Runner Tutorial Problems

Right now I’m trying to go through the Runner Tutorial, but…



…it seems that the ground sprites only partially appear on screen. Furthermore, everything moves very, very fast - faster than I believe it’s supposed to. Can someone explain what causes this behavior and how to fix it?

The default cutoff bottom edge is by the red line so you need to move the ground up a little.

As for speed. Can you post your script code?

1 Like

ground.script (609 Bytes)
controller.script (821 Bytes)

The game runs much faster than the playable sample, and if I reduce the dimensions of the window, it gets even fasterer and becomes unplayable.

Sounds like vsync might not be enabled in your graphics driver.

You can either enable vsync in your graphics driver settings, alternatively you could check “variable_dt” in game.project settings which will let the engine use actual time when stepping.

1 Like

I noticed that delta time (dt) provided to the update() function of the controller.script isn’t used. And I see now that it’s not used in the tutorial code either. This is quite surprising as it can result in different results depending on hardware. The update function should look like this to use dt:

function update(self, dt)
    self.gridw = self.gridw + self.speed * dt

Obviously you need to increase the speed from 6 to something larger (try 360 pixels per second).

3 Likes

Hi!

I recently joined, and I wonder if it’s alright to ride this existing topic, as I’m having trouble with this same tutorial as well.

I am at step 4, creating a hero character. It says to move the frog images to match the box and sphere shapes, but I can’t see the frog sprites and the collision object simultaneously. What am I doing wrong?

Hard to tell. So you have the hero.go file open? And in the Outline you should have a spine component and a collision component attached (plus at a script and at a later stage also a particle fx). Like this:

Share your setup as a screenshot so we can compare with the one above.

1 Like

I was just taking the screenshot, when I noticed that I was missing one leg sprite in the atlas, and adding it fixed it. It’s strange I was missing it, since I’m 99% sure I used select all when moving the images, but what are you going to do, down to user error this one.

Thank you for your time and sorry about the bother!

4 Likes

My bad, but the tutorial is updated now.

2 Likes

Added crutch until spikes are added. If Hero beats his head in a jump of the left corner of the platform - the speed of x decreases, if the head beats of the right corner of the platform - the speed increases and he runs off the zone.
Fast remedy:

local function handle_geometry_contact(self, normal, distance)
.....
   if self.velocity.x~=0 then
       self.velocity.x=0
   end
end

What do you mean by this?

Sorry for my English.
I mean before adding spikes to the platform

1 Like