Powering Up: LightUp
|
This week I have been working on the first real power-up in out game. Since Ambient Pressure, our game that is, takes place mostly in a dark environment, one of the most valuable things is knowledge of your surroundings, and for this we have the LightUP power-up. What this power-up does is quite simple: it reveals the entire screen for a moment. This means the player get a much greater visual range, and will be able to spot new paths, threats, and possibly even goodies such as Samples (our main collectible) and other power-ups. Let us take a look on how it could look in-game. You are swimming about, trying to figure out where to go next, when in the corner of your lighted up area, you spot something, an odd bottle! We move closer to inspect, and happen to reach the bottle, and then… Suddenly the map is lit up, giving us a lot more to see, and revealing a fish! Luckily we now know where the fish is before we end up meeting it, and thus can avoid it getting too close. In just a moment we have become aware of our surroundings and the nearby threat, and can thus change our course and adapt to what we now know. The LightUp is a game-changer when found, but only lasts for a couple of seconds. If quick this allows the player to plan ahead and consider their options. It also, as shown above, helps reveal any nearby enemies, while they remain none the wiser, allowing you to avoid them easier, or set up for the use of a flare to distract them. The effect itself is currently quite simple. There is just a bool which, when false, turns off the darkness layer. This bool is controlled is turned false when the power-up is picked up: if (distance GetExist() == true) This also resets a clock, which when it reaches 3 seconds turns the bool to true again, and thus allows the darkness to return. This was a simple solution that could likely do with some refinement later on, but works good enough for now. It was the quickest and least demanding way to handle the power-up that I could think of at the moment of coding, and while the efficiency is questionable, the results work well enough. /Stefan ps. As for the pictures: I am aware that the walls right now are messed up and that might not have been the best demonstration, but due to some other mostly unrelated code issues I failed to move the power-up to a better position. |

