forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[WIP]RGE (Revolution Game Engine)

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Mon Apr 13, 2009 11:30 pm    Post subject: [WIP]RGE (Revolution Game Engine) Reply with quote

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();
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group