logoalt Hacker News

gambitingyesterday at 4:12 PM1 replyview on HN

I mean that's just a bad assumption no matter how anyone looks at it - if you created an array for 8 devices then just stop adding to it when you reach 8. The "a user will never have more than 8 gamepads" is a bad assumption because the logical question then is "what if they do" and the answer even back in the day would have been "the game will crash" which isn't how any code should be written. Stop processing at 8 if you are so sure there will never be more than 8, but have the most basic sanity checks.


Replies

AyyEyeyesterday at 4:41 PM

Back in the days of manually setting IRQs enough of them were used by the system that no, you couldn't use 8 gamepads. Assuming you could even connect them.

(I think this game is probably past those times but not by much)

show 1 reply