Re: Shaping my game API

2011-04-05 Thread pepijn (aka fliebel)
Thank you for the insights. What I will do is make a separate protocol for drawing and acting. There might indeed be objects that only act but not draw, and other objects that do not act but just draw themselves, not necessarily using a sprite. Collision could be another protocol like (defprotoco

Re: Shaping my game API

2011-04-04 Thread Timothy Baldridge
In a test game engine I developed, I simply used maps and created a sort of "duck" typing. It actually worked quite well. For instance, each entity would have a :physics-update function: ((:physics-update entity) entity timespan) It ended up working very well. I had a few thousand entities, all u

Re: Shaping my game API

2011-04-04 Thread Joost
Pepijn de Vos wrote: > Hey, Hi, Just a couple of remarks: > I'm writing some Clojure game stuff, and I'm having trouble coming up with a > sensible model for the game objects. > > The basic idea is that I have a bunch of objects that represent the game, and > call 'act' on them, supplying the