LiamMcKenzie / ScaredKrow

ScaredKrow is a game made for the third year "ID737001 Game Development" paper at Otago Polytechnic
MIT License
1 stars 2 forks source link

Hiding in haybales, haybale particles and bale spawn rate #35

Closed DevonHenderson closed 4 months ago

DevonHenderson commented 4 months ago

Description:

This PR adds the functionality of the player hiding in haybales. Using the existing code from Johnathan for 'isHidingPlace' in TileController.cs, it was a relatively simple addition to the player movement and crow collision checks

I chose to include the code in Player movement instead of the player controller as there was already some code in the TileController for this (PlayerEntersTile(Transform playerTransform))

I have also addressed some of the feedback from the Games Showcase and Design team as slightly lowered the probability of haybales spawning to add a bit more challenge to the game. As this change will not carry over between scenes, all I did was change the probabily from 10 to 3 in the tile generation settings. This seemed to still give an okay amount of bales to hide in but open to feedback if this needs increased/decreased.

A small particle animation will play when the player enters the haybale for an improved visual indication to the user. When the player leaves the haybale the particles will stop.

At the moment I have left the haybale model as it was so the player still appears to be sticking out the top of it. This should be fixed in another PR when we have the final asset from the design team.

Details

Branch: Devon/Haybale-Rate-and-Hiding

Fixes Issues:

Scene: Scenes/Player Hiding

Prefab: Prefabs/Tiles/Hay with Particles/HaypileTile (Added to TileData in place of old prefab)

Scripts added: Scripts/Effects/HayParticleTrigger.cs

DevonHenderson commented 4 months ago

I think the haybale particle should use a burst instead of rate over time. here are some values I thought looked good. Note the delayed time which makes the particle start when the player fully enters the haybale.

Have made the change. Definitely looks better now that it starts when the player fully enters. Just hadn't really used the particle system so didn't know burst was a thing.