8 direction on RTS

This forum is currently in read-only mode.
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • 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.

  • 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

  • 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:

    http://www.badongo.com/file/12169978

    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

    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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Think more Warcraft, less Warzone.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)