warping example

Post your own tutorials, guides and demos.

Post » Tue Oct 13, 2009 8:25 pm

endless warping...
B
79
S
24
G
55
Posts: 4,755
Reputation: 41,273

Post » Tue Oct 13, 2009 8:35 pm

That's exactly what I want, thank you very much.

I'm assuming this can be modified to fit any size room / view. I don't have time to look at it too much right now, but when I tried to expand the layout it just smashed everything together, haha. I'll look into it, but this is awesome, thanks.
B
2
G
3
Posts: 68
Reputation: 986

Post » Tue Oct 13, 2009 9:49 pm

i couldn't get passed the first level
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Wed Oct 14, 2009 6:39 am

[quote="lucid":vpf7vjfg]i couldn't get passed the first level[/quote:vpf7vjfg]

It's easier when you fall off the cliff, that way you don't have to jump the spike.
B
2
S
1
G
3
Posts: 118
Reputation: 1,336

Post » Fri Oct 16, 2009 8:07 pm

Did you mean wrapping? Anyway, nice example.

[quote="lucid":36dwh6sv]i couldn't get passed the first level[/quote:36dwh6sv]

lol :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Dec 12, 2009 10:43 pm

Lol, Level 2 is much tougher, guys!

I saw a tutorial for this for MMF a while back, it started normal, then you entered an area and it was endless in one direction (Forward).

I added a counter to keep track of how many wraps you did so that it would take you that much time to get out.
B
4
S
1
G
5
Posts: 98
Reputation: 1,648

Post » Mon Mar 29, 2010 9:43 pm

[quote="R0J0hound":2wa5ykfh]endless warping...[/quote:2wa5ykfh]

I'm a recent convert from the MMF2 world - would you mind (if you have the time) explaining the code for this example? I love to know how things work before I just copy and paste so I can address/solve my own problems down the line :)

Terrain: Set X to Terrain.X-player[Platform].VectorX*TimeDelta
Player: Set X to 440+player[Platform].VectorX*TimeDelta

So is the player/terrain moving or is it more like a carpet being pulled beneath the object to imply motion? What is this TimeDelta concept?
I'm not used to the "." between events - is that merely a separator in the line or is that fundamental code?

Thanks for your help and your sample.

Cheers
Brian
B
1
G
2
Posts: 4
Reputation: 633

Post » Mon Mar 29, 2010 10:15 pm

Hi Wetasaurus,
[quote:3q3643ym]So is the player/terrain moving or is it more like a carpet being pulled beneath the object to imply motion?[/quote:3q3643ym]
The player is moving like normal when it's X position is between 200 and 440, and when the player passes either of those boundaries he is kept from moving and the terrain is moved (like a carpet as you say).

[quote:3q3643ym]What is this TimeDelta concept?[/quote:3q3643ym]
TimeDelta is the difference of time from one frame to another.

[quote:3q3643ym]I'm not used to the "." between events - is that merely a separator in the line or is that fundamental code?[/quote:3q3643ym]
Fundemental code. See "Object expressions" in the wiki [url:3q3643ym]http://sourceforge.net/apps/mediawiki/construct/index.php?title=Expressions[/url:3q3643ym]

[quote:3q3643ym]Terrain: Set X to Terrain.X-player[Platform].VectorX*TimeDelta
Player: Set X to 440+player[Platform].VectorX*TimeDelta[/quote:3q3643ym]
I'm using the simple formula "rate X time = distance".
The first line moves the terrain at the same speed but opposite direction as the player. And the second moves the player to the boundary plus any any movement the player was going to avoid jitter. Try setting the second line to just 440 to see the difference.

Cheers.
B
79
S
24
G
55
Posts: 4,755
Reputation: 41,273

Post » Tue Mar 30, 2010 2:34 pm

Thank you so much! I'm now that much closer to being fully dependent on Construct for my game-creation needs.

Cheers,
Brian
B
1
G
2
Posts: 4
Reputation: 633


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest