SOLVED Selecting tilemapcollision

H

Hyteel

Guest
Hi, I have made countless collision-systems, tile-based or not but I have never made one that is flawless, I am working on a multiplayer project and I need to be as good as possible and for that I need to find the best way to implement it.
I have some suggestions and questions and would like some input into which one might be the best.

1st: A collision-system that checks for input and then moves the player pixel by pixel in that direction checking for a tile-map a pixel in the future and stops if it spots one.
Pros: Easy to implement and bug-fix
Cons: Very heavy and ineffective

2nd: A collision-system that works by checking the players speed and then if there is a tile-map there, snap to the tile-map-border itself. (Talking about binary based ones here)
Pros: Very sophisticated and light
Cons: Extremely hard to bug-fix and understand

And then the 3rd one that I am actually really interested in implementing, which is a more math-based (non binary) system. Taking some of the effectiveness and sophistication from the 2nd one and the simplified and easy to bugfix factor from the 1st one:
Namnlös.png
Where it will be (simplified):
if (y + a crosses z)
c = a - z's position
b = a - c
y += b

But I have no idea how to properly implement something like Z and I have been searching for quite awhile.

So what do I actually want help with?
I would like to have you guy's opinion on which of these three (or a suggestion) would be the best collisionsystem and if and how you could implement something like 3.

Thanks in for taking your time to read this!
 
H

Hyteel

Guest
I went with a fourth option that checks if it would collide with a tilemap and then moves it back pixel by pixel until it dont.
 
H

Hyteel

Guest
They are static but I have no interest working with a grid or binary system
 
Top