supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Item Pocket

Open MatusGuy opened this issue 1 year ago • 6 comments

The Item Pocket allows you to save a powerup for later use. If you collect a flower while having a bonus greater than GROWUP_BONUS, that flower gets equipped and the old flower gets stored in the top left corner of the screen. Now, the player can press the new ITEM control (usually Select/Back or Left Shift) to use the stored flower by throwing it up and catching it.

This pull request replaces the powerup stacking feature because this new solution is much more balanced. It also limits the amount of concurrent players to 4.

MatusGuy avatar Oct 05 '24 12:10 MatusGuy

Please fix initialization order:

/Users/runner/work/supertux/supertux/src/supertux/player_status.cpp:38:3: error: field 'bonus' will be initialized after field 'm_item_pockets' [-Werror,-Wreorder-ctor]
  bonus(num_players),
  ^~~~~~~~~~~~~~~~~~
  coins(START_COINS)

tobbi avatar Oct 05 '24 17:10 tobbi

Oh, right, this is a draft, so my comments were maybe a bit premature.

tobbi avatar Oct 05 '24 20:10 tobbi

/home/runner/work/supertux/supertux/src/badguy/boss.cpp:76:70: error: implicit conversion from 'int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion]
    float startpos = (context.get_width() - (m_hud_head->get_width() * m_max_lives)) / 2;

tobbi avatar Oct 06 '24 19:10 tobbi

Has the ability to disable the itembox been discussed?

swagtoy avatar Oct 11 '24 22:10 swagtoy

Has the ability to disable the itembox been discussed?

What do you mean by disabling it...? It's a core gameplay feature

bruhmoent avatar Oct 11 '24 22:10 bruhmoent

What do you mean by disabling it...? It's a core gameplay feature

Pardon? I meant that some level designers may want to disable it for themselves (or per world). I am curious on the consensus. I personally wouldnt enable it for my worlds

swagtoy avatar Oct 12 '24 02:10 swagtoy

Found tiny bug: after I played through a level and went back to the worldmap, the item pocket visually disappears while on the worldmap. It does come back when entering a level, but goes away again afterwards.

Rusty-Box avatar Oct 26 '24 23:10 Rusty-Box

The blinking effect indicates that you can't pick it up yet. This is a mechanism that prevents immediately grabbing the object upon jumping.

Also, I think the general consensus is that it shouldn't move in x axis whatsoever but I might be wrong so I'll leave this up for discussion.

MatusGuy avatar Oct 30 '24 14:10 MatusGuy

Can you check if power up stacking was truly removed in case I missed something?

MatusGuy avatar Oct 30 '24 14:10 MatusGuy

image seems theres a bug with the item pocket that makes it so theres multiple item pockets when theres only one player

Frostwithasideofsalt avatar Nov 16 '24 05:11 Frostwithasideofsalt

being that this seems to be done, could it be merged?

Frostwithasideofsalt avatar Nov 19 '24 23:11 Frostwithasideofsalt