News for hackers. Stuff that matters.
Re:Making Balls Bounce off of Walls in a Labyrinth by userbinator on Thursday June 19, 2014 @12:52AM (#7914531)
I would've realised that the 16 different wall combinations would've fit well into a 4-bit encoding - e.g. 1 for left, 2 for right, 4 for up, 8 for down. That gets rid of the sets and reduces the check for wall existence to a simple AND.

If you have a "wall" only in one tile and not its adjacent one, that essentially creates a one-way wall, which could be an interesting effect too.

There are no comments on this comment yet.