Roll-a-Ball: Introduction to Game Development

 Overview

This post serves as an introduction to game development in Unity, using the Roll-a-Ball tutorial as a foundation. The purpose of this exercise was to understand the basics of creating game objects, adding components, working with prefabs, scripting, and designing simple levels. This mini-project provided essential knowledge that will be applied to my main game development project for the VIA Arcade Machine in the XR Lab (which I already have the idea :D).

Core Mechanics

  • Physics-based movement: The player sphere uses a Rigidbody component to enable realistic movement.

  • Player input handling: Implemented through Unity’s Input System, allowing responsive controls.

  • UI and score tracking: TextMeshPro displays the player's collected items and if the player wins or loses dynamically.

  • Game logic: A win condition triggers when all collectibles are picked up.



This first picture is the script that allows a "PickUp" object to be picked up by setting the gameObject to false, making it dissappear when colliding with the player and incrementing a counter. 


This second picture is the script that shows the counting text and, when the winning condition is met (23 "PickUp" gameObjects have been picked up), a win text is shown and all the gameObjects with the "Enemy" tag are destroyed.

To keep the player visible at all times, I implemented a camera-follow script:

  • It maintains a fixed offset from the player, preventing erratic movements.


Creating and Managing GameObjects

  • Understanding GameObjects: Everything in Unity is a GameObject, and learning to attach components to modify behavior was the main takeaway from this mini-project.

  • Materials & Customization: I learned how to create and apply materials to objects, giving them different visual styles.

  • Using Prefabs: I created reusable PickUp, Enemy and Dynamic Obstacle prefabs that could be  reused in the scene easily.


Expanding the Game with Zones & Obstacles

After implementing the base Roll-a-Ball mechanics, I explored level design by adding different areas and obstacles, but not so much since I want to spend most of my time in the actual project. Below you will find a snapshot of how the final game looks:

  • Barriers and walls: Added to create more structured gameplay and challenge.

  • Ramps and a "window".




Next step

For the next blog post, I will show the main game design documentation and milestones. It will guide my game implemententation and it will show 3 important milestones for my game development process. 

Comentarios

Entradas populares de este blog

Enemy AIs, UI logic and Adjusting Weapons Architecture

Core Gameplay Prototype

Final Game and Conclusion