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!
game design
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 ^^
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 ^^
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.
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
If you want modern rendering techniques learn how to make them or go to the engine next door =p
-
- Posts: 157
- Joined: Tue Mar 20, 2007 8:30 am
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
Tell me what you cherish most. Give me the pleasure of taking it away.
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!
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!
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