Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Building Phase: Problems with mines

This week, I faced several challenges with the building phase of our game. Specifically, I struggled with:

  • Getting the mines to spawn correctly.
  • Ensuring mines detect and eliminate enemies effectively.
  • Correctly placing buildings, as they were spawning in unintended locations.

These issues would significantly impact the player's experience, compromising the core mechanics of strategic building and defense. Addressing these problems was crucial to ensure that players could properly engage with the game's building elements and maintain a smooth and enjoyable gameplay experience.

Debugging and Solutions:

  1. Identifying the Issues:
    • Mines: Misalignment in hitbox calculations was causing detection failures.
    • Buildings: An off-by-one error in the grid coordinates led to incorrect placements.
  2. Correcting Positioning Logic: I refined the grid coordinate system to ensure each tile's coordinates were accurately mapped and aligned with the grid, preventing buildings from spawning in the wrong places. what this does is capture the tile you would like to spawn to and ensure that that's where is goes 



  1. Using Object Finding for Mine Detection: Instead of collision detection, I used the "find object by name" method to accurately detect and eliminate enemies when mines are triggered. It was unorthodox how I determined if an enemy is on a mine I did this by position of the enemy vs using a collider due to the nature of the tile system.  this made it tricky for me trying to rid of the mines and led me to a unique solution

 


Impact on End User Experience:

  • Reliable Building Placement: Players can now place buildings in their intended locations, allowing for better strategic planning and defense.
  • Effective Mine Functionality: Mines now function as expected, enhancing gameplay by providing a reliable means of dealing with enemies.

all in all a good week I am extremely excited to get the build phase working here is a short demonstration of that 


Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.