|laziness, impatience, and hubris|
Game Events and Scriptingby bladx (Chaplain)
|on Jun 15, 2007 at 20:34 UTC||Need Help??|
bladx has asked for the
wisdom of the Perl Monks concerning the following question:
Edit: I think I might try going with Java for this. I was hoping to use Perl somehow, but I can't seem to find a way to have graphical output work with Flash (because of the limits,) and I don't know of any other way to dynamically show graphical output in a web browser other than with a Java applet.
So, unless there is another way to display graphics in a browser (not just output a jpg/png, etc.) I'll just try to get started with Java. (Please let me know if there is another way, as far as the graphical output in a browser goes...) Thanks for the input!
(original post below)
Background:This is a fairly general question about game scripting. I am creating a project in Perl (just for fun,) that is a simple game world/environment.
Question:The part I am stuck at as far as planning this project out is... the events part. This game is actually going to just be a simulation... no user input really, just something being played out on the eventual screen.
So with Perl, what I'm thinking would work (in my head,) so far is... run the game/simulation (in a Perl script,) and have each event that happens (say, a character walks across the screen...) logged as an event entry and then outputted into some file in some type of format (like XML.)
But as far as events go... does this sound like a reasonable way to make a simulation/game? The problem comes when there are multiple characters on screen. With multiple events going on per character on screen, would I just have to alternate logging events per character? That sounds confusing maybe. But I mean, how to I simultaneously log information about events that are going on in the game/simulation?