Chilly Willy, on 15 November 2011 - 11:58 PM, said:
I have an issue with Allegro 5 - they've dropped support for CPUs without an FPU.
Worse actually, they outright dropped support for anything that doesn't use Direct3D or OpenGL. Bitmap support is a joke, without a GPU forget about drawing. There's software rendering, but it's laughable. Ever checked the software blit command? It goes through the blitter with blending, which in turn goes through the one that does scaling, which in turn goes through one that also does rotation, which in turn goes through a rendered that transforms every pixel through a 4×4 matrix. It's literally trying to emulate a GPU.
dust hill resident, on 16 November 2011 - 02:57 PM, said:
It has some problems. Most noticeably, you can fall through the floor if you're moving fast enough. I think I know why it happens, but I haven't though of a solution to the problem yet.
Without even looking at the code, let me guess: it moves so fast that it outright goes past the rectangle in a single frame. There are several ways to work around this:
- Give the player a collision box instead of just a point. In other words, you'd be checking if two boxes intersect now.
- Trace a line between the old and new vertical positions, and check if the box intersects it (note the line is always aligned to the Y axis, I.e. the X position is the same for both points).
- Check every pixel the player goes through the fall =P (inefficient though)
This post has been edited by Sik: 16 November 2011 - 04:04 PM