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

Update flamed enemies with an overlay like ice #3133

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

weluvgoatz
Copy link
Member

@weluvgoatz weluvgoatz commented Dec 8, 2024

This updates the flame sprites to match the current graphics style, as well as to make the flamed enemy sprites similar to the iced enemy sprites. This reduces the amount of files in the game. There is even a firey glow to the enemies, as well as a little charr effect when they get flamed. The graphics included in this PR are by @Rusty-Box.

@weluvgoatz weluvgoatz marked this pull request as ready for review December 8, 2024 08:08
@weluvgoatz
Copy link
Member Author

All the fire sprites have now been updated and should be all ready for review.

@weluvgoatz weluvgoatz changed the title Update flamed enemies with an overlay like ice [WIP] Update flamed enemies with an overlay like ice Dec 8, 2024
@Frostwithasideofsalt
Copy link
Member

i noticed icy enemies dont burst into flames. will they be updated to do so, or will they all just get a updated version of their melting animations?

@Frostwithasideofsalt
Copy link
Member

https://github.com/user-attachments/assets/1debf75e-41b9-4c98-8eeb-2818121e40d4
there also seems to be an issue with some enemy sprites randomly offseting. some enemies ive found to do this are

  • mr tree and stumpy + corrupted variants
  • igel
  • vicious icy and walking leaf + corrupted variants
  • snail + corrupted variant
  • corrupted jumpy

the swimming fish + varitants, chasing fish + variants, skullyhops, pumpkin and bumpkin, leafshot + corrupted variant, owl, wooden jumpy, zeekling, corrupted igel, and jumping fish all do not have the offset issue seemingly.
also, the forest chasing fish will turn into the icy island chasing fish while burning.

@Rusty-Box
Copy link
Member

i noticed icy enemies dont burst into flames. will they be updated to do so, or will they all just get a updated version of their melting animations?

I was considering a seperate overlay type annimation for them that's essentially the one the have when melted mid-air. So yes, the will get their own update later.

@weluvgoatz
Copy link
Member Author

weluvgoatz commented Dec 8, 2024

TODO:

  • Handle the charring in update and not draw to prevent a weird looping and to make it dependent on the game's time

@weluvgoatz weluvgoatz marked this pull request as draft December 8, 2024 23:02
@weluvgoatz weluvgoatz marked this pull request as ready for review December 8, 2024 23:30
Copy link
Member

@MatusGuy MatusGuy left a comment

Choose a reason for hiding this comment

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

Nice work

@@ -302,8 +328,24 @@ BadGuy::update(float dt_sec)

case STATE_BURNING: {
m_is_active_flag = false;
// char the enemy
Copy link
Member

Choose a reason for hiding this comment

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

Well that's a pretty sophisticated verb. 🧐

if (m_state == STATE_BURNING) {
// draw the flame sprite
m_firesprite->draw(context.color(), draw_pos, m_layer);
m_firesprite->set_action(get_overlay_size(), 1);
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to do this outside of the draw function? set_action compares strings and does stuff that isn't adequate in a draw function.

Comment on lines +190 to 191
if (m_state != STATE_BURNING || m_firesprite->get_current_frame() < 5)
m_sprite->draw(context.color(), draw_pos, m_layer - (m_frozen ? 1 : 0), m_flip);
Copy link
Member

Choose a reason for hiding this comment

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

Please indent the body of this if statement

Suggested change
if (m_state != STATE_BURNING || m_firesprite->get_current_frame() < 5)
m_sprite->draw(context.color(), draw_pos, m_layer - (m_frozen ? 1 : 0), m_flip);
if (m_state != STATE_BURNING || m_firesprite->get_current_frame() < 5)
m_sprite->draw(context.color(), draw_pos, m_layer - (m_frozen ? 1 : 0), m_flip);

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.

4 participants