dinosaur-exploder icon indicating copy to clipboard operation
dinosaur-exploder copied to clipboard

[Bug]: Enemy Projectiles are handled as green Dinos

Open Johann4002herti opened this issue 8 months ago â€ĸ 3 comments

👉 Please confirm the following

❌ Current Behavior

If you shoot a enemy Projectile it has the same behavior as a green dino. Because the levelsystem is based on how much enemys are killed, you can get to the next level very easily/ without killing any dino. Also the projectile can drop coins too.

✅ Expected Behavior

If you shoot a projectile it should hav its own behavior.

🚩 Steps To Reproduce

  1. Start the Game
  2. shoot just projectiles
  3. get to the next level

đŸ’ģ Environment

- OS: Windows 11
- Game version: 1.2.0

â„šī¸ Additional information

Maybe this isn't a bug and is intended but i thought it is not how the game works.

Johann4002herti avatar Apr 25 '25 13:04 Johann4002herti

👋 Hello @Johann4002herti, thank you for your interest in Dinosaur Exploder đŸĻ–! Please visit our â­ī¸ Discord server if you need help about something.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a 🆕 feature request, please provide all your ideas, or better yet: a model of what you'd like to improve in the game.

  • ✅ Verify that you have well fill out the different checkboxes in the issue template.

github-actions[bot] avatar Apr 25 '25 13:04 github-actions[bot]

Oh woaw, you're right, thanks for this bug issue !! @Johann4002herti

jvondermarck avatar Apr 25 '25 13:04 jvondermarck

Hi, I think it is the same issue we talked about before (in the issue #169), so it will be solved when the pr #186 will be merged !

D-Tubz avatar Apr 25 '25 20:04 D-Tubz

hii, i am interested in this issue. can you assign me this issue.

pratham-radadiya avatar Jul 05 '25 10:07 pratham-radadiya

Last activity was in july, so I am assuming no one is working on this issue right now. I'd like to contribute here!

azure-glades avatar Oct 11 '25 11:10 azure-glades

Hello, yes you can work on it ! Thanks !! @azure-glades

jvondermarck avatar Oct 11 '25 11:10 jvondermarck

So if I've understood this correctly, the issue says that Projectile-EnemyProjectile collisions behave as intended (i.e both are removed from the world) but this also increments the total enemies killed and this causes the level to increase (hence, "shoot just projectiles, get to the next level")

After investigating, the problem appears to have been non-existent or resolved by a recent update. I performed some stuff (i've outlined them below) and could not trigger the behavior.

Here is what I have tried.

Levelling is handled by adjustLevel() which is called by isLevelUpAfterHitDino() in CollisionHandler class. It calls incrementDefeatedEnemies() from LevelManager which is responsible for updating the number of defeated enemies.

Defeated enemies can only be updated by this function.

Now, isLevelUpAfterHitDino() is only called by ProjectileGreenDinoCollision and NOT ProjectileEnemyProjectileCollision. The former handles player_projectile, dino collision and the latter handles player_projectile, dino_projectile collision. So it appears that the levelling is not affected by Projectile-EnemyProjectile collision in any way.


To check the behaviour, I also modified the shouldAdvanceLevel(). Old :

    public boolean shouldAdvanceLevel() {
        return defeatedEnemies >= enemiesToDefeat;
    }

Modified:

    public boolean shouldAdvanceLevel() {
        return defeatedEnemies >= 2;
    }

just to observe behaviour. (the enemiesToDefeat value is modified only during leveling up) Again, I did not observe leveling up even when I only killed enemy projectiles.


So, yeah. It appears this issue doesnt exist or has been fixed in a previous update.

azure-glades avatar Oct 11 '25 12:10 azure-glades

@jvondermarck what should i do next 😅

azure-glades avatar Oct 12 '25 05:10 azure-glades

Oh yes thanks for your amazing investigation ! Indeed, indeed, I tried the game now, and it looks like it has been resolved in a last update, probably during the big refactor we did ! Thanks so much for your contribution and I will close this issue, thanks so much @azure-glades

jvondermarck avatar Oct 13 '25 15:10 jvondermarck