|
Explore Kongregate & earn 10 kreds Here are your 10 free kreds Explore Kongregate & earn a trophy Here’s a shiny trophy for you 15% XDanishdragon's messagesPublic messages for Danishdragon
clasher235
Dec 18, 2011 3:01pm For your game square squire, you may wish to improve the jumping physics. An easy way to do this would be to set an ‘upvel’ variable and have it decrease as the player remains in the air, eventually reaching 0 and causing him to fall in the same manner. EX: 1.player presses jump. upvel = 5. 2.player height increased by 5. upvel—. … show moreFor your game square squire, you may wish to improve the jumping physics. An easy way to do this would be to set an ‘upvel’ variable and have it decrease as the player remains in the air, eventually reaching 0 and causing him to fall in the same manner. EX: 1.player presses jump. upvel = 5. 2.player height increased by 5. upvel—. upvel = 4… 6. player height increased by 1. upvel—. upvel = 0. 7. player height increased by 0. upvel—. upvel = -1. And so on. show less
Loading
Danishdragon
Dec 19, 2011 12:26am
The problem at the moment is checking for collision while jumping, afterwards jumping can be tweaked :) |