Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Game Events and Scripting

by bladx (Chaplain)
on Jun 15, 2007 at 22:13 UTC ( #621533=note: print w/ replies, xml ) Need Help??


in reply to Re: Game Events and Scripting
in thread Game Events and Scripting

Thanks for the idea about Perl/Tk and NetLogo.

The thing is... if this was just for a regular encapsulated simuation program, I would have used C++, I think. And that's what I was planning to do last year.

But I'm trying to approach this type of program from another angle now. My idea is (and it's not original,) that I have a MySQL database that holds all my program's environment variables, character variables, etc. I would be using Perl just to run the simulation (but with no graphical output using the Perl script itself.) The simulation is only run once a day for a fixed length of time.

The simulation would then output all that has happened in this program's world, events, etc. into a XML or other data type of file. Then, this is read into another Perl script that converts the actions that took place into a flash movie using SWF/Ming. The movie is exported, saved, and then I can view all that took place in a web browser.

I don't like Flash, but after looking at Java/applets for doing real graphics programming viewable in web browsers... it seems like the majority of the internet world is using Flash for graphics lately. SO, SWF/Ming looks like what I would need. The only thing is, confining a regular programming language (like Perl) with Flash/Actionscript, one can only do so much.

The reason I would even use Perl is just because of its availability on the server where I'm running all of this.

The point is, it doesn't matter how fast the simulation runs because it's only generated a specific times and then outputted to a .swf file that takes care of the rest. But maybe this all isn't very possible... though it's something I'd like to try.


Comment on Re^2: Game Events and Scripting
Re^3: Game Events and Scripting
by john_oshea (Priest) on Jun 16, 2007 at 14:55 UTC

    You may be able to cut one step out of your proposed process by having the .swf read your xml directly. There are a lot of pointers to this on the Macromedia^wAdobe site - here's a link to a slightly less Flash-heavy page just for the heck of it.

    Not strictly Perl, but possibly worth knowing about anyway - hope that helps.

      Thanks for the reference info on reading from XML in Flash! I haven't used Flash all that much so I'm unfortunately learning what it's potential advantages and disadvantages are as far as scripting. Yeah, that extra step might seem unnecessary, (and normally it probably would be,) but the thing is, I am trying to break up the .swf files into unique files so that they can be organized by date in the future. Instead of having one huge file... because this is a simulation that would go on for a while if it even got off the ground.
      But, I guess another problem is... according to at least one reference, the limit of objects a flash file can have is about 200. I don't know if that's true for the latest versions of Flash or not. But I guess the point is... maybe I need to be looking into another way to do the graphics. I didn't like the limitations of Flash in the first place... but I wanted to have an excuse to use Perl to learn some new (for myself,) fields of programming.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://621533]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-10-31 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (217 votes), past polls