Skip to content

Unity mini-game for the Interactive Agents and Procedural Generation (ECS7016P) module at Queen Mary, University of London.

Notifications You must be signed in to change notification settings

mughees-asif/zombie-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zombie Run 🧟

Video Demonstration 📽

  • The video demonstration is available to view here.

Introduction 📰

  • This mini-game was built as a project for the Interactive Agents and Procedural Generation (ECS7016P) module at Queen Mary, University of London.
  • The aim of the game is to complete the maximum number of levels without the health reaching 0.
  • Food items can be collected to replenish the health.
  • The interaction of the player with the enemy or the boundary walls of the game result in a decrease in the health of the player.

Game structure

📦Assets
 ┣ 📂Scenes                         // Main Scene
 ┃ ┗ 📜TechDemo.unity                   
 ┣ 📂Scripts                        // Player and enemy definitions
 ┃ ┣ 📂Agent                        
 ┃ ┃ ┣ 📜Enemy.cs
 ┃ ┃ ┗ 📜Player.cs
 ┃ ┣ 📂Generator                    // Procedural level generation
 ┃ ┃ ┣ 📜BoardManager.cs
 ┃ ┃ ┣ 📜GameManager.cs
 ┃ ┃ ┣ 📜Loader.cs
 ┃ ┃ ┣ 📜MovingObject.cs
 ┃ ┃ ┗ 📜Wall.cs
 ┣ 📂ThirdParty                     // Animations and character skins
 ┃ ┣ 📂Animation
 ┃ ┃ ┣ 📂Animations
 ┃ ┃ ┗ 📂AnimatorControllers
 ┃ ┣ 📂Prefabs
 ┗ ┗ 📂Sprites

Setup

  • This project was developed on Unity version 2020.3.32f1.
  • Drag and drop the TechDemo.unity scene into the Project window from Assets/Scenes/TechDemo.unity.
  • The dependencies will be loaded and the scene can be run.

Procedural Generation 🎮

Level generation

  • The levels are generated on an 8 x 8 board consisting of different texture tiles located in the 📂Prefabs folder.

Fig. 1: Prefabs for the level generation

  • The levels are procedurally generated using Cellular Automation until the player dies i.e., runs out of health.

Fig. 2: Loading screen

  • Each level loads for 3 seconds with a placeholder image to indicate the level number.

Fig. 3: End screen

  • When the player's health reaches zero, the game ends.

Food generation

  • The food regenerates the player's health by 20 points per each item.
  • The placement of the food items is randomised within the game environment.

Interactive Agents 🕴

Player

Fig. 4: Player character

  • The player can be controlled by using the keyboard arrow keys.
  • The player starts off with 50 points of health that reduces every second by 2 points when the player moves.
  • The health only reduces when the player, either moves, is attacked by an enemy or interacts with the boundary wall.
  • The health can be regenerated by consuming food scattered around the map.

Enemies

Fig. 4: Enemy character

  • The enemies follow the player using a simple navigation algorithm.
  • The author tried to leverage the A* Pathfinding library but due to the procedural generation of each level, the task could not be accomplished.

Third-party libraries 🆘

  • The sprites, prefabs, and animations were imported from the 2D Roguelike package.

Suggested Improvements 🦾

  • Different procedural generation techniques can be used to produce the level texture tiles and food.
  • The movement of the zombies can be enhanced by using a more advanced navigation algorithm i.e., Behaviour Trees, A* Pathfinding and Path Planning.

About

Unity mini-game for the Interactive Agents and Procedural Generation (ECS7016P) module at Queen Mary, University of London.

Topics

Resources

Stars

Watchers

Forks

Languages