It's obviously not mandatory, but when you have limited processing power, it might be interesting to write more specialized functions for the simpler cases, instead of using the more complex routine for everything. This is true for everything, not only collision detection. Physics, for example, is usually more complex for the main character, while other objects use simpler logic.psycopathicteen wrote:I didn't know anyone programmed it 2 different algorithms for the same type of collision.
clean method of doing collision with tiles
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: clean method of doing collision with tiles
-
psycopathicteen
- Posts: 3001
- Joined: Wed May 19, 2010 6:12 pm
Re: clean method of doing collision with tiles
Which is easier to program? 1-point slope collision or 2-point slope collision? At first I tried 2-point collision because it makes slightly more physical sense, but I'm having trouble making the back point snap to downward sloping platforms. 1-point slope collision makes platform snapping easier, but the rules of standing at the edge of a tile changes depending if there is a sloped tile there or not.
Re: clean method of doing collision with tiles
I prefer to do 1-point, but revert to 2-point when that 1-point goes off the ground.psycopathicteen wrote:Which is easier to program? 1-point slope collision or 2-point slope collision?
-
psycopathicteen
- Posts: 3001
- Joined: Wed May 19, 2010 6:12 pm
Re: clean method of doing collision with tiles
I know how to make this easy. Give the tiles underneath slopes, matching slope data, so they can eject objects into the slope above it.