>>>>> "Jason" == Jason Bertsche <[email protected]> writes:

 Jason> you just want to run NetLogo headlessly and provide your own
 Jason> version of the NetLogo view, which, of course, is kept in sync
 Jason> with the state of the model as it progresses.  Is that right?
 Jason> If so, and if you're dealing with the code from the 'headless'
 Jason> branch of NetLogo, then take of a look at
 Jason> 'org.nlogo.mirror.Mirroring
 Jason> 
<https://github.com/NetLogo/NetLogo/blob/headless/src/main/mirror/Mirroring.scala>'.
 Using
 Jason> that and its `diffs` method, you can find out what variables
 Jason> have changed in the model since your last snapshot, and then
 Jason> update your visualization according to that diff.

Generally I second everything Jason has said in his posts.  But Brant, I
want to make sure it's clear to you that the simplest possible renderer
wouldn't use the mirroring stuff at all.  And in fact, NetLogo's own
built-in renderer does not use the mirroring code.

The simplest possible renderer would simply iterate over all of the
agents in the world and draw each one.  When it's time to render the
next frame, you just do it all over again.

There are some scenarios in which you might want to persist agent state
in the renderer between frames, and then use the mirroring code to
update that state.  But involving the mirroring code adds a layer of
complexity, so you shouldn't go that route unless you're confident that
it makes sense to do so in your scenario.  Involving mirroring is not
the shortest path to a working renderer.

-- 
Seth Tisue | http://tisue.net

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to