Supertux: Swimming

Created on 7 Nov 2015  Â·  35Comments  Â·  Source: SuperTux/supertux

Swimming in SuperTux is a planned idea.

code levels hard functionality medium feature

All 35 comments

Be careful. Otherwise it would ruin almost every level. Implement it, but use different sorts of water for it. Some of the levels would be too easy otherwise.

In fact, water shouldn't be over-used according to the style guidelines, with the reasoning: "It's useless if you can't swim."

Good idea to re-post the idea here.

How would Tux swim?

By pressing some keys?

Action key?

Possibly, but I also thought about moving up and down, and shooting other enemies that can swim (which is where we'd need the action for that).

See, swimming is too complicated. WE can't have any more buttons.

We could have a custom bonus block item for that.

Just please don't make it the same as climbable.
I'd suggest that swimming would be the only possible action in water. It should look like penguins normal swim, so tux would be unable to stop when swimming and he could change his angle by pressing up and down.

Just please don't make it the same as climbable.

:+1:

I'd suggest that swimming would be the only possible action in water.

I agree that Tux shouldn't be able to walk in water, but imho there should be a way to kill enemies that one might find in water.

This is priority:medium because this idea is so old and is a TODO for 0.5.x/M3. I'd say this should be actually priority:high after the release of M2.

@maxteufel It is priority:extremely low before M2 though

No. It is Milestone 3. It will be years before Milestone 2.9 comes out to show it off. It should be low, and upgrade to medium after 0.4.2.

@brmbrmcar There are releases in between M2 and M3, even if they are development releases

I k-now. I mentioned that they will still not demo stuff like swimming for ages. At least not the official build.

So as it turns out, we've already got some code for swimming. It's just behind a compiler/preprocessor #ifdef. If you want to test it, go to your build folder, edit config.h in your text editor, add #define SWIMMING anywhere before the #endif /*CONFIG_H*/ line and rebuild.

The feature/swimming branch will be used to track development in regards to swimming. Currently, it allows you to enable swimming directly using CMake, by appending -DSWIMMING=ON to your usual cmake command.

We should disable backflips in water because it results in a strange behaviour.

I think Hume2's earlier idea about penguin style swimming is the best. In some ways it is similar to my idea, which is to copy Penguin Mario from the recent mario games. up/down/left/right keys determine direction, jump key speeds you up (like a kick in water)

Those keys wouldn't work with Jump with Up.

Jump with up could be handled differently. The point is, do you think the idea works/is good?

If we, as per https://github.com/SuperTux/supertux/issues/292#issuecomment-170266344 require down to activate a swimming mode, there wouldn't be conflicts. (Jumping while swimming doesn't make sense anyway)

@maxteufel We will need an option to enable it. When wouldn't you want to swim?

What? I thought I was speaking of an option to enable it.

@maxteufel There shouldn't be a swimming mode. You swim, when you're in water.

I agree that swimming should "just happen" when entering a new type of water. The new water type prevents the need to update previously build levels - just edit only the levels that you want to add swimming areas to. As for the swimming mechanics themselves, I think swimming like a normal penguin is a good idea.

It's been a long time since I worked with the Supertux code, but when I made Rescue Girlies I used the ghost mode code to make the helicopter levels. It allowed for nice up/down, left/right motion. The same code could be used here for general movement. Adding a nice sprite sequence for turning around and swooshing up/down would make it look really nice.

For general combat, the player could double tap the down button to move forward and down quickly, then execute a tail-swipe at the enemy. Player skill comes into play when judging the distance to the target and timing the movement of both Tux and the target.

A powerup ability could be a vortex that Tux creates and launches toward an enemy. The vortex spins the enemy in place for 5 seconds, allowing Tux to pass by without being harmed. A nice sprite of Tux whirling in a circle then knocking the vortex away with his tail would make this look fantastic.

Thems be my thoughts. :)

@Tatwi Interesting thoughts indeed. My personal thought is that Tux should keep his power ups when going underwater. And rather than "double-tap" to move in a direction quickly, space should perform this function. This is because you cannot jump in water anyway, so this button can be reused.
I think a different type of water would make our job easier, but it would confuse players as to which water can be swum in and which can't. Water is not supposed to be used, and those level designers that have will need their levels changing, as a result of their mistake.

Hello, I see this is an old issue. :)
As for the different types of water, I'm not sure what way to think about it.
I think there should be a breathing meter somewhere on the screen which when it runs out, Tux dies. Tux has to reach the surface to refill it.
Swimming-wise, Tux should be able to swim in all directions with the arrows. Pressing jump/space will speed Tux up but also make the breathing meter run out faster.
As for attacks, using above-water powerup attacks will not work (Fire doesn't work in water IRL, and ice will float to surface). As for basic attacks, maybe Tux has to press "action" to attack an enemy? And some enemies require Tux to hit it multiple times. Just something different from the basic behaviour.
That's my unfinished suggestions. Please consider them. :)

/me sings: Barb is a...

Just kidding. Water levels would indeed be nice, _especially_ for a game starring a penguin. But it indeed is hard to get right, evidenced by the fact that certain popular games didn't.

What level will this be introduced in?

@weluvgoatz Possibly the level The Somewhat Smaller Bath from Icy Island as it is the first level featuring water.

I was thinking "23rd Airborne" since it has a lot of water AND is on the
linear area of the path, unlike "The Somewhat Smaller Bath".

On Mon, May 6, 2019, 2:46 PM Carsten Wirtz notifications@github.com wrote:

@weluvgoatz https://github.com/weluvgoatz Possibly the level The
Somewhat Smaller Bath from Icy Island as it is the first level featuring
water.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SuperTux/supertux/issues/217#issuecomment-489795286,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJPWEMQNPGSWYUTKDNK5DKTPUCRK5ANCNFSM4BTXG7HQ
.

Swimming should have a bigger presence in World 3/Tropical Island, since it should have some ocean levels.

Swimming has now been officially added to the master branch. Closing this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maxteufel picture maxteufel  Â·  7Comments

Wuzzy2 picture Wuzzy2  Â·  6Comments

Ordoviz picture Ordoviz  Â·  3Comments

Rusty-Box picture Rusty-Box  Â·  3Comments

GlowingApple picture GlowingApple  Â·  7Comments