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

Scared Gold Bomb #2559

Merged
merged 10 commits into from
Sep 2, 2023
Merged

Scared Gold Bomb #2559

merged 10 commits into from
Sep 2, 2023

Conversation

Rusty-Box
Copy link
Member

Gold Bomb will panic when Tux gets too close or any type of bomb is about to explode nearby.

They will run away for as long as Tux and/or a triggered bomb is in close range. If they reach a bottomless pit they "freeze" quivering in fear for as long as the "threat" is nearby (if there is safe ground they will drop down). When the area is all-clear, after a couple seconds, they will slowly resume their original behavior again.

This is a proof-of-concept made through the use of scripting and a ScriptedObject:

gold_bomb_scared.mp4

@Rusty-Box Rusty-Box added this to the 0.7.0 milestone Jul 25, 2023
@FILIPOKonGithup

This comment has been minimized.

@Linusintro
Copy link

How did you get the Sprites for this?

@MatusGuy
Copy link
Member

@Linusintro He drew them.

* Gold Bomb now flees from Tux and any kind of Bomb about to explode
@Rusty-Box Rusty-Box changed the title Scared Gold Bomb (code pending) Scared Gold Bomb Aug 1, 2023
@Rusty-Box Rusty-Box marked this pull request as ready for review August 1, 2023 13:14
@Rusty-Box Rusty-Box added status:needs-review Work needs to be reviewed by other people and removed status:in-progress Progress has been done, but more is intended be done labels Aug 1, 2023
src/badguy/goldbomb.cpp Outdated Show resolved Hide resolved
src/badguy/goldbomb.cpp Outdated Show resolved Hide resolved
src/badguy/goldbomb.cpp Outdated Show resolved Hide resolved
src/badguy/goldbomb.cpp Outdated Show resolved Hide resolved
src/badguy/goldbomb.cpp Outdated Show resolved Hide resolved
MatusGuy and others added 2 commits August 17, 2023 14:56
* gold bomb goes faster when tux comes close

* Go opposite direction when close to bomb

* Fix turning around

* gold bomb hop and turn away

* A bunch of features:

- Become cornered
- Hop
- Flee when player, haywire or bomb

* New animations impl

* bugfix

* Fixed flappy bird bug

* Change max drop height and push badguy out of the way!

* add default case

* change i to size_t

* Ok wtf im using clang now.

* Initializer list moment

* Remove normal walkspeed easing and fall off edge if safe

* oops

* style guide [ci skip]

* SAFE_DIST > REALIZE_DIST

* Fix normal walking off edge

* Code organization

* remove debug drawing

* Goldbomb react to other goldbomb and when squished doesnt turn

* Gold bomb turn around when tux catches up

* Prevent fleeing when gold bomb cant see

* Change return to break inside switch case for consistency [ci skip]

* Revert "Change return to break inside switch case for consistency [ci skip]"

This reverts commit 1543135.

* Gold bomb react to all things when seen

* Push haywire

* Fix weird animation when exiting safe dist when cornered by pit

* Better debug drawing for distances

* Fix walk in place when in safe dist after realizing

* Fix weird behaviour when frozen

* Minor tweaking and stylistic changes
Copy link
Member

@Vankata453 Vankata453 left a comment

Choose a reason for hiding this comment

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

Some of the comments from my previous review are left unresolved.

@MatusGuy
Copy link
Member

i noticed that. im gonna tell rusty to fix it rq

src/badguy/goldbomb.cpp Show resolved Hide resolved
src/badguy/goldbomb.cpp Outdated Show resolved Hide resolved
src/badguy/haywire.hpp Show resolved Hide resolved
* gold bomb goes faster when tux comes close

* Go opposite direction when close to bomb

* Fix turning around

* gold bomb hop and turn away

* A bunch of features:

- Become cornered
- Hop
- Flee when player, haywire or bomb

* New animations impl

* bugfix

* Fixed flappy bird bug

* Change max drop height and push badguy out of the way!

* add default case

* change i to size_t

* Ok wtf im using clang now.

* Initializer list moment

* Remove normal walkspeed easing and fall off edge if safe

* oops

* style guide [ci skip]

* SAFE_DIST > REALIZE_DIST

* Fix normal walking off edge

* Code organization

* remove debug drawing

* Goldbomb react to other goldbomb and when squished doesnt turn

* Gold bomb turn around when tux catches up

* Prevent fleeing when gold bomb cant see

* Change return to break inside switch case for consistency [ci skip]

* Revert "Change return to break inside switch case for consistency [ci skip]"

This reverts commit 1543135.

* Gold bomb react to all things when seen

* Push haywire

* Fix weird animation when exiting safe dist when cornered by pit

* Better debug drawing for distances

* Fix walk in place when in safe dist after realizing

* Fix weird behaviour when frozen

* Minor tweaking and stylistic changes

* Code documentation and minor fixes
@Vankata453 Vankata453 merged commit ff4dbe3 into SuperTux:master Sep 2, 2023
33 checks passed
@Vankata453 Vankata453 removed the status:needs-review Work needs to be reviewed by other people label Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants