Unreal Game: Rocket Snail
Screenshot of the boss fight for Rocket Snail
The Rocket Snail (War is Shell) is my first Unreal 4 project in which I was the lead programmer. The concept of the game was simple: you played as a snail that was part of a secret weapon program developed by the US armor during WWII. You as the prototype of your unit must complete a sequence of tests in order to prove your worth as a weapon of war.
We started the project with this simple concept: a war snail that had rockets strapped onto him. It took me a week to prototype a playable toy for us to test the concept.
Blueprint of the snail in playable toy
The blueprint at this point was very rough: not every line was commented and things were just being put in where ever needed. However we have got the core functionality: our snail was able to dash towards the direction of the camera, and he was able to retract into his shell where he keeps his momentum and starts simulating physics.
We had a little visual problem at this point: as we have a snail as the main character it was very odd to see him walking onto angled surfaces without rotating his body. Thus I created a function that was called on tick which ray traced down from where the snail was and rotated the snail based on the vertex normal direction on the floor beneath him:
Before Rotation Script (Left) and After Rotation Script (Right)
I eventually went back and reorganized the player blueprint once we were sure what mechanics we were keeping from the Player Zoo. As we had intentions to develop the game further in the future I took the time to categorize and color-code all of the code.
The final blueprint for the player at the end of the development
After this point, we had a fully functional snail who can dash with his rocket and roll around in his shell form, it was time to introduce weapons and enemies. A total number of 4 enemies was eventually constructed during the development including patrol tanks, turrets, lobber turrets, and the final boss.
The tank during his patrol
The tank was the most common enemy in the game, which also had the most complex logic. Each one of them is assigned a unique index and will patrol between his own patrol points until he sees the player. Upon engagement, the tank will try to close the distance by moving towards the player, and once in attack range will fire missiles from his cannon. The tank also checks per frame once engaged whether he still has a line of sight of his target, if that returns false he will go to the last known location of the target and spin around in place in search for target. He will either reengage if he finds the target again or retreats back to his patrol route if he does not.
A turret with his power box located beneath him, currently engaged with his laser on
The turret is essentially a stationary version of the tank. He has a larger field of view and fires faster-moving projectiles at greater range. Once a turret sees his target he turns on his red laser notifying the player of his engagement. A turret is immune to damage itself, but are killed when his power box is destroyed.
The lobber turret, stationed right in front of the gate for the boss fight.
The lobber turret is a unique enemy in the game with a massive attach range covering most of the map. Throughout the game he fires shots into the air which drops at the players location. The parabola is calculated by a macro that takes the distance between him and his target, and returns me the velocity the shell should be fired at. The shell it fires always takes 5 seconds to reach the player, which combined with his loud firing noise makes his attacks easy to predict.
The boss in his idle state
The boss is a large tank with a metal ball attached behind him. Once the player enters his area he will start moving along the edge of the map and attack the player. The boss has 4 weaknesses on him, serving as his 4 hit points. 4 method of attacking are employed by this boss:
His main cannon always rotates and fires missiles at the player.
Each of his weak spots will have a rapid firing machine gun spawned on it once destroyed.
The metal ball he drags turns blue every 10 seconds and electrifies the floor for 2 seconds.
Last of all, if the player gets too close to him they will be crushed to death by his treads.
The logic and behavior of all these enemies are coded purely via blueprint, as I was more comfortable with my ability to code complex logic states.
Blueprint of the majority of the tank’s logic
The player had 4 types of attacking methods: Shell Smash, Rocket, Swarm Missle and Air Strike.
The player can hold right mouse at any moment to retract into their shell, if they had enough momentum before doing so they can smash through walls and enemies.
The Rocket is a single-shot rocket launcher. The rocket launcher pops off after firing and the rocket itself is able to destroy walls and enemies.
The swarm missile fires 32 shots of tiny missiles on command. The missiles all have a randomized spread making them inaccurate for sniping but good for spraying down a whole area. The recoil from firing them also pushes the player backwards which can be used to reach higher altitude.
The flair can be tossed by clicking left mouse button. Once it drops on the floor it will start to release red smoke and summon a B12 plane to carpet bomb wherever the flair was dropped. The plane will always attempt to make a lift off after the bombing and will self destruct after hitting the walls of the map.
The idea of different shell types that can be picked up along the way was also experimented upon during early phases of development. The bomb shell was a concept which allowed the player to start rolling in their shell with the bomb shell equipped. The bomb shell once reached certain velocity will heat up and destroy everything along its path. The idea did not make it into the final built as we did not have enough time to build a level that properly utilized this mechanic.
Here is a play through video that I uploaded onto YouTube.