Ammunition Crates
|
This week has been a fair bit of work under the hood, preparing new things and setting up stuff for a later date. Given this there haven’t been much made to show. Thus this weeks post will talk about ammunition pick-ups. As mentioned in the post about flares, our projectiles are limited due to the fact that having an endless amount would render the lack of light pointless. However, since it is a limited resource, refills can be an essential part of motivating the player to spend charges, and make sure they have access to flares at key points of maps. For this reason we have the Ammunition crate, a simple item pick-up that gives more flares and allows the player to fire more projectiles. Let us continue this example with some pictures: The last flare has been fired, leaving us without ammunition, but the glow from it has revealed a crate lying on the floor below us. The yellow color does hint that it is something useful, so we move closer. As we move closer, the crate starts to lift, moving towards the avatar. As it reaches the avatar, it refills our ammunition, which will be more visible with the screen not cropped and the GUI fully operational. We are once again able to fire new flares, lighting up the path ahead for us. We are now once again able to use the flare, until we run out again. As displayed this gives us a way to control the supplies of flares, and make it possible to resupply the player. If we notice the player running out of flares at specific points while testing a level, we can strategically place out crates to allow them to continue on. Let us have a look at some code: if (distance GetExist() == true) This is very similar to the code used for power-ups and samples. The first checks the distance between player and the crate, and causes the crate to move towards the player, slightly faster than the player could swim away from. Once close enough to the player, the second part of the code triggers, removing the crate and setting the ammunition count to 5, the maximum. Whether or not the crates will always fully fill the projectiles or not is not set in stone and will have to be decided through testing. So the crates allow us an easy way to resupply the player, and thus allow us to control the challenge and limitations a map provides, as well as design for moment when spending several flares would be okay. I hope this text has been somewhat helpful in explaining what we have been working on, and how this artifact helps my team in designing our game. /Stefan |


