Can we stretch a layer? Isometric 3D engine

Get help using Construct 2

Post » Mon May 04, 2015 3:34 pm

Movement happens in a normal 2D plane, it's that same plane that get transformed so movement skewing is already taken care of. Blocker squares is simply a quick way to add collisions in a proof of concept example. I fail to see how christina's idea is not a good one...
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Mon May 04, 2015 3:47 pm

Move one of the blockers after the transformation.
Image ImageImage
B
169
S
50
G
170
Posts: 8,291
Reputation: 108,726

Post » Mon May 04, 2015 4:13 pm

I still don't see what's wrong. The transformation is purely visual, if I move a blocker it'll still continue to block as it did.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Mon May 04, 2015 4:19 pm

But its moving in 2d, not isometric, so its y will be more than what it should be, unless you offset it to iso coordinates.
If you want to change anything that does collisions after the transformation it will have to be done this way.
If you want to add anything after the squash and rotate, it will have to be placed to iso.
Image ImageImage
B
169
S
50
G
170
Posts: 8,291
Reputation: 108,726

Post » Mon May 04, 2015 4:42 pm

Yes, it's moving in 2D, like everything else. But with the transformation, if I say "Set Y to Y + 32", it will look like it shifted 24 pixels left and 12 pixels down, thus mimicking the iso movement.

What will be hell is not positionning and movement, it will be having pre-distorted sprites and backgrounds. :|
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Mon May 04, 2015 4:51 pm

@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
Last edited by christina on Mon May 04, 2015 8:50 pm, edited 1 time in total.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Mon May 04, 2015 4:53 pm

hmm pretty clever @christina

I ran a quick test, it works for me.. I can't see why it wouldn't work. Although I've never worked in iso before so I can't be sure.
B
97
S
32
G
16
Posts: 1,199
Reputation: 16,680

Post » Mon May 04, 2015 4:57 pm

B
97
S
32
G
16
Posts: 1,199
Reputation: 16,680

Post » Mon May 04, 2015 5:01 pm

Math, it gets you in the end.
Edit:
------------------------------or----------------------------
Math you may not get it, but it will get you.
Image ImageImage
B
169
S
50
G
170
Posts: 8,291
Reputation: 108,726

Post » Mon May 04, 2015 5:12 pm

@christina wrote:@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

Quite true, I forgot you could let Construct pre-transform your sprites for you, so the 2D to ISO viewport actually revert them back to their original appearence. Pretty clever indeed ! ;)
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Bootfit, COGames, Huemerson, jorgmaquoi, unicornspitfire and 4 guests