reporting 3D positional coordinates from game engine to other apps?

Started by
1 comment, last by formant 18 years ago
I'm currently working on a project using "Machinimation" (filmmaking software that runs on the Quake3 Game Engine), and "Max/MSP" - an object-oriented graphic programming environment for real-time sound synthesis and processing (among other things). I'm basically trying to create a 3D virtual interactive sound installation. In order to link the two programs, I need to continuously feed Max/MSP the user/s positional coordinates from within a Quake map (or a map running on another engine). So, does anyone know how to access coordinate data from whithin the Quake3(or any other 3D game engine) and export it (i.e. perpetually write that information to an .xml file - this would be the easiest for me)? If not, might there be a committed slot of RAM where this information resides? I'm not a game programmer, as you can tell. If I know where this information is, I should be able to design a way for Max/MSP to access it. Any help would be GREATLY appreciated. I'm stuck, and can't go any farther with my project until I figure this out. Thanks, Zach
Advertisement
Zach,

The Quake3 source code is available for download from ID Software. It includes build scripts and project files necessary to create your own binary. Once you've done this you can just copy your built binaries into the installation directory of Quake3 in order to run your own binaries.

Now, open up the project and either search through the main game loop or do a "find" on where the engine is detecting keyboard input. Once you find it, follow the logic to where it sets character position based on keyboard presses. Once you find it, you can trap the behavior by inserting your own code into the function that sets the character position. It might be, in the unfortunate case, that ID sets character position in multiple places using public variables rather than mutators. If that's the case, you'll have to write your own function for setting character position and then find/replace all instances where they change the position variables with your own functions.

Make your changes, compile, and run....with your changes you can serialize positions to an .xml file, or even send it to an open socket for other application to stream in - the sky's the limit at this point.

Cheers and good luck!
Jeromy Walsh
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints
Thank you Jeremy! I'll check this out.

This topic is closed to new replies.

Advertisement