Sprite Movement: Optical Illusion

Get help using Construct 2

Post » Mon Jan 13, 2014 4:30 pm

Hi, I've been working on this a few days now and just can't figure it out. I need another set of eyes..

The Goal: I have a 2D sprite that is drawn as if 3D. It's a space ship and I want it to fly in, towards the "player's view" as if this were a camera view.

I am trying to slowly increase the size of the sprite, as I move the sprite towards the right side to give an optical illusion of it coming closer to you.

the sprite is angled 3/4 view and facing 4 o'clock-ish.

I start the sprite at 0.1 scale @ xy: 160,150 then increase size using lerp and dt. While at the same time setting it's position using lerp moving towards 640,350.

My Problem: I can't get it to look right. And it seems awkward to increase the sprite's position while I'm checking for max size which always equates to the sprite never reaching it's position.

I've played around with the variables, and I can get it to go in a "straight line",sort of, but I can't slow it down. I feel like I might be going about this the wrong way.

I've been playing with the last parameter of Set Position's lerp. but it's not making that much of a difference. And if it's set too low I get a swooping effect (since I know lerp can give a deceleration 'look' used that way). So I tried applying that logic to Set Scale but it's not working like I would expect.

I know this is tricky..can anyone help me identify the variables I need to balance in order to make this look right? (Since I will probably have other sprites drawn at different angles I need to know how to balance growth-rate vs movement.

Thanks in advance!

capxjobel2014-01-13 16:33:33
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Mon Jan 13, 2014 6:58 pm

Hi,
difficult.

In my opinion its to short of a way from left to right to increase the size that much.
I'd go play around with it moving faster than it's growing and maybe giving the layout more width so it has some space to move and grow.
B
22
S
7
G
4
Posts: 154
Reputation: 3,709

Post » Mon Jan 13, 2014 7:06 pm

If you have assets this good, why are you making a 2D game? 3D assets in 2D games pretty much universally look bad in my experience.

Sorry for not directly answering your question but I think what you have now is probably the best you'll get in a purely 2D engine.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Mon Jan 13, 2014 7:29 pm

@sqiddster
no, this isn't my asset.. it's just downloaded from the web. But I will have art like this in my game. And I'm not treating it like a game asset really, it's for cut scenes.. so it will be totally scripted.

similar to this:

watch @ 1:49

http://www.youtube.com/watch?v=TRXgPtp6LKs&list=PL4E7163B8944F2B03
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Mon Jan 13, 2014 7:35 pm

sorry, watch @ 1:55 ...that space rock with an engine strapped to it.. it's basically the reverse motion that I want.. it gets smaller and moves slightly to the left.. it's an optical illusion that "pushes it back".

yeah no 3D games for me just yet! haha
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Mon Jan 13, 2014 7:40 pm

[QUOTE=5Type]
In my opinion its to short of a way from left to right to increase the size that much.[/QUOTE]

@5Type

thanks, I'm thinking the same.. I just don't think I have the math right.. the 2 (size and position) are related..when I change to other values it just gets worse...
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Mon Jan 13, 2014 7:41 pm

All right, fair enough.
Still, I don't see what's wrong with what you have. Is it just too fast?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Mon Jan 13, 2014 11:01 pm

yeah it's too fast and the ratio is off.. I feel like the math is wrong because it just doesn't look right. It should look as if the ship were flying toward you.. and currently it looks more like it's just getting bigger.. something is off, but when I tweak the numbers it doesn't change much. I can't get it to grow any slower by changing x * dt.

I've done exactly what I am trying to do in animation programs.. I just never had to do the math for it.. and really this is just a proof of concept. It may be that I can't do cut scenes like this...although I would really like to... but first I need to know how to automate sprites movements!
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Jan 14, 2014 6:01 pm

Is this better??

https://copy.com/3Ivz1xValXo0
B
10
S
4
Posts: 133
Reputation: 1,543

Post » Tue Jan 14, 2014 6:25 pm

@jobel I believe Imchucho's example already looks a lot better - still being a little off. Just thought it might have something to do with the perspective of the ship sprite. The example would look tons better if the sprite graphic was more heading toward to screen. Being like this it also moves down a bit as it should be scaling from the middle. Try playing around with its origin point.5Type2014-01-14 18:26:37
B
22
S
7
G
4
Posts: 154
Reputation: 3,709

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 44 guests