8 direction on RTS

New releases and general discussions.

Post » Wed Nov 19, 2008 4:29 pm

I was playing with the rts template, and I thought Id see if an isometric sprite would work (bless you Reiner tilesets), and it does... sorta.
The problem is that the rts behavior uses full 360 degrees rotation all the time, whats needed is the ability to choose either 8 way or 360, even better would be to add rotation points on the animator bar... say 32? You could then choose none, 2 way, 4way, 8 way, 16 way, 32 way.
Ideally, it would be great if all the movement behaviors had this.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Thu Nov 20, 2008 7:00 pm

well isometric doesnt rotate in a circle (like 8 directions), its an oval with a width its height. so the current rts movement wouldnt work out too well, in iso if you want a tank to move foward, scale to the view angle (2x=1y right?) you need to do

set position
set X to
- RTStank.x+((cos(RTStank.angle))*2)*('speed')
set Y to
- RTStank.y+(sin(RTStank.angle))*('speed')

this moves you in an oval, meaning youll move twice as fast X wise as you would Y wise.

its not right for a tank to move in 8 directions, since that uses a circular method of rotation where (1x=1y)

i think the best way to make an iso rts would be to have an actual setting in the rts movement, or 2 code your own speed limiter based on angle,

8 directions is not the way to go

i never actually tried the rts behaviour but its pretty good now that i looked at it, my only problem is
units shouldnt be able to rotate while moving, it makes it look like they're bumper cars, and they run into obstacles because of this
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Nov 20, 2008 9:14 pm

Well I'm not trying to replicate true isometric, more like quasi-isometric, using pre-rendered sprites.
Here's a cap to show what Ive done:
[url:2wk2ro4y]http://www.badongo.com/file/12169978[/url:2wk2ro4y]
Now this is using the 8-direction behavior, using arrow keys for movements, but if you use the rts behavior, you get the sprite physically rotated, on angles not specified in the animator bar, which is unwanted.

[quote:2wk2ro4y]units shouldn't be able to rotate while moving, it makes it look like they're bumper cars, and they run into obstacles because of this[/quote:2wk2ro4y]
The thing is you still need some sort of rotation, because you don't want the sprites flipping on opposite angle movements, and when you think about it tanks change angles that way in real life.

Yeah a true isometric behavior would be great, but I'm not sure how that could be transferred to the animator bar. Since 90 degrees would be more like 45 degrees. I mean at least not without something telling the user the difference.

Any way, I'm just going with what I've got, the easiest way possible, and I'm saying having 8-way on all movement behaviors would be a nice feature, but 16, even 32 would be greater. Sorry if that sounded rude. 8)
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Thu Nov 20, 2008 10:40 pm

i cant test your thing right now because im using an older version, i usually wait a week or 2 before upgrading, but anyway, making an animation would be easy, you just use 3ds or something and render a 360 spin at an iso angle, using a non perspective camera, any iso unit has 2 be done this way, i believe the angles would match up, although im unsure.

it prolly would because at an angle of 45 your tank would be facing in a slope of +0.7 for y, and +1.4 for x, meaning youd move in the direction that matches that animation angle, if u rendered your sprites correctly of course.

and about the bumper cars-ness, i mean vehicles should stop,and then rotate on place, like a real tank also does, if youve ever played tiberium sun or red alert 2 youd know what i mean.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Nov 21, 2008 9:19 am

Think more Warcraft, less Warzone.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests