Journal Entry 2 - main game mechanics
Date: 28.7.2021
I decided on choosing no concrete theme beforehand (as in environment and art). I have no prior experience in Unity so I want to focus on making the basic concept work and then I will decide on theme afterwards. That goes against the idea of having one-page design before implementing anything, but I decided that's the best thing that will work for me.
After updating Unity I created a new scene. After refreshing my knowledge of the UI I added new scene.
I need a boundaries at the bottom and at sides to make player unable to leave the area. That could of course be done using invisible barriers or code but I want to have clear visual border that I can ad some decorations later on.
I added BoxColliders to all objects and RigidBody to the player object. Then wrote a script to allow player moving left and right. Allowing player to jump was little more challenging as I had to detect when player is on the ground. Otherwise they would be able to jump indefinitely.
Movement now works fine, the only issue is the player can get stuck on side walls.
Date: 29.7.2021
After few attemps I fixed the getting stuck issue. When player collides with wall and attempts to move into wall's direction player's velocity in X direction is set to zero.
Another feature to add is UI text for displaying score. For now it will only display amount of jumps as debug value.
Date: 3.8.2021
Today's goal is to create a prefab for falling objects. It should have gravity and colider for detecting collision with player. It should be killed when it is no longer visible by camera. First I tried to let them move down only by gravity but the movement felt a little weird. I want the objects to fall at constant speed, so I made them move using script. Object is killed when is it no longer visible by camera. That's achieved by calculating wheter camera and object's box collider overlap.
Here is how the game currently looks like:
The player and objects are currently just squares. The next step is to actually decide and design the theme of the game and get some art.
Get Project C
Project C
Game design and implementation
Status | In development |
Author | milan_25 |
Tags | mff-gdintro-c |
More posts
- Journal Entry 3 - game designAug 05, 2021
- Journal Entry 1 - design decisionsMay 07, 2021
Leave a comment
Log in with itch.io to leave a comment.