Sign in to follow this  

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

This topic is 4244 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

This topic is 4244 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this