Jump to content
  • Advertisement

Archived

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

imr1984

console binds

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

ok ive implemented a fairly advanced quake like console. The engine supports mods through the use of 1 dll, and from that dll you can call something like: exe.conAddProc("+forward", &Cmd_ForwardDown); exe.conAddProc("-forward", &Cmd_ForwardUp); so that when the key that is bound to +forward, is pushed down, Cmd_ForwardDown is called by the console, and when that key is released, Cmd_ForwardUp is called. Its all very logical, and i like it because it looks like how quake3 does it, but its a hell of a lot of code to set up the function callbacks. For example that would have to be done 4 times for forward, back, left and right etc as well as setting up booleans. Can anyone think of a better way? How does quake2/3 do it? Id prefer to keep my system of a key being bound to a command line, which is then passed for procs / cvars.

Share this post


Link to post
Share on other sites
Advertisement
You can download the source for quake1 and quake2 legally, so I''d suggest you start there. You can also download the SDK for quake 3 and half-life, which probably contains the code for the console handling.

Share this post


Link to post
Share on other sites
There are probably many tutorials about adding console commands to all the games I''ve listed (since making a modification with different features would basically require it, right?), so maybe could check out places like Planet Quake or Planet HalfLife for such tutorials.

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!