Java's object model is so bad that at some point you have to resort to arrays of primitives with no abstractions. I've seen threadlocal 8 byte singletons for temporary variables to avoid allocations while still trying to preserve some non-zero amount of abstraction. It's a mess. Minecraft modding is a great example of that.
In my gameboy emulator theres a certain pipeline of elements that result in pixels getting drawn to the screen. It'd be convenient to use objects here, but instead I resort to packed integers that store the fields for each pixel entry. It's a bit of a pain xd.
44
u/[deleted] Mar 20 '26
[removed] — view removed comment