|
From: Daniel J S. <dan...@ie...> - 2013-08-26 05:34:15
|
On 08/25/2013 06:20 PM, sfeam (Ethan Merritt) wrote:
> On Sunday, 25 August 2013, Daniel J Sebald wrote:
>> As for the demo, updating gnuplot_x11 via the install makes things
>> worse. xixit.plt doesn't create any type of plot (gnuplot_x11 doesn't
>> appear).
>
> Oops. Sorry.
> There was a line missing from x11.trm in yesterday's cvs version.
> It would hang waiting for terminal input if the input was from a
> file but the terminal was x11. Not good.
> Fixed in CVS as of a minute ago.
>
>> Huh, after running some demos, gnuplot now behaves like normal at the
>> shell command line...but it still has the super fast redrawing.
>
> I have not yet seen any case of "super fast redrawing".
> Could you explain in more detail?
>
> thanks for testing!
>
> Ethan
OK, with the latest code the shell command line is working properly
again. Thanks Ethan.
As for the redrawing, it is simply that the position coordinates at the
bottom of the page are redrawn superfast and similarly the cursor icon
flickers between the cross and the busy symbol.
Looking more closely at the xixit.plt file, it looks like there are some
bugs to work out yet. The reason this is being refreshed so quickly is
that a redraw is forced every time through the loop. When I comment
that out:
iter = iter + 1
# do_redraw = 1
# and finally show the new state if needed
if (do_redraw) {
eval redraw
do_redraw = 0
replot
}
things behave more nicely. I've also come across the situation where I
get this error:
gnuplot> block_7_-1 = tc
because
"j = ymin;".\
and
block(i, j) = sprintf("block_%d_%d", int(i), int(j))
so if ymin becomes negative, that creates a syntax problem. I'm not
sure how ymin is becoming negative, but I think there are a lot of key
bindings that do something to move the plot around. If those keys
aren't bound to some bogus function that does nothing, they might cause
problems. For example, the up-arrow seems to move all the blocks
downward out of the window, but I don't see that the up-arrow is
"binded" to anything in the xixit.plt code.
Pressing and holding down the down-arrow can make the blocks drop past
the end of the screen and the game seems to get stuck as a consequence,
but I'm not 100% sure what it is supposed to do to move the stack downward.
I think that the pause can be much longer than 0.005. If I understand
the program correctly, the redraw isn't supposed to happen until the
blocks move, and that seems to be the case when commenting out
"do_redraw = 1" as above. The user's keypad action can initiate a
change in the plot, but I'd think there is no way someone playing the
game could type keys faster than, say, 1/10 of a second. I changed
"pause" to 0.1 and "wait" to 5 and the games seems to run fairly fast.
(I'd think one would want it to run fast by default and make it
challenging for the user.)
Dan
|