Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

Thanks!

- Mark Beihoffer, Network Architect (and video gamer evidently.)


In reply to Scripting for Video Games by Dragonfly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-25 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found