> for example, right now i have a record called gameentity which > contains a position, the current health, speed, the polygon > representation which should be rendered and a few more things - but > haven't figured out yet where to put the logic and how to apply it so > that everything is easily extensible
In the OOP languages, entity systems seem to be all the rage. I suggest stealing ideas from there if you can. I'll note that most descriptions of such systems are very much written for C++ programmers, and many of their explanations are tough to get through if you aren't familiar with the problems. The basic idea is something like splitting up your record above into a record per feature. An entity is then just an aggregation of such features. Then for each feature, there is a function which handles changes to that feature. The game loop goes through each function, runs it against all entities, and then continues. In some ways, the entities are data and relations, and the functions that operate on them take queries on this data as input. jack. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en