christina's Forum Posts

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

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

  • newt r0j0's example is completely wrong, the mapping of the positions are all wrong, it's not the same thing.

    [EDIT: no it absolutely isn't wrong, my bad! ]

    You're thinking of coordinate transformation, I'm plainly showing you transformation of the *end visual result*

    If you want more convincing, take my example and implement a super-exact grid movement on the orthogonal plane, perfect square tiles. When you run it through the two canvases, you'll see every pixel lines up, pacman will be on the exact same grid square in both the orthogonal and iso plane.

    Try it!

    Magistross agreed. Even though! The "floor" doesn't need any distortion. Only vertical sprites do (walls, people etc). And even then it's a distortion that can just happen using code at Start of Layout: all family_vertical_sprites rotate -45 degrees and scale vertical 200%. And then you forget about it

  • newt?

  • Can you show me what doesn't work. Because all my tests show it does. Look at this CAPX. The collisions are correct, pacman can't walk through walls. There's no offset or math, it's the same as regular 2D pacman, but it is rendered isometrically. Help me understand what you don't like about this, apart from the probably inefficient method I'm using.

    Are we talking about a different thing? I don't mind stretching layers any more. Just the canvas transformation looks fine. And it works fine.

    And apparently it's used in http://rymdkapsel.com/ too.

  • So it seems

    Do you get my genius idea now newt? In that pacman CAPX you can just create maze obstacles and set them to solid, and the collision is taken care of!

    There's probably ways to simplify things. Maybe 2 canvas objects are unnecessary? But it works!

  • Whaaat! OK not only am I right, but they informed me on twitter that Nintendo used the same effect for A Link Between worlds! They distorted link in order to make him look good from top-down.

  • Just tried it. When you press space, a coin appears to the exact right of pacman in the ortho view. I pre-stretched and rotated the pacman sprite so it appears correct. Nothing hard. There may be ways to streamline that.

    Here's the ortho view:

    And here's what the engine looks like after the canvas transformation. Everything is 100% exact.

    What do you think?

    CAPX here

  • They will not. I'm feeling stupider by the minute now, but imagine you're taking this game

    Subscribe to Construct videos now

    just as it is, no changes in code or graphics,

    and display it rotated 45 degrees and then squashed 50%.

    It becomes isometric. The sprites will look weird, but the positions will be perfectly fine. And you could adjust the sprites and have UI on a separate layer.

    Am I wrong?

    ETA: if you needed to draw something to screen coordinates, yes, you would have to convert positions. But you could just draw something on the plain orthographic map instead. Like, a powerup to the right of the player on the game layer (before the transformations). It would appear to the top and right of the player after the transformation, at proper iso coordinates compared to the player.

  • newt what are you talking about?

    Ok maybe I need to explain it better.

    You make an orthographic game that looks like Ultima above (or chess) on one layer. Not one image, that's just my test. You make a proper tileset. Floor tiles, walls, characters, everything.

    Movement and Z order are easy, since it's orthographic. The higher the Y and X, the higher the Z order. It's solved, the same way Ultima solves it. You don't have to do anything else.

    Then you draw everything on two canvases, one rotates what you see by 45 degrees, the other squashes the rotated version to 50% height. The end result is isometric.

    Yes, you will need to make all your vertical sprites (walls, characters) vertically stretched by 200%, so they survive the squash. And you have to know where they're facing so you can choose the appropriate animation.

    But other than that, you get basically free 3D. No?

  • newt I get it. I don't really need layers with separate width and height scale. The canvas trick seems to work ok. So why is it a bad idea? Look at what it inspired someone to make: https://twitter.com/FireCamp_games/status/594500636927983616

    Thanks for the cool iso article

  • newt So it's a crap idea? What do you suggest?

    Edit: I was thinking we could keep track of the purple square sprite's *actual* screen coordinates and angle, and slap a proper isometric sprite on top, above the canvas transformations

  • So I had an epiphany yesterday. This sums it up:

    My idea caught fire on twitter and already there's an engine for Game Maker. Have a look:

    https://twitter.com/FireCamp_games/status/594500636927983616

    An isometric 3D engine out of an (easy to code) planometric grid is easy, if we can stretch a layer's height.

    I gave it a try with R0J0hound 's Canvas plugin. I used 2 canvases. I don't know if it's overkill, and I'm doing something wrong anyway, because there's a lot of cropping going on.

    However I'm going from this ortho view:

    To this: (what the engine looks like after the canvas transformation)

    with no strange isometric calculations. Collisions and Z-order should also be super-easy, as I'm basically working on an orthographic 2D image.

    Here's the CAPX

    The downside of course is this doesn't work for pixelart. But I think you clever people might find it useful

  • You do not have permission to view this post