Game Development Community

Torque 3D 1.2 RTS Prototype - suggestions please.

by Richard Ranft · in Torque 3D Professional · 05/17/2012 (11:40 am) · 56 replies

I am reviewing and revising this document and I would appreciate any input that any of you have on the topic.

In order to bring it more in line with the FPS Tutorial I am adding some additional clarification to file locations and multi-step processes, but I have been wanting to bring this up to speed with full functionality in multiplayer as well in both hosted and dedicated server modes.

Thanks everyone!

About the author

I was a soldier, then a computer technician, an electrician, a technical writer, game programmer, and now software test/tools developer. I've been a hobbyist programmer since the age of 13.

#21
08/15/2012 (9:20 am)
It's not inherently multiplayer at all. There are differences in the way you handle things that make it easier or harder to covert T3D projects from single player to multiplayer - my goal was to make the tutorial useful regardless of which type of game you are making.

Essentially, if you set it up to work in multiplayer then it will also work in single player - but the other way does not generally work.

Also, still pending Q/A time for the new document but it's not forgotten. I'm making a pest of myself over it.
#22
08/16/2012 (4:52 am)
Thanks for the info. :)
Create a lot more ruckus and get the document/tutorial out to us.
#23
08/29/2012 (10:42 am)
Our new Q/A man has told me that he's going to try to slip this project in between a couple of other tasks, so keep your fingers crossed. Hopefully I have done well and we can get this online before the end of the week - or I have done poorly and it will need another pass....
#24
09/01/2012 (2:03 am)
I can tell you have done great, already ;)
A week you say...keep us posted.. Will need to free my next weekend.
#25
09/05/2012 (8:34 pm)
Ok, got a list of bugs (fairly short) to clean up - I'll try to get them straightened out by Sunday evening. Hopefully it'll pass muster and we'll get it posted shortly thereafter.
#26
09/20/2012 (3:14 pm)
Well, almost didn't make it for the MIT release but it's done! Head on over to the documentation section and check it out.

Feedback is appreciated, as always.

Thanks!
#28
09/20/2012 (4:02 pm)
Quote:
A special thanks to Steve Acaster and his Tactics-Action Hybrid Game Tutorial series for saving me considerable time fiddling with the camera.
lol, thanks.
#29
09/20/2012 (4:46 pm)
Credit where credit is due - and that means Mitch deserves a mention in there now that I think about it; he wrote the original after all....
#30
11/03/2012 (1:56 pm)
Few things that would made this example 10x better

example of making options for placement for more then one building.
(with example of two people could figure add as many as they need)

example of gather two types of resource simple trigger effect or somthing.
(with example of two people could figure add as many as they need)

example of adding a cost from resources to spawn things from buildings

these things are need for a true rts not a coder but if I figure them out is it okay to post them here to be added to example?
#31
10/05/2013 (9:47 pm)
It appears there is still a bug in the RTS Prototype tutorial code.

In two different sections where the documentation describes adding and modifying function serverCmdorbitCam in ServerCommands.cs the code has this line listed:
%client.camera.setOrbitObject(%client.player, mDegToRad(20) @ "0 0", 0, 5.5, 5.5);

But in order to get the code to function without crashing the game when I switch to orbit cam, I needed to add an additional space to the rotation string parameter in order to send the proper x, y, z Euler angles to the C++ code:
%client.camera.setOrbitObject(%client.player, mDegToRad(20) @ " 0 0", 0, 5.5, 5.5);

(Note the additional space after the @ " -- without this the script was sending an infinite z value for the rotation, in my case, since it was tacking the first zero onto the end of the x-factor of the rotation)
#32
10/06/2013 (12:32 am)
Nice catch. Changing the @ to a SPC would make the code clearer:
mDegToRad(20) SPC "0 0"
#33
10/06/2013 (8:28 am)
Aw hell - that whole block:
// ----------------------------------------------------------------------------
// Camera commands
// ----------------------------------------------------------------------------

function serverCmdorbitCam(%client)
{
   %client.camera.setOrbitObject(%client.player, mDegToRad(20) @ "0 0", 0, 5.5, 5.5);  // here
   %client.camera.camDist = 5.5;
   %client.camera.controlMode = "OrbitObject";
}
function serverCmdoverheadCam(%client)
{
   %client.camera.position = VectorAdd(%client.player.position, "0 0 30");
   %client.camera.lookAt(%client.player.position);
   %client.camera.controlMode = "Overhead"; 
}

function serverCmdtoggleCamMode(%client)
{
   if(%client.camera.controlMode $= "Overhead")
   {
      %client.camera.setOrbitObject(%client.player, mDegToRad(20) @ "0 0", 0, 5.5, 5.5); // here
      %client.camera.camDist = 5.5;
      %client.camera.controlMode = "OrbitObject";
   }
   else if(%client.camera.controlMode $= "OrbitObject")
   {
      %client.camera.controlMode = "Overhead"; 
      %client.camera.position = VectorAdd(%client.player.position, "0 0 30");
      %client.camera.lookAt(%client.player.position);
   }
}

function serverCmdadjustCamera(%client, %adjustment)
{
   if(%client.camera.controlMode $= "OrbitObject")
   {
      if(%adjustment == 1)
         %n = %client.camera.camDist + 0.5;
      else
         %n = %client.camera.camDist - 0.5;
      
      if(%n < 0.5)
         %n = 0.5;
         
      if(%n > 15)
         %n = 15.0;
         
      %client.camera.setOrbitObject(%client.player, %client.camera.getRotation(), 
        0, %n, %n);
      %client.camera.camDist = %n;
   }
   if(%client.camera.controlMode $= "Overhead")
   {
      %client.camera.position = VectorAdd(%client.camera.position, "0 0 " @ %adjustment); // and replacing the trailing space here with SPC would be good.
   }
}

Question: are we migrating these to the wiki? Because if we're not this is extremely unlikely to be addressed.
#34
10/06/2013 (5:09 pm)
I put in a pull request to fix this in the https://github.com/GarageGames/Torque3D-Documentation repo so it doesn't get lost....

Might finish and add my AI Tutorial here shortly....
#35
11/24/2013 (5:20 pm)
are you adding in a mini map resource?
#36
11/25/2013 (6:06 pm)
Find a way to get a mini-map and some fog of war in there and you'll have yourself a very impressive starting point for almost any type of RTS game.
#37
11/25/2013 (7:50 pm)
Seconded.
#38
11/25/2013 (10:17 pm)
Just on the fog of war thing, one place to start on this is the lightmap, modifying the lightmap at a shader level is the best way to do this but i dont know how to do this without modifying torques source code, and im guessing Richard is going to keep this purely script editing.
#39
11/26/2013 (6:38 am)
This was intended to be solely in script - though I did veer off a little and provide a translation of the ballistics calcs for the grenadier into C++. I'm not very familiar with the renderer or with RTT in general so FoW and minimaps are still on my personal list. Right now my "minimap" is a black square and it crashes when entering the GUI editor.

However, if you want to really see something, grab the AI Tutorial and take a run at it. Might have to pull down the assets from the RTS Prototype - yeah, better do that. That'll keep you busy....
#40
11/26/2013 (6:53 am)
Yea I downloaded them last friday has there been any changes since then?

I know there is a minima on here done purely in script but it would be very hard on a pc when ur talkin rts scale where there would be hundreds of units at a time.think its title was Torque3D minimap - no source edit. Would be useless for RTS I think tho,