Checkpoint 02--Level Blocking
Checkpoint02--Level Blocking
After implementing the player movement, we are going to invite another important game object—virus and those blocks around it, and add some effects when pills flying.
I draw some simple blocks in Paint 3D, and add both box collider and rigidbody on them in unity. Same actions with ground.
I've mentioned in game concept, each level will have a background of cities around the world, and these citys suffered during this periods. So the first one is WuHan--China, I chose 3 pictures online and set it to be our background.
The next trickiest things is how to judge if enemies are killed. Relative speed finally came up to my mind. When objects collide with each other, we calculate two object’s relative speed at that point. If this number is very large then our enemies will die, if in some range they’ll hurt, if to small then nothing will happen(it means you’ve done a suck shot lol).
I also did some change so when virus hurt it’ll change what it looks like(even uglier than before)
Weeks before when I doing some research on CSDN(a computer learning as well as programming or unity app in China), I surprisingly found an amazing effect which could be added on pills. I downloaded sources in https://blog.csdn.net/akof1314/article/details/37603559. It's a unity package, just drag it into unity to import it. Then I followed the instructions then it looks perfect, I’ll show you a GIF in the end.
To make it more vivid I add a animation, so when enemies or pills die, it’ll show a boom effect. It looks like this>>>
And I use the basic way(in script I add some codes to let camera follow pill when flying), and that’s all>>>GIF at the beginning
(because gif is larger than 3MB, I decrease the quality)
Peer's evaluation and related correction
Some of my classmates said that sometimes when pills hanging over and swinging around, they can’t click exactly on pill’s body. So in order to solve this annoying problem I add another circle collider on pills body and set it to be a trigger(if not a trigger, then those pills will have “huge and invisible” body and will interact with our enemies directly, it seems unfair to virus haha). After that we could click wherever around pills to select them.
Besides, I’m happy to hear the downloaded effect pleased them a lot.
Alternative way or further implements
Actually I’ve thought lots of ways to implement game logic, for example, by judging the velocity of pills when they collide with enemies, but later I found I could do nothing when enemies fall onto ground. So here relative speed is one of the best choice. What we need to do further is add some button so that we can restart the game whenever we want.
Another alternative way to follow pills when flying is cinemachine but fortunately our game it not very complex, so just adding few lines will be fine. But cinemachine indeed works all the time.
P.S.
All gifs are made with https://www.gif.cn and all videos are captured with an app download in https://www.ieway.cn/evcapture.html
Files
Crazy Pills
Status | Prototype |
Author | Xunyi Zhao |
Genre | Puzzle |
More posts
- DocumentationOct 07, 2020
- Planed updates based on testOct 06, 2020
- User GuideOct 06, 2020
- Game TestingOct 04, 2020
- Checkpoint 05--UI/Polish/More LevelsOct 02, 2020
- Checkpoint 04--Graphics/Presentations/Maps/MusicSep 27, 2020
- Checkpoint 03--Basic game functions and Game logic/Interaction/PuzzlesSep 18, 2020
- Checkpoint 01--Player MovementAug 26, 2020
- Game ConceptAug 19, 2020
Leave a comment
Log in with itch.io to leave a comment.