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

Crow Enemy spawning, movement and shadow collision #14

Closed DevonHenderson closed 4 months ago

DevonHenderson commented 4 months ago

Crow Enemy

Description

This pull request aims to resolve the following issue:

This MVP of the Crow covers spawning, movement and hit detection. There are currently the following features:

For review in PR: Currently working in a test scene called CrowTesting

How it works:

When the scene starts, a crow prefab is instantiated offscreen at a set x-position ahead of the player and a random z-position (bound to the playable area). The crow then moves over a set amount of time (current 5sec) towards an end x-position before hiding offscreen again, waiting a random amount, then respawning at a new z-position.

Implementing in the main scene:

As discussed, after merging this feature another branch/PR will integrate this correctly with the main scene assets and structure.

Future tasks required:

As we have not set up the player health/items yet, there isnt much to show the player has collided with the crow so it is only shown as a Debug.Log() at this stage. The design team have also mentioned they would like the possiblity of adding more crows as the game goes on. This could easily be implemented by calling SpawnCrow() again after the first crow has passed the player a set number of times. (If crow has 'moved' 5 times, spawn a second crow, repeat up to a max of 3 crows.)

Other potential issues:

The alert may not always show correctly if the Crow travelTime is a low value (e.g 1). As the alert is likely to change from this initial prototype I have not worried in addressing this issue at this stage but in the future we could have a shorter animation that plays/loops.