prevent continuous drift with spaceship controls

0 favourites
  • 2 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Hi,

    I am creating a 2D space shootem-up style game, anyway at the moment I am using one of the additional plugins for spaceship movement, where w thrusts forward and s thrusts backwards and a and d rotate the player left and right.

    The problem I am having is that if the player goes forward a little, they will continue to drift forever... but ideally i want them to gradually slow down, and come to a stop. So that they will only drift for a short time and not forever.

    If people would like to see an example of how it works at the moment, you can see my prototype tests here:

    face2palm.com/index.php/spatial-flux

    Sorry for long download I have also been testing how to build the introduction with some placeholder gfx, press start game and after the intro wasd will control the spaceship and youll see what i mean.

    Should I keep using the spaceship controls and add some rules to make the ship slow down, or use custom controls to do the same thing,m and if so can anyone provide a capx with how to build the control system.

    Thanks for any help you can give.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not familiar with the plugin/behaviours you use for spaceship control but how about including a countdown variable that runs whenever w isn't pressed? Pseudo-code:

    System -> every tick

    If (key.w <= 0 And ship.speed > 0)

       If (ship.countdown > 0)

          ship.countdown -= 1; (or whatever)

          ship.speed *= ship.countdown;

       Else

          ship.countdown = 0;

          ship.speed = 0;

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)