The next public alpha is here! This prototype adds improved entity AI (random idle/wandering movement, semi-awareness and full-awareness, and other changes), sounds (doors, entities), particles (entity attacks), and a demonstration of upcoming world-space UI.
A new semester at my university has started, and the first couple weeks kept me from finishing this next update. I have finally cleared the to-do list and exported the build today, which now allows me to move forward with some changes I wanted put off until a.04.00 (due to making major API-level modifications). About half of this update is a refining of the previous, while another half introduces the foundation for a new system.
Testing PHE wandering code
I first began working on something that was present in UE1 - random wander movement. As before, it was very simple to implement - a timer gives a baseline limit of how often entities can wander, and an additional 5%-chance-per-frame check is done to make it more random/organic. When the check is passed, find a random spot within a certain radius to move to. After that, I began on working on entity awareness. In UE1, entities were either aware of you (in range or if they were attacked) or they weren't. For this update, I made it so that they could be partially aware of you - either because you're somewhat close but not in range, or because you attacked them from afar. Some other improvements to the PHE were made as well: it faces the player much better than before (leading to its bullets having a much higher chance of hitting the player), and it tends to move around the player from various positions to make it harder to hit (or at least make the player move around more). The fire rate was also fixed so that there's no odd pauses between every few bullets. The base reaction time (the number multiplied by player distance) was halved for all entities.
UI work. Some of this is for a.4.0, but the crosshair is not
Test of the world-space UI. Also demonstrates crosshair color changing
I then began work on the UI. First I wanted to get a concept down for the HUD, which I set aside to finish working on in a.4.0. Then I worked on an improved crosshair, since the first one was messy and obnoxious. I decided to make a vector-based image rather than a raster-based image, so that the crosshair was crisper. Vector graphics will be used as much as possible for the UI (currently, HUD text still uses Unity UI (blurry, raster) rather than TextMeshPro (crisp, vector(?); it was not yet changed because it would increase API level to 4). The crosshair turns red when targetting an entity, and it turns blue when targetting world-space UI. After the crosshair was made, I began creating the foundation for both world-space UI and the store system (needed to test the UI on something, may as well make it the store). The world-space UI works like so: the PlayerManager constantly fires a ray to determine target (currently entity or UI). If the collider that the ray collides with is the UI, a check is ran for input. If the player presses "E" (custom controls will come later on), it sends a message to the upgrade button that is attached to the collider's gameobject. The store/upgrade system then handles upgrades. This will likely expand beyond the store/upgrade system eventually.
The last thing that I worked on is reflected in the first screenshot - effects. I worked on some sounds for entity attacks (such as a crackling ice effect for the cold of the SCCE, a hissing effect for the toxin of the ODE, etc.). I also made a door sound, somewhat similar to but less 'industrial' than the one in UE1. I also added some particle effects to the various entity attacks (also ridding of the bullet gameobjects from the PHE and RTFO).