# Top-down fake depth/3D effect

Get help using Construct 2

### » Fri Mar 22, 2013 6:44 pm

Hello.

So I'm making a 2D top down RPG game (Think Pokemon or the early Final Fantasy games) and I wanted to make a fake depth effect for different heights.

First, I though I would be able to do it by using different parallax values depending on the layer height, and this is what I got:

https://www.dropbox.com/s/oatban7plfo3mj4/parallax3Dtest.capx

Basically there are green "towers" which are supposed to be high. I would use this to simulate height on different objects such as buildings.

The problem is the further the objects (green towers in this case) are from the left side of the screen, the more deformed they get.

Can you set the parallax origin somewhere else, for example, the player?

I think I could make it by making the different height layers move more or less depending on how far the player is to an objext, but I think that would be quite complicated to make, and also would take quite a lot of memory, as I'm aiming to release this for mobile devices.

Any clue on how to make this?

B
3
Posts: 11
Reputation: 372

### » Fri Mar 22, 2013 9:42 pm

I tried to alter the top object's distance to the bottom object by using the distance of the bottom relative to the player, and this is what I got done: https://www.dropbox.com/s/b7aagrv02sxmnxr/Red%20towers%20text.capx

Now there's several problems: the Top object will only move in diagonal lines and furthermore, it changes its position suddenly when the player walks past the Bottom.

Edit: I also noticed it only takes ONE of the Bottoms as a reference, not each individual one.

My idea was to make the Top object orbit around the Bottom, 360 degrees, getting closer or further to the Bottom depending on the players position to the Bottom itself.

Any ideas?

B
3
Posts: 11
Reputation: 372

### » Fri Mar 22, 2013 10:09 pm

I would use this method (threw it together quickly): Link

If you don't care about the perspective not being uniform, this would be easier to manage. Otherwise you'll have to set something custom up.buddy402013-03-22 22:10:09
B
14
S
7
G
6
Posts: 146
Reputation: 3,235

### » Fri Mar 22, 2013 11:01 pm

That's great, it's pretty much what I wanted.

But what do you mean it's not uniform?

And can you explain what the Scale function does? I'm guessing it modifies the units each layer works with, but why doesn't that make the boxes smaller or bigger?

B
3
Posts: 11
Reputation: 372

### » Fri Mar 22, 2013 11:16 pm

It does make the boxes bigger, just visually, as it is zooming in on each layer by whatever factor you enter.
B
14
S
7
G
6
Posts: 146
Reputation: 3,235

### » Sat Mar 23, 2013 3:57 am

nice effect @buddy40
B
37
S
9
G
5
Posts: 437
Reputation: 6,098

### » Sat Mar 23, 2013 7:46 am

HOLY...!!!! That's virtually EXACTLY what I was trying to do a while back. The main difference (hence, the "virtually") is that instead of layers, I wanted to create a solid box.

The problem I realized is that, as far as I have learned, C2 doesn't stretch/skew sprites in odd contortions while pinning them to each other's image points at corners (ie: a square's shape shifting so that it's that of a trapezoid or parallelogram to represent the sides of the box from shifting top-down perspectives as in this example).

Well done, @buddy40!!! WOW!

EVENT
-> Play .capx file | Top3D
ACTION
-> Rhindon's mind | blownRhindon2013-03-23 07:51:48
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
146
S
25
G
8
Posts: 798
Reputation: 15,438

### » Mon Mar 25, 2013 7:45 pm

Nice. I will be following this thread to see your finished project. I to am doing an RPG.
B
73
S
16
G
2
Posts: 46
Reputation: 6,334

### » Tue Mar 26, 2013 12:33 am

For Final Fantasy type rpg's etc... you really don't need to apply this type of effect as it is going to cause some oddities with sprites that actually have details to them. The 3D effect is awesome here, but for an ISO overhead RPG, none of the old school ones had any type of perspective change when moving past objects.... usually they were just static Isometric buildings, etc... the difference being that you could walk around the base of them, or once you passed a certain Y coordinate in comparison to them, you could go behind them.

While I think the above effect is damn smooth, my feeling is it will cause you issues trying to create more details sprites and also if you need to have solid behaviors, etc... since the collision detection may get a bit odd with the scaling... just some thoughts... very nice effect though!
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,633

### » Tue Mar 26, 2013 2:29 am

I quickly updated the example to show how it might apply to a Pokemon style angle: Link

What we really need, is Ashley to add sprite distortion! It would take a lot of layers/work/effort to make a smooth looking building this way.buddy402013-03-26 02:33:34
B
14
S
7
G
6
Posts: 146
Reputation: 3,235

Next