Unit Movement

Unit Movement

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderators: Moderators, Moderators

Post Reply
Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Unit Movement

Post by Von66341 »

Hey!
I have been looking through the avaliable gadget and widget on unit movement and stuff.

However I not quite if it is possible to the following:

1. Say I have 5 soliders
2. When I give a move command on 1 solider, the rest of the solider will follow. Same with all the other commands, attack, guard etc etc.

Have anyone done or know any ways that this can be possible?

Another question:
If we have textured road in the map, will we be able to set units to move only on those roads?

Thanks!
0 x

Google_Frog
Moderator
Posts: 2445
Joined: 12 Oct 2007, 09:24

Re: Unit Movement

Post by Google_Frog »

1. Say I have 5 soliders
2. When I give a move command on 1 solider, the rest of the solider will follow. Same with all the other commands, attack, guard etc etc.
Very possible. This can be done a few ways depending on exactly what you want.
If we have textured road in the map, will we be able to set units to move only on those roads?
Set where? Do you want the players to be able to tell units to stick to the roads or do you want to prevent all off road movement?

Preventing all movement is simple, use typemaps.

Toggling road using is harder, you could replace long move orders with ones that are going to follow the road. Maybe there is some solution to do with unit swapping and typemaps as well.
0 x

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Unit Movement

Post by Pxtl »

Simply by using a typemap to make road use substantially faster makes the pathfinder *heavily* encourage road use. See Beherith's older FFA maps to watch units swarm along the roadways.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Unit Movement

Post by smoth »

*sighs* if it was only that simple "use typemaps"

Unit gets pushed into typemap: stuck
Unit slows down too slowly, goes into typemap: stuck

Typemaps are filled with all sorts of issues like this when you explore them
0 x

Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Unit Movement

Post by Von66341 »

Google_Frog mind sharing some ways I could explore on squad commands?

I am currently able to spawn my units in squad.
So for e.g. if I have 5 solider, the 5 solider will spawn together at game start.
Do I need to script a widget or gadget so they will move together and support each other in the battle.

It seem typemaps have it own set of problems.
Smoth care to elaborate more about the units into type map and gettting stuck?

Thanks!
0 x

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Unit Movement

Post by Pxtl »

smoth wrote:*sighs* if it was only that simple "use typemaps"

Unit gets pushed into typemap: stuck
Unit slows down too slowly, goes into typemap: stuck

Typemaps are filled with all sorts of issues like this when you explore them
Which is why a hard "can't move on terrain X" typemap is a bad idea without some Lua to force the unit back onto the road if they end up off it.

Really, most games suffer from this problem of units getting stuck on terrain they can't navigate, it's just a rare occaision without the typemap making the issue more common.

But either way, a soft limit of "unit moves really slow on typemap X" is a good solution.
Last edited by Pxtl on 14 Apr 2011, 17:48, edited 1 time in total.
0 x

User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Unit Movement

Post by SinbadEV »

Von66341 wrote:Google_Frog mind sharing some ways I could explore on squad commands?

I am currently able to spawn my units in squad.
So for e.g. if I have 5 solider, the 5 solider will spawn together at game start.
Do I need to script a widget or gadget so they will move together and support each other in the battle.
Try out "GundamRTS" as it has squads that work as you've described them. I'm pretty sure all of the behaviour is in Lua scripts so you could poke at them and figure out how smoth accomplished it.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: Unit Movement

Post by smoth »

Kdr coded the thing btw I don't even remember what/if I did any time on it
0 x

Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Unit Movement

Post by Von66341 »

Thanks lots for the guidance! The scripts from gundam works well with slight modification. Thanks! =D
0 x

User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2695
Joined: 25 Aug 2004, 13:31

Re: Unit Movement

Post by bobthedinosaur »

Cuberor uses this.
0 x

User avatar
Echo419
Posts: 64
Joined: 31 Aug 2010, 14:09

Re: Unit Movement

Post by Echo419 »

This squad thing, is it like AoE2 formations? or just a "move as group" sort of thing?
0 x

Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Unit Movement

Post by Von66341 »

Links to the orignal gadget that was used in gundam.
http://springrts.com/phpbb/viewtopic.ph ... &view=next
0 x

Post Reply

Return to “Game Development”