I’m working on a new game, and I would appreciate any input you have for my situation.
In the game, the player uses a bicycle to move. What I’m trying to do is set up the movement so that, when a direction key is pressed, the bicycle employs a natural acceleration, and when the key is depressed, the bicycle will employ a natural deceleration.
What I set up originally was an object variable to represent the bike’s speed, and that the variable coincides with the pixel speed for object movement. I then set up an event where, if the direction key is released but the object variable is greater than zero, that the object movement kicks in in the opposite direction of the current movement, to simulate a slowing down and eventual stop of the bike. Obviously, this was without success.
I’ll attach a screenshot. I would appreciate any input from anyone who has actually set something like this up. I’m going to try to play with it a bit more today, but any help on this would be appreciated