Devlog Update - Enhancing Gameplay with Raycasting and Strategic Item Usage


Progress:

Today, significant strides were made in refining the game mechanics related to item pickups, raycasting, and on-demand item usage:

  1. Item Pickup and Immediate Points Addition:
    • Implemented functionality where picking up the Death Potion immediately adds 500 points to the player’s score.
    • This ensures players are rewarded instantly for finding valuable items in the game world.
  2. Inventory Storage and On-Demand Usage:
    • The Death Potion is now stored in the player's inventory, available for use later.
    • Players can activate the potion on-demand by pressing Keypad 5, triggering its effect to destroy nearby enemies.
  3. Enhanced Player Control:
    • Adjusted the item interaction logic to give players more control over when and how they use collected items.
    • This change adds strategic depth, allowing players to decide the optimal time to utilise their inventory.
  4. Raycasting for Enemy Detection:
    • Integrated a raycasting system for detecting and destroying enemies in a 360-degree radius around the player.
    • This feature allows for precise and efficient enemy elimination, enhancing gameplay dynamics and strategic planning.


Challenges Overcome:

  • Synchronising Item Pickup and Usage:
    • Initially, the logic for immediate points addition and storing the item for later use was conflicting. The solution involved separating the two actions clearly: adding points right away while storing the item for later use on a key press.
  • Debugging and Verifying Behaviour:
    • Ensured that the Death Potion destroys enemies only when used, not upon pickup, providing the intended gameplay experience.
  • Raycast Implementation:
    • Successfully integrated raycasts to detect and destroy enemies within the specified radius. This addition significantly improves the effectiveness of the Death Potion when used.

Next Steps:

  1. Polish and Testing:
    • Conduct additional playtesting to ensure that the item usage mechanics feel smooth and responsive.
    • Identify any edge cases where items may not behave as expected and refine the logic further.
  2. Implement Additional Item Types:
    • Explore adding new items with varying effects, like temporary boosts or other enhancements, to expand gameplay variety.

Overall, today was a productive day with crucial functionality enhancements. The integration of raycasting has elevated the game mechanics, making the use of items more dynamic and impactful. The game is shaping up well, and it’s exciting to see these features coming together!

Leave a comment

Log in with itch.io to leave a comment.