Torque 101: Intro to Torque
by Infinitum3D · in Torque Game Engine · 10/05/2006 (10:12 am) · 155 replies
I have just purchased and downloaded the TorqueGameEngineSDK_1.4
I will be documenting my experiences with it here. I am new to Torque and C++, so I hope others here will be able to learn from my mistakes.
UPDATE: Since I make several mistakes, you should always read through the entire thread of posts before trying anything. There are times that I ruin everything and have to start over entirely. Also, I have upgraded to Torque 1.5 since this post.
Thanks!
1. Download and run the TorqueGameEngineSDK-1-4.exe
This will install the Torque SDK on your computer. It will also place a link on the desktop called Torque Game Engine SDK.
This link is to twelve shortcuts;
FPS Starter Kit
Getting Started Tutorial
readMe.html
Racing Starter Kit
Torque Developer network (online)
Torque Game Engine Demo
Torque Game Engine Home Page
Tutorial Base
Torque Show Tool Pro
Torque Documentation (online)
Torque SDK forums (online)
Uninstall Torque Game Engine
I will read up on these and post more soon. I am starting with the ReadMe.html and the getting Started Tutorial.
UPDATE 10/07/06:
The ReadMe.html is just a one page note about where to find help. Look it over or skip straight to the Getting Starting .pdf tutorial.
2. The Getting Started tutorial is excellent. Follow it through, word by word, step by step, from start to finish, even if a section looks like common sense. !!!Be sure to place the TorqueScript in the EXACT location, exactly as the tutorial says!!! This was my first mistake.
All we have left to do is make sure that our 'clientGame.cs' file gets loaded. Open up GameOne/main.cs and find the 'Client scripts' section of the function called initClient. At the bottom of that list, add the following line, which will load our file:
I added the line at the bottom of the page, not at the bottom of the initClient function.
Update 10/11/06:
Next try to make some changes. For example: tdn.garagegames.com/wiki/Beginner
a. Make a new Torque Logo model that is blue instead of red.
b. Make it give 2 points instead of just 1.
c. Make a yellow one that gives 5 points.
Once I have done this, I'll explain how to do it.
Tony
I will be documenting my experiences with it here. I am new to Torque and C++, so I hope others here will be able to learn from my mistakes.
UPDATE: Since I make several mistakes, you should always read through the entire thread of posts before trying anything. There are times that I ruin everything and have to start over entirely. Also, I have upgraded to Torque 1.5 since this post.
Thanks!
1. Download and run the TorqueGameEngineSDK-1-4.exe
This will install the Torque SDK on your computer. It will also place a link on the desktop called Torque Game Engine SDK.
This link is to twelve shortcuts;
FPS Starter Kit
Getting Started Tutorial
readMe.html
Racing Starter Kit
Torque Developer network (online)
Torque Game Engine Demo
Torque Game Engine Home Page
Tutorial Base
Torque Show Tool Pro
Torque Documentation (online)
Torque SDK forums (online)
Uninstall Torque Game Engine
I will read up on these and post more soon. I am starting with the ReadMe.html and the getting Started Tutorial.
UPDATE 10/07/06:
The ReadMe.html is just a one page note about where to find help. Look it over or skip straight to the Getting Starting .pdf tutorial.
2. The Getting Started tutorial is excellent. Follow it through, word by word, step by step, from start to finish, even if a section looks like common sense. !!!Be sure to place the TorqueScript in the EXACT location, exactly as the tutorial says!!! This was my first mistake.
All we have left to do is make sure that our 'clientGame.cs' file gets loaded. Open up GameOne/main.cs and find the 'Client scripts' section of the function called initClient. At the bottom of that list, add the following line, which will load our file:
I added the line at the bottom of the page, not at the bottom of the initClient function.
Update 10/11/06:
Next try to make some changes. For example: tdn.garagegames.com/wiki/Beginner
a. Make a new Torque Logo model that is blue instead of red.
b. Make it give 2 points instead of just 1.
c. Make a yellow one that gives 5 points.
Once I have done this, I'll explain how to do it.
Tony
#82
12/22/2006 (10:38 am)
@Fucifer can you send it to me as well?
#83
12/22/2006 (11:01 am)
And me :P
#84
12/22/2006 (11:15 am)
Tony, Im just asking how does your barrel work as an StaticShape?
#85
If anyone has script for bomb please email to me. I am try to develop a bomb on the ground that when player come accross it, blowup.
12/22/2006 (12:18 pm)
I think understand what you asking. The barrel will take damage from the projectile of any weapon. When it reach damage a level it explode a part. I have debris dts which is animate to look like the barrel is exploding but real all it does is replace the barrel.dts. Once the second dts animation is play you can drop a health or another object. In my scripts I try to keep things as simple as possible because I am teaching group kids soon. So my script may not be best practices. The object you drop will need it own script to function. I have tested it with weapons, health and various other objects. Right now in process of change it to drop the AIGuard in to the mission. It will drop the AIGuard without any errors execpt the AIGuard will not have weapon. I am looking into why it does have gun. It will run after me like crazy person. If anyone has script for bomb please email to me. I am try to develop a bomb on the ground that when player come accross it, blowup.
#86
I don't have much time online, so it's hard to upload pics. I'll try over the Christmas holiday though.
@Fucifer, I'd love the script. Can you post it?
Here's what I've been working on:
12 21 2006 Torque 101: Map Toggle
There are two types of game developers; Those that draw a map then build a world to match it, and those that build their world THEN draw a map of it. I belong to the first group. I have a map for my world, a 800x600 worldMap.png in my client\ui folder. I'm trying to add a "Display Map" feature using the M key to toggle the map of the world on/off. This isn't going to draw a map or modify the map or anything like that. It will simply toggle a picture of the map on/off . We have to create a GUI and bind the M key to it.
I used Tim Newell's Inventory Popup Tutorial as a base. (Always give credit where due. Thanks Tim!)
Place your WorldMap.png file in the client/ui folder.
1. Back up everything! It took me two days to work out problems with this tutorial, so I may have made a mistake or left something out. BACK UP FIRST!!! You will modify (or create) six different files. I always backup my entire Starter.FPS folder as Copy Of Starter.FPS Just right click on Starter.FPS and click 'copy', then click 'paste'. Windows will paste a copy right there.
2. OK, here we go. Go into \client\scripts\default.bind.cs and at the bottom add this code:
//------------------------------------------------------------------------
//Show WorldMap.jpg using "m" to toggle
//-----------------------------------------------------------------------
$worldmapState = false;
function toggleWorldmap()
{
if ($worldmapState == false)
{
commandToServer('DisplayWorldmap');
$worldmapState = true;
}
else
{
Canvas.setContent( PlayGui );
$worldmapState = false;
}
}
moveMap.bindCmd(keyboard, "m", "toggleWorldMap();", "");
//------------------------------------------------------------------------
3a. Go into client\init.cs and add this to the SHELL GUI exec section:
//load the world map gui
exec("./ui/WorldMapGui.gui");
3b. and under //Client scripts
exec("./scripts/WorldMapGui.cs");
4. Delete config.cs and config.cs.dso in the client folder. Torque will recreate these for you.
Actually, delete out ALL the .dso files to force a recompile.
5. Create a WorldmapGui.cs file in the client/scripts folder:
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-------------------------------------------------
// WorldMapGui.cs
//-------------------------------------------------
new ActionMap(WorldMap);
WorldMap.bindCmd(keyboard, "m", "toggleWorldMap();", "");
function WorldMapGui::onWake()
{
$enableDirectInput = "1";
activateDirectInput();
WorldMap.push();
}
function WorldMapGui::onSleep()
{
echo("onSleep");
// WorldMap.pop();
}
function clientCmdPopWorldMap()
{
Canvas.setContent( WorldMapGui );
}
//----------------------------------------------------------------------------
6. Go into server/scripts/commands.cs and add this to the bottom.
//-----------------------------------------------------------------------------
function serverCmdDisplayWorldMap(%client)
{
//Send the info to the client to display it
commandToClient(%client, 'PopWorldMap');
}
//----------------------------------------------------------------------------
7. In client/ui open defaultGameProfiles.cs
add this to the bottom:
//-----------------------------------------------------------------------------
// WorldMap profile
new GuiControlProfile ("WorldMapProfile")
{
opaque = false;
fillColor = "128 128 128";
fontColor = "0 0 0";
border = true;
borderColor = "0 0 0";
fontType = "Arial";
fontSize = 18;
};
//----------------------------------------------------------------------------
8. Create a new GUI called WorldMapGui, set the bitmap as our worldmap.png.
-Load a mission in Torque.
-Go into GUI editor (F10)
-Click File>New GUI
-Name it WorldMapGui
-Click New Control and select GuiBitmapCtrl
-In the lower tree-view, in the Misc section, click the ... next to bitmap, and change it to your WorldMap.png
-Name the control WorldMap
-Click Apply
-Click File> SaveGUI
Save it in the client/ui folder.
9. Test it out!
Start Torque.
Load a mission.
Once the mission load, press the m key and your world map should display. Press m again, and the map should toggle off.
I hope this works for you.
Tony
12/22/2006 (5:08 pm)
Wow, lots of people reading!!!I don't have much time online, so it's hard to upload pics. I'll try over the Christmas holiday though.
@Fucifer, I'd love the script. Can you post it?
Here's what I've been working on:
12 21 2006 Torque 101: Map Toggle
There are two types of game developers; Those that draw a map then build a world to match it, and those that build their world THEN draw a map of it. I belong to the first group. I have a map for my world, a 800x600 worldMap.png in my client\ui folder. I'm trying to add a "Display Map" feature using the M key to toggle the map of the world on/off. This isn't going to draw a map or modify the map or anything like that. It will simply toggle a picture of the map on/off . We have to create a GUI and bind the M key to it.
I used Tim Newell's Inventory Popup Tutorial as a base. (Always give credit where due. Thanks Tim!)
Place your WorldMap.png file in the client/ui folder.
1. Back up everything! It took me two days to work out problems with this tutorial, so I may have made a mistake or left something out. BACK UP FIRST!!! You will modify (or create) six different files. I always backup my entire Starter.FPS folder as Copy Of Starter.FPS Just right click on Starter.FPS and click 'copy', then click 'paste'. Windows will paste a copy right there.
2. OK, here we go. Go into \client\scripts\default.bind.cs and at the bottom add this code:
//------------------------------------------------------------------------
//Show WorldMap.jpg using "m" to toggle
//-----------------------------------------------------------------------
$worldmapState = false;
function toggleWorldmap()
{
if ($worldmapState == false)
{
commandToServer('DisplayWorldmap');
$worldmapState = true;
}
else
{
Canvas.setContent( PlayGui );
$worldmapState = false;
}
}
moveMap.bindCmd(keyboard, "m", "toggleWorldMap();", "");
//------------------------------------------------------------------------
3a. Go into client\init.cs and add this to the SHELL GUI exec section:
//load the world map gui
exec("./ui/WorldMapGui.gui");
3b. and under //Client scripts
exec("./scripts/WorldMapGui.cs");
4. Delete config.cs and config.cs.dso in the client folder. Torque will recreate these for you.
Actually, delete out ALL the .dso files to force a recompile.
5. Create a WorldmapGui.cs file in the client/scripts folder:
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-------------------------------------------------
// WorldMapGui.cs
//-------------------------------------------------
new ActionMap(WorldMap);
WorldMap.bindCmd(keyboard, "m", "toggleWorldMap();", "");
function WorldMapGui::onWake()
{
$enableDirectInput = "1";
activateDirectInput();
WorldMap.push();
}
function WorldMapGui::onSleep()
{
echo("onSleep");
// WorldMap.pop();
}
function clientCmdPopWorldMap()
{
Canvas.setContent( WorldMapGui );
}
//----------------------------------------------------------------------------
6. Go into server/scripts/commands.cs and add this to the bottom.
//-----------------------------------------------------------------------------
function serverCmdDisplayWorldMap(%client)
{
//Send the info to the client to display it
commandToClient(%client, 'PopWorldMap');
}
//----------------------------------------------------------------------------
7. In client/ui open defaultGameProfiles.cs
add this to the bottom:
//-----------------------------------------------------------------------------
// WorldMap profile
new GuiControlProfile ("WorldMapProfile")
{
opaque = false;
fillColor = "128 128 128";
fontColor = "0 0 0";
border = true;
borderColor = "0 0 0";
fontType = "Arial";
fontSize = 18;
};
//----------------------------------------------------------------------------
8. Create a new GUI called WorldMapGui, set the bitmap as our worldmap.png.
-Load a mission in Torque.
-Go into GUI editor (F10)
-Click File>New GUI
-Name it WorldMapGui
-Click New Control and select GuiBitmapCtrl
-In the lower tree-view, in the Misc section, click the ... next to bitmap, and change it to your WorldMap.png
-Name the control WorldMap
-Click Apply
-Click File> SaveGUI
Save it in the client/ui folder.
9. Test it out!
Start Torque.
Load a mission.
Once the mission load, press the m key and your world map should display. Press m again, and the map should toggle off.
I hope this works for you.
Tony
#87
I don't understand the question. Sorry.
Tony
12/22/2006 (5:10 pm)
@SaskaQuote:Tony, Im just asking how does your barrel work as an StaticShape?
I don't understand the question. Sorry.
Tony
#88
Like example in this line of code:
datablock StaticShapeData(ExplodingBarrelShape)
{
category = "Exploding Objects";
shapeFile = "~/data/shapes/barrels/barrel01.dts";
maxDamage = 100;
destroyedLevel = 10;
mass = 10;
friction = 1;
elasticity = 0.3;
explosion = ExplodingBarrelShapeDataExplosion;
// debrisShapeName = "~/data/shapes/barrel/barrel_debris1.dts";
// debris = StaticShapeDataDebri;
};
12/23/2006 (12:11 am)
Shouldnt your barrel be a shape not a static one?Like example in this line of code:
datablock StaticShapeData(ExplodingBarrelShape)
{
category = "Exploding Objects";
shapeFile = "~/data/shapes/barrels/barrel01.dts";
maxDamage = 100;
destroyedLevel = 10;
mass = 10;
friction = 1;
elasticity = 0.3;
explosion = ExplodingBarrelShapeDataExplosion;
// debrisShapeName = "~/data/shapes/barrel/barrel_debris1.dts";
// debris = StaticShapeDataDebri;
};
#89
Code please?
12/23/2006 (12:20 am)
Tony, also in your worldmap code, what do you mean:Quote: Create a new GUI called WorldMapGui, set the bitmap as our worldmap.png.
Code please?
#90
That's what the datablock does. It turns it from a static shape into a shape. I don't understand the code. I just know it works.
In the GuiBitmapCtrl use the Inspector to set the bitmap property. Step 8, lines 5 and 6.
Hope this helps.
Tony
12/23/2006 (4:33 am)
Quote:Shouldnt your barrel be a shape not a static one?
That's what the datablock does. It turns it from a static shape into a shape. I don't understand the code. I just know it works.
Quote:...set the bitmap as our worldmap.png
In the GuiBitmapCtrl use the Inspector to set the bitmap property. Step 8, lines 5 and 6.
Hope this helps.
Tony
#91
and thanks for the worldmap.png help ill test it out.
12/23/2006 (4:39 am)
Oh sorry i must have read the code wrong :Pand thanks for the worldmap.png help ill test it out.
#92
01/06/2007 (1:46 am)
[EDIT] Removed out of date screenshots and links. 03-23-2007
#93

edit: AAAARRRRGGGGHHHHH!
edit2: finally works...
01/06/2007 (2:30 am)
New website with geocities www.geocities.com/infinitum3d/
edit: AAAARRRRGGGGHHHHH!
edit2: finally works...
#94
Well, the inventory system I'm using is based on Tim Newell's "Inventory Popup Tutorial"
It works for crossbow ammo. Now I have to figure out how to add more items to it.
One thing I notice that seems odd... In Realm Wars, the Inventory.cs file is in client/scripts while mine (from the tutorial) is in server/scripts.
Any ideas why? I'll have to check in the other forums, but it would seem like the inventory should be a client function, not server. OK, my InventoryGUI.cs is in the client\scripts folder. That makes more sense to me. Inventory.cs is the default inventory system that comes preloaded in Starter.FPS, and InventoryGUI.cs is the system that I created using the Inventory Pop-Up tutorial.
So far, all our inventory window does is display a list of crossbow ammo. It doesn't show the crossbow. Also, I thought the R was supposed to "throw" an object. OK, the crossbow isn't a 'thrown' weapon, like a spear would be. Also, how do I "drop" the crossbow? There are functions for onUse, onThrow, and onPickup, but not onDrop to "unmount" the crossbow.
Also, we need to add a Sword.dts that can be mounted.
Realm Wars can mount a sword and axe already, so I may just switch from starter.FPS to RealmWars. No sense in re-inventing the wheel.
I copied the 'shortSword.dts' from Realm Wars, and placed it in my world, but there is no collision detection. The console says "GameOneFPS/data/shapes/swords.dts - Collision mesh names should start with Col or LOSCol, encountered 'damageStart' in detail level 3". I guess I need to create a new 'sword.dts' file with correct collision details.
OK, I moved the 'rune_blade01.dts' over from Realm Wars. I can place it in my world as a static shape. I have to script a datablock for it to make it a 'dynamic' (non-static) shape.
In Server/scripts there is a 'sword.cs' file. NOTE: I may have copied that file from Realm Wars. It may not be a stock TGE script.
Here's what it says:
Make sure to exec it in game.cs as exec("./sword.cs");
This places swords in the upper tree view, but we can't pick it up (mount) or use it. Why?
More to come.
Tony
01/18/2007 (5:01 am)
01 11 2007 Torque 101: Fixing the Inventory SystemWell, the inventory system I'm using is based on Tim Newell's "Inventory Popup Tutorial"
Quote:
Avg. Rating (of 6) 4.2
Basic Information
Author: Tim Newell (Dec 15, 2001)
Categories: Scripting
It works for crossbow ammo. Now I have to figure out how to add more items to it.
One thing I notice that seems odd... In Realm Wars, the Inventory.cs file is in client/scripts while mine (from the tutorial) is in server/scripts.
Any ideas why? I'll have to check in the other forums, but it would seem like the inventory should be a client function, not server. OK, my InventoryGUI.cs is in the client\scripts folder. That makes more sense to me. Inventory.cs is the default inventory system that comes preloaded in Starter.FPS, and InventoryGUI.cs is the system that I created using the Inventory Pop-Up tutorial.
So far, all our inventory window does is display a list of crossbow ammo. It doesn't show the crossbow. Also, I thought the R was supposed to "throw" an object. OK, the crossbow isn't a 'thrown' weapon, like a spear would be. Also, how do I "drop" the crossbow? There are functions for onUse, onThrow, and onPickup, but not onDrop to "unmount" the crossbow.
Also, we need to add a Sword.dts that can be mounted.
Realm Wars can mount a sword and axe already, so I may just switch from starter.FPS to RealmWars. No sense in re-inventing the wheel.
I copied the 'shortSword.dts' from Realm Wars, and placed it in my world, but there is no collision detection. The console says "GameOneFPS/data/shapes/swords.dts - Collision mesh names should start with Col or LOSCol, encountered 'damageStart' in detail level 3". I guess I need to create a new 'sword.dts' file with correct collision details.
OK, I moved the 'rune_blade01.dts' over from Realm Wars. I can place it in my world as a static shape. I have to script a datablock for it to make it a 'dynamic' (non-static) shape.
In Server/scripts there is a 'sword.cs' file. NOTE: I may have copied that file from Realm Wars. It may not be a stock TGE script.
Here's what it says:
Quote:
//-----------------------------------------------------------------------------
// Torque Game Engine
//
// Copyright (c) 2001 GarageGames.Com
//-----------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Weapon Item. This is the item that exists in the world, i.e. when it's
// been dropped, thrown or is acting as re-spawnable item. When the weapon
// is mounted onto a shape, the SwordImage is used.
datablock ItemData(Sword)
{
// Mission editor category
category = "Weapon";
// Hook into Item Weapon class hierarchy. The weapon namespace
// provides common weapon handling functions in addition to hooks
// into the inventory system.
className = "Weapon";
// Basic Item properties
shapeFile = "~/data/shapes/sword/rune_blade01.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
emap = true;
// Dynamic properties defined by the scripts
pickUpName = "a sword";
image = SwordImage;
itemType="melee";
//trayIcon = "sword01.png";
};
//--------------------------------------------------------------------------
// sword image which does all the work. Images do not normally exist in
// the world, they can only be mounted on ShapeBase objects.
// phdana hth ->
datablock ShapeBaseImageData(SwordImage)
{
// Basic Item properties
shapeFile = "~/data/shapes/sword/rune_blade01.dts";
emap = true;
// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = 0;
eyeOffset = "0.1 0.4 -0.6";
// When firing from a point offset from the eye, muzzle correction
// will adjust the muzzle vector to point to the eye LOS point.
// Since this weapon doesn't actually fire from the muzzle point,
// we need to turn this off.
correctMuzzleVector = false;
// Add the WeaponImage namespace as a parent, WeaponImage namespace
// provides some hooks into the inventory system.
className = "WeaponImage";
// Projectile && Ammo.
item = Sword;
// ammo = CrossbowAmmo;
// projectile = FireBall;
// projectileType = Projectile;
// we are a HAND TO HAND weapon so we have a custom look anim
customLookAnim = "h1root"; // as a test
// Here are the Attacks we support
hthNumAttacks = 3;
hthAttack[0] = OneHandedAttackSwing;
hthAttack[1] = OneHandedAttackSlice;
hthAttack[2] = OneHandedAttackThrust;
// Images have a state system which controls how the animations
// are run, which sounds are played, script callbacks, etc. This
// state system is downloaded to the client so that clients can
// predict state changes and animate accordingly. The following
// system supports basic ready->fire->reload transitions as
// well as a no-ammo->dryfire idle state. In this case we are a
// HAND to HAND weapon and there is no ammo but we can use the
// reload time to limit how often the weapon can be fired
// Initial start up state
stateName[0] = "Preactivate";
stateTransitionOnLoaded[0] = "Activate";
// Activating the gun. Called when the weapon is first mounted
stateName[1] = "Activate";
stateTransitionOnTimeout[1] = "Ready";
stateTimeoutValue[1] = 0.6;
//stateSequence[1] = "Activate";
// Ready to fire, just waiting for the trigger
stateName[2] = "Ready";
stateTransitionOnTriggerDown[2] = "Fire";
// Fire the weapon. Calls the fire script which does the actual work.
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.2;
stateFire[3] = true;
stateAllowImageChange[3] = false;
//stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = CrossbowFireSound;
// Play the relead animation, and transition into
stateName[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.8;
stateAllowImageChange[4] = false;
//stateSequence[4] = "Reload";
stateEjectShell[4] = false;
stateSound[4] = CrossbowReloadSound;
};
//-----------------------------------------------------------------------------
function SwordImage::onFire(%this, %obj, %slot)
{
// default hand to hand weapon code
WeaponImage::onFireHandToHand(%this, %obj, %slot);
return;
}
// <- phdana hth
Make sure to exec it in game.cs as exec("./sword.cs");
This places swords in the upper tree view, but we can't pick it up (mount) or use it. Why?
More to come.
Tony
#95
I gave up, deleted the entire thing, and reloaded the default Starter.FPS
After working with it a few minutes, I realized that I had put alot into my last game attempt. I can't go back, so I now have alot of catching up to do. I have to redo my inventory system, and my map display. And then I found out that the "wrong version" error sometimes occurs because the texture simply isn't in the right place.
Things may have worked out better if I would have taken one shape at a time, copied it to my dtata folder, and tested it before copying the next. Also I should have copied ONE .cs file at a time, and EXEC'd it, then tested it before moving on. I tried to do too much at once. And finally, I SHOULD HAVE BACKED UP EVERYTHING BEFORE EDITING!!!!!!
So just to summarize;
1. BACK UP everything before editing.
2. Don't try to steal from Realm Wars, even if it is allowed.
3. I've been Torque'ing for four months and I'm back to the default Starter.FPS
3. Back up everything before editing. I can't say that enough.
At least I can say I've learned alot. For a total newbie, Torque really isn't that hard to enjoy :)
Well, now I've got some catching up to do.
More to come.
Tony
02/03/2007 (10:05 pm)
Well, I did it again. I completely ruined my game. I tried copying the stuff from the Realm Wars game into my own data folder, so I could use the sword and axe like in RW. Then I loaded Torque and started placing shapes and interiors. I got an error message saying something to the effect of "you don't have the correct version of the art blah blah blah" and torque closed my mission. After a half hour of trying, I got frustrated and started deleting things from my data directory. Then I realized some .cs files weren't being compiled. I'd forgotten to EXEC them in game.cs. I couldn't remember what was mine and what was RW. And since I never follow my own advice and BACKUP before editing, I had a real mess.I gave up, deleted the entire thing, and reloaded the default Starter.FPS
After working with it a few minutes, I realized that I had put alot into my last game attempt. I can't go back, so I now have alot of catching up to do. I have to redo my inventory system, and my map display. And then I found out that the "wrong version" error sometimes occurs because the texture simply isn't in the right place.
Things may have worked out better if I would have taken one shape at a time, copied it to my dtata folder, and tested it before copying the next. Also I should have copied ONE .cs file at a time, and EXEC'd it, then tested it before moving on. I tried to do too much at once. And finally, I SHOULD HAVE BACKED UP EVERYTHING BEFORE EDITING!!!!!!
So just to summarize;
1. BACK UP everything before editing.
2. Don't try to steal from Realm Wars, even if it is allowed.
3. I've been Torque'ing for four months and I'm back to the default Starter.FPS
3. Back up everything before editing. I can't say that enough.
At least I can say I've learned alot. For a total newbie, Torque really isn't that hard to enjoy :)
Well, now I've got some catching up to do.
More to come.
Tony
#96
I've changed the visibility levels. If you go into the World Editor (F11) and select the Sky from the upper Tree-View, listed in the lower Tree-View is Visibility. Set visibility to 200, and just below that is Fog::FogDistance. Set fogDistance to 100.
Now, buildings in the distance will fade in/out. The fade begins at 100 meters, and totally obscures view at 200 m.
I've figured out ambient lighting, sort of.
I've changed my Sun setting using the World Editor Inspector. I made the color 0.6 0.6 0.6 0.6 1 and changed ambient 0.3 0.3 0.3 1.
This makes things look darker (more natural).
So I mentioned that I had to start again, because of the whole RealmWars fiasco. I have to redo my inventory system. I'm using Tim Newell's Inventory Pop-Up tutorial again.
It works again, so I did it right! The only change needed is the directory listing. My folder isn't FPS it's GameOneFPS, so in inventoryGui.cs you have to change it. Also, the InvAmmo.png doesn't show up. The InvEmpty.png shows up OK, but the slot for ammo is blank. Hmmm.... OK, the tutorial says to name things Inv[insert ingame datablock name here].png - so if it was the rifle's inventory image you would name it InvRifle.png So I named my ammo image InvAmmo.png but apparently the datablock for ammo gives it the name Crossbow not ammo. So name the image InvCrossbow.png I wonder what the datablock calls the crossbow? Maybe I'll do an Inventory strictly for the weapons, four slots, 1. crossbow, 2. axe, 3. sword, 4. wand. And we need hotkeys, like 1 is bound to the sword, 2 to the crossbow, etc... In MorrowindIII they have a pop-up window with ten "hot-key" slots that can be filled with spells,weapons, potions, etc. You hit the number 1-10 and that effect occurs.
Why limit it to four things? The tutorial can be expanded. I can copy/paste the code to open up ten slots, or twenty, or a hundred. This is written as strings, but an array would be better. Of course I'm not a programmer, but I can ask questions. I've posted the question in the Discussions forum.
Other things to work on:
1. Inventory - it works, but it's very limited
-also, I want to add an Alchemy Inventory system
2. Dialog Bots - I lost my bots. I had BOTS but no way to communicate with them
-also need bots in other locations
3. Exploding Objects - This works for barrels, but I need debris.dts files, and more objects coded to pop
-like locked doors, path obstacles, etc.
4. Sign Triggers - These work, but they're not very good.
02/08/2007 (6:13 pm)
02-07-2007: Torque 101: Starting Yet AgainI've changed the visibility levels. If you go into the World Editor (F11) and select the Sky from the upper Tree-View, listed in the lower Tree-View is Visibility. Set visibility to 200, and just below that is Fog::FogDistance. Set fogDistance to 100.
Now, buildings in the distance will fade in/out. The fade begins at 100 meters, and totally obscures view at 200 m.
I've figured out ambient lighting, sort of.
I've changed my Sun setting using the World Editor Inspector. I made the color 0.6 0.6 0.6 0.6 1 and changed ambient 0.3 0.3 0.3 1.
This makes things look darker (more natural).
So I mentioned that I had to start again, because of the whole RealmWars fiasco. I have to redo my inventory system. I'm using Tim Newell's Inventory Pop-Up tutorial again.
It works again, so I did it right! The only change needed is the directory listing. My folder isn't FPS it's GameOneFPS, so in inventoryGui.cs you have to change it. Also, the InvAmmo.png doesn't show up. The InvEmpty.png shows up OK, but the slot for ammo is blank. Hmmm.... OK, the tutorial says to name things Inv[insert ingame datablock name here].png - so if it was the rifle's inventory image you would name it InvRifle.png So I named my ammo image InvAmmo.png but apparently the datablock for ammo gives it the name Crossbow not ammo. So name the image InvCrossbow.png I wonder what the datablock calls the crossbow? Maybe I'll do an Inventory strictly for the weapons, four slots, 1. crossbow, 2. axe, 3. sword, 4. wand. And we need hotkeys, like 1 is bound to the sword, 2 to the crossbow, etc... In MorrowindIII they have a pop-up window with ten "hot-key" slots that can be filled with spells,weapons, potions, etc. You hit the number 1-10 and that effect occurs.
Why limit it to four things? The tutorial can be expanded. I can copy/paste the code to open up ten slots, or twenty, or a hundred. This is written as strings, but an array would be better. Of course I'm not a programmer, but I can ask questions. I've posted the question in the Discussions forum.
Other things to work on:
1. Inventory - it works, but it's very limited
-also, I want to add an Alchemy Inventory system
2. Dialog Bots - I lost my bots. I had BOTS but no way to communicate with them
-also need bots in other locations
3. Exploding Objects - This works for barrels, but I need debris.dts files, and more objects coded to pop
-like locked doors, path obstacles, etc.
4. Sign Triggers - These work, but they're not very good.
#97
02/09/2007 (3:10 pm)
[EDIT] Removed old screenshots. 03-23-2007
#99
S U B V E R S I O N ! ! !
... or some other version control system. If you don't know what I'm talking about then please ask!
For more information, read these articles:
Introduction
Client / Server Installation*
Guided Tour
Subversion Best Practices webinar
Branches
CM Crossroads has tons more articles, but these that I listed should get you started.
*Note that a server is not required for SVN... if you have further questions, ask here and if you don't get any answers, contact me via IRC or e-mail. I'm generally on irc.maxgaming.net #garagegames, irc.fractureduniverse.com #fractureduniverse, and irc.mydreamrpg.com #MyDreamRPG.
02/13/2007 (10:38 am)
Not just to Infintium3d, but everyone that's even thinking about scripting for Torque, making a MOD or creating a game... one word:S U B V E R S I O N ! ! !
... or some other version control system. If you don't know what I'm talking about then please ask!
For more information, read these articles:
Introduction
Client / Server Installation*
Guided Tour
Subversion Best Practices webinar
Branches
CM Crossroads has tons more articles, but these that I listed should get you started.
*Note that a server is not required for SVN... if you have further questions, ask here and if you don't get any answers, contact me via IRC or e-mail. I'm generally on irc.maxgaming.net #garagegames, irc.fractureduniverse.com #fractureduniverse, and irc.mydreamrpg.com #MyDreamRPG.
#100
Thanks for bringing this up. Ever since GarageGames gave up on their CVS, there have been many questions about CVS in general. I haven't used any CVS so I can't be much help. All I know is that it is a way for all developers of a project to keep their files consistent. CVS: Concurrent Version Software (or something like that).
Tony
ps. Congrats mb on being the 100th post.
pps. I'm backing up right now :)
EDIT: I apologize for not posting more frequently. My day-job just got extremely busy, so I haven't much time for playing with Torque, but I'm still reading/learning as much as possible.
02/13/2007 (5:24 pm)
Is SUBVERSION a free CVS? Thanks for bringing this up. Ever since GarageGames gave up on their CVS, there have been many questions about CVS in general. I haven't used any CVS so I can't be much help. All I know is that it is a way for all developers of a project to keep their files consistent. CVS: Concurrent Version Software (or something like that).
Tony
ps. Congrats mb on being the 100th post.
pps. I'm backing up right now :)
EDIT: I apologize for not posting more frequently. My day-job just got extremely busy, so I haven't much time for playing with Torque, but I'm still reading/learning as much as possible.
Torque Owner Fucifer