Waterslide like Bubble Bobble and prevent jumpthru from side

Get help using Construct 2

Post » Tue Mar 25, 2014 9:04 pm

Trying to make water like Bubble Bobble

Image
https://www.youtube.com/watch?feature=player_detailpage&v=tNe9UJyrDEM&list=PL5VS1wmJcr19OiTPh59uN9PkAE8eUq_e-#t=129

My attempt to replicate it using a Rope behavior didn't go well (CAPX)
https://dl.dropboxusercontent.com/u/28087823/bubble%20bobble%20water/bubble_bobble_water.capx

Can anyone point me in the right direction? Is it an array?
Last edited by christina on Sun Mar 30, 2014 11:14 am, edited 3 times in total.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Tue Mar 25, 2014 10:01 pm

Yes!
As usual, just posting on the forum made me find a way!
Image

Here's how simple it was:
https://dl.dropboxusercontent.com/u/28087823/bubble%20bobble%20water/bub_water2.capx

1. while space pressed
-> if there's less than 15 tiles of water,
-> pick topmost watertile and add a watertile
--> below it (if there's no obstacle there)
--> to the right of it (if there's an obstacle there)

2. if there's 15 or more tiles of water
-> add a new tile of water like before, but also:

-> select all tiles of water
-> now select the bottom-most tile of water and delete it


__
Of course this only works for one stream of water. A second stream would interfere with the topmost/bottommost Z order.
Hmm
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sun Mar 30, 2014 12:52 am

I made it! It now works perfectly, and is also framerate-independent.
In the end I did go with an Array.

Play it online:
https://dl.dropboxusercontent.com/u/28087823/bubble%20bobble%20water/index.html
Download the CAPX (fully commented, for study):
https://dl.dropboxusercontent.com/u/28087823/bubble%20bobble%20water/bub_water_4_working_perfectly.capx

Image

And not only that, but I managed to solve a tricky problem that others have been having with jump-throughs: platform permeability from the sides.

until @Ashley makes an awesome Jumpthru behaviour that can distinguish which side you're entering the platform from (please do <3 ), my solution is simple:

make a "JumpThroughProtector" sprite, one sprite wide, and as high as the platform you want to protect from a jumpthrough from the side. Set a few conditions, and now you have a platform that you can jump through, but will also act like a wall if you're pushing against it when not on the floor.

You can check it on the two small platforms to the right: try jumping against the white vertical stripes. You can't.
Now walk under one of these platforms and jump up. Works like a charm.

This is preferable, in some cases, to switching the Platform from solid to Jumpthru, because sometimes you may not want the other players to exploit a platform that should only be jumpthru-able for you, since you're the one who's jumping the right way.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sun Mar 30, 2014 1:23 am

Excellent! The platform behavior will be useful. I like the waterside example too. Thank you for sharing.
B
3
S
1
Posts: 39
Reputation: 405

Post » Sun Mar 30, 2014 1:27 am

You're welcome.

It also solves this problem that was filed as a bug report:
viewtopic.php?f=152&t=88846&p=760907#p760907

namely, preventing jumpthru from the side of a platform
B
28
S
12
G
4
Posts: 193
Reputation: 4,581

Post » Sun Mar 30, 2014 12:43 pm

That's by design. Can't you do the same thing using solids at the edges?
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Sun Mar 30, 2014 7:48 pm

@Ashley yes of course I can, but that completely defeats the point of having a jump-through platform.

I don't want a platform with solid edges that you can't jump up through or can't fall down through. I want a platform that knows whether I'm trying to enter it from below or the sides. And that's functionality that I miss, in the built-in Jumpthru behavior. It should be able to tell the difference and give me control.

This is what I mean: https://dl.dropboxusercontent.com/u/280 ... index.html

It could also have been solved by having the platform have both a solid and jumpthru behavior, only one of which is enabled at any given time. But then, I'd be changing the platform's behavior for all players, which is not ideal in a 2-player game.
B
28
S
12
G
4
Posts: 193
Reputation: 4,581


Return to How do I....?

Who is online

Users browsing this forum: RIDETHEPIG and 2 guests