So here we are, I am tasked with creating a game of my choice after submitting the Game Design Documentation a week ago. I have planned out how I am going to envision my game and begun making the bread of all development – the assets.

This is my pixel art sprite sheet made purely for the game that I’m making. I have envisioned what the player character would look like, settling for a more basic approach to the character. I also created more sprites of the environment this player will be traversing through, such as different shapes of rocks and bushes, and grassy terrain like platforms and tiles. To complete the sprite-sheet, I created a heart container to act as the player’s health, showing the depleted container upon the player’s death.

place all of my assets in a sprite-sheet, complete with naming conventions to show its appearance.

Before I can even separate my sprite-sheet into individual assets, I checked the Inspector View (after placing it in the hierarchy), I made sure to check the Mesh Type and select ‘Full Rect’ making sure it would slice alright. I also have to select the drop down menu for Sprite Mode and change to multiple as the sprite editor won’t allow me to manually select each one.

This is also a priority for slicing assets. I selected the Draw Mode from Simple to Sliced so it would correctly work in the editor. As you can see in the below image, my player character has a blue outlined box encapsulating it. This allows me to separate the character from the sprite-sheet, the same for the other assets too.

Now that all of my sprites are separated, it was time to create the actual level. I started with a basic level platform for now and got to work on the first script, presumably where we get the player character moving.

The script is a basic starting point of any Unity game because it determines the movement of our player, including moving left and right, sprite flipping and jumping.

I then attached the script to the player and these variables appeared for me to tweak them to my liking. I then applied a groundcheck Object beneath the player’s feet to determine if they land on the ground.

Within my script, I also determine the player’s facing position using the Sprite Renderer method [sr] to flip the sprite horizontally. This gives the player more movement capabilities and allow a more smooth experience.

Sometimes when jumping, the player character will get stuck on a platform ledge. Having this feature left in just feels weird, so I applied a 2D Physics Material called PlayerMat and attached it to the player’s Rigibody to eliminate the issue.

The Rigibody’s Body Type is set to Dynamic by default. Setting the Body Type to Kinematic would just make the player continuously float in the air after a single jump, which I don’t want. The Dynamic type allows the player to fall back down after jumping. For this reason, I left the Body Type as it is.

Leave a Reply