Scrolling similar to Mario Style Games

Get help using Construct 2

Post » Thu Jun 06, 2013 10:25 pm

I am attempting to make a 2D platformer with guns that shoot towards wherever the user clicks on the screen. When using the "scroll to" behavior on the player, the screen moves up and down when the player jumps, and this makes it hard to aim at an enemy while jumping.

I already have tried to "on every tick" scroll X to Player.X and this works, however if the player jumps down a cliff he of course does not remain on the screen. I want to make the screen only move in the Y direction when the player reaches the very bottom of the screen or the very top.

I tried to create invisible sprites on the top and bottom of the window, with 0,0 Parallax, and then when the player is overlapping the sprites then make the system scroll Y to Player.Y - (half the height of window) (or plus for when hes at the top of the screen). This works exactly how I imagined only there is a lag so the player appears choppy while the vertical scrolling is happening. :(

Any ideas on how to make it smooth? Thanks!
Posts: 1
Reputation: 127

Post » Thu Jun 06, 2013 11:51 pm

I was thinking on this the other day and I believe you must have an invisible sprite that has the Scroll To behavior. He is positioned in the center of the place you want the level to start. I think it's a matter of moving the sprite's X (and/or Y) along with the player.

Just clicked me, maybe using Pin behavior it can get even better.

But I never tested, I just thought about it :P
Posts: 133
Reputation: 8,755

Post » Sun Jun 09, 2013 2:00 am

I typically use the method that siks described. Have an invisible object that has the scroll-to behavior, and have it update its x position along with the player.
Posts: 89
Reputation: 6,017

Return to How do I....?

Who is online

Users browsing this forum: christina, KazaaMafia, Kenthria, QuantumMMX and 9 guests