This repository contains my work for COMP 521 - Modern Computer Games. Throughout these assignments, I created various microgames and simulations to apply course theory, including collision detection, resolution, and pathfinding techniques. All assignments were implemented in Unity.
In this first project, I reacquainted myself with Unity by creating a single-level first-person shooter. The objective is to reach the temple, destroy a weak pillar using a gun, and use the fallen pillar pieces to cross a river and reach the goal.
Notable Features:
- Player controller for movement and view direction.
- Projectile system with collision detection.
- Dynamic spawning of game objects (e.g., pillar pieces falling into the river).
- Simple UI for win/lose messages.
- Out-of-bounds constraints to keep the player within the playable area.
In this simulation, balloons spawn randomly and float upwards with natural movement, influenced by random gusts of wind. A harpoon launcher at the top, controlled by arrow keys and spacebar, allows the player to launch harpoons to pop balloons upon direct collision. Balloons respond to various collisions, including with terrain, other balloons, and projectiles.
Notable Features:
- Custom collision detection and resolution system.
- Autonomous balloon movement with wind influence, managed by a Game Manager that handles spawning and despawning.
- Harpoon controller for launching at balloons using arrow keys and spacebar.
Simulation in Action
Next Steps:
- Add sprites to enhance visuals.
- Resolve remaining bugs in collision resolution.
- Animate balloon spawning.
- Add sound effects (e.g., wind, balloon popping).
This simulation replicates a large library setting where robots move discretely on a grid, while humans move continuously. Robots fetch and replace books, avoid obstacles, and interact with benches around the building. Both types of agents avoid collisions, seek the shortest paths, and handle dynamic obstacles.
Notable Features:
- Discrete Movement: Implemented a dynamic grid based on the environment's size and obstacles. Nodes containing obstacles are marked as unwalkable.
- Continuous Movement: Built a waypoint graph dynamically, placing waypoints based on obstacle layout.
- Pathfinding: Developed A* pathfinding from scratch, modified for both discrete and continuous movements.
- Robot Behavior: Follow paths, avoid collisions with dynamic agents, and re-path when necessary.
- Human Behavior: Detect deadlocks, follow paths, and re-path as needed.
Running with five humans and five robots.
This project highlights Unity’s capabilities in simulating physics and movement within complex environments, using both discrete and continuous pathfinding. Thank you for exploring my work in COMP 521!