Learning algorithms
I like to constatly learn and test new algorithms. Below are some smaller projects I've started to try implimenting algorithms that I found intersting. I will continue to update this page with new projects.
MiniMax AI
I have a great interest in video game AI. So, I decided to implement my own MiniMax algorithm for some simple board games. The two game AI I decided to create were Tic-Tac-Toe and connect four. The Tic-Tac-Toe algorithm is working as intended all games result in a tie or the computer winning.In Tic-Tac-Toe the player is always "X". The connect four however there is still a chance to beat the computer. The connect four algorithm is still a work in progress. In connect four the player is always yellow. I hope to continue updating it until I can make it unbeatable.
A* Pathfinding
The purpose of this project was to impliment the A* pathfinding algorithm in Unity using C#. The A* pathfinding algorithm is an extension of Dijkstra's algorithm. It works by factoring in a "cost" while finding the shortest path. This cost is determined by two factors. The first is the G cost which is based on the distance from the starting node. The second cost is the H cost, which is a heuristic value from the node to the end point. The algorithm than goes through each node with the lowest overall cost to determine links from node to node. Once the end goal is reached a path is then traced back based on links to previous nodes. Check out the code here : Github
UDP - Server-client Game
This project was a school project where we were tasked with creating a network game by using .NET udp sockets. For my game I decided to keep gameplay simple and focus on the networking aspects. The game works with a dedicated server starting and game and clientss then join to play. The server has control over everything in the game, clients just send messages to the Server. Below is a video in which I explain how all the networking was setup and a short gameplay demonstration.
Inverse Kinematics and Procedural Animation
Since I have an interest in both animation as well as programming, I wanted to learn procedural animation. This first step towards this was learning and implimenting an inverse kinematics tool. Inverse Kinematics works opposite to forward kinematics, instead of working the start joint to the end joint it works from end bone to start. The result is more natural moving limbs in animations. My script works by going through bone by bone and rotating it first towards a target location, than towards a preset pole. This script could than be used on limbs of any length. This allowed me to create creatures with any number of limbs and joints. Since it is moving towards a target and not using a premade animation this allows for accurate placement. With this I was able to create animation that could traverse uneven terrain or stairs and not clip through or float above resulting in more natural movement. Check out the Videos below to see some examples. I plan to use this in the future to add even more movement to my future projects. Heads looking in specific directions, arms grabbing things, and dodging obstacles are just some of the ways this system can be used. Check out the code here : Github
Conway's Game of Life Clone
This zero-player game has a set of rules that determines how cells are created and destroyed. Any Cell with less than 2 neighbours dies, due to underpopulation. Any cell with more than 3 neighbours dies. Any cells with exactly 2 or 3 neighbours lives. Any dead cell with 3 live neighbours comes back. These 4 rules cause interesting interactions and patterns amoung the cells. There are multiple infinite patterns that can occur during the game. For my implementation the live cells are chosen randomly at the start then the simulation. Below is a video demonstration of my implementation of Conway's Game of Life.