Checkpoint 01--Player Movement
Checkpoint01--Player Movement
This is my first post about my game's designing process.
When it comes to the very first steps of create a game, player and its movement will always be considered and, indeed, it's the most basic part of a game project. This game Crazy Pills(I'll call it CP for short in following paragraph and later checkpoints), because of its genre and characteristics, player movement can be inplemented in few minutes(thanks to the various function and powerful components in Unity).
Unlike those have eightwaymovement player or have jump function like super mario, our mission is to use something like catapult to throw those pills and let it move in parabola trail arcoss the sky just like we throw ball in real life. In this way, pills can hit objects around virus and also disgusting virus itself at some angle and speed to destroy them and win the game.
Let's finish this mission in several steps:
1. I firstly add a catapult and a pill in scene, catapult have two parts right half and left half. The reason why I seperate it is I want to display these three parts in different layers, as you can see below, the left half of catapult could be seen at bottom, then it will cover the pill then, the right half.
2. Then I add a rigidbody and a polygencollider to the pill because we need to treat it like real physical body and allow it can collide with others.
But what I need to do to throw my pills? Emm... it sounds pretty easy because those two wooden things have name called "catapult"! I know our great scientist Hooke must feel extremely excited now for he has found a amazing law which has some relationships with spring. Yes, the "spring"(not season of course lol). I immediately recall a marvelous component -- Spring Joint 2D(when we attach this to a physic object, it can do whatever spring in real life do).
3. I attached this to my player, and put the connected anchor on right half of catapult, adjusted the distance(how long this spring will be) and frequency(how fast this spring will swing)
I add a script to let the pill follow my mouse's position after I click mouse and hold it to move. When my mouse button up, I stop the springjoint to let pill fly, it looks like the following gif>>>
Peer's evaluation and related correction
One of my classmate said it feels pretty good but not very natural because pill fly so fast and don't feel like in real physic world. So I did some research and I found we have three options on rigidbody's body type, I tried to use Kinematic(something like we play basketball) shortly after throw the pill over the sky. It looks great after altering some tricky setting.
My classmate also mentioned pill kept circle around when dragging it, so I change anchor's position in springjoint2D(like we change the body's center of gravity), then problem solved!
Alternative way or further implements
It seems I've done but in my opion, something can still be added or inplemented. We can draw two straps when we dragging the pill(line renderer) and we can adjust the angle of pill's track(maybe drop down pill's mass or add catapult's strength)
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 02--Level BlockingSep 10, 2020
- Game ConceptAug 19, 2020
Leave a comment
Log in with itch.io to leave a comment.