RTS Controls, now with Behaviors
by Trace Kern · in Torque Game Builder · 08/02/2007 (12:12 pm) · 5 replies
This thread is intended to continue discussion on how to use/design behaviors to emulate common RTS style contorls. Things like mouse selection of single or multiple units. Right-click actions/movement. Saved selection groups. Etc.
Original discussion started here: www.garagegames.com/mg/forums/result.thread.php?qt=65414
Feel free to catch up over there. Don't worry, we'll wait.
Back? Okay, now let's get back to business.
Original discussion started here: www.garagegames.com/mg/forums/result.thread.php?qt=65414
Feel free to catch up over there. Don't worry, we'll wait.
Back? Okay, now let's get back to business.
#2
I agree on your point there.
I was actually thinking of a "player" object which is invisible, which is used to track the players keyboard input and hold other behaviors needed as well (like resources, current camera position etc for replay and all the like)
08/02/2007 (12:37 pm)
No problemI agree on your point there.
I was actually thinking of a "player" object which is invisible, which is used to track the players keyboard input and hold other behaviors needed as well (like resources, current camera position etc for replay and all the like)
#3
08/02/2007 (10:21 pm)
Ahhh, yes that's pretty much what I was suggesting. Only instead of calling it 'Player', which could easily be confused with an actual player class, I'd suggest something more generic. Controller perhaps?
#4
So Controller is more likely to be a good idea.
Good point there.
As well as there is another thing this controller could be used for: camera pivot, an invisible "target point" for the camera to which it is mounted.
This could perhaps solve a problem I have with the MouseSelector, which I wanted to do the "move the camera while dragging if the rect is larger than X units, whereas X can be defined through another property". With a controller and behavior for this, this should be cleaner to get done and most likely simpler.
08/03/2007 (12:38 am)
Hmm yeah I forgot about those RTS that have ingame Avatars like Spellforce and especially forgot group action adventures where the RTS selection etc is of use as well but where even more than one ingame representation exists.So Controller is more likely to be a good idea.
Good point there.
As well as there is another thing this controller could be used for: camera pivot, an invisible "target point" for the camera to which it is mounted.
This could perhaps solve a problem I have with the MouseSelector, which I wanted to do the "move the camera while dragging if the rect is larger than X units, whereas X can be defined through another property". With a controller and behavior for this, this should be cleaner to get done and most likely simpler.
#5
11/04/2007 (9:28 pm)
What is the cleaness way to design behaviors so that if I click on an object and then click on its destination anywhere on the screen, it will automatically move to that position? I was thinking of using combination of AI/Move Toward and RTS/MousePointer and MakeSelectable? How should I track the objects selected so I can cycle through it? And also queue up a list of destination point it needs to visit and exec callback?
Torque Owner Trace Kern