Hello,

I'm new to game programming and I'm trying to make a 2D platform game.

The game loads maps that are made out of triangles. Triangles have textures and define the boundaries (walls, floor, etc.).

I'm using DelphiX to program the game. But I don't know what's the best approach for letting the player respect the given boundaries.

Should I make each individual triangle a sprite, so when the player collisions with a triangle, the game is automatically aware of what triangle it bumped into.

Or should I make a sprite with the complete map as the sprite image, and then when the player bumps into a non-transparent pixel, the game calculates which triangle it bumped into, and it acts accordingly.

Or is there a better or easier way.

Does anyone know what's the best way to go?