I need some help with the math for making an object move between 2 fixed positions, then slow down smoothly to the final position.
The cart contains my attempt to make this work but I cannot quite reach the end point, and therefore the mode variable does not change.
Can anyone see what is missing here, and what could I do to make the last few steps a bit faster? (It slows to a crawl at the end...!)
Many thanks in advance :)
Hello :)
(Forever) Beginner level programmer here!
I have been trying to make a top down driving game, and rather than reinvent the wheel I figured I could take some existing carts and use the code to make a player that uses a sprite that can rotate, and move forward and backward.
I found this post for the sprite rotation, which works exactly as I would like, although I can't really grasp how the function is working: https://www.lexaloffle.com/bbs/?pid=52525 (example1)
Then I found a cart of Asteroids by @mccolgst: https://www.lexaloffle.com/bbs/?tid=29903, stripped out all the stuff I didn't need (example2), and have been going between these 2 carts to try and combine the sprite rotation function with the desired movement.
Unfortunately I hit a wall and my latest effort was example3, but I'm quite lost honestly.
Can anyone shed some light on how these carts work and how I could go about applying a forward movement to a rotated sprite?
Many thanks in advance!
Hello!
I am going a bit mad trying to figure out how to make a simple 4 frame sprite animation run on a loop, and then transition to a different 4 frame animation loop after a button is pressed.
Simply - I am trying to make this Mario sprite look like it is walking forward when idle, or pressing forward, and then look like he is walking sideways when pressing left or right. I can make him animate on loop when idle, but I cannot figure out how to make it animate as a different sequence after a direction is pressed, and ensure the animation runs smooth (for example, I can get it to change to the new sequence, but holding the button down keeps the sequence locked into the first frame of the animation).
Hello!
I am developing a small hockey type game where the player character can move in all directions. It works fine enough but because of the D-pad movement, if the player tries to go in a circle, its very much a diamond shaped movement instead.
I am not sure if there is any way to make this movement smoother, so its circular if you hit the buttons in quick succession like the below gif image?
Any suggestions or feedback are most welcome! :) Thanks!