Can we stretch a layer? Isometric 3D engine

0 favourites
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • I fail to see how my example that newt quoted is wrong. It's the same as the transform in the op except everything is already rotated by 45. The second example quoted by christina is for a perspective transform, which isn't the same. The main difference is axes of motion in my example are relative to the screen instead of to the iso grid. Other than that christina's example is a valid iso transform.

  • newt yay! You got it in the end

    jobel yes totally this!

    Magistross another victory! Now I have to iron out the canvas placement, because there's some cropping due to the 45 degree rotation of the first one.

    Also if there's an easier way to do it, R0J0hound would know. Like if it was possible to paste a *rotated* layer onto the canvas object. But my tests indicate that a rotated layer gets pasted un-rotated into the canvas object. Maybe that's for the best anyway.

  • R0J0hound the reason I'm saying it's "wrong" is because the positions do not line up

    If the black ball is on the tip of the first tile of the second row, then the grey (ortho) ball should be at the same tip, where the arrow points. No?

  • That would be the case if the hot spot was at the bottom of the sprite, but it isn't. The black circle's hotspot is in the middle a of tile, so is the grey one.

  • That's cosmetic, the transformation only transforms the object's origin. To complete the illusion of the circle being a sphere the circle's origin would need to be moved to the bottom.

    In your capx you can fix it being off center by not moving the canvas' and have their origins be in the center.

    canvas1: set angle to 0

    canvas1: clear

    canvas1: paste layer

    canvas1: set angle to 45

    canvas2: set height to 480

    canvas2: clear

    canvas2: paste canvas1

    canvas2: set height to 240

    You'll probably want to make canvas2's height to be twice the screen height so stuff will be drawn from the top to the bottom.

    Still in order to not have empty triangles in the corners you'll have to make canvas1 much larger than the screen (that could probably be calculated but it's probably easier to guesstimate).

  • Magistross huh!

    R0J0hound crap I should have checked! It's not like I didn't know this happens. Apologies! Very cool And thanks for the tips.

  • My concern with this kind of approach is the "squish by 50%" step is destructive to artwork drawn in planometric style. Linear sampling will blur pixels, and point sampling might inconsistently pick pixels depending on floating point scaling or positioning. It seems a better idea to just draw your artwork in isometric to guarantee pixel-perfect rendering.

    There was a reason the engine doesn't support per-axis scaling of layers, but frustratingly I can't remember what it is...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks ASHLEY.

    Linear sampling and blur would be an acceptable sacrifice in some cases, and it's a good trade-off for an engine that doesn't need isometric math. But yes, it will be less pretty

  • Thank you so much for this thread, exactly what I looking for today!

    Additional question:

    How do I then trim off the excess black area?

    I'm using this "planometric to fake isometric" technique, and I've added offsets to the canvas positioning to mimic 'system-Scrollto-player' so my maze appears to be moving around my character. I'd like to zoom in or trim the excess screenspace but I don't understand the canvas object well enough to know if I can do this within the structure as it is now.

    The only thing I can think of is using the techniques in pacman demos to create a third canvas that is "zoomed in" which seems wastefully wrong?

    if I should rather submit this as a fresh "how do I.." topic, let me know and I'll move it.

  • You should make a new topic, and a capx.

    Questions like "How do I then trim off the excess black area?" are hard to figure out without an example.

  • alrighty, it's over here:

  • well since this was resurrected, let me just pop in to say newt I'm still surprised at your disagreement. this works fine

  • Let's say reanimated like cranberries zombies.

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