3 ms·
It's just easier to work with when you have to do things like iterate over dozens of game objects, each of which may or may not have certain properties or metho
by bitwize 13y ago
It's just easier to work with when you have to do things like iterate over dozens of game objects, each of which may or may not have certain properties or methods. Delegation is also a lot easier. So is FFI in some cases; the runtime exposes C functions for querying and even creating and updating classes. In fact, inside the (relatively tiny) ObjC runtime is a complete, COM-like object model that's less of a pain in the butt to use than COM, which is why ObjC was so central to NeXT's software-componentry plans in the good old days (WebObjects, etc.).
Obviously you don't want to have any method calls on code paths that need to be super fast, but I'm not afraid of using straight C for those. It's a 2D engine; and from the profiling I've done, drawing and updating the screen still dominates the CPU time used, and it works fast enough even on many, many years old hardware, so I'm not worried about performance.