Perl: the Markov chain saw | |
PerlMonks |
Re: Game Events and Scriptingby samtregar (Abbot) |
on Jun 15, 2007 at 22:08 UTC ( [id://621532]=note: print w/replies, xml ) | Need Help?? |
There are many good books about game/simulation design, although most are going to show their examples in other languages. I recommend you pick one up anyway - the concepts will be highly portable and it definitely looks like you need to do some research before starting this project!
On the other hand, maybe all you need is a hint. Here's one - most simulations use a global loop which increments every object once per pass and then updates the screen with the results. Something like:
Each object is responsible for updating its state and exposes some kind of standard interface used by $screen to do the output (x, y, color, texture, etc). I don't know why you'd bother with XML and log files, but you could consider outputting them similar to re-drawing the screen. -sam
In Section
Seekers of Perl Wisdom
|
|