designing a big game

  ... tutorials on how to use AndEngine.

designing a big game

Postby milerk » Sun Mar 04, 2012 8:54 am

hi guys, i need some help or advices,
whenever i create a game, especially bigger ones like some tiled RPGs with monsters, levels, equipments, tasks
after like a thousand or two lines of code i got a feeling that im lost in that project, code looks ugly
something doesnt work and fixing stuff takes ultra long time or even game crashes or has low performance etc.
these problems usually annoy me so hard and make me wanna delete this project, and start another one

can someone tell me how to visually design game on paper, cause i dont know where to make different threads,
how often should i update stuff or create main-loop, or use handlers instead :?: :?:
milerk
 
Posts: 1
Joined: Sat Mar 03, 2012 11:44 pm

Re: designing a big game

Postby onerain88 » Sun Mar 04, 2012 2:30 pm

Hi,guy! I have no much experience for developing games!
But if I develop a RPG game, I will do as follow:

1.I will design some kinds of class, as Sprite(or AnimatedSprite), Status(or Scene), Util etc.
2.I will design as the mode of Status Machine! Resources load, game running, pausing and restart are status of the game, different status to different operation!
3.I will design some "Manager", as TaskManager, EquipmentManeger etc. Status of game will trigger, and the managers will response.
4.Divide your logic and performance!

I hope to help you, but my English is bad!
Good luck!
onerain88
 
Posts: 8
Joined: Mon Feb 06, 2012 6:12 am

Re: designing a big game

Postby rizzythedon » Fri Mar 09, 2012 2:56 am

Am making games with lots of code, and they way i do it is having one game loop and then each object has its own update this way the main loop does not need to update it and also the object checks of collision itself via a ArrayList that u can pass to it our if you have one player then no looping is need, this way it gives performance and less code, you must not code in activity you load stuff in this makes it mess, load everything in BaseGAmeActivity and make a scene system and have one screen for gameplay and pass the BaseGAmeActivity in all of ur scenes to use the textures :)! good luck
Games with AndEngine:
## Flop Ball [new]
## Tiny Elite Commando
## Copter
and more... click link and play
Market Link: https://market.android.com/developer?pub=Fihox
rizzythedon
 
Posts: 85
Joined: Thu Dec 22, 2011 2:45 am

Re: designing a big game

Postby pourquoipas » Wed Mar 21, 2012 6:39 pm

Sorry for late reply (and for poor english).
I'm triyng just in this day, to use an EntitySystem for large game development (ok, i'm planning to use it in a small game, but just something like RPG).
I'm testing Artemis and using AndEngine as graphic engine for now.

the Component entity systems architecture is a little different for my way to think at software.
No big classes but small components
big separation between data and logic
great also for team development because every system have to manage only his part of logic.

here's a link to a good article about entity systems: http://t-machine.org/index.php/2007/09/ ... nt-part-1/
here's the link to Artemis framework (small, fast and good): http://www.gamadu.com/artemis/

The only think, i have separated the business logic (all business systems) who are running in a separate game thread, and the rendering system (called on Scene onUpdate) so this systems are synchronized with a mutex object to avoid problems (IE: the expire system can remove an object just when the render system is about to process it, and this result in some error).

For me it's a bit hard to start thinking to entity, components and objects instead of usual way like, mobile class, monster class, player class, bullet class and so on.
But the first result seems to be good and the way you can use component to add behaviours to your system is really simple and useful.
(i don't have even a playable demo for now, just expect to have the basic components ad some simple system to create some a simple playable demo app).
pourquoipas
 
Posts: 6
Joined: Fri Dec 17, 2010 3:01 pm


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 21 guests