Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mike

I could use some help implementing a Quake-like console...

This topic is 6855 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

Advertisement
if you don't want to handle the parsing yourself (which can be a huge pain), you can instead use Microsoft's JavaScript thing, which is available free. the address is http://msdn.microsoft.com/scripting/, on the left click on script control, then click documentation on the tree under script control, then click on Windows Script Interfaces on the right. you can also use an ActiveX control if the interfaces are too complicated

------------------
http://members.xoom.com/mutex0

Share this post


Link to post
Share on other sites
I would like to use a Quake-like console in my next game project and I've got some general questions about how one would create such a thing. I've not tried to code it yet, but here is how I've thought about doing it:

-Create a struct that contains two pieces of data; a pointer to a global variable, and a string representation of the variable.

-Create a struct as described above for each global variable, and stick them all into a binary tree.

-Create a Console class to hold the binary tree and handle the string parsing code.

My goal is to have it so that one could bring down the console and type the following:

SET SPEED 20

The console would then (upon reciveing the enter key) parse the string and call something like Set( "SPEED", 20 ); I'm primaryly conserned with using the console to alter global variables durring runtime. Do I have the right idea, or am I going the wronge direction?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!