jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Mon Apr 13, 2009 11:30 pm Post subject: [WIP]RGE (Revolution Game Engine) |
|
|
Hello everyone,
I am inventing a game engine which you can use to make games the "GameMaker" way.
You define sprites
You define objects
You link sprites with objects
You put code in your objects
You put objects in a game/room
A simple game (actually this is not a game) can be:
| Code: | #include <pspkernel.h>
#include <pspdebug.h>
#include <stdio.h>
#include "../RGE/Rgame.h"
/* Define the module info section */
PSP_MODULE_INFO("template", 0, 1, 1);
/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
class Robject_1 :public Robject {
public:
Robject_1():Robject() {}
bool goup;
void Create(){
goup=1;
}
void Step(){
if (goup) y+=5;
else y-=5;
if (y<0) goup=1;
if (y>200) goup=0;
}
};
class Robject_2 :public Robject {
public:
Robject_2():Robject() {}
bool goup;
void Create(){
goup=1;
}
void Step(){
if (goup) x+=5;
else x-=5;
if (x<0) goup=1;
if (x>200) goup=0;
}
};
int main(int argc, char *argv[])
{
pspDebugScreenInit();
pspDebugScreenPrintf("start test\n");
Rgame* game=new Rgame;
Robject_1* obj1=new Robject_1;
Robject_2* obj2=new Robject_2;
Robject* obj3=new Robject;
game->addObject(obj1);
game->addObject(obj2);
game->addObject(obj3);
game->enableVsync();
game->run();
delete obj1;
delete obj2;
delete obj3;
return 0;
} |
If you like this way of making games say it (it will motivate me to go on with this project).
If you know a suggestion post it also. _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|