dejai wrote:Hello I have a bit of a newbie question for today but please bare with me. I would like to know how you structure your library and game, I cannot think of any other way of putting it. I am just interested if there is any certain framework that you have applied to your game and library. (Please note I am referring to the game framework as a separate issue from the library. ) If this has already been answered sorry and if its unclear its due to my lack of knowledge in the area thus the question.
im not exactly sure what you want to know but i will do my best to give a good answer.
okay. first advice i can give you is to plan, plan, plan. i hate doing things twice, so planning helps alot.
this is my methodology to designing a game, by now means is it the best and its not scalable. its just how i like doing things.
it all depends on how big you want the game to be. i have never made a game that had a story or major levels and so on, thats something i thin Falco and them can help you on beter.
when i start a project i outline what i want the game to do. ie, will it have sound, graphics, input, etc.
then i start drawing class diagrams of each of the things i want, i usually just have graphics, physics, objects, and IO. so i make diagrams of how i think they will be able to interact with each other.
this is just an example.
next i prototype all my classes, but hold off on the functions.
i usually go with a singleton design pattern, ie, there is just one occurrence of a graphics object that handels all the graphics and so on.
i would highly reccomend studying up on design patterns
http://en.wikipedia.org/wiki/Design_pat ... r_science)
then its just a matter of making sure your physics class can handle you objects, and that your graphics class can handle your objects and so on.
i usually end it off by making a "game" class, that encompass' ever thing, and its usually a FSM (finite state maching).
im not sure if i answered your question, but please feel free to ask me any question.
on a last note, i tend to stay away from libraries out there. ie, graphics libraries and so on.
there are pros and cons to this.
pros:
i have complete control over every thing.
i get a better understanding of game development,
cons:
its gonna be slower that a good library most likely. (i dont like making 3d games so i dont worry about that, you need good artist to make 3d games look good, 2D games is where the indy scene should be. i would much rather 2D, non linear game, than lets say HL2)
development time is longer.
not as flexible.
not as many features unless you put them in.