3D Platformer/Shooter Prototype


A Recreation of Ratchet And Clank


The game in the above video is available to download and play here!
Windows x64 Download
You will need a controller such as a ps4 dualshock or xbox controller to play. The controls are listed in game by clicking the "controls" button with your mouse.

As a big fan of Ratchet and Clank, I decided to try recreating my own version of the game with 3D models I found online. I then went through the process of making needed adjustments on the models in blender, rigging them for animation with Mixamo, fine tuning the animations with an asset called Umotion, and setting up the animitions to play with Unity's Animator Controller. As more of a programmer than an artist, this project was really challenging as I attempted to branch out to more artistic concepts such as animation and UI design. I enjoyed the new challenges, and had fun drawing the UI for this game with the pen tool in photoshop. The healthbars and weapon UI in the top left corner was all hand drawn by myself, and overall I'm pretty pleased with my frankenstein programmer art! In the future I would try to pick a consistent color pallette from the start as I feel some of the reds and oranges and blues of all the combined UI may be too many different colors.

One aspect of this project that I condsidered to be the most fun to work on was the behavior of the different weapons at Ratchet's disposal. The machine-gun, rocket-launcher, and plasma gun in this protype all have projectiles which launch in a straight line if no target is selected. But, if a target is selected by the targeting system, the projectiles use a steering behavior to pursue the provided target. This behavior can be modified by a multiplier so that the bullets only slightly curve in the direction of the target, or completely follow the target like a heat seeking missle. For other weapons that did not make it into this prototype, I played around with some curved trajectories and other mechanics such as flying up to random points in the sky before launching at the target. In the future I would love to expand this into a small game with unlockable weapons that have more unique mechanics in how they launch their projectile bullets.

The targeting system works by using an overlapBoxNonAlloc that is positioned in front of the player that only senses colliders in the ITargetable layer of my project. It then adds any detected targets to a list, sorts the list by distance, and returns the targetable object that is closest to the player. This happens once every 1/10th of a second. If a target is detected, it is passed to the currently equipped weapon which is able to give the selectedtarget to it's projectile when the weapon is fired. This overlapbox which senses the targetable objects is centered infront of the player so that only objects near the center of the screen are detected.

Another big challenge of this project was the boss fight. I used a finite state machine to control the boss, and this ended up working quite well! However, I did find that I would like much of the bosses behavior to happen as continuous chains of decisions, and I feel that in the future, behavior trees will be more useful in creating this more advanced behavior. I am currently studying how to script my own behavior trees, and I am excited to see what kind of enemy AI I can produce in the future! I also used this project as a learning experience for segmenting timed behaviors such as sounds or particle systems during specific moments within an animation. For example, the swishing sounds of the bosses sword, and the clanging sound when it hits the ground after the final slash in his animation. I ended up swapping from Unity's animation events to just adding timed delays on the behaviors and fine tuning the delays in the editor. This was a tough decision because I do find that animation events are a more precise method to get perfectly timed events, but Unity's current system for animation events is very tough to keep organized, and is string based where you must perfectly type the name of the method called by the event which can be error prone. Unless I can find a cleaner way to implement animation events in future projects, I will most likely just use coroutines that delay regular C# events for the required behavior, and just hand-tune the delay time in the editor in play mode.

Additionally, this project was also my first attempt at world building with 3-D modeling and I created all of the level inside Unity with probuilder. Probuilder seems like a great tool, and I will definitely use it more in the future to box-out levels. One asset that is a must for probuilder is ProGrids. I initially started building my level without grids and imediately ran into complications when trying to line up objects or snap them together. Using grids made everything much more simple to snap together and measure the dimensions of whatever I was creating. I imagine that grids would become increasingly more important if I were to create platforming puzzles where I would have to match the heights and distances of the objects to the jump distances of the player.

One subject I often find myself researching is how I want different systems and data to persist between scenes, and how I want to handle dependencies. For now I am considering a combination of scriptable-objects, and a service-locator pattern. It seems there are many possible options such as a grand central pub-sub event based architecture, the infamous singleton manager, or dependency injection with something like zenject. Also, avoiding monobehavior classes and then using the factory or builder pattern seems to be a subject I will have to further study so that I can also pass in dependencies that way as well. This is one topic I feel has no directly correct answer and will take some time and experience to feel out which strategies work for different types of games.