acceleration

  1. C

    How to I add acceleration/deceleration to player movement with 8 directions in a top down game?

    Hey friends! I am making a top down rpg like game, and I would like to make the player's movement more smooth by adding light acceleration and deceleration. This is what I have so far, and as of now, moving along the x axis works fine with both acceleration and deceleration, but for some...
  2. V

    GameMaker acceleration

    So what im trying to do is when the player is shooting he gets sent back a bit and i managed to do that: if (mouse_check_button(mb_left)) && (cooldown < 1) && weapon_picked_up = true && can_shoot = true { x = x - lengthdir_x(8, weapons.image_angle); y = y - lengthdir_y(8...
  3. V

    GameMaker dropping weapons acceleration

    so if you dont understand from the title or dont know what acceleration is im trying to make it when the player drops the weapon the weapon slides for a bit on the floor and stops slowly. Please help me ive been triyng to figure this out but nothing works. heres the code for my picking up and...
  4. KamilSeven

    [SOLVED]Accelerating player movement like Swing Copters 2

    Hi, I'm trying to make a player movement like in the mobile game Swing Copters 2. The problem is I couldn't find a way to apply acceleration/deceleration to it because it needs to switch direction with the same button. My controller so far is basic as: if(keyboard_check_pressed(vk_space)) {...
  5. J

    GML Help implementing acc in my movement script

    Hello, I'm trying to add acc to my movement script. I usually know how to do this, but with my current code I'm using "xDirection" which makes this unfamiliar territory for me. my script: var xDirection = keyboard_check(ord("D")) - keyboard_check(ord("A")); var jump =...
  6. W

    smooth movement and 8D movement for top-down

    Hi could someone please point me in the right direction for implementing smooth acceleration/deceleration into a topdown game with 8D movement? im using a vector system(?) that uses a switch statement checking player angle for my 8D movement ( 0 = right, 45 = upright etc..) I have an idea of...
  7. V

    SOLVED Help with certain acceleration?

    Hey all whom use this forum! I was wondering if someone can help me tackle a problem? I have my acceleration and deceleration working the way I want it. I have a "sprint" button as well. The problem that I'm having is my speed won't decelerate to the desired number, but instead jump to that...
  8. S

    Gravity Acceleration

    Hi i was trying to make gravity acceleration. This was my idea. grv = 1; vsp = vsp + grv; if (place_meeting(x,y+1,oWall)) { grv = 1; } else for(i=1; i < 50; i += 1) { grv += 0.1 * grv; } if...
  9. FoufaDjo

    SOLVED collision,friction and accel problems

    i followed a tuto on yt about movement and the dont use the speed var so i cant use the friction function can someone help me: hspd = (rkey-lkey); vspd = (dkey-ukey); if (hspd != 0 or vspd != 0){ dir = point_direction(0,0,hspd,vspd); hmove = lengthdir_x(spd,dir)...
  10. S

    Delta Time speed problem

    I'm having a very bizarre delta time problem that I can't figure out how to fix. Accelerations actually work perfectly, since I followed this tutorial: https://web.archive.org/web/20160307185547/https://www.niksula.hut.fi/~hkankaan/Homepages/gravity.html The problem is this: when I make my...
  11. R

    Problem with Deceleration

    I have a player object whose state variable is set to a player_jump state whenever up is pressed (the state script, of course, is executed in a step event) It starts out being a certain vspd (which is constantly being added to the Player's y position), but I want it to start to decelerate (as a...
  12. N

    Legacy GM Running in Platformer

    Hey all! I've a small problem when running my platformer game. If I press shift my character needs to run, but it only runs to the right. When I press shift + left arrow key, the player walks to the left and not runs to the left. This is the Run code: Step Event Player: key_left =...
  13. G

    GameMaker [SOLVED] Can't figure out how to do collision for accelerated movement

    As the title says, I quite suck at doing collision, mainly because my movement code includes accelerating and decelerating hspeed and vspeed and all the fixes i've looked for rely on the fact that the movement speed is fixed and doesn't change. In the step command of obj_player: maxspeed = 6...
  14. S

    GameMaker [SOLVED] Movement Using Cumulative Speeds

    So I have a script that the player executes that controls movement. playerRunSpeed is set to 90. playerDiagonalRunSpeed is set to 63. xAcceleration is set to 6. yAcceleration is set to 6. yCurrentSpeed is updated every step of the game based on what has happened to it before. xCurrentSpeed is...
  15. EricPB

    GameMaker Noob Problems: Platformers and Wall Jumping [Solved]

    SO, I am a dedicated artist who has decided to try and learn programming myself so i can at least try to make something worthwhile with both skills sets... and so far... i am actually having a lot of fun learning and problem solving! But there are some issues I cant seem to wrap my head around...
  16. R

    Acceleration and Deceleration Help

    As some of you may know, I am working on a commercial side-scroller game, and although I have plenty programming experience, I have some trouble on some presumably simple things, such as acceleration and deceleration for the player. The problems: The deceleration integer never decreases below...
  17. P

    2D Simulate aircraft acceleration/decelleration

    Hello everyone, I try to write a small demo project with an airplane (sidescroll) fly with control of acceleration (it's a biplane) so basically player control propulsion with right key till value of 10 let's say and stop it to 0 with key left. I not use 2d engine nor gravity because I am just...
  18. Luke Pierson

    Acceleration and Momentum (Physics Question)

    Hello GMC! Today I have a question about acceleration and momentum using GameMaker's physics. I'm making a car racing game, and I'd like there to be bigger and heavier vehicles that accelerate slower but can hold up some steady momentum and don't get thrown off their path as easily as the little...
  19. X

    Legacy GM [Solved] Accelerative movement seems to be tricky

    I've followed some tutorials in the past and checked back on one in order to create a basic platformer, as it seems I had forgotten the basics of how to make it all work over time, since I'm basically redoing my entire game (reason being that everything's just bunched up, so I just created a new...
  20. M

    Move Objects With Your Mouse

    In my game, you basically pick up objects with your mouse and throw them away. I tried to create a rope joint between the object and the mouse pointer, but it only allows me to move it around, and when i delete the joint, the acceleration that it used to have doesn't affect it. Is there any...
Top