From: Ian K. <ke...@UD...> - 2005-10-14 18:50:03
|
John A. Tamplin wrote: > My personal feeling is that it will be too difficult to describe in XML > every possible way this can be done, and a better approach is to implement > that in Java, with part of the files distributed for a game being .class > files which can be loaded with ClassLoader. That was the approach I took > for a partially-completed Cosmic Encounter long ago -- the basic timing > issues were codified, but all the powers that allow you to break the rules > in specific ways were implemented directly in Java. <delurking> Distributing .class files as part of the game configuration defeats the purpose of using XML, since it makes it that much harder for users to fix or tweak existing games or to create their own games using similar properties. I would recommend instead using an existing Java scripting language, such as Rhino, Jython, or LuaJava, which are imo ideally suited for this purpose. This would provide the same degree of flexibility while still keeping the configuration binary-free. Pure Java would of course be faster, but execution speed should not be a real issue here, since these will most likely be short scripts that run only at a handful of specific times in the game logic. </delurking> -Ian |