Tactics-Action Hybrid Game Tutorial Part2: Level Creation
by Steve Acaster · 05/07/2011 (7:06 pm) · 4 comments
Back to Part One: Overview
(if you've tried my Simple FPS Tutorial this part will be fairly familiar as I'm using the same level design)
Overview:
Create The New Project
Save A New Level
Create A Terrain For A Game Area
Place Props
Ambience - Sky and Fog:
Create The New Project:
This tutorial will make use of the "Full Project" project install. To create a new "Full Project" start Torque3D toolbox and click the "new Project" button. In the name for the project call it "Torque_Tactics_Tutorial" (notice the underscores - you don't need them here but you should get used to using them in general). From the Template menu select "Full Project" and press "Create".

Once your "Torque_Tactics_Tutorial" has been created, you can find it under "My Projects". Now either shutdown Torque Toolbox and start the "Torque_Tactics_Tutorial.exe" under "My Projects/Torque_Tactics_Tutorial/game", and then select "Play" then "Empty Room", and finally press "Go", or by using Torque Toolbox, select your project, select "Empty Room" from "Project Levels" and press "Play Game". Either way, that's the last you'll see of Toolbox in these tutorials.
Save A New Level:
You should now be in-game, controlling a character in first person holding a rocket launcher and an endless GroundPlane stretching out around you.
Bring up the World Editor (F11) and from the drop down find and edit "theLevelInfo". Scroll down and change "LevelName" and "desc0". Now we can find it by name in the levels/missions menu list.
Now "Save Level As" and name it "torqueTacticsTutorial.mis". Save it and exit (not quit). At the Main Menu screen hit "Play" and you should now see your new level available. Select it and press "Go", and you'll be back in the game area. Open up the World Editor again.
Create A Terrain For A Game Area:
It's looking a little desolate, so create a new terrain. You could do this from "Scene Tree-> Library-> Level-> Environment-> Terrain Block", but let's do it the other way via the toolbar "File-> Create Blank Terrain". You don't have to give it a name, but if you do don't use spaces (get used to it!) and don't use a number. For Material choose "sand", Resolution "512", and make sure "Flat" is checked rather than "Noise". And a new terrain block should be created.

Firstly, with terrain selected look in the inspector window and find "Squaresize", this should say 1 but we want it changed to 2. Next, reposition the terrain. Make sure the terrain is selected and from the toolbar select "Object-> Drop Location -> Origin" and press (CTRL D) and the Terrain should now be directly positioned over the GroundPlane and "Z- fighting" it for visibility. Delete the GroundPlane ... but don't panic when your player falls through. Toggle to camera view (CTRL C) and let him go.
Note: Your terrain should be at z 512 rather than z 0. Switch to the Terrain Editor (F2) and select the tool "Set Height". We're going to carve a simple route out the terrain which our final game will play along. With Brush Size set to 10 and set to 508, start near one edge of the terrain and carve in a dog-leg (left).

You should have a depression 4 units/meters/yards/whatever deep. Now continue to carve a route through the terrain, ending just short of about half way. Try and make it so that from the start the path is left, right, right, left, left, right and then come to the end make a little circle. Now make 3 "alleys" using a size 4 brush and place one between right/right, one between left/left and a final one halfway down the last straight. Hopefully it'll look something like below ...

At the end, where the little circle is, make a single, circular indentation with brush size 80, using the circle as the bottom of the now huge brush so you don't eat into the final side-alley.
Now change "Object-> Drop Location-> to Terrain". Select the Player's spawnsphere (Missiongroup-> PlayerDropPoints -> Spawnsphere) and look at the beginning of the route you've created. Place it there (CTRL D). Now make sure that "Snap To Grid" is off (it's a button on the toolbar) and position the diamond of the spawnsphere just above the terrain. Now edit the name of this spawnsphere and call it "PlayerSpawn1". Now create 2 more side-by-side and call them "PlayerSpawn2" and "PlayerSpawn3" respectively. The idea being that when the player starts the game for real, they'll have 3 team members spawn next to each other. Make sure that the new spawnsheres are inside the PlayerDropPoints folder/simset.

Save! And save often!
Place Props:
Let's add a few simple props. Look at the big circle at the end of the terrain and in "Scene Tree-> Library-> Meshes-> Art-> Shapes-> Station-> Station01". A large building should appear. Select it and shuffle it around if it's not in the centre of the circle or flat to the ground. In the object inspector find "Collision Type" and select "Visible Mesh".

The route is somewhat empty leading up to the station, so let's add some big rocks. Library-> Meshes-> Art-> Shapes-> Rocks-> rock1" and place it near the corner of the first left of our route. It might look a bit odd standing up, so sink it down, maybe as much as half way.

The "Rock1" model comes with it's own collision mesh (Station01 didn't have one) so we can leave the "collision type" as the default "Collision Mesh".
Now let's add a few more copies of rock1. Add one smack bang in the middle of first right corner.

Add another halfway down and to the left side between second right and second left, a third in the middle of left/left opposite side-alley 2(but not blocking it!), and a final rock in the middle of the straight between third left and final right. Hopefully it should look something like this.

That's enough props for this tutorial, they're just there to give the player's squad members something to hide behind and walk around every now and then.
In "Missiongroup" you'll see all these objects listed as TsStatic with no names. For this, they don't need names, but we can tidy up the Missiongroup tree a little by placing them all inside a simgroup (folder). "Library-> Level-> System-> SimGroup". Go back to the "Scene" tab and you'll see a new folder. Double click on the name "SimGroup" and rename it "props". Now drag all 6 of your props under "Missiongroup" and drop them into this new folder. "Missiongroup" now looks a lot tidier.
Save! And save often!
Ambience - Sky and Fog:
It still looks a bit bleak with the black sky and lack of light decay in the distance. Let's improve the ambience a little with some fog and sky.
For the fog, it's back to "Scene-> Missiongroup-> theLevelInfo". There are 2 parameters to change, the first is fogDensity - or how thick the fog is itself, default is 0 or fog disabled. The second parameter is fogDensityOffset - or how far away from the camera/player the fog will start, by default it's set to 700 or half a mile away ... which is quite a distance. Let's bring that closer and make the fog thicker.

That's better, the terrain and models in the distance fog up, now to sort out that black, fogless sky.
From "Missiongroup" select the Skybox which should be called "theSky". In the inspector, click on the circular Material icon. This should bring up the material Selector list. Find an appropriate sky and select it and then press select. Your black sky should now be blue, but still looking a little odd as the fog does not affect it like it does affect the props and terrain. To fix this, with the skybox selected, in the inspector find fogBandheight, default is 0. Set it to 0.5, and hopefully the fog will appear to populate the sky.
Save! And save often.
Exit back to the Main Menu, then hit "play", select your level and "go".
Now if all has gone according to plan, you should have something that looks like this:

Finally, let's make the lighting a little easier on the eye. In the "sun" object, change color and ambient.
And that's it for Torque Chronicles: Tactics-Action Hybrid GameType Tutorial Part Two. You now have a simple game environment in which our gameplay will occur.
Part Three: Custom Camera System
Part Two: Level Creation
(if you've tried my Simple FPS Tutorial this part will be fairly familiar as I'm using the same level design)
Overview:
Create The New Project
Save A New Level
Create A Terrain For A Game Area
Place Props
Ambience - Sky and Fog:
Create The New Project:
This tutorial will make use of the "Full Project" project install. To create a new "Full Project" start Torque3D toolbox and click the "new Project" button. In the name for the project call it "Torque_Tactics_Tutorial" (notice the underscores - you don't need them here but you should get used to using them in general). From the Template menu select "Full Project" and press "Create".

Once your "Torque_Tactics_Tutorial" has been created, you can find it under "My Projects". Now either shutdown Torque Toolbox and start the "Torque_Tactics_Tutorial.exe" under "My Projects/Torque_Tactics_Tutorial/game", and then select "Play" then "Empty Room", and finally press "Go", or by using Torque Toolbox, select your project, select "Empty Room" from "Project Levels" and press "Play Game". Either way, that's the last you'll see of Toolbox in these tutorials.
Save A New Level:
You should now be in-game, controlling a character in first person holding a rocket launcher and an endless GroundPlane stretching out around you.
Bring up the World Editor (F11) and from the drop down find and edit "theLevelInfo". Scroll down and change "LevelName" and "desc0". Now we can find it by name in the levels/missions menu list.
levelName ---> Torque Tactics Tutorial desc0 ---> Valkyria Chronicles Style Game Tutorial For Torque3DIt's okay to use spaces in the description.
Now "Save Level As" and name it "torqueTacticsTutorial.mis". Save it and exit (not quit). At the Main Menu screen hit "Play" and you should now see your new level available. Select it and press "Go", and you'll be back in the game area. Open up the World Editor again.
Create A Terrain For A Game Area:
It's looking a little desolate, so create a new terrain. You could do this from "Scene Tree-> Library-> Level-> Environment-> Terrain Block", but let's do it the other way via the toolbar "File-> Create Blank Terrain". You don't have to give it a name, but if you do don't use spaces (get used to it!) and don't use a number. For Material choose "sand", Resolution "512", and make sure "Flat" is checked rather than "Noise". And a new terrain block should be created.

Firstly, with terrain selected look in the inspector window and find "Squaresize", this should say 1 but we want it changed to 2. Next, reposition the terrain. Make sure the terrain is selected and from the toolbar select "Object-> Drop Location -> Origin" and press (CTRL D) and the Terrain should now be directly positioned over the GroundPlane and "Z- fighting" it for visibility. Delete the GroundPlane ... but don't panic when your player falls through. Toggle to camera view (CTRL C) and let him go.
Note: Your terrain should be at z 512 rather than z 0. Switch to the Terrain Editor (F2) and select the tool "Set Height". We're going to carve a simple route out the terrain which our final game will play along. With Brush Size set to 10 and set to 508, start near one edge of the terrain and carve in a dog-leg (left).

You should have a depression 4 units/meters/yards/whatever deep. Now continue to carve a route through the terrain, ending just short of about half way. Try and make it so that from the start the path is left, right, right, left, left, right and then come to the end make a little circle. Now make 3 "alleys" using a size 4 brush and place one between right/right, one between left/left and a final one halfway down the last straight. Hopefully it'll look something like below ...

At the end, where the little circle is, make a single, circular indentation with brush size 80, using the circle as the bottom of the now huge brush so you don't eat into the final side-alley.
Now change "Object-> Drop Location-> to Terrain". Select the Player's spawnsphere (Missiongroup-> PlayerDropPoints -> Spawnsphere) and look at the beginning of the route you've created. Place it there (CTRL D). Now make sure that "Snap To Grid" is off (it's a button on the toolbar) and position the diamond of the spawnsphere just above the terrain. Now edit the name of this spawnsphere and call it "PlayerSpawn1". Now create 2 more side-by-side and call them "PlayerSpawn2" and "PlayerSpawn3" respectively. The idea being that when the player starts the game for real, they'll have 3 team members spawn next to each other. Make sure that the new spawnsheres are inside the PlayerDropPoints folder/simset.

Save! And save often!
Place Props:
Let's add a few simple props. Look at the big circle at the end of the terrain and in "Scene Tree-> Library-> Meshes-> Art-> Shapes-> Station-> Station01". A large building should appear. Select it and shuffle it around if it's not in the centre of the circle or flat to the ground. In the object inspector find "Collision Type" and select "Visible Mesh".

The route is somewhat empty leading up to the station, so let's add some big rocks. Library-> Meshes-> Art-> Shapes-> Rocks-> rock1" and place it near the corner of the first left of our route. It might look a bit odd standing up, so sink it down, maybe as much as half way.

The "Rock1" model comes with it's own collision mesh (Station01 didn't have one) so we can leave the "collision type" as the default "Collision Mesh".
Now let's add a few more copies of rock1. Add one smack bang in the middle of first right corner.

Add another halfway down and to the left side between second right and second left, a third in the middle of left/left opposite side-alley 2(but not blocking it!), and a final rock in the middle of the straight between third left and final right. Hopefully it should look something like this.

That's enough props for this tutorial, they're just there to give the player's squad members something to hide behind and walk around every now and then.
In "Missiongroup" you'll see all these objects listed as TsStatic with no names. For this, they don't need names, but we can tidy up the Missiongroup tree a little by placing them all inside a simgroup (folder). "Library-> Level-> System-> SimGroup". Go back to the "Scene" tab and you'll see a new folder. Double click on the name "SimGroup" and rename it "props". Now drag all 6 of your props under "Missiongroup" and drop them into this new folder. "Missiongroup" now looks a lot tidier.
Save! And save often!
Ambience - Sky and Fog:
It still looks a bit bleak with the black sky and lack of light decay in the distance. Let's improve the ambience a little with some fog and sky.
For the fog, it's back to "Scene-> Missiongroup-> theLevelInfo". There are 2 parameters to change, the first is fogDensity - or how thick the fog is itself, default is 0 or fog disabled. The second parameter is fogDensityOffset - or how far away from the camera/player the fog will start, by default it's set to 700 or half a mile away ... which is quite a distance. Let's bring that closer and make the fog thicker.
fogDensity ---> 0.01 fogDensityOffset ---> 50

That's better, the terrain and models in the distance fog up, now to sort out that black, fogless sky.
From "Missiongroup" select the Skybox which should be called "theSky". In the inspector, click on the circular Material icon. This should bring up the material Selector list. Find an appropriate sky and select it and then press select. Your black sky should now be blue, but still looking a little odd as the fog does not affect it like it does affect the props and terrain. To fix this, with the skybox selected, in the inspector find fogBandheight, default is 0. Set it to 0.5, and hopefully the fog will appear to populate the sky.
Save! And save often.
Exit back to the Main Menu, then hit "play", select your level and "go".
Now if all has gone according to plan, you should have something that looks like this:

Finally, let's make the lighting a little easier on the eye. In the "sun" object, change color and ambient.
color = "0.8 0.8 0.8 1"; ambient = "0.3 0.3 0.4 1";
And that's it for Torque Chronicles: Tactics-Action Hybrid GameType Tutorial Part Two. You now have a simple game environment in which our gameplay will occur.
Part Three: Custom Camera System
About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#2
Yep, that's what I'm thinking too. Maybe a new career Steve? :)
But all the fun on a stick this is a translation of a Dutch saying, which means that I am serious now, you are doing a great job Steve, with all these tuts. Thanks.
05/08/2011 (2:45 am)
Quote:ah go 'on..write a book already. :P + ;)
Yep, that's what I'm thinking too. Maybe a new career Steve? :)
But all the fun on a stick this is a translation of a Dutch saying, which means that I am serious now, you are doing a great job Steve, with all these tuts. Thanks.
#3
05/08/2011 (4:57 am)
Awesome work Steve :-)
#4
and no instructions on how to create new player spawn points.
03/08/2014 (3:50 pm)
With Brush Size set to 10 and set to 508? and with what set to 508? forgot to add something there.and no instructions on how to create new player spawn points.

Torque Owner TheGasMan
G.A.S. [+others]
// it's great to see these resources, don't think I'm saying otherwise. ..I simply think you could make some extra pub money for yourself.