Stupid newbie question time
by Jeff Randall · in Torque Game Engine · 08/27/2001 (10:28 am) · 10 replies
Hello everybody. First, let me apologize if my questions seem stupidly simple or have already been answered in other forum strings. It's kind of hard to cruise the forums looking for the specific info I need. Also, I'm very much a programming newbie, having experience in Visual Basic mostly. Please, be gentle. It's my first time ;)
1) How would you bind movement to the arrow keys? I know that under default.bind.cs there is
moveMap.bind( keyboard, w, moveforward );
what do I have to change w to for the arrow key UP (as well as the other directions).
2) How would I read/write info from a .CS file from a GUI window? Example would be to create a player options GUI where you can change key bindings. It would need to read the current binding from default.bind.cs and display them, then write to default.bind.cs the new settings when applied.
3) I'm trying to create a new player HUD. I have a 1024 x 192 png file w/ transparent areas I want to display along the bottom of the player's screen. I did setup a crosshair using Mark Smith's post and that works fine. Using the same new GuiBitmapCtrl function as the crosshair, I can't get the new HUD to display, just a white box where it should be. I was able to change the hud to 4 separate 256x256 sections and add them in just fine. What am I doing wrong? Must I only use square textures? (extending them out sucks, makes them look grainy).
4) How do setup a blank mission that I can use as a basis for making missions?
5) Is there a 'screenshot' function that I can bind to a key?
6) When will sound be fixed? It sucks that I have to run WinAmp in the background and imagine explosion sounds in my head ;)
7) Will there ever be a good 'V12 for dummies' tutorial or doc explaining the general basics?
8) What program does a good job of 'Find In Multiple Files'? Doxygen seemed too confusing for a simpleton like me at first glance.
Again, sorry for all the stupid questions. Any and all help is dearly appreciated. This whole situation amazes me. An awesome engine, sweet community, what more can you ask for (besides decent documentation, working sound, working AI,... ;) )?
1) How would you bind movement to the arrow keys? I know that under default.bind.cs there is
moveMap.bind( keyboard, w, moveforward );
what do I have to change w to for the arrow key UP (as well as the other directions).
2) How would I read/write info from a .CS file from a GUI window? Example would be to create a player options GUI where you can change key bindings. It would need to read the current binding from default.bind.cs and display them, then write to default.bind.cs the new settings when applied.
3) I'm trying to create a new player HUD. I have a 1024 x 192 png file w/ transparent areas I want to display along the bottom of the player's screen. I did setup a crosshair using Mark Smith's post and that works fine. Using the same new GuiBitmapCtrl function as the crosshair, I can't get the new HUD to display, just a white box where it should be. I was able to change the hud to 4 separate 256x256 sections and add them in just fine. What am I doing wrong? Must I only use square textures? (extending them out sucks, makes them look grainy).
4) How do setup a blank mission that I can use as a basis for making missions?
5) Is there a 'screenshot' function that I can bind to a key?
6) When will sound be fixed? It sucks that I have to run WinAmp in the background and imagine explosion sounds in my head ;)
7) Will there ever be a good 'V12 for dummies' tutorial or doc explaining the general basics?
8) What program does a good job of 'Find In Multiple Files'? Doxygen seemed too confusing for a simpleton like me at first glance.
Again, sorry for all the stupid questions. Any and all help is dearly appreciated. This whole situation amazes me. An awesome engine, sweet community, what more can you ask for (besides decent documentation, working sound, working AI,... ;) )?
About the author
#2
moveMap.bind( keyboard, up, moveforward );
3) I'm trying to create a new player HUD. I have a 1024 x 192 png file w/ transparent areas I want to display
Try using a GuiChunkedBitmapCtrl
5) Is there a 'screenshot' function that I can bind to a key?
ctrl-p is bound to the screenshot function at the moment
6) When will sound be fixed? It sucks that I have to run WinAmp in the background and imagine explosion sounds in my head ;)
Rick Overman is working on that now, or I believe that's what Tim Gift said he was working on ;)
7) Will there ever be a good 'V12 for dummies' tutorial or doc explaining the general basics?
Good question...
8) What program does a good job of 'Find In Multiple Files'?
Windows 9x.. "Find Files"... Win 2k "Search"
Or if you only want to search in files that are open I use UltraEdit, and Visual C++ has a decent find in files .
08/27/2001 (10:40 am)
1) How would you bind movement to the arrow keys?moveMap.bind( keyboard, up, moveforward );
3) I'm trying to create a new player HUD. I have a 1024 x 192 png file w/ transparent areas I want to display
Try using a GuiChunkedBitmapCtrl
5) Is there a 'screenshot' function that I can bind to a key?
ctrl-p is bound to the screenshot function at the moment
6) When will sound be fixed? It sucks that I have to run WinAmp in the background and imagine explosion sounds in my head ;)
Rick Overman is working on that now, or I believe that's what Tim Gift said he was working on ;)
7) Will there ever be a good 'V12 for dummies' tutorial or doc explaining the general basics?
Good question...
8) What program does a good job of 'Find In Multiple Files'?
Windows 9x.. "Find Files"... Win 2k "Search"
Or if you only want to search in files that are open I use UltraEdit, and Visual C++ has a decent find in files .
#3
6) It should be in the first patch. Not sure when the first patch will be released but it probably won't be too long.
7) Mark is already working on a set of overview docs.
8) Visual C++ has an excellent Find in Files built in. Windows 98 SE's and Windows 2000's Search tool (Start->Search) can do this also.
Edit: LOL....don't everyone answer at once!
08/27/2001 (10:45 am)
5) Ctrl-P6) It should be in the first patch. Not sure when the first patch will be released but it probably won't be too long.
7) Mark is already working on a set of overview docs.
8) Visual C++ has an excellent Find in Files built in. Windows 98 SE's and Windows 2000's Search tool (Start->Search) can do this also.
Edit: LOL....don't everyone answer at once!
#4
1)Just edit the binds to the movement you want (there isnt currently any notion of "UP" movement).
O.K... let me put this another way. Please fill in the blank to correctly bind the arrow keys on the keyboard to player movement:
moveMap.bind( keyboard, _, moveleft );
moveMap.bind( keyboard, _, moveright );
moveMap.bind( keyboard, _, moveforward );
moveMap.bind( keyboard, _, movebackward );
Should I use the ASCII character code for the arrow keys?
3) Does it have to be a square power of 2 image? I tried a 1024 x 256 and that didn't work. Is it because of my crappy Voodoo3 I'm using doesn't support 1024 size files?
4) copy one of the other missions, make sure its not read only, open it and delete everything you dont need. Save that as your empty mission..
What don't I need? In other words, what should I delete?
Thanks for the lighning fast response Phil. Hopefully my stupid questions won't wear on your nerves.
08/27/2001 (10:50 am)
Wow. A response in like 10 minutes! You rock Phil!!!1)Just edit the binds to the movement you want (there isnt currently any notion of "UP" movement).
O.K... let me put this another way. Please fill in the blank to correctly bind the arrow keys on the keyboard to player movement:
moveMap.bind( keyboard, _, moveleft );
moveMap.bind( keyboard, _, moveright );
moveMap.bind( keyboard, _, moveforward );
moveMap.bind( keyboard, _, movebackward );
Should I use the ASCII character code for the arrow keys?
3) Does it have to be a square power of 2 image? I tried a 1024 x 256 and that didn't work. Is it because of my crappy Voodoo3 I'm using doesn't support 1024 size files?
4) copy one of the other missions, make sure its not read only, open it and delete everything you dont need. Save that as your empty mission..
What don't I need? In other words, what should I delete?
Thanks for the lighning fast response Phil. Hopefully my stupid questions won't wear on your nerves.
#5
08/27/2001 (10:52 am)
Voodoo 3 only supports up to 512x512 (3dfx caught a lot of flak for that one).
#6
Thanks Harold and Matthew for your input!
Matthew: I knew it was a problem with my crappy equipment. Planning on a new Thunberbird 1gig+ w/ GeForce 3 by Christmas(I'm hoping)
Harold: You're my new idol. The things your doing for the engine and the community is greatly appreciated.
So, nobody wants to touch on my question two, huh?
08/27/2001 (11:01 am)
Jeez, two more responses in the time it takes me to respond to one!Thanks Harold and Matthew for your input!
Matthew: I knew it was a problem with my crappy equipment. Planning on a new Thunberbird 1gig+ w/ GeForce 3 by Christmas(I'm hoping)
Harold: You're my new idol. The things your doing for the engine and the community is greatly appreciated.
So, nobody wants to touch on my question two, huh?
#7
-- Bob
08/27/2001 (11:49 am)
Jeff, look at the end of sim/actionMap.cc for a list of all non-alphanumeric key binds.-- Bob
#8
My best guess (haven't tried) would be to choose to execute the movemap.bind() upon pressing of the button or something to that effect... maybe?
-Snowman
08/27/2001 (9:47 pm)
Does anyone know the answer to his second question? I'm curious as well.My best guess (haven't tried) would be to choose to execute the movemap.bind() upon pressing of the button or something to that effect... maybe?
-Snowman
#9
I checked out actionMap.cc, very sweet! One question, when binding those virtual maps, should I use quotes?
moveMap.bind( keyboard, "numpad0", DoThis );
or
moveMap.bind( keyboard, numpad0, DoThis );
I see both styles in the default.bind.cs.
PS. Is rxaxis the reverse xaxis for the mouse?
08/28/2001 (5:38 am)
Bob, I checked out actionMap.cc, very sweet! One question, when binding those virtual maps, should I use quotes?
moveMap.bind( keyboard, "numpad0", DoThis );
or
moveMap.bind( keyboard, numpad0, DoThis );
I see both styles in the default.bind.cs.
PS. Is rxaxis the reverse xaxis for the mouse?
#10
moveMap.getBindings(moveforward);
the return value from the getBindings() function is a string that contains the device and bind value for the specified command. So, in the above example, the call would return:
"keyboard^w"
The ^ is really a tab character according to the source code - but you may be able to parse the string using the ^ character.
Anyway, once you have queried the global moveMap object for all key bindings, you can now display this in your options dialog. When a user changes a key binding in your dialog, you simply call the bind() function again, like this:
moveMap.bind(keyboard, up, moveforward);
(assuming the user changed the "move forward" key from "w" to "up arrow")
For more information on the moveMap object (as well as other ActionMap-derived objects like globalActionMap), you can check the C++ source code file \engine\sim\actionMap.cc to see all the possible functions for managing your input device mappings.
Hope this helps!
08/28/2001 (8:50 am)
I'll take a shot at #2. The moveMap object is a global variable to the console. Therefore, you can query the moveMap object for the existing bindings, like so:moveMap.getBindings(moveforward);
the return value from the getBindings() function is a string that contains the device and bind value for the specified command. So, in the above example, the call would return:
"keyboard^w"
The ^ is really a tab character according to the source code - but you may be able to parse the string using the ^ character.
Anyway, once you have queried the global moveMap object for all key bindings, you can now display this in your options dialog. When a user changes a key binding in your dialog, you simply call the bind() function again, like this:
moveMap.bind(keyboard, up, moveforward);
(assuming the user changed the "move forward" key from "w" to "up arrow")
For more information on the moveMap object (as well as other ActionMap-derived objects like globalActionMap), you can check the C++ source code file \engine\sim\actionMap.cc to see all the possible functions for managing your input device mappings.
Hope this helps!
Torque 3D Owner Phil Carlisle
1) How would you bind movement to the arrow keys?
Just edit the binds to the movement you want (there isnt currently any notion of "UP" movement).
3) I'm trying to create a new player HUD. What am I doing wrong? Must I only use square textures? (extending them out sucks, makes them look grainy).
textures must be power of 2, so for instance, 16, 32, 64, 128 and 256 are fine.. 256 is the upper limit you should use for a single texture (newer cards can use upto 2048, but older cards will die at anything more than 256).
4) How do setup a blank mission that I can use as a basis for making missions?
copy one of the other missions, make sure its not read only, open it and delete everything you dont need. Save that as your empty mission..
5) Is there a 'screenshot' function that I can bind to a key?
ctrl-p does a png screenshot in your test app directory.
6) When will sound be fixed? It sucks that I have to run WinAmp in the background and imagine explosion sounds in my head ;)
theyre working on it :)
7) Will there ever be a good 'V12 for dummies' tutorial or doc explaining the general basics?
write one? maybe someone will. Tim was working on some simple tutorial things too.
8) What program does a good job of 'Find In Multiple Files'? Doxygen seemed too confusing for a simpleton like me at first glance.
I use devstudio to do a search for strings.. there's also grep (sgrep under dos) thats good for searching all files for a string.
Phil.