quote:
Original post by SikCiv
If the game calculates tile collision to the pixel, instead of having lines preset for each tile, make it so whenever the character hits a pixel side on, test the pixel above it and if its not solid, move the character up one pixel whilst keeping its horizontal velocities. I havent actually coded it in my game yet but to me this seems the logical/easy way to do it.
My web page: www.geocities.com/neoseeka
I did something like that in a platform game test.
Lets say that your character is going right. For each pixel movement you test the next horisontal pixel value. If the pixel is NOT a colorkey (=Solid) you go one pixel up and test that. If this pixel is not solid you move your character one pixel right and one pixel up....If it IS solid you can test the pixel above it until you find that the slope is to high for your character to climb or the pixel is not solid...
And no it is not slow...Just don´t lock/unklock the surface for every pixel you test...
If the slope is high/steep (argg what is the word) you must be prepared to move your pixel testing to the tile above the one you started out with.
You should make the character move slower as it walks uphill and perhaps faster downhill.