Quote Originally Posted by ZoriaRPG View Post
What routines were those 1600 NPCs running? Movement, walkability, collision, solidity detection, character detection, event preprocessing, string updating (based on triggers)?
Like I said; none. Just an empty script.

Most of those things are all the same thing though. It's not like NPCs in RPGs are really complex until you add in messages with events, etc. But even those are only run when activated so I don't think it'll matter much.

The way rpg maker, game maker, et al. do it is everything is a "god object'. ex; an npc is an event is an sprite is an waypoint is a object is a battle character, etc. IMHO this is the worst kind of abuse of OOP design, and is just bad to do whenever performance is an issue. I'm not doing this at all. I'll be putting in small, specialized cases. If you want a warp event at location x,y, you don't put a particle system or NPC there, you put a warp there. It's just common sense. Only a player can interact with warps so that's instant "optimization" if you want to think about it like that. I just think of it as sane.

Speaking of god objects, here's a true story. I was looking at a platform layer for mobile a while back, came across cocos2d; apparently it's really popular, anyway--cutting to the end: The sprite class alone was like 1.5 kilobytes, allocated a bunch of stuff, had like 4 matrix4 transformations, and was virtual, and hierarchical. If you think I am full of shit when I say that everything is shit these days, just go take a look at that.