Author Topic: Debug Toolbox  (Read 3134 times)

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Debug Toolbox
« on: 3 February 2009, 11:51:04 »
Just thinking into the future a bit here to after the GUI lib is in. I would like to have a debug toolbox to change different settings on the fly. Maybe a console could do the same. Depends if you're into GUI or command line I guess.

Some features could be:
  • Turn off/on rain
  • Turn off/on mouse pointer
  • Remove/Change AI player
  • Lots more...

This could also work in with server controls.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Debug Toolbox
« Reply #1 on: 3 February 2009, 19:17:50 »
I would personally prefer a simple command line to a gui.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Debug Toolbox
« Reply #2 on: 8 February 2009, 10:35:04 »
Wouldn't it be simpler to just be able to type it into Glest's chat?

We could type ~weather to toggle on/off weather such as rain or snow.

There could also be a way to move ahead in time by a certain amount at a time (ie: go to the next day). ~time(seconds)

Could be very handy for testing mods as well. Perhaps ways to even create units. ~createUnit('unit_name', 0, startLocation(0))

It'd be like lua scripting, but could be typed while in glest for debugging.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

daniel.santos

  • Guest
Re: Debug Toolbox
« Reply #3 on: 17 February 2009, 08:43:39 »
Well, it's sounding a bit like the id software-style console where you hit ~ and the console comes down from the top of the screen, lookinig much like a terminal window.  You have a text box at the bottom where you type your commands and you see output on the rest.  You hit something like shift-page up/down to scroll through pages of the output.

First off, the keymapping is already similar.  It has the concept of an "impulse" (I call them "commands") and a binding.  I say make a list of these things and any special requirements for them to be active.  Being the server should be implicit to server controls, but turning rain on and off should probably only be enabled if you have the .ini setting MiscDebugMode (or some other) enabled.  So far, I can certainly see toggle weather and mouse pointer.

I think omega has some smart ideas as well.  Perhaps the ability to arbitrarily execute lua code from the console would be in order.  Also, I don't mind his suggestion on how to do it (simply prefixing the text with a special character), although, I'm thinking that a more common command-prefixing character like the forward slash might be more intuitive.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Debug Toolbox
« Reply #4 on: 17 February 2009, 12:12:09 »
Forward slash might be a better idea, yes. No shift key.

Not sure what you mean when you want a console to pop down. Do you mean that when you type a special character, a console window will pop up for entering commands?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

daniel.santos

  • Guest
Re: Debug Toolbox
« Reply #5 on: 24 February 2009, 23:41:40 »
Download the one of the Quake demos and hit the ~ key (actually, I guess it's the backtick key because you don't have to hold down shift, my mistake)
Quake 1 demo: http://www.download.com/Quake-demo/3000-7563_4-10002186.html
Quake 2 demo: http://www.download.com/Quake-II-demo/3000-7563_4-10243474.html

id software uses this interface on all of it's games (Quake, Doom, Castle Wolfenstein, etc.).  Thus, if such a feature were added, I strongly advocate the use of the key that is somewhat standard among FPS games now to access the game's console (I'm pretty sure I've planed non-id software games that use the same thing).

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Debug Toolbox
« Reply #6 on: 25 February 2009, 05:08:57 »
What about using keymap.ini to set the key?  ::)

` as default would be good though.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/