
Prototyping
This page contains collections of prototypes I have worked on to supplement my knowledge, as well as for use in games. There are short videos showing the functionality and descriptions as to why I put in the work and what I did.
Procedural Terrain Generation
This prototype was made in support of The War, a turn-based tactical multiplayer game set in an alternate reality. The prototype video includes a voice over in which I explain the features of the prototype.
​
This prototype was created using a combination of Perlin noise, pseudo-random number generation, and Unity scriptable objects. Perlin noise is used to determine the heightmap used to create the terrain itself, with the RNG acting as a seed for the terrain. Additionally, it includes randomized offset, moving the visible world along the X and Y values of the heightmap. Due to these RNG values, millions of combinations can occur, ensuring the possibility of receiving the same map twice is very low.
​
In addition to generating the terrain with millions of permutations, object placement within the map works much the same. Any object can be added, set to randomize placement either directly or with Perlin noise, randomize rotation and size, and angle to normals, where needed.
​
Further adding to the capabilities above, all adjustments are performed with scriptable objects, meaning that any setting can be saved and traded out as desired. This makes the functionality exceptionally modular. Lastly, the code has been configured to allow for infinite terrain, including range based level of detail and threading, to ensure optimization when running.
Save/Load
This prototype was done in support of the GravityWorks game project. It was a prototype for the back-end data structure of the game, particularly surrounding the game levels/segments and the game save system using a binary formatting structure. The video above shows the system in action. It is not flashy, but works wonderfully.
All of the data structure was contained inside a dictionary within the game controller. This dictionary allowed for quick access for each level using an enumerated value. Within each level there were also segments, which denoted each checkpoint in the level. All segments within the level structure was contained in an array. Each of these segments retained data on if the segment had been completed, the points gathered while in this segment, and the health of the player when they completed the segment.
​
The save/load system would take all of the data from the level dictionary, send it through a binary formatter to ensure the data could not be manually changed outside of the game, then stream the data to a file type of SAV, though this was later changed in game to BLR.
Day / Night cycle
The Day/Night cycle prototype was created as a desire to determine how a cycle could work in a feasible manner while using time dilation. Other possibilities were built into this prototype as well, including hunger, dehydration, and exhaustion of the player as possibilities in a survival game. This prototype also included more in-depth animation and character model implementation.
​
The day/night cycle itself is very straight forward. The sun and moon are both directional lights, placed opposite each other, facing toward each other, in space. As time progresses, the two lights orbit the origin, always facing the center. The time dilation is implemented in a single line, returning the current time as a float value. From this return, the rotation occurs by dividing the returned value by 360 degrees.
Pathfinding
The Pathfinding prototype was done in an attempt to determine the best way to set up procedural terrain generation with character movement in a turn-based game. The final product includes the character's ability to find the cheapest path around the U-shaped mountain pass, and through the swamp. The costs for each tile can be configured independently, and the character can be configured to only move left/right/up/down, or in diagonals as well.
​
For this prototype I used Dijkstra's algorithm as, due to the game being a turn-based configuration, the calculation did not need to be performed quickly, comparatively speaking, only precise. I also used a pre-set pattern for the terrain generation using simple blocks and color coding as the terrain generation was not the point of the prototype. The actual pathfinding calculation is handled by the map by passing in the source location of the active unit, and the target destination, which is passed in by the clicked tile. The path is then calculated and sent to the unit to manage. Clicking the button will move the unit as far as it can along the path in one turn.
Fog of War
This prototype was developed in support of the Oetherworld RPG currently under development. It displays a fog of war type of system, in conjunction with line of sight and character attributes. As the character moves around, the fog will disappear within a certain radius of the character, based on their perception attribute. If the character comes across an interactive object, such as an NPC, enemy, doorway, or loot stash, while within line of sight, the object will appear. If line of sight is broken, but still within perceptible range, the object will disappear.
​
A few systems were built together to make this work properly. First, the attribute values and modifiers needed to be determined and accessible. From this point, the camera controller takes over, casting a ray from the camera viewport to the character. On the way, the ray will intersect with the fog of war layer. At the point of intersection, the fog is set transparent. This continues to points away from the character as distant as the perceptible radius. As the character then moves, any point previously seen, but no longer within the radius, is set at 50% opacity.
FPS
The FPS prototype is a general first-person shooter functionality prototype including movement, firing, weapon switching, reloading, and impact effects. Pretty straight forward.
The FPS prototype is a general first-person shooter functionality prototype including movement, firing, weapon switching, reloading, and impact effects. Pretty straight forward.