On 2 May 2013 12:09, Alex Fowler <alex.murat...@gmail.com> wrote:

> Hmm, interesting, but games usually involve much state and changes to keep
> up their worlds alive.. how do you abstract over this?


I work out what changes are required to the scene by comparing the current
data structure with the previous one, then change the scene accordingly.

I'm currently employing a very naive strategy: if the data structure
associated with a tree of nodes has changed, I remove all the child nodes
and recreate them from the data structure. This works well for a relatively
static world, and allows me to have around 50 moving NPCs in the scene and
still maintain 60 fps on modest hardware.

If I want more power, then I'd need a more sophisticated approach. For
instance, I could construct a custom data structure that maintains a log of
changes, then use that to mutate the jME3 node attributes that have
changed. However, I suspect I'll hit other bottlenecks (such as the number
of triangles my GPU can render) long before I need something quite that
complex.


As far as I see, Jonathan and I, too create the wrappers as a side-effect
> of a personal project. I just think that maybe it is possible to factor out
> and assemble the code to a separate library and if you need something in
> your project, you implement it straight to the library and commit. Of
> course that would require a kind of coordination like never before, but it
> is a real FTW and is prone to benifits like finding something you wanted to
> have already being implemented by someone!
>

My use case might be different enough to make this difficult. I'm using
jME3 classes to save time, but I deviate from standard jME3 practise when
it makes sense to do so. For instance, I don't use the AssetManager from
the SimpleApplication object, because it makes more sense to have a global
AssetManager.

- James

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to