I really like component-based entity models for games!

Unfortunately I'm not using one. I have a library for this that I wrote in like 50 lines of JavaScript, and I've been using it for the past year or two. Going back to the old way with a class hierarchy really makes me appreciate what I'm missing. It feels so clunky, I don't know how I put up with it for so long. My classes are already a mess and I'm just getting started.

At some point I'll have to port my JavaScript library to python. I'm not sure how exactly I'm going to do that. JavaScript's prototype-based inheritance system made writing it really easy and natural, and I don't think it'll work as well with python's more traditional system. But if I can figure it out, it would really be worth it!

(log in to comment)

Comments

Do it with metaclasses! (I don't know what a metaclass is, but I also don't know what a component-based entity model is, so they seem like a good match. Do you have a link to your JavaScript library?)