Game Editor SDK Updated 8 / 25 / 09

Ideas for Game Editor evolution.

Game Editor SDK Updated 8 / 25 / 09

Postby Hblade » Wed Jul 22, 2009 9:32 pm

Game Editor SDK


Features:
Movement perfection, which prevents the character from going off the screen using the keys,
Playtime function, a perfect playtime function
Advanced FPS Viewer, Views the current FPS (Updated every second), and the highest FPS you reached
Gravity - A shorter way of yvelocity



7 / 27 / 09
StartHP - Starts the HP, you set an ammount
StartMP - Starts the MP, you set an ammount
AddHP - Adds HP by ammount
AddMP =- adds MP by ammount
DecreseHP - Decreses HP by ammount
DecreseMP - Decreses MP by ammount
ShowHP - Shows current and max HP
ShowMP - Shows current and max MP
ShowStats - Shows stats, attack def, mag, and speed
ShowLevel - Shows level and EXP

8 / 25 / 09
strech - Scales an image

need anything added?
Tell me what you would like me to add in this SDK , and I'll see what I can do


Will more versions of this SDK come?
yes,I will make more versions of this SDK and enhance it so that Game Editor becomes even more easier and faster to use


What is this SDK for?
This SDK is for anyone who dosnt like typing a ton of code to get what they want, I take codes and compact them to 1 function, so far I made these codes but I'm willing to make more


Code: Select all
int UP = 0;
int DOWN = 1;
int LEFT = 2;
int RIGHT = 3;
int sec;
int minutes;
int hours;
int tempcount;
int tempdetectfps;
int setfps;
float framecount;
int levelrepeat;
int HP;
int MP;
int attack;
int def;
int mag;
int spd;
int level;
int experience;
int currenthp;
int currentmp;
int scale;
void CharMov(int chardirection, int speed)
{
    char *key=GetKeyState();
 
 
    if (key[KEY_UP] == 1 && chardirection == 0)
    {
        if (yscreen>0)
        {
            y = y - speed;
        }
    }
    if (key[KEY_DOWN] == 1 && chardirection == 1)
    {
        if (yscreen<view.height)
        {
            y = y + speed;
        }
    }
     if (key[KEY_LEFT] == 1 && chardirection == 2)
     {
         if (xscreen>0)
        {
            x = x - speed;
        }
     }
     if (key[KEY_RIGHT] == 1 && chardirection == 3)
     {
         if (xscreen<view.width)
        {
            x = x + speed;
        }
     }
}



void Playtime()
{
    if (tempdetectfps == 0)
    {
        setfps = real_fps;
        tempdetectfps = 1;
    }
    if (real_fps>setfps)
    {
        setfps = real_fps;
    }
    sprintf(text, "%d:%d:%d", hours, minutes, sec);
    framecount = framecount + 1;
    if (framecount >= setfps)
    {
        sec = sec + 1;
        framecount = 0;
    }
    if (sec == 60)
    {
        minutes = minutes + 1;
        sec = 0;
    }
    if (minutes == 60)
    {
        hours = hours + 1;
        minutes = 0;
    }
}
void ShowFPS()
{
    if (tempdetectfps == 0)
    {
        setfps = real_fps;
        tempdetectfps = 1;
    }
    if (real_fps>setfps)
    {
        setfps = real_fps;
    }
    tempcount = tempcount + 1;
    if (tempcount >= setfps)
    {
        sprintf(text, "Current FPS: %d Highest FPS: %d", real_fps, setfps);
        tempcount = 0;
    }
}
void Gravity(double gravity)
{
    yvelocity = yvelocity + gravity;
}
void StartHP(int ammount)
{
    HP = ammount;
    currenthp = HP;
}
void DecreseHP(int ammount)
{
    if (currenthp<0)
    {
        currenthp = 0;
    }
    currenthp = currenthp - ammount;
}void AddHP(int ammount)
{
    if (currenthp>HP)
    {
        currenthp = HP;
    }
    currenthp = currenthp + ammount;
}
void ShowHP()
{
    sprintf(text, "HP \n%d / %d", currenthp, HP);
    if (currenthp<0)
    {
        currenthp = 0;
    }
    if (currenthp>HP)
    {
        currenthp = HP;
    }
}
void ShowStats()
{
    sprintf(text, "Attack: %d \nDefense: %d \nMagic: %d \nSpeed: %d \n", attack, def, mag, spd);
}
void ShowLevel()
{
    sprintf(text, "Level: %d \nEXP: %d", level, experience);
}
void ShowMP()
{
    sprintf(text, "MP \n%d / %d", currentmp, MP);
    if (currentmp<0)
    {
        currentmp = 0;
    }
    if (currentmp>MP)
    {
        currentmp = MP;
    }
}
void StartMP(int ammount)
{
    MP = ammount;
    currentmp = MP;
}
void AddMP(int ammount)
{
    currentmp = currentmp + ammount;
}
void DecreseMP(int ammount)
{
    currentmp = currentmp - ammount;
}
void stretch(char *actor, int xx, int yy, int percent)
{
       draw_from(actor, xx, yy, percent);
}



How to use

CharMov(Direction, speed), Directions are UP DOWN LEFT and RIGHT, can be used in Key inputs, or Draw Actor

Playtime(), create a text actor and put this in Draw Actor

ShowFPS(), shows the FPS, current and max reached FPS, make a text actor and put this in draw actor

Gravity(gravity), gives the character a gravity, the higher the number the faster the gravity is, put this in draw actor

StartHP(ammount), place this in Create Actor, sets the stating HP

StartMP(ammount), place this in Create Actor, sets the stating MP

AddHP(ammoun), adds HP for potions, etc...

AddMP(ammount)Adds MP for ethers, etc...

DecreseHP(ammount), Decreses the HP for attacks, etc...

DecreseMP(ammount), Decreses the MP for magic, etc...

ShowHP(), Shows HP, current and Max, put this in draw actor

ShowMP(), Shows MP, current and Max, put this in Draw Actor

ShowStats(), Shows Stats, attack, defense, magic, and speed, put this in Draw Actor

ShowLevel(), Show's Level and EXP, put this in Draw Actor

stretch("actor name", x, y, scale), Use this inside of a canvas in Draw Actor



Some of these have to be text actors


How to use Stats for more then 1 character


You will see the variabels in the global code called int HP, and stuff like that, just turn those variables into actor variables, and delete the INT's, make sure you dont delete an INT you didnt make into an actor variable
Attachments
Game Editor SDK 8 25 09.zip
(3.47 KiB) Downloaded 159 times
Last edited by Hblade on Wed Aug 26, 2009 2:04 pm, edited 5 times in total.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Game Editor SDK

Postby Djermegandre » Mon Jul 27, 2009 12:57 am

I think this is a good idea, especially for those people (like myself) who get lost when there's too much code going on. :D

Personally, I think there should be an easier way to implement health and other stats like that, for action/platformers, RPG's and such. I also wonder if it would be possible to just implement a function or something like that for attack damage?
So, what goes here?
User avatar
Djermegandre
 
Posts: 4
Joined: Sat Jul 25, 2009 3:07 pm
Score: 1 Give a positive score

Re: Game Editor SDK

Postby Hblade » Mon Jul 27, 2009 4:21 pm

Alright! I'll start making an easier way to use Stats, such as HP, MP, Attack def, agility, speed, or w / e you wanna call it
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Game Editor SDK Updated 7 / 27 / 09

Postby OmniArts » Fri Aug 21, 2009 3:20 pm

I'm not sure whether u can or not..
But how about an auto stretch feature for the resolution?

Would make it more compatible on newer mobile devices supporting many different resolutions!
User avatar
OmniArts
 
Posts: 134
Joined: Sat May 30, 2009 2:30 am
Location: Sydney
Score: 16 Give a positive score

Re: Game Editor SDK Updated 7 / 27 / 09

Postby Hblade » Fri Aug 21, 2009 4:20 pm

You know, you can do that all by using a canvas, simply use draw_from and select your actors :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Game Editor SDK Updated 7 / 27 / 09

Postby makslane » Fri Aug 21, 2009 4:44 pm

A game thats can run in any device regardless the screen resolution is in my plans.
The problem is the speed to make this possbile.
A solution is use the OpenglES API (there are code into engine with almost done OpenGL support), but only works at good speed if the hardware of the device have support for Opengl ES. The software render is not good enought.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Game Editor SDK Updated 7 / 27 / 09

Postby Hblade » Fri Aug 21, 2009 4:49 pm

Have you tried Direct3D? or DirectX? Every card today has atleast directx 9, and that supports a ton of things! You dont always need directx for 3D, allot of applications that are in 2D support directX
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Game Editor SDK Updated 7 / 27 / 09

Postby makslane » Fri Aug 21, 2009 7:13 pm

Remember Game Editor games runs in devices thats doesn't have DirectX!
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Game Editor SDK Updated 7 / 27 / 09

Postby Hblade » Tue Aug 25, 2009 5:30 pm

Oh yeah/// hmm. wow your in one heck of a twist huh... Hmm, O.o Well uh you could try open GL I guess maybe it'll work without lag... >.>
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Game Editor SDK Updated 8 / 25 / 09

Postby makslane » Wed Aug 26, 2009 3:09 pm

OpenGL will works good only if the device have a hardware accelerator.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Game Editor SDK Updated 8 / 25 / 09

Postby Hblade » Wed Aug 26, 2009 4:00 pm

Hmm, really though, looks like you have no other choice
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Game Editor SDK Updated 8 / 25 / 09

Postby OmniArts » Sun Aug 30, 2009 12:54 am

It is said that Windows Mobile 7 will have support for OpenglES, tho there are few WinMo Devices already with the support. One being Sony Xperia.
I'm beginning testing on devices in a few days to find out exactly what the specs for my games are on mobile.. my guess is you'll need the best devices currently available!

Man I cant wait for Windows Mobile 7, will make a Dev's life a lot easier :)
User avatar
OmniArts
 
Posts: 134
Joined: Sat May 30, 2009 2:30 am
Location: Sydney
Score: 16 Give a positive score

Re: Game Editor SDK Updated 8 / 25 / 09

Postby Hblade » Wed Sep 02, 2009 1:51 pm

Sweet :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest