Game AI Project
A reflection of the game development projects during my time at NC State University.
A reflection of the game development projects during my time at NC State University.
Although my degree is a B.S. in Computer Science with no specific concentration, I did take two specific courses towards game development: 'CSC481 - Game Engine Foundations', and 'CSC484 - Building Game AI'.
CSC481 is designed to build a game engine from scratch using SFML, programmed with C++. This course is built around students developing foundational concepts most game engines include, including but not limited to GameObjects and Components, Physics and Collisions, Time Management, Networking, and Event Handling.
CSC484 uses the same development environment as CSC481 and focuses on implementing Game AI concepts, including but not limited to Steering Behaviors, Pathfinding, Collision Avoidance, Decision Trees, and Behavior Learning.
I first took CSC481 and then CSC484 the following semester. Although it is strictly not required, I actually ended up using my game engine from CSC481 to complete CSC484!
My performance in both courses was an A+ in CSC481 and an A in CSC484.
Take a look at some of the work I did! I will note that I unfortunately do not have the games that I made in CSC481, but I do have the assignment writeups I submitted.
Steering & Flocking Behaviors
This part shows off flocking behavior:
Being the first assignment in CSC484, this saw the implementation of steering behaviors. Behaviors were combined to simulate flocking behavior, including:
Position Match
Velocity Match
Separation (to not have them run into each other)
Wander
Not only did each of these behaviors need to be implemented individually, but they were also given weights, and I had to determine the best weights for all of them to simulate the desired behavior.
The Game Engine's streamlined methods to handling physics objects and graphics
The code for multithreading.
This part shows off pathfinding:
The agent shown will wander around, avoiding walls until a mouse click, in which the agent will generate a graph. The agent then uses a pathfinding algorithm (there were multiple implemented, but this one uses A*), to look through the path and find the best one.
Path Finding and Path Generation
The Game Engine's method for drawing shapes and graphics using SFML.
The common method for keeping track of time for the game engine.
The GameObject class, including a list of components and methods for manipulating them.
Behavior/Decision Trees
This part of the project showcases two agents with different behaviors:
The smaller 'prey' which will wander around the screen, avoiding collisions with the walls.
The larger 'monster' which similarly wanders and avoids colliding with the walls, but also tries to "eat" the prey agent.
Here, a behavior tree was created to have the monster determine what to do based on the scenario (following a flowchart), and behavior tree learning was also done to have the monster make its own flowchart!
Handling client input in the server.
A method for the Game Engine to handle events thrown by the program.
In CSC481, the majority of the game engine was used to develop a platformer. However, the last assignment was incredibly simple in concept; make an entirely new game using the engine. I used this as an opportunity to make a Galaga clone with minor differences, so fundamentally a very different experience. Below is a report I was assigned to do to quantify how reusable my engine was:
And so, almost 95% of the lines present in the Platformer game were NOT changed to make a game of an entirely different genre. This means that, realistically, the major differences between the two were just the main.cpp which actually built the game!!! Because of this, this would be considered a wildly successful game engine.