[Java Game Serie / HELP ] How can I adapt the game to be a platform and have a gravity?

I have all the inputs working, didn't complete the series, but all the basic stuff that controls the map and the player are ready, even the collision.

I setted the "ya" to 1 (in the Player.java class), so everytime I start the game the player is always being pulled down until it hits a box/block, and when he hits something, I want him to walk only on the X direction.

But I can't make it work that way, as for now, the player is hitting the block and deactivating all moves you try to do, even on the X axis.

Posted Apr 2, 2017, 8:52 PM UTC · edited

12
Loading comments…