Game Design Patterns
Game Design Patterns
This isn't particular to irrlicht, but to overall game development. I'm wondering if anyone has run across good/useful game design patterns/framworks/best practices for developing games in general, and for Irrlicht in particular.
Patterns are by definition suitable for any application.
The usefulness of every pattern depends on your design. You may probably be interested in Abstact Factory if you plan to switch the type of a set of things (like maze - magic maze - forest maze - ...), while you may prefer Strategy Pattern for game states, Observer for any triggered comunication, or may use Singleton for every manager, etc.
I wouldn't recommend using them just because they're cool. Use them if need them, do not the design your system to fit any of them, but use patterns to bring your design to life. So, first, think which's the problem you want to solve, then check if any of the patterns is useful to solve it.
The usefulness of every pattern depends on your design. You may probably be interested in Abstact Factory if you plan to switch the type of a set of things (like maze - magic maze - forest maze - ...), while you may prefer Strategy Pattern for game states, Observer for any triggered comunication, or may use Singleton for every manager, etc.
I wouldn't recommend using them just because they're cool. Use them if need them, do not the design your system to fit any of them, but use patterns to bring your design to life. So, first, think which's the problem you want to solve, then check if any of the patterns is useful to solve it.
Warchief's Warboard 3D Now hotseat release
A big mistake in game development is trying to make a generalized game engine, rather than a specialized one. I read an article on gamesutra about using the Model/View/Controller pattern in game development. After playing around with it, it seemed like a very nice way to controlling it. Especially the part about controllers only providing information when asked, and doesn't actually change the game-state manually.
Scene node animators are good for keeping scene nodes locked to their game object counterparts, without coupling the game object to the graphical part of the game.
Not really a design pattern, but I thought it might be useful info.
Scene node animators are good for keeping scene nodes locked to their game object counterparts, without coupling the game object to the graphical part of the game.
Not really a design pattern, but I thought it might be useful info.
I find when I write a new Irrlicht game/app I start straight away with a basic class framework that I can easily add to or upgrade later.
This makes making a game easier and if you get a layout like this that you prefer it can help give you a starting point as to what to do next.
The main file looks something like this:
edit see here for an example:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=18649
This makes making a game easier and if you get a layout like this that you prefer it can help give you a starting point as to what to do next.
The main file looks something like this:
Code: Select all
#include "MainHeader.h"
int main()
{
CEngine* engine = new CEngine(/* config data if you want */)
engine->run();
}
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=18649
pushpork