Objective: Set up Flip Behaviour for Player Sprite

As shown above, when the Player moves forward and backwards, the rotatio of the Player has it always facing to the right. We need the Player to face left when moving that direction.

There’s an easy way to set the sprite facing rotation and that is using the Sprite Renderers Flip functions. This mirrors the sprite in the X or Y axis. We will flip the X making the sprite face left.

There’s many ways to do this and it may be common to put this logic in the Player script but…


Objective: Create Transitions between Animations.


Objective: Set up the Players Idle and Run animations.

As seen above the Player has no animation attached when idling or moving. Let’s fix that.

Start by opening the Animator and with the Players Sprite selected in the hierarchy create a new animation. To keep things organsied save it to a new folder in the Player called animations as there will be a few and they need to be kept seperate from any other enemy or so on game characters that have animations later.

With the animation window open highlight and pull all the animations from the idle sprite we created earlier.


Objective: Set up Player Jump and Speed

Currently the Player moves left and right (without animation) using the left and right/a and d keys. We want to have the Player jump when the space key is pressed.

We start with creating a float for the jump force. We need to keep the script clean so we move the movement logic form the Update method to its own Movement method. Next we run a conditional if to check if the space key has been pressed. …


Objective: Set up Player Idle Sprites and Basic Movement

The above image is the spritesheet for the Players idle animation. We will follow the same process as before to slice this up into frame sprites.

Next we create an empty object in the scene and reset the position. Rename it Player then drag the first frame of the idle sprites into the Player, rename it Sprite and reset its position. Now we create a Player script inside a seperate scripts folder and attach it to the Player object. …


Objective: Set up an animated Tile Set

The above image is a sprite sheet for an animated waterfall. In order to set this up (Unity 2020 as version setup varies) we need to get the Unity 2D extras from the Unity Github.


Objective: Set up Tilemap for the Project

Firstly we set up the interface layout to work in. If you are missing the Tile Palette go to Window, 2D, Tile Palette to bring it up then dock it next to the scene view. Next right-click in the hierarchy and select 2D object, Tilemap. This gives us a grid. The grid is where we paint the environment.


Objective: Project setup

The above image is a screenshot from the game we will be building from scratch. This will be done in stages and documented with posts along the way, showing the progression at each stage.

The game will be a 2D mobile game with on screen controls, Enemy AI, Attack and Loot systems, Ads and more. The final stage will include testing and publishing to the Google Play Store.

To start off we create a fresh git hub project and link it to a new Unity project on our local development system. Each stage of the project will be commited to this git hub repository to keep track of the progress along with the medium posts. In the next post, we will start by looking at building the environment.


2.5D Platformer

This post is just a list of all the posts involved in the 2.5D Platformer sections within part 2 of the GameDevHQ program.

  1. https://simonleen.medium.com/gamedevhq-part-3-2-5d-platformer-d1c2ab038b14
  2. https://simonleen.medium.com/physics-based-character-controller-26d718daafc4
  3. https://simonleen.medium.com/physics-based-character-controller-part-2-ef3c53218f77
  4. https://simonleen.medium.com/creating-collectables-in-unity-88de40bc01ef
  5. https://simonleen.medium.com/moving-platforms-in-unity-42ec6ce15d93
  6. https://simonleen.medium.com/lives-in-unity-e4a43cbeb7a0
  7. https://simonleen.medium.com/elevators-in-unity-9059808eab2a
  8. https://simonleen.medium.com/wall-jumping-in-unity-dc07a54f5d4e
  9. https://simonleen.medium.com/pushing-objects-in-unity-b4a27738e17
  10. https://simonleen.medium.com/urp-in-unity-9fb29d50e20d
  11. https://simonleen.medium.com/player-characters-with-filebase-3de8a51de68a
  12. https://simonleen.medium.com/player-animations-6f83975a4c9c
  13. https://simonleen.medium.com/player-animations-part-2-f9313d9d364
  14. https://simonleen.medium.com/player-animations-part-3-3f10f8149ddb
  15. https://simonleen.medium.com/player-animations-part-4-4d35a172bf93
  16. https://simonleen.medium.com/ledge-grab-part-1-863c4ab2b21e
  17. https://simonleen.medium.com/ledge-grab-part-2-ac446268baf
  18. https://simonleen.medium.com/gamedev2-5d-cert-requirements-a8907e6b642e
  19. https://simonleen.medium.com/gamedevhq-2-5d-cert-requirements-part-2-d070088d9dff
  20. https://simonleen.medium.com/gamedevhq-2-5d-cert-requirements-part-3-b1a4254fa21
  21. https://simonleen.medium.com/gamedevhq-2-5d-cert-requirements-part-4-cbbad66dcb1a
  22. https://simonleen.medium.com/gamedevhq-2-5d-cert-requirements-part-5-fdd3d339ee6d
  23. https://simonleen.medium.com/gamedevhq-2-5d-cert-requirements-part-6-c297c812a36b
  24. https://simonleen.medium.com/gamedevhq-2-5d-cert-requirements-part-7-49d44cbf6df3
  25. https://simonleen.medium.com/gamedevhq-2-5d-cert-requirements-part-8-e6d575d80a82

Objective: Create a Ladder System

First we get a ladder from GameDevHQs pluging Filebase. Then we go to Mixamo and get the climb ladder animation.

Simon Leen

Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store