[WIP]RGE (Revolution Game Engine)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

[WIP]RGE (Revolution Game Engine)

Post by jojojoris »

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: Select all

#include <pspkernel.h>
#include <pspdebug.h>
#include <stdio.h>

#include "../RGE/Rgame.h"

/* Define the module info section */
PSP_MODULE_INFO&#40;"template", 0, 1, 1&#41;;

/* Define the main thread's attribute value &#40;optional&#41; */
PSP_MAIN_THREAD_ATTR&#40;THREAD_ATTR_USER | THREAD_ATTR_VFPU&#41;;

class Robject_1 &#58;public Robject &#123;
public&#58;
	Robject_1&#40;&#41;&#58;Robject&#40;&#41; &#123;&#125;
	bool goup;
	void Create&#40;&#41;&#123;
		goup=1;
	&#125;
	void Step&#40;&#41;&#123;
		if &#40;goup&#41; y+=5;
		else y-=5;
		if &#40;y<0&#41; goup=1;
		if &#40;y>200&#41; goup=0;
	&#125;
&#125;;

class Robject_2 &#58;public Robject &#123;
public&#58;
	Robject_2&#40;&#41;&#58;Robject&#40;&#41; &#123;&#125;
	bool goup;
	void Create&#40;&#41;&#123;
		goup=1;
	&#125;
	void Step&#40;&#41;&#123;
		if &#40;goup&#41; x+=5;
		else x-=5;
		if &#40;x<0&#41; goup=1;
		if &#40;x>200&#41; goup=0;
	&#125;
&#125;;

int main&#40;int argc, char *argv&#91;&#93;&#41;
&#123;
	pspDebugScreenInit&#40;&#41;;
	pspDebugScreenPrintf&#40;"start test\n"&#41;;

	Rgame* game=new Rgame;

	Robject_1* obj1=new Robject_1;
	Robject_2* obj2=new Robject_2;
	Robject* obj3=new Robject;
	game->addObject&#40;obj1&#41;;
	game->addObject&#40;obj2&#41;;
	game->addObject&#40;obj3&#41;;

	game->enableVsync&#40;&#41;;

	game->run&#40;&#41;;

	delete obj1;
	delete obj2;
	delete obj3;


	return 0;
&#125;
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: Select all

int main&#40;&#41;&#123;
     SetupCallbacks&#40;&#41;;
     makeNiceGame&#40;&#41;;
     sceKernelExitGame&#40;&#41;;
&#125;
Post Reply