Toasty Tumble Devlog #3 - Everything Is Better With Bacon!
In this devlog I implement a lives system, introduce a crash bug, then fix it, create a web playable version of the game and tweak difficulty settings. Next I begin work on a pickups system to score points by collecting food and streamline the entire codebase by refactoring to use the Unity event system.
AI Generated Summary:
Devlog: Game Development Progress Overview of Key Features
- The devlog covers three main areas: a Lives system, a web build for browser play, and the implementation of a pick-up scoring system.
- Instead of scoring by passing through pipes like in Flappy Bird, players will collect floating food items in the kitchen.
Lives System Implementation
- A heart system has been integrated to allow players to continue playing after losing lives; however, the visual presentation is currently lacking due to unlearned font skills.
- I inadvertently introduce a crash bug related to the heart system when losing lives
Bug Fixing Experience
- After extensive troubleshooting, the bug was identified as an issue with event handling in Unity's Event System that wasn't properly unsubscribing upon scene reload.
- I reflect on the importance of learning through tutorials before attempting new features independently to avoid wasting time on debugging.
Scoring Mechanism and Game Flow
- Currently, there is no scoring mechanism implemented; players can lose but cannot score points yet. I contemplate alternative scoring methods involving collecting food items.
- A web build version is being developed for upload to itch.io, featuring improvements such as a title screen and better fonts.
Obstacle Spawning Mechanics
- Adjustments have been made to how obstacles spawn on the counter using randomization techniques for height variation.
Game Development Insights Food Item Integration
- I've reorganized project folders and created prefabs for food items that fit a toast theme
- A variety of graphics (around 20 different items) have been found for potential gameplay features
Collider Issues and Solutions
- I discuss issues with colliders while working on bacon prefabs
- Two box colliders were implemented using child objects to manage collision detection effectively without compromising performance.
Object Pooling and Event Management
- An object pooling system is utilized for managing toppings similar to obstacles, aiming for efficient resource management in the game.
- A check is introduced in the code to identify root objects during collisions, ensuring accurate interaction handling within the topping manager.
Scoring System Implementation
- A basic scoring system has been established where each collected food item awards ten points; currently, all items spawn at a fixed location.
- The code has been refactored to use an event-driven architecture, improving communication between game components without direct references.
UI Updates and Player Interaction
- The UI now privately manages updates related to lives and scores through events raised by the game manager rather than direct method calls.
Game Development Insights: Decoupling Managers Benefits of Decoupling in Game Management
- The game manager's design has improved by eliminating references to other managers, resulting in a fully decoupled architecture. This enhances modularity and reduces dependencies among classes.
- Previously, the game manager contained multiple references (e.g., obstacle manager, topping manager), which are no longer necessary. This simplification allows for easier future expansions without cluttering the codebase.
Event System Advantages
- I plan to implement a sound system in the future. Instead of embedding sound effect calls throughout the code, an event-driven approach will allow audio systems to subscribe to relevant events (e.g., player hitting an obstacle).
- Utilizing an event system leads to cleaner coding practices by reducing repetitive updates across the codebase when adding new features like sound effects.
Simplified Implementation and Future Plans
- The event system is described as simple yet effective; it requires only two lines of code—one for raising events and another for responding—making it easy to maintain and extend.
Toasty Tumble
Flappy Bird inspired game, but with toast!
Status | In development |
Author | Rheyan |
Genre | Action |
Tags | 2D, Cozy, Cute, Flappy Bird, Non violent, Simple, Unity |
Leave a comment
Log in with itch.io to leave a comment.