So you remember how to codeauthoreyes said:
sebt3 said:So you remember how to codeauthoreyes said:
Cool. Have a great day Mark
init_jump()
{
y_acceleration=9; // block size = 16
}
do_jump()
{
y+=y_acceleration;
y_acceleration--;
}
collision_detection()
{
...
if (y_acceleration<0)
{
is there a block below to collide with?
}
}
Unfathomable Depths said:'looking at ways to work around my graphical prowess short-comings'
That's my whole homebrew career in a sentence :lol:
The collision detection for the corner parts of the platforms looks spot on. You using a mask layer for that?
Jumps look a bit artificial to me. I always do jumping with an initial y_acceleration set a bit higher than half of one game tile. Then decrease the y_acceleration by one (or whatever) and only check 'landing' if the y_acceleration is a minus number.
For collision detection, there are no masks...basically my sprites are multiples of 16 (the tile size), so i just calculate borders and check the tiles at the adjacent spots
Unfathomable Depths said:I'm assuming that also means slopes....