Sonic and Sega Retro Message Board: Crash Mobile - Viewing Profile - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Group:
Trial Member: Trial Members
Active Posts:
13 (0.04 per day)
Most Active In:
Engineering & Reverse Engineering (5 posts)
Joined:
16-July 12
Profile Views:
0
Last Active:
User is offline Yesterday, 01:10 PM
Currently:
Offline

My Information

Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Male Male
Location:
Portugal

Contact Information

E-mail:
Private

Previous Fields

Project:
SonicKit
National Flag:
pt

Latest Visitors

Topics I've Started

  1. What's the best way to implement collision masks?

    25 July 2012 - 10:54 AM

    I am trying to build a Sonic physics engine, and the problem of how to implement collision has left me a bit stumped. I first thought about doing it like the classic games and using height arrays and per-tile angles, but calculating the angles turned out to be complicated. So now I'm thinking about using a simple bitmap (probably will be a PNG with two colors) for collision, and calculating the height by scanning the pixels along the ground sensor lines from the Physics Guide, and then calculating angles with atan2 or something like that. (and still doing the quadrant-switching that the SPG describes)

    My question is: what problems could this method cause? Is there a better way to do this that I'm missing?