Game Development Community

RTS Tutorial not working.. Player start location below ground

by Zeph · in Technical Issues · 09/06/2011 (5:23 pm) · 7 replies

Was doing the RTS tutorial located here ---> http://www.garagegames.com/products/torque-3d/documentation/user/doc41

Half the tutorial does not work... Clicking on AIplayer does not auto fire, and the player start points are all messed up every time I reload either editor or game... Player start locations are now under ground or in water floating... I attempted to reposition the spawn markers that are below level then save level. When I reload level starting positions are back below level.. Also, Some of the spawn spheres below level will not allow me to edit inbox...

I attempted to delete all spawns, and remake them... This did not work.. I searched the forum, and looked for game.cs per instruction, and did not see the code entry for default spawn locations...

Is this an old tutorial meant for an earlier version of Torque? How do I correct this issue without making a new level??

Thanks for any help ;)

#1
09/06/2011 (5:24 pm)
By the way Im using the new Torque 3d version....
#2
09/06/2011 (6:40 pm)
Just to update everything since last post... I took the resources from the bottom of the page and copied over my .cs files with those resources provided, just to see if maybe.... Maybe I did an error on my end as far as code goes... When I attempted to load and play the level I received an error unable to create player class ect... The error goes by so fast its hard to read it....

At the bottom of the tutorial here ---> http://www.garagegames.com/products/torque-3d/documentation/user/doc41#Camera_Modes

There are two links @ bottom for resources:

You can download the completed scripts by CLICKING HERE. http://docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced/rts_prototype_scripts.zip

If you wish to download the scripts and assets in a single file, CLICK HERE.
http://docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced/rts_prototype.zip
#3
09/09/2011 (12:44 pm)
Zeph,

The tutorial should still work with Torque 3D 1.1; I ran through it about a month ago and it checked out for me. It was, however, very easy to make a mistake that broke it (I made several).

For the issues you're having with your level, it would help if you could post any errors you are getting in your console.log file in the game directory.

One recommendation I would offer for the RTS tutorial is to use the assets that come with the default project template instead of the ones the tutorial tells you to use. For example, I found it easier to use DefaultPlayerData in place of BoomBotData.

#4
12/11/2012 (8:34 am)
This has been updated to work in T3D 1.2, but that doesn't mean that there haven't been changes in the open source codebase that might cause problems (very unlikely, but not impossible).

However, I'm not entirely sure that those scripts in the download package are "perfect"; I'd have to look, but I'm pretty sure that I got the latest working version uploaded before the final release update to the site.

I'm not sure how the start location got moved - the tutorial doesn't even cover moving the start point and actually instructs the reader to remove all but one spawn sphere if there are more than one (to keep things simple).

If the errors are too fast to catch, try looking in your game folder for the console.log file - all of those errors are written to it. That way you can review them at your leisure. I'm certain that doing so will be enlightening, since they should point you to the source of your problems.

If you're not using Torsion I'd recommend it. It has integrated script debugging features that will save you hours of hair-pulling. Or at least Notepad++ - it will make it easier to find the correct line in the script.
#5
12/11/2012 (10:23 am)
Quote:
but that doesn't mean that there haven't been changes in the open source codebase that might cause problems
There may be some minor issues with the new Template(s) once they go live. The directory structure will be slightly different, but still similar enough that it shouldn't be too complicated to figure out. I haven't looked at the tutorial to see how it handles spawning, but if it's modifying the gametype package's spawn, which overrides that of the core package, it should be noted that the gametype stuff will be removed from the Starter Template. Which means that there will be slight differences in arguments passed during the spawn process. Ideally, at some future point, the tutorial code would be rolled into that of the Starter Template and then expanded upon for a RTS Template.
#6
12/11/2012 (7:17 pm)
The only thing done with the spawn sphere is to select it in the editor and set the spawnClass and spawnDatablock on it. That shouldn't change (unless you guys are gutting the SpawnSphere class).

I take it back - there is a section earlier that walks through changing $Game::defaultPlayerClass and $Game::defaultPlayerDatablock in scripts/server/gameDM.cs, but then later it covers simply setting these on the spawn sphere itself.
#7
12/12/2012 (2:48 am)
Nah, there will be no functional change in the spawn code; however, the gametype version did override the core's version of spawning and introduced a new parameter as the first argument, which changed the order of all others. Removing the gametype code will simply mean that the instructions for the Starter Template will be for the (formerly) original spawn code that doesn't include the one additional argument. For the FPS Template, there will be no changes other than the directory restructuring.