Game Development Community

Torque 101: Day Two

by Infinitum3D · 10/15/2006 (1:57 pm) · 9 comments

(keywords: Infinitum3D begginer tutorial)

1. OK, Next thing. I prefer to run things full screen rather than in the default window. So when you start Torque, the GameOne GUI window opens with the toolbar at the top. The toolbar has GUI EDITOR, WORLD EDITOR, etc. On the far right, next to EXIT is OPTIONS. Click OPTIONS and a pop-up window opens with Graphics and Audio options. Click the box next to Fullscreen Video if you like to work full screen. I also set my resolution at 1024 768. Be sure to click Apply if you make any changes. It will change to fullscreen view. Unfortunately, there is no way to minimize the fullscreen view. If you press ALT+TAB to switch to another program while in fullscreen mode, the Torque Gui disappears and I don't know how to get it back. Torque is still running, because the task manager (hotkey CTRL+ALT+DELETE) lists TorqueDemo.exe under the PROCESSES tab. But it doesn't show up under the APPLICATIONS tab. And if I try to restart Torque it brings up a "fatal error" saying Torque is already running. So I have to go under PROCESSES and End Process for torqueDemo.exe. This isn't a good way to do things, and it may be a bug in the Torque code, or maybe just a problem with MY system, I don't know. But I'm going to post everything I do, so if there are others with similar problems they can learn from me.

So Fullscreen isn't the best option for me at this time. I turned off fullscreen view and set resolution to 1024 768.

2. Another bug I found is that the Terrain Texture Painter doesn't switch back to Terrain Editor unless I File>Save Mission, File>Exit and restart.


3. I also learned that the world is round! At least it seems that way. If you switch to camera view (ALT+C) because camera view moves much faster (SHIFT+7) than player view, and just move forward (W) eventually you end up in the same place, so the world must be round, right? If so, that means you can create a North and South pole with frozen tundra terrain, and an equator with beaches and palm trees.

4. Now, there's another thing I'm trying to figure out. What is the red rectangle surrounding an area of the world in Editor mode? And in Terrain Texture Painter mode, there is a green rectangle outside the red one.

The red one is the Mission Area. When you open WINDOW>MISSION AREA EDITOR (hotkey F5) a window opens showing the world, camera location, and the red box. The red V is your field of view. I still don't know the purpose of the red box.


OK, I was planning on adding some sort of "mini-map" feature, but until I learn how to, I'm using the Mission Area Editor (F5). With the Mission Area Editor open, I can see certain terrain landmarks. I raised a large mountain just west of my lake. On the Mission Area Editor, the mountain appears as a bright white area. High points are white, low levels are black, everything else is shades of gray.


5. I just found a bug. My terrain has a square hole in it. My player falls through into the void. If I use the terrain editor, it distorts the shape of the hole. I don't know how to get rid of the hole. It's almost like a face has been deleted from the terrain. Is that even possible? Did I do this, or is this a bug in Torque?

Aha! It's not a bug. I must have made this hole somehow. I was able to get rid of it by clicking ACTION>CLEAR EMPTY, and click my brush on it. ACTION>SET EMPTY lets you delete faces from the terrain, and ACTION>CLEAR EMPTY replaces them. Pretty neat. I'm not sure what this is good for.


6. I just made cliffs. I made a very tall mountain, which looked really bad, so I tried to flatten it out by using the Terrain Editor and a 25x25 brush. It worked OK, but then I saw ACTION> FLATTEN. When I flattened the mountain top, it gave me a high cliff with a plateaus on top. Looks like a great place for a castle. Unfortunately, players can scale the cliff with no difficulty even though it's almost straight up and down. Somehow I'll have to figure out how to code in angles of climbing allowed. the player should be able to climb a 45degree hill, but anything more steep that requires special skills. 60 degrees would be very difficult, and 90 degrees would require expert skills, like a GrandMaster Thief or a Ninja or something.


Maybe I can run a river through the valley between the two cliffs, like the Grand Canyon or something.

Tony

#1
10/15/2006 (2:51 pm)
Item #3 above

TGE worlds aren't round -- it would be cool if they were. However, each terrain map (effectively a 256x256 grayscale bitmap) can be set to tile to infinity. That's why you're seeing the same place over and over. If you were to drop a static object or interior in a particular section of geography and start walking away from it, eventually, you would get back to the same bit of landscape geometry, but the object you dropped won't be there. Tiling terrains can be turned off in the editor.
#2
10/15/2006 (3:28 pm)
Hi again.

By the way, I should probably mention that you might want to save up your comments and discoveries and only publish them once a week or so.

The Garage Games 'blog' is generally treated more like a developer's update than a stream-of-consciousness thought-dump. This is one of the main places where community developers can keep their project and process in the public eye. However, the more often you post your blogs, the less exposure someone else's project receives as they get bumped off the main page.

I hope all of that makes sense without sounding too bossy.

[Edited: mellowed this out a bit]
#3
10/15/2006 (3:31 pm)
#6 - // Controls over slope of runnable/jumpable surfaces
runSurfaceAngle = 40;
jumpSurfaceAngle = 40;

0 - 90 controls angle you can run up
run and jump self explanatory

These are found in player.cs in server/scripts
#4
10/15/2006 (3:46 pm)
Thank you both for your comments. I agree with only posting once a week.

Tony
#5
10/15/2006 (10:23 pm)
A suggestion: if you're going to tag with keywords, you should spell them correctly. It's spelled "beginner".

Post as often as you'd like, and with whatever content you like. This is your blog; you do not need to conform to what "most" people do.
#6
10/16/2006 (8:13 am)
Infinitum, the red Mission Area is like a trigger object. Its purpose is just to let the script know when the player has moved outside it. It doesn't prevent the player from crossing it, but when the player crosses it the callback: Player:onLeaveMission() or something like that gets called. thats all it does as far as I know.

also, Ive had the "hole in terrain" problem myself. You just need to fill the hole using the editor. highlight the hole and use the fill operation from the terrain menu. that should fix it.
#7
10/21/2006 (9:37 pm)
Thank you for taking the time to do the blog. I also am a new Torque user with no Programming abilities and have found your articals helpful. I look ofrward to your next post.
#8
10/28/2006 (10:38 am)
Hey, where's your post for this week? :P
#9
01/28/2007 (7:32 am)
Instead of using the blog, I've been posting in the forums. Look IN Torque SDK Private Forums>Getting Started for the thread Torque 101:Intro to Torque.

Thanks!

Tony