python - How to make RTS units -


i want make units fight in space try out stuff need print whats going on , results. i'm planing on loading each unit separate file or similar (units modifiable think should better way, no need keep each unit stats instancing). i'm not sure how load units. question broad? link similar helpfull couldn't find anything

there bunch of different ways of handling this, depending on trying save , how want use it.

if want save basic unit-type stats can modified, plain-text file or csv file work nicely. (if have copy of game alpha centauri, @ faction definition files - should give lots of ideas!).

for ultimate in flexibility, save units python source-files , import needed. "flexibility" can make debugging nasty. half-way step definite own 'unit definition language'

you use cpickle if want save , reload units, not edit them; might useful savegames.

for graphics or 3d models, lot of game engines (panda, pyogre, etc) have binary-format support built in.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -