Hi Brian,

My son told me a joke the other day about a software engineer who started to 
work on solving the 70 bugs that were in their program and after solving the 
first one, had only 90 left to fix. It's not as funny when it happens to you, I 
told my son, don't quit your day job. 

Possible solutions? You might think about whether you can use the layering 
paradigm I described earlier, animators have been using it for years in 
classical cel animation. Rather than drawing the entire picture in each frame 
they paint the background once and then have the characters move in front of 
it, painted on clear plastic so that the background shows through. In your case 
you may have two layers in front of the background. One for the local computer 
and one for the community version of your drawing. The local one would only be 
controlled by the one user, but perhaps there is a command that would allow 
each user to move the super turtle that everyone shares. Layers may be done by 
some form of 'or' operator that flattens the different layers into one display. 
Just some thoughts. I look forward to the solutions that you come up with, 
since they are far more important than my hand-waving ideas. :-)

Cheers, bob

On Sep 30, 2014, at 11:27 AM, Brian Schott <[email protected]> wrote:

> I spoke too fast about "the problem is solved," because the fix produces
> another pair of problems; (1) instead of only seeing the last pen lines
> drawn by the turtles, all of the pen lines on all of the browsers first
> remain in their existing state and (2) then are redrawn and then the newest
> pen lines are added. Not only is this confusing to the viewer, it can take
> quite a considerable time as turtle activity is extended.
> 
> I am especially perplexed as to why I cannot clear all the pen ink from all
> the sessions before the existing ink is put down (again). The draw()
> function, which is called before every new drawing, starts with the command
> gl.clear(...) that I thought gl.clear(...) would do just that, but does
> not, apparently:
> 
>    gl.clearColor(bgcolor[0],bgcolor[1],bgcolor[2],1);
>    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
> 
> The second problem may be impossible to solve because I suppose there is no
> way to differentiate among the various open browser sessions to
> paint/draw() them differently. On the other had is it possible to send a
> distinct numeric value to each browser session when it clicks the "command"
> line? If so, then I'm thinking the value of `NUMBER` could be sent to each
> browser and if it could be compared with the current value of `NUMBER`,
> perhaps only the most recent ink could be laid down. If this problem could
> be solved, it might be a way to also fix the first problem.
> 
> But I would like help on solving these 2 problems.
> 
> 
> On Mon, Sep 29, 2014 at 1:30 PM, Brian Schott <[email protected]>
> wrote:
> 
>> The problem is solved by my removing the commented out 2 lines below.
>> 
>> They only belong in the initializing stages.
>> 
>> Of course I did not share `ev_command_enter` before because the problem
>> could not have been there. Duh.
>> 
>> ev_command_enter=: 3 : 0
>> NB. PENDING=: ''
>> NB. NUMBER=: 0
>> sm". getv 'command'
>> jhrajax (":NUMBER),JASEP,viewXYZ,JASEP,viewUP,JASEP,}.PENDING
>> )
>> 
>> --
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to