Can we stretch a layer? Isometric 3D engine

Get help using Construct 2

Post » Sat May 02, 2015 8:29 pm

They will not. I'm feeling stupider by the minute now, but imagine you're taking this game https://www.youtube.com/watch?v=NOpHUzG8OnU

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.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sat May 02, 2015 8:47 pm

Ok try it.
Image ImageImage
B
169
S
50
G
170
Posts: 8,292
Reputation: 108,728

Post » Sat May 02, 2015 9:08 pm

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:

Image

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

What do you think?
CAPX here
Last edited by christina on Sat May 02, 2015 11:36 pm, edited 1 time in total.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sat May 02, 2015 10:57 pm

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.

Image
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sat May 02, 2015 11:58 pm

Seriously?
Image ImageImage
B
169
S
50
G
170
Posts: 8,292
Reputation: 108,728

Post » Sun May 03, 2015 12:16 am

So it seems :D

Do you get my genius idea now newt? :D :D :D 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!
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sun May 03, 2015 12:35 am

I know it does not work as I used this method in CC when it did work, and then was broken when the engine was changed to scale uniformly.
Even then it would have required an offset to be made to any objects as soon as they moved.
Image ImageImage
B
169
S
50
G
170
Posts: 8,292
Reputation: 108,728

Post » Sun May 03, 2015 7:45 am

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.

Image

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.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Mon May 04, 2015 7:47 am

@newt?
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Mon May 04, 2015 2:12 pm

This capx by Rojo shows why:
download/file.php?id=9013
Press the up and down keys and notice how much faster the ball on the 2d layer moves.
That coupled with the need for the gazillion blocker squares is why.
Image ImageImage
B
169
S
50
G
170
Posts: 8,292
Reputation: 108,728

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Anonnymitet, Evanetot, gamecorpstudio, plinkie and 13 guests