|Think about Loose Coupling|
Scripting for Video Gamesby Dragonfly (Priest)
|on Sep 23, 2003 at 20:25 UTC||Need Help??|
Dragonfly has asked for the
wisdom of the Perl Monks concerning the following question:
Anybody have any experience trying to use Perl as a kind of "scripting engine overlay", that could be used to send and receive text into say a 3D online video game?
I'm not too ashamed to admit that I sometimes use Windows and I found a fun 3D MMORPG recently that allows you to send keystrokes to the application that make your avatar "emote" different moves. For instance, to make your avatar smile, you just preface the command "smile" with a single quote.
I'd basically like to see if I can run Perl as a daemon on Windows and have it wait for certain function keys, and perhaps make some more complex loops so I could, for instance, type another character's name into the command, and it would incorporate that into a little song + dance routine. (Maybe find an automatic rhyme generator? heh.)
If I can get this to work, it'd open up a whole new realm of possibilities for my character - some people have suggested I use commercial macros packages instead, but I think this way would be far more rewarding (and hopefully I'd learn enough about Win32 Perl that I could use the knowledge in the future to automate my other apps.)
I've seen a few other avatars using the macros apps and they're frankly kind of limited in what they can accomplish.
I know I'll have to work with the Win32::OLE automation stuff probably, I was just hoping perhaps some of you would have had experience with this and could give me a jump start.
I have worked with Expect a while back to script a few routines for a MUD, but this is a totally different ball o' wax I think.
- Mark Beihoffer, Network Architect (and video gamer evidently.)