Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wind: Affect Tux on ground + Fancy Particles Option #1493

Merged
merged 11 commits into from Aug 10, 2020
Merged

Wind: Affect Tux on ground + Fancy Particles Option #1493

merged 11 commits into from Aug 10, 2020

Conversation

weluvgoatz
Copy link
Member

This PR adds a few things:

  • An option for fancy particles to show up
  • Tux blows Tux on the ground
  • As a result of the new animation, there is a better on/off transition

A preview: https://www.youtube.com/watch?v=RbmOd7azlns

The particles are optional because there are some instances in which the particles look bad, such as in diagonal wind or in small zones where it may not be needed.

Reviews are encouraged. :-)

@papb
Copy link

papb commented Aug 7, 2020

Really nice!! I like it!

Tux blows Tux on the ground

This is a typo, right? 😅

@serano01
Copy link
Member

serano01 commented Aug 7, 2020

For some reason the new wind-images were not in-game in my build (maybe because you used [ci skip] ), apart from that it looks very good. The "affect badguys"-part itself is worth the merge.

@serano01
Copy link
Member

serano01 commented Aug 7, 2020

Nevermind, the last part with the badguys was already part of an other PR.

"windup2.png"
"windup3.png")
)
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a new line after this.

@@ -69,8 +75,9 @@ Wind::get_settings()
result.add_float(_("Acceleration"), &acceleration, "acceleration");
result.add_bool(_("Blowing"), &blowing, "blowing", true);
result.add_bool(_("Affects Badguys"), &affects_badguys, "affects-badguys", false);
result.add_bool(_("Fancy Particles"), &fancy_wind, "fancy-wind", false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about what others might think, but I consider the name "Fancy Particles" to not be verbose enough.

if (badguy->can_be_affected_by_wind()) {
if (badguy && this->affects_badguys)
{
if (badguy->can_be_affected_by_wind())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could concatenate both of those if statements.

@@ -0,0 +1,26 @@
(supertux-sprite
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please check the indentation of this file and fix it (because if we merge it now, this won't happen)

Oh, and add [ci skip] after your commit message so that we don't waste unnecessary integration cycles.

LAYER_BACKGROUNDTILES+1);
if (fancy_wind)
{
Sector::get().add<SpriteParticle>("images/particles/wind.sprite", (abs(speed.x) > abs(speed.y)) ? "default" : "flip", ppos, ANCHOR_MIDDLE, pspeed, Vector(0, 0), LAYER_BACKGROUNDTILES+1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if maybe you should move the (abs(speed.x) > abs(speed.y)) ? "default" : "flip" into its own variable. The line is quite long. Also, add spaces around the +

Yes, sorry for being mean and stricter than necessary, but that's just me being a good code reviewer. No hard feelings.

@weluvgoatz
Copy link
Member Author

Merging as per suggestion of someone in the Riot channel.

@weluvgoatz weluvgoatz merged commit 4c6e0fe into master Aug 10, 2020
mbernard2 pushed a commit to mbernard2/supertux that referenced this pull request Aug 18, 2020
* New wind images 

* Updated wind

* fix odd formatting 

* Formatting

* Conversions(?)

* More conversions

* More conversions

* Update wind.sprite

* Update wind

* Indentation 

* Spaces
@mrkubax10 mrkubax10 deleted the wind branch August 18, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants