I just finished my first 2 weeks of “Gameplay Sprint.” If you want to know what I really mean by that, check out my previous post about my “ Master Plan.”
I started the sprint with a… oh wait… You have no clue about the game I am building. Let me give you a tiny brief, then.
About the game
Egg Project — is the working title of a game I am building. It’s about an egg that lost its way, trying to find its mother through an amazing world of wonderful creatures, terrifying beasts, and magic!
Yup. There it is. That’s the game I am building.
I started the sprint with a clear, simple goal: to make a small playable prototype with 3 environmental puzzle mechanics.
Character Movement
My first job was to create the character control using the new Unity’s Input System. I was not well versed with it. So it took some time to establish the necessary links between the keys and the player movement. But once done, it was robust and was simple to handle. In fact, I discovered that using the Input System. I didn’t have to deal with the “Diagonal high speed” problem. The values were normalized, making sure the magnitude remained the same in all directions.
Soon, the character could move in all directions, just like I wanted. I quickly set up the “Cinemachine” to control the camera. I wanted a top-down pseudo-isometric-like view, and it was pretty straightforward to set it up with Cinemachine.
Puzzle mechanics — the easy, the hard, the exciting.
Next, I created a small terrain with a narrow, crooked bridge to test the character controls. This was also part of the environmental puzzle. So with this, I was left with creating just 2 more puzzle mechanics, and I was done for the sprint.
With spirits high, I jumped to program the next puzzle, a sticky surface wall where the character could climb up. That worked brilliantly, although it failed at the edges and worked only in certain directions on the wall. I wanted the character control to adapt to the player’s orientation while stuck to the sticky wall. I worked very hard, applied my knowledge in trigonometry, and came up with some strangest solutions. But none of them worked perfectly. That’s when I realized that I needed access to an angle formed by the normals of the wall with the world in 2 different axes. Alas, my math isn’t that good. And I had already spent 3 days on it, trying to figure it out. Of course, I could hardcore the orientation information for each sticky wall I place, and the character could work well, but this system wasn’t scalable. Also, it will be tough to make a change to it during level design.
So, I parked it for the moment. I decided to return to it later.
The third mechanic was the jump-pad. The basic was simple — when the player hits the jump-pad, throw them up in the air in a certain direction. But again, setting up the throwing velocity and setting up the angle wasn’t scalable, and it was hard to test it. I wanted to build a system where I could define where the object will land after the jump and how high the object could be thrown. Then the system could automatically figure out the throwing velocity and its angle. This time, my knowledge of physics got my back. After referring to some equations of motion, the system was working. But not as intended. It turned out, the drag I had applied to the player character was affecting its motion. So I had to go back and re-code the character control mechanic in a way to automatically remove any drag when it’s up in the air.
I did some more tweaks, such as increased the gravity value to make the jump and movement of the character snappier. I used Scriptable Objects to store properties of different ground surfaces to make the player move differently on different surfaces. I also added some Post-processing effects, just for the fun of it. I made a small testing level to test all these mechanics. That’s when I realized something — It would be cool if the player can re-orient the jump-pad direction.
Now, since the character is an egg, it pulling a lever to change the direction of the jump-pad didn’t fit well. But a lever had to be turned nevertheless. So I came up with a new mechanic to do just that. The lever is extended horizontally so that the player can use their body to push against the lever’s handle. After some tries, I got it working. Now the player can change the direction of the jump-pad. That was really exciting. Yay!
Next step
I was feeling good at this stage and was thinking about what other mechanics to add. That lead me to more questions about world-building and stories. Also, next was the Visual Sprint, and I had no idea how I wanted the game to look in the end. So I need to do some concept art as well. I have collected a good number of inspirational images for the game. Now it is time to apply that inspiration and create some good, unique, and eye-catching visuals.
Onto the next week — Visual Sprint.
I wish you well!
Originally published at https://www.theearlyowl.com on August 28, 2021.