On Aug 13, 9:51 am, Mike Anderson <mike.r.anderson...@gmail.com> wrote: > 2. It would be great to reduce the amount of memory allocations. Yes, > I know memory is plentiful and GC is very cheap, but it's still not as > cheap as stack allocation and any noticeable GC pauses are not good > for the player experience in interactive games. For this reason, I > find myself using reduce and indexed loops a lot more than I guess > would normally be idiomatic, and conversely tend to avoid some of the > lazy constructs and functions that generate sequences. While Clojure > is great for a strategy game, I'd probably hesitate to use it for a > real-time 3D game.
There really is no way around this. We preallocate space for all our OpenGL vertex, as well as all the FSM for the AI engine. This is something we do even in our C++ code. We avoid creating objects whenever possible, and preallocate at init time. This is especially true in devices with smaller footprint like console/iphone/android, etc. Having said that, for prototyping OpenGL realtime 3d stuff on our desktop, clojure has been ok. > 3. I think it would be great to have better support for circular > references - perhaps a two-pass compile? The reason this is > particularly acute in game development is that different subsystems > have quite a lot of inter-dependencies. AI evaluation system needs to > understand game state/engine so it can evaluate a position. Game state/ > engine needs to understand units so it can manipulate them. Units need > to understand AI evaluation system so they can decide which actions to > take...... obviously it's possible to work around all this, but it's a > major pain, adds complexity and means that you need to structure code > to manage dependencies rather than in logical modules (which would be > easier to manage and maintain!) I'm not sure what you mean by this, can you expand on this? -- 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