In the past, to create surfaces on a grid map, I would:
give the surface a start x, max x, start y, max y.
Then I would check if the player's x was between the start x and max x, and if their y was between start y and max y, and if it was then it meant they were on the surface.
However, in my game there may be necessity for surfaces that don't face exactly 0, 90, 180, or 270 degrees. What I'm asking is, how do I make a surface that is facing, say, 45 or 59 or 69 degrees or whatever, and still be able to check if the player's coordinates are still within its bounds?
If that's unclear, basically instead of creating a rectangle that is perfectly parallel with one axis and perpendicular to the other, I want one that could be slanted. I've looked this up on Google, but haven't quite found what I'm looking for.
https://stevend.net/scramble/support