How should I organise classes for a space simulator?
Posted
by
Peteyslatts
on Game Development
See other posts from Game Development
or by Peteyslatts
Published on 2012-12-08T07:09:15Z
Indexed on
2012/12/08
17:22 UTC
Read the original article
Hit count: 274
XNA
|architecture
I have pretty much taught myself everything I know about programming, so while I know how to teach myself (books, internet and reading API's), I'm finding that there hasn't been a whole lot in the way of good programming.
I am finishing up learning the basics of XNA and I want to create a space simulator to test my knowledge. This isn't a full scale simulator, but just something that covers everything I learned. It's also going to be modular so I can build on it, after I get the basics down. One of the early features I want to implement is AI. And I want to take this into account as I'm designing my classes so I can minimize rewriting code.
So my question: How should I design ship classes so that both the player and AI can use them?
The only idea I have so far is:
Create a ship class that contains stats, models, textures, collision data etc. The player and AI would then have the data for position, rotation, health, etc and would base their status off of the ship stats.
© Game Development or respective owner