3 ms·
This is a good point; some controllers are neither circular nor square. Check out the mapping ranges for a couple of Nintendo’s old controllers: https://electro
by dahart 4y ago
This is a good point; some controllers are neither circular nor square. Check out the mapping ranges for a couple of Nintendo’s old controllers: https://electromodder.co.uk/ https://electromodder.co.uk/
That said, Lemire’s approach rewritten as dot products might work nicely and even look a bit more clean, even if it took 3ns instead of 1.5.
- Arrath 4y ago> This is a good point; some controllers are neither circular nor square. Check out the mapping ranges for a couple of Nintendo’s old controllers: https://electromodder.co.uk/ https://electromodder.co.uk/ Very interesting, thanks! I've noticed myself that sometimes if I'm holding the controller a bit skewed my natural impulse will be to push in directions that don't exactly map to what the controller wants. EG I think I'm pushing forward, but I'm moving forward and slightly to the left. And its not just stick drift, its my own user error.
- dahart 4y agoI 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.
- deleted 4y ago[deleted]