Posted July 10, 2025 by Buddhadeb Chhetri
##2Dgame ##devlog ##powerups ##indiedev ##gameupdate #budedhadebchhetri ##update
Hey everyone!
This week I worked on tightening up the collision system in Bulletbound to make the gameplay smoother and more bug-free. Here’s a breakdown of what’s new and fixed:
🛡️ Added a collision prevention flag
Introduced to prevent the same bullet from triggering multiple hits. This solves the long-standing issue of duplicate hits.
⚡ Early return check added
Both OnCollisionEnter2D
and OnTriggerEnter2D
now check if (hasHitTarget) return;
early on. This ensures the bullet only processes one collision.
🧠 Centralized collision logic
Created a new method: HandleCollision
Now, both collision functions simply call this method — removing duplicate logic and making the code much cleaner.
✔️ Flag is now set correctly
Inside HandleCollision
, hasHitTarget = true;
is triggered after hitting enemies or environment objects. This ensures bullets behave consistently regardless of what they hit.
hasHitTarget
system and centralized logic, bullets now apply damage only once, so enemies only drop one ability per hit, as intended.I’m now working on:
Stay tuned, and thanks for checking out the devlog! If you’re testing Bulletbound, I’d love to hear your feedback — it helps shape the game.