in reply to Game Events and Scripting
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:
my $ticks = 0; while (1) { $_->update($ticks) foreach (@objects); $screen->draw(@objects); $ticks++; }
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Game Events and Scripting
by bladx (Chaplain) on Jun 15, 2007 at 23:11 UTC |