clean method of doing collision with tiles

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: clean method of doing collision with tiles

Post by tokumaru »

psycopathicteen wrote:I didn't know anyone programmed it 2 different algorithms for the same type of collision.
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
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: clean method of doing collision with tiles

Post by psycopathicteen »

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.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: clean method of doing collision with tiles

Post by tokumaru »

psycopathicteen wrote:Which is easier to program? 1-point slope collision or 2-point slope collision?
I prefer to do 1-point, but revert to 2-point when that 1-point goes off the ground.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: clean method of doing collision with tiles

Post by psycopathicteen »

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.
Post Reply