Side-scrolling platformer template

I just wanted to share with you my template for creating a side-scrolling platform game.

It has the typical movement animations you would expect when moving left & right (thanks to the extension ‘riknoll/character-animations’ from @richard). I also set an image when jumping and facing left or right, and another image when ‘not moving’.

I use the camera a little different than what most games do. Normally the player is set to move the camera. In this case the player is always centered in the middle of the screen, and also when the player jumps higher than the center of the screen, the screen scrolls up and down.

In this game, I set a sprite (the little red square) to appear just in front of the player. That square is used to move the camera. So when the player jumps, the screen does not scroll. When you place the camera to be above the player, the player moves to the center of the screen again. If you want the player to stay fixed towards the left of the screen, just place the camera a little further away.

For those interested in the extensions that I used:

I had also installed the ‘tilemaps’ extension, but didn’t use it. In this example I used the ‘color-coded-tilemap’ instead. Use whichever tilemap extension you feel comfortable with.

I hope others might be able to use this as a way to get started in their own game development. :+1:


can i use your template to make a platformer

1 Like

By all means, please use as much or as little code as you like. I have posted this as an example so that others might be inspired to make their own game. I look forward to seeing what you might make, and feel free to ask any questions you might have.

tnx :smile: :smile:

1 Like