Henry Dai​ 
​Gameplay Programmer
  • Home
  • Professional Projects
    • Hero Academy 2
    • Orcs Must Die! Unchained
  • Individual Projects
    • Skeletal Animation System
    • Procedural City Generator
    • Town
    • Simple Miner
  • Team Projects
    • Gravitas
    • Cult
    • Avian Apocalypse
  • Résumé
  • About Me
 
×

Town
A Data Driven Roguelike Game


Picture
Overview
  • Tech: C++, OpenGL, GLSL
  • Development Time : 8 weeks
  • Engine: Own C++ Engine
  • Features:
    • Self-Registering Classes
    • A* Pathfinding
    • Per NPC Faction 
    • Prefab Room Generation
    • Data-Driven NPC Actions
  • Github Link
  • Download Here
  • ↓ To Video ↓

Goals

The goal of this project is to create a roguelike type of gameplay and a framework that allows developer adding new features or modifying existing behaviors without changing any line of code.
Picture

  Features

Self-Registering Classes
Self-Registering Classes
Self-registering class is a feature that allows developer to add new features without change any of the game logic and code. In the source file of each self-registering class, it specifies its own register name, and the game code will initialize a 'Factory' system that uses the name it registered as key to store all the information accordingly.
A* Pathfinding
​A* Pathfinding
A* is a well-known algorithm that is widely used in pathfinding and graph traversal. This project applies A* as a pathfinding method for each NPC to create an intelligent behavior. In this project, each tile has its own move properties, based on that properties and move properties on each NPC , the algorithm will adjust its g-cost, so the NPC will change their path accordingly to create more organic and realistic feeling. 
Per NPC Faction
Per NPC Faction
Fiction is a feature that create more dynamic in this game world. Each race has its own initial faction setup against different races. For example, orcs is allies with wolves, but enemy with elf. The faction of each NPC will adjust based on what they saw in the game world. And the adjustment will only affect the NPC itself, for example, if the player killed a wolf, and been spot by orcA, orcA will have negative feeling about player, but orcB will not change it's faction set. 
Perfab Room Generation
Prefab Room Generation
In order to make it add flexibility for developers to generate specific environment setup. This project allows developer to pre-define layout of rooms in XML files under prison map type. Based on the attributes of each room, the map generator will place each room in a proper location in a prison map. 
Data-Driven NPC Actions
Data-Driven NPC Actions
The framework of actions of each NPC is similar to a component system. Behaviors of each action is defined by its own self-registering class. Based on the setting of each NPC in its XML file, the framework will assign actions on each NPC accordingly, and create different behaviors. With this framework, designer can easily combine with different actions to create NPCs with different behaviors.

Code Snaps   [Github Link]
  • TheGame.hpp
  • TheGame.cpp
  • PathFinding.hpp
  • PathFinding.cpp
  • NPC.hpp
  • NPC.cpp
  • ​NPCFactory.hpp
  • NPCFactory.cpp
<
>
 

  Demo Video


↑ To Top ↑
©2016   Home | Professional Projects | Individual Projects | Team Projects | Résumé | About Me
Home
About
Contact
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • Home
  • Professional Projects
    • Hero Academy 2
    • Orcs Must Die! Unchained
  • Individual Projects
    • Skeletal Animation System
    • Procedural City Generator
    • Town
    • Simple Miner
  • Team Projects
    • Gravitas
    • Cult
    • Avian Apocalypse
  • Résumé
  • About Me