Page 1 of 1

Game Structure and Libraries

Posted: Sun Nov 30, 2008 2:00 am
by dejai
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.

Re: Game Structure and Libraries

Posted: Sun Nov 30, 2008 12:35 pm
by avansc
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.
Image

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.

Re: Game Structure and Libraries

Posted: Tue Dec 02, 2008 8:11 pm
by MarauderIIC
hijack: What program do you use to make your class diagrams, avansc?

Re: Game Structure and Libraries

Posted: Tue Dec 02, 2008 9:28 pm
by avansc
MarauderIIC wrote:hijack: What program do you use to make your class diagrams, avansc?
hijack???

anyways. to be honest i dont really have a program. and i dont really following somthing like UML style specifically.
there are a bunch that are nice i guess. i know eclipse has an inbuilt one that nice. there is classdraw.

i mostly make doodles onpaper.

Re: Game Structure and Libraries

Posted: Tue Dec 02, 2008 9:44 pm
by MarauderIIC
hijack as in thread going off on a tangent. I was asking because the thing in that sshot looks usable =p

Re: Game Structure and Libraries

Posted: Tue Dec 02, 2008 9:54 pm
by avansc
MarauderIIC wrote:hijack as in thread going off on a tangent. I was asking because the thing in that sshot looks usable =p
oh im pretty sure thats iether eclipses or netbeans, i kinda just snaged a shot online.

this is your best bet on finding something free thats good.

http://en.wikipedia.org/wiki/List_of_UML_tools

actually, thats a project i wouldn't mind taking on. i mean making software that could make class digrams. but i think i would charge for it if i was going to put some effort into it. maybe something like $9.99.

i was a much more proficient programmer in my younger days (probably because i could sit and program 12 hours a day due to lack of other responsibilities)
and when i was 17 i spend about 2 months of solid programming, and made an administration suite for a goldsmith and got paid 2000 bucks(was not worth it because i ended up supporting it for a year on my own, then i came to the states, but didnt get a dime for the suport). was the first time i got paid for programming.

if the competition wasent so fierce i would start my own company and try and make a living that way.