Analyzing a process for jumping
The goal next was trying to figure out where we could possibly insert a jumping subroutine. Darren stated that the player should have an upward and downward trajectory to track where the player hits the arc at. If the button is released early then the player could fall. Ken chimed in, “You’re gonna need something like a look up table that gives you different Y offsets over time. So that it starts and ends in bigger increments. Then there is hang time at the top of the trajectory. So there are a couple of zero’s at the top. Then you have to consider if you can allow for a double jump.”
We then started discussing gravity a little more. Darren clarified that “this is more of a falling gravity constant. There is no acceleration. You fall for each terminal velocity. So technically, he should be moving slower at the beginning of the fall. Then the terminal velocity should be speeded up the closer he gets to the ground.”
Checking for the ladder collision proved to be more difficult. Since I wasn’t skilled with the code, I was throwing questions left and right to Darren. Siggy setup the code to grab the character behind the sprite and call the subroutine TestBlocking. The code was currently checking the direction in the left and right direction, so Darren suggested not making changes to the logic here. Instead he said “In the up/down the test blocking is different because everything is blocked unless it’s a rope or a ladder. In the example below however, everything is blocked unless its’ under 128.