Week 10 : Enemies and Interactions
Enemies & Interactions
Enemies
- What is it and how it works?
First of all, the enemies here in the game world are similar to ghosts. Therefore, they can move to all direction without colliding with any objects or walls inside the game world. Now I will explain how the enemies works. So right after 10 seconds the player appeared in the game world, the enemies will be spawned in 5 random places. Each spawner will spawn an enemy every 10 seconds during the game. Every time an enemy is spawned, there will be animation of the enemy appearing like a ghost. After then, the moving animation is applied to each of the enemy while moving around.
- How to kill the enemy?
To kill the enemy, the player will be using the gun to shoot the enemy. However, the each enemy has a health bar and it consists of 5 lives. When the player shoots toward the enemy and the bullets hit/collide with the enemy, its live will be decreased which can be seen by the health slider move to left. If the enemy has only 1 live left, the health slider will turn form green to red. This is implemented to let the player know when the enemy will die. When the enemy dies, an animation of it disappearing will be played following the enemy being destroyed (gone from the game world).
- How it attacks the player?
Not only the player can kill the enemy, but the enemy can do the same as well. The enemy attacks the player by moving towards the player when it is near the player. Here I make a radius to the player so that when the enemies collided with the player’s radius, it will have an effect of dragging the enemies toward himself. Same as the enemy, the player also has health bar which can be seen as hearts in the top-left of the game. The player has 3 lives but each live has 5 sub-lives. Every time the enemy collided with the player, it will decrease the sub-live of the player which is described by the amount of blood inside the heart decreased. When it reached to empty (5 times collided with enemies), the empty heart will be gone. This means that the player has only 2 lives left.
However, when the enemy is not inside the radius anymore, it will either go to other direction or move away from the player.
Chest
- How it appears?
After some enemies have died, a chest will appear in random places. Here I have set 5 random places in the game world to spawn a chest.
- How it can be opened? When player goes near to the chest and press 'Space' key, the chest will be opened and an object inside will come up. The object inside the chest can be a key to access the underground room or it can be power up/tool to help the player to avoid being defeated easily.
Underground room 1 Character
- The Monster In this underground room, I have implemented a new character called the monster. Basically, this has pretty similar effect with the enemies in the Game World(main room) where the player will get his sub-live decreased when colliding with the monster. However, this monster can only move either up and down or left and right. And one thing that player has to know is that the monster cannot die. They will keep on moving and if the player collides with the same monster, the player will lose it sub-live again.
- Coins
The coins here are need to be collected in order for the player to complete the mission in the underground room. When the player has collected all 20 coins, the player then can escape the underground room by finding exit stair. Also, I have given an animation for the coins so that it feels like the coin is turning using sprite sheet.
Underground room 2 Object
- The red and green light
In this underground, the player will be playing the red light and green light game. Basically the player will have to move during the green light and stop during the red light. If the player moves during the red light, player's sub-live will be decreased. Here I have used light illustration to be used for letting the player know what is the current light. Also, I have used Unity's Point Light 2D to change the light to red when it's time to stop and normal light(white) when it's time to move.
Feedback
During KIT109’s tutorial in week 10, I have gotten feedback from my peers as they have test my game and play with the enemies and other new feature in the game. Here are their feedback:
enemies are looking great, especially love the animations for them! for some reason, my health disappears after a while, and looking at your reply to Ethan, the player is supposed to teleport to the start after it collides with an enemy, but its not doing it
So basically it is correct that the player is supposed to teleport after it collides the enemy. So there are some error in my script so I have changed the index of an array so that when the index reach the last element in the array, the player will be teleported to the start position of the game. Anyway, thank you for giving me feedback:)
Hey Jastine, Games looking pretty polished right now. Small issue I noticed with some tighter corridors, this area in specific (see attached video) felt a bit tight to move through, that might just be me though.
I have fixed the collider in the some areas so that the player have more space to move now. I did it by changing the collider type of the blue thingy from Sprite to none Thanks for letting me know!
Improvement
An improvement that I have made in this step is that by adding a new cinemachine cam when a player is colliding with the chest object and press the enter key to open it. When the chest is opened, the camera will zoom in following the player so that we can see what object inside the chest.
Credits
- Enemy Sprites by Elthen > https://elthen.itch.io/2d-pixel-art-shadow-entity-sprites
- Pixel Art Torch by NYKNCK > https://www.pinterest.com/pin/815221970034312085/
- Heart Sprite sheet (for player health) from Adobe Stock> https://www.google.com/url?sa=i&url=https%3A%2F%2Fstock.adobe.com%2Fsearch%3Fk%3...
- Monster sprites > https://id.pinterest.com/pin/306455949644981574/
- Coin gif by Irina Mir > https://dribbble.com/shots/2434202-Coin-flip-2
- Red light by ColdUnwanted > https://pixelworlds.fandom.com/wiki/Traffic_Light_Block
Files
Get ESCAPE MANIA
ESCAPE MANIA
More posts
- Documentation + User GuideOct 14, 2021
- Week 13 DevLog : Updates Based on TestingOct 14, 2021
- KIT109 Assignment 4 - Game TestingOct 07, 2021
- Week 12 Devlog : UI and PolishOct 07, 2021
- Week 11 DevLog : Presentation and GraphicsSep 27, 2021
- Week 9 Devlog : Basic Level BlockingSep 18, 2021
- Week 8 Devlog: Basic MovementSep 08, 2021
- KIT109 Assignment 2 - Escape Mania Concept DocumentAug 28, 2021
Leave a comment
Log in with itch.io to leave a comment.