menu

ReyTD

Introduction

Strategically place towers to defend against waves of monsters!

ReyTD is a tower defense game featuring six levels with increasing difficulties, set in a lonely path in the woods traversed only by monsters. Stop all monsters from crossing over to the villages and wrecking havoc!

Defend against nine different monster types using five unique towers each with their own abilities. Be careful though, some monsters are immune to some towers. Can you strategize your defenses and get 3 stars in all levels?

Duration: May 2024 - Jul 2024

Technologies: Rey Engine (Custom C++ Game Engine)

Role: Sole Developer

Key Features

  • Complete game with menus, art assets, polished effects and refined user-experience.
  • Features 6 levels, 9 enemy types and 5 tower types.
  • Data-driven game content from XML files, making it easy to add towers, enemies, map tiles and levels.
  • 3D model loading from OBJ and MTL files.
  • UI system for menus and in-game UI elements, supporting popups, buttons and sliders.
  • Billboarded particle system for status effect damage, leaves to simulate wind, and other visual effects.

Complete Game with Menus, Instructions and Polish

One of my biggest goals for this project was to make a game that looked and felt complete, in terms of programming, level design and art.

  • The game consists of a main menu, a how-to-play screen with controls and information on enemies and towers, a settings screen to change audio settings, a level select screen and popups for appropriate information and confirmations.
  • The game uses 3D assets from Kenney and Quaternius for the art to show models instead of placeholder programmer geometry.
  • There is attention to detail with a custom cursor that changes based on available actions, a full-screen mode and no debug information or debug keys within the game.

Data Driven from Images and XML

All towers, enemies, static entities and wave data for each level is loaded from XML files which allows for easy addition of more levels. These XML files include:

  • Models to be used for towers, enemies and static entities include map tile.
  • Stats for each tower including damage, fire cooldown, slow-down effect, burn and poison status effects.
  • Stats for each monster including health, speed, resistance to various status effects and money multiplier when killed.
  • Wave data for each level- the start time of each wave, enemies in the wave and the interval between enemies within a wave.
  • Maps constructed from images with the texel color depicting which block to be placed at any position.

				

CPU Driven Particle Effects

  • CPU-driven particle effects for towers firing, enemies getting hit and dying and leaves for wind effect.
  • Textured billboarded quads updated on the CPU every frame.
  • Potential Improvements:
    • Abstract Particle variables to ParticleDefinition class to keep Particles lightweight and store by value for cache efficiency.
    • Send only particle positions every frame from CPU to GPU.
    • Simulate particles completely on the GPU and avoid sending particle data from CPU to GPU every frame.

				

Status Effects

  • Towers can put status effects on enemies- freeze, burn or poison.
  • I created a parent StatusEffect struct with FreezeStatusEffect, BurnStatusEffect and PoisonStatusEffect sub-classes.
  • Each enemy maintains a list of status effects applied to it and calls update on the StatusEffect.
  • A status effect with a the same type as an existing status effect on an enemy but a stronger effect replaces the existing status effect.