Libgdx tutorial beginner Part 2 – Player

In this second part we will add the player and cube which will interact with the world/level we are going to create in the next part.

  • Here we have the player Bob and cube that we’re going to control
  • Yes the Map is not there, I want to focus on these 2 for now
  • Most important thing to note is that Bob and Cube are very similar, but cube is not effected by gravity
  • fetchCollidableRects will get collision tiles and trytoMove will check if there is a collison when we are moving, pretty clear actually
  • If you are familiar with java it should be clear, but if you are completely new to game programming just ask anything and I’ll explain it, will add more explanation later


Recent Posts

Categories