News for hackers. Stuff that matters.
Re:Round a direction vector to an 8-way compass by dahart on Monday July 25, 2022 @01:48PM (#32228181)
I do the same. Some difficult and brutal platformers will really help you notice how much user error you bring to the table. :P Good point too, because for fast twitchy games where the directions really matter, it’s quite nice to be able to calibrate and/or bias the direction rounding to compensate for my own bias. This could be one good reason to go with the trig code instead - offsetting the angle becomes trivial. It could be done under the covers before the rounding code sees it, but it’d still be doing trig somewhere.

There are no comments on this comment yet.