Self Study 4 -- Simple Game
Expanding on the very basic game concept I created last week, I took some creative liberties when incorporating the player health script. Rather than add the player health script to the player character itself, it was added it to the little ally robots that the player controls. Health bars were added rather than health text (to reduce screen clutter), and the health bars appear above the prefab they belong to. This led the project down the wonderfully complicated world of events and delegates in order to be able to add and remove health bars dynamically. In spite of the complexity, I can see this "observer" pattern coming in useful in many situations, and am likely to use it in the future.
The addition of health to the blue allies added tension to the game play, as you frantically try to destroy the red enemies before they chew up your allies who are unable to fight back themselves. The enemies attack almost once per second (though there is no animation for this), and each ally has 10 health, so with multiple enemies attacking one ally, it can take less than a few seconds for that ally to die. You cannot shoot your own allies (this would be quite annoying given the current control scheme), but that could be an interesting way to expand on the game play.
When creating spawners for the enemies, it became apparent that infinite enemy spawners would be a problem owing to the game revolving around the resource management of your allies health points. The enemy spawners had the number of spawns reduced, and were limited to one enemy instance at a time. When the current enemy instance dies, the spawner may then create a new one, unless it has spawned its maximum, then it disables itself (the spawner can be seen in the GIF below represented as a floating red ball above where the enemies spawn).
The enemy targeting system was updated so that it will update its target each frame based on who is closest, rather than locking onto whoever entered its trigger first. This means that if the player gets too close, it is possible for the enemy to target them instead of the allies. It is worth nothing that enemies kill the player character in a single hit (I didn't bother to capture footage of this because the player just disappears), so rather than healing the player, health packs heal your allies. When the player or an ally walks over a health pack, all allies in range are healed to full health. This creates an interesting dynamic where you want to get the most value out of a health pack, so you delay taking it until your allies really need it, but cut it too close you may lose some of your allies. It is also possible to have the allies run to the health pack mid fight in order to save one close to death.
UTAS KIT207 Portfolio
More posts
- Tutorial 5 -- Post-Processing and CinemachineApr 12, 2024
- Self Study 5 -- Lighting and ShadergraphApr 11, 2024
- Self Study 4 -- IdeationApr 02, 2024
- Tutorial 3 -- NavigationMar 22, 2024
- Self Study 3 -- Terrains and ProBuilderMar 21, 2024
- Tutorial 2 -- 3D Models in UnityMar 14, 2024
- Self Study 2 -- Bones, Rigging, and AnimationMar 14, 2024
- Tutorial 1 -- 3D ModelsMar 08, 2024
- Self Study 1 -- Getting Started in BlenderMar 01, 2024
Leave a comment
Log in with itch.io to leave a comment.