Front Scroller : basically a 2D pepsi man?

Hello, This is my first question here and I am also new to game dev and defold as well.
We are a very small team (one programmer and one artist : both noobs) working on our first game. I want to implement a bonus level where the hero is running towards the camera and something is chasing it just like this image, but it is 2d.


Any idea which topics I should look into? or better a sample piece?

If you are completely new to Defold you should start by doing a tutorial. You can also check some of the basic examples. And finally also read the first few manuals.

Hi, Thanks, I have finished the tutorials. I will dig deeper into the manuals and will try to be more specific next time :slight_smile:

Start by breaking it down into the pieces required:

  • User input - You need to deal with input and move the player character based on the user input. How do you detect input in your code?
  • Animations - The player character should have a running animation. How do you play animations? Search for flipbook animations in the manuals.
  • Obstacles - From the screenshot it looks like there are obstacles (the crates/boxes). How do you spawn objects? Check out game object factories!
  • Collisions - How do you detect when the player character collides with something? Learn about the physics system in Defold.

Start reading and trying out things in isolation and ask questions here!

3 Likes