game design

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

game design

Post by JonLT »

Hi!
I've come up with an idear for a little game, and i'd like to begin coding. But I'm a little stuck on the structure of it all.
I guess i could just begin writing some stuff, but I don't think I'd go very far before I'd have to remake the most of it because of something i didn't think of.
So I ask for advice. How would you design the game code? Some base class with the irrlicht device that every other class is derived from? Interfaces? Where do I put the event receiver or the main loop. What about directory structure? Is there a good template out there I could use. What are your experiences?
Thanks!
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

That is so vague mate... I meant a MUD is different from a shoot-them-up from a card game from a mmo from a platform from a puzzle, etc.

To each his own approach. Start by planning out EVERYTHING in your game (and I really mean everything. Yes it will change on the way, but at least you'll be pretty sure where you're going, which is crucial).

Then, from there, I (as me)'d go by creating all the base classes needed. From there on I'd go hunting for libs and code which I'll need, then link it and plug it in, make sure it works and is compatible with the rest. Then implement feature after feature, testing it on the way, making it as modular as you can, adding plenty of comments. From there, if you made it this far, you're actually having good chances of finishing your project, congratz. Make sure all the features you want are in and working properly, weed out as many bug as you can, add extra feature, repeat until you tire of it. There you go, your project is finished. Hope you've thought of a name, a way to license and distribute and got all the media you need ^^
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

I find coding prototypes then combining them easier than detailed forward planning, i think this style is called unit testing.

As for templates, irrwizard is very good in terms of framework design.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
olivehehe_03
Posts: 157
Joined: Tue Mar 20, 2007 8:30 am

Post by olivehehe_03 »

As far as development approaches go, I'd say that I use prototyping. That is I code something, see how it works, then either fix it and try again or code the next thing. As for structure, I have one .cpp file and one .h file at the moment, int main() is in the .cpp and all my classes are in the .h. I don't use many comments, but all my code is properly formatted. And being able to collapse functions and classes in my IDE is cool too :D
Tell me what you cherish most. Give me the pleasure of taking it away.
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

Thanks for the replies! :)
I've realized that this thing gets easier and easier the more i develop my game idear. The more structured i get the idear, the more i feel like that i'm on top of things. I guess im not a prototyper, I very easily get lost in my own code, and I need to know what I'm coding when I'm coding it.
So my advice (to my self) would be like Dorth said plan out EVERYTHING!Not that I have done that but I can already feel the advantage.

Thanks!
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

i cant plan everything, i just sit and programm.. i know its bad :P but things dont go as bad as you think. my project codename zulu has pretty good structure (at least i think so). check out solution screenshot
Image
its pretty basic and quite neat :)
dejai
Posts: 522
Joined: Sat Apr 21, 2007 9:00 am

Post by dejai »

You could always download a video tutorial on game making I have one. I think if you type..... VIdeo game tutorial C++ you will get some good results
Programming Blog: http://www.uberwolf.com
Post Reply