Isometric Projection

0 favourites
From the Asset Store
Build your map with these isometric objects and terrains
  • R0J0hound

    Your reference does not work for Z-Rotation.

    Your "isometric Racer" doesn't hit the right Angel "45°"

    Search for:

    Choosing the correct isometric character facing direction.

    What's the best way of transforming a 2D vector into the closest 8-way compass direction?

    Isometric graphics in video games and pixel art (wikipedia)

    Can you please create a capx for it? ...resulting in these axes following a 26.565° (arctan 0.5) angle to the horizontal.

    Example:

    I only wanna set a variable like 45° and your event transform it to isometric Z-Rotation and set the playercontrol to this angle.

  • JamesXXXYZ

    It does. Since it's using x and z it's rotating around the z axis. Use x and z for y axis rotation, and y and z for x axis rotation.

    You can convert an angle to the closest 8 direction with

    You can convert an angle to an iso projected angle with

    angle(0, 0, cos(a), sin(a)/2) where a is an angle.

  • R0J0hound

    Your 8 way example is completly wrong

    Your (?) isoracing example miss the right diagonal axis around 3°.

    [attachment=0:28744sq7][/attachment:28744sq7]

    Can you put this in events for game isometric please?

    (I only wanna write x°, y°, z°)

    The best is to calculate the game in 3D and then simply project it into isometry.

    const angle:Number = Math.PI/3;//you may want to tweak this one

    const xVec:Point = Point.polar(-Math.PI/2 + angle, 1);

    const yVec:Point = Point.polar(-Math.PI/2 - angle, 1);

    const zVec:Point = new Point(0, -1);

    ............................

    transform 3D to 2D:

    function transform(x:Number, y:Number, z:Number):Point {

    return new Point(x*xVec.x + y*yVec.x + z*zVec.x, x*xVec.y + y*yVec.y + z*zVec.y);

    }

    ............................

    I uploaded on my Youtube channel two isometric examples, both are in "Real" isometric view.

    Is the speed reduction from 0° to 90° linear?

    8 Way? No.

    Sprites with walk cycle i wanna have 24 Way (min). Without 40 Way (min), I'm thinking about 360 Way. My highest rotation test was by 120 Way.

  • So the 8 direction capx doesn't work right for isometric. I can see that, which isn't a problem since it wasn't made with isometric in mind.

    So the problem becomes how to find the closest angle as in your image. There probably can be an elegant formula to do it nicely, but barring deriving that you can check against all those angles to see if it's close.

    But wouldn't it be simpler to do all the motions from a top view and set all the visible stuff to an isometric projection? Then the 8 direction capx is perfectly applicable. I doesn't matter that 45 is an animation drawn at 22.5 degrees, because when the angle of motion is changed from to view to iso it will be 22.5.

  • R0J0hound

    I guess it doesn't work (I saw other examples of isometric view[Construct 2]). Problem is that isometric rotation is not linear. I don't know if the iso pathfinding demo has correct rotation and speed. I guess every example which content sin and cos aren't real iso projection. I have no problem to render things out in isometric view. Use my example 24 Way picture and load it to your 8 Way example. I don't really understand the theory behind isometric and i'm not a programmer.

  • JamesXXXYZ

    I'm not sure what you mean by isometric angles not being linear. If 0 degrees is to the right and 90 degrees is down then with 1:2 isometric the vertical speed should half the speed of going horizontal. sin and cos aren't a reason for why it wouldn't work.

    Would it be simpler if you just did all the motion as if in top view and convert to iso by dividing all y positions by two?

  • The Pathfinder behavior/ movement doesn't play well with setting frames based on angles. The behaviors expression for the angle of movement only points to the node its going to. You could probably figure out the correct angle if you looped through all the xy's needed to get to the next node, but... bleh.

    It would be way easier if we had some expressions to get those lines.

    If thats the pathfinding he's talking about that is.

  • newt

    isometric game basic based on "Pathfinding demo"

    Can you integrate isometric rules for playercontrol (Rotation/Speed), please? Is it possible that the enemycontrol is limited to 24 way?

  • JamesXXXYZ

    I'm not sure what you mean by isometric angles not being linear. If 0 degrees is to the right and 90 degrees is down then with 1:2 isometric the vertical speed should half the speed of going horizontal. sin and cos aren't a reason for why it wouldn't work.

    Would it be simpler if you just did all the motion as if in top view and convert to iso by dividing all y positions by two?

    good example, but isn't better to make a graphics isometric directly? like in photoshop?

    I mean, without script? if someone want to make holes...etc... how can be reached this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound

    This is a good example, but i don't need this for movements. SpriteIso doesn't rotate. Can you create a playersprite and add this code (this is for rotation)? First line i think isn't necessary.

    const angle:Number = Math.PI/3;//you may want to tweak this one

    const zVec:Point = new Point(0, -1);

    X and Y i don't need or?.

    const xVec:Point = Point.polar(-Math.PI/2 + angle, 1);

    const yVec:Point = Point.polar(-Math.PI/2 - angle, 1);

    Ribis

    I think the same, but it's o.k.

  • newt

    isometric game basic based on "Pathfinding demo"

    Can you integrate isometric rules for playercontrol (Rotation/Speed), please? Is it possible that the enemycontrol is limited to 24 way?

    Yes, I already did, just not with 24 angles.

    The template uses 8, since that was the least amount of frames that divided into 360.

  • Ribis

    You can make the graphics any way you want there's no right way.

    JamesXXXYZ

    That code just defines 3 isometric direction vectors, not rotation.

    Angles can be handled exactly as I stated before.

  • newt

    Thx newt, but your version is not what i'm searched for.

    R0J0hound

    thx you very much, this looks good. I like my controls more than yours.

    If you have time can you optimized my version or put this sprite in yours and insert my controls please?

  • R0J0hound

    [attachment=1:1hyiqqeu][/attachment:1hyiqqeu]

    40 Way example:

    Green arrow is my playercontrol. I don't know how to limit the rotation of the playercontrol. 9° steps for 360° doesn't work. I only wanna write how many steps it should rotate for 360°. Can you solve this for me, please?

    You wrote: "Would it be simpler if you just did all the motion as if in top view and convert to iso by dividing all y positions by two?"

    You can control this with my reference.

    [attachment=0:1hyiqqeu][/attachment:1hyiqqeu]

  • JamesXXXYZ

    Sorry I'm unable to fix it or merge features from your capx to mine. Pretty busy.

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