Delay of animation on Slide display
Paul Groot
pfc.groot at gmail.com
Sun Feb 3 22:20:43 UTC 2013
hi Mark,
I'm not sure what exactly is going wrong here, but you could insert some
debug.print lines in your inline script to see what is going on. I.e.:
Debug.print "startTime: " & startTime
...
Debug.print "redraw: " & Clock.Read
etc.
Also, you could try to redraw only the circle itself:
Display.WaitForVericalBlank
theCircleL.clear
theCircleL.X = Mouse.CursorX
theCircleL.Y = Mouse.CursorY
theCircleL.draw
And, offcourse, when you only draw a simple circle, you could do things
more efficiently by drawing the circle using the canvas drawing functions,
instead of using a slide with an image.
best,
paul
On 1 February 2013 20:24, Mark <mgancsos at gmail.com> wrote:
> Hi all!
>
> I inherited an experiment that draws a circle on the screen and then
> refreshes for a set duration to make it appear to move. The problem I am
> having with it is that there is a noticeable delay, like 2 seconds, from
> the time the circle appears on the screen and you start moving the
> joystick, until the time the circle starts to move. Essentially it
> appears, you start moving the joystick, nothing happens for about 2
> seconds, then the circle "jumps" to wherever the joystick coords are at the
> moment and then moves perfectly in time with the joystick motion.
>
> If I could get rid of that lag/delay, there would be no problem.
>
>
> The inline code that governs the moving circle is below. The inline
> object follows a slide object in this procedure, which is blank except for
> a SlideImage called 'TheCircleL' which is 5k. The inline code sets
> TheCircleL's X and Y coords equal to the joystick coords, then redraws the
> slide.
>
> Any help would be greatly appreciated!
>
>
>
> ****************************************************
> startTime = Clock.Read
>
> ' Tracks the movement
> ' Uncomment the joystick line and comment the mouse line when using
> joystick
>
> 'While (not Mouse.Buttons and ebMouseButton1 and (Clock.Read-startTime <
> drawDuration))
> 'While (Not Joystick.Buttons and ebJoystickButton1 and
> (Clock.Read-startTime < drawDuration))
> While (Clock.Read-startTime < drawDuration)
> theCircleL.X = Mouse.CursorX
> theCircleL.Y = Mouse.CursorY
> blankL.draw
>
> Wend
>
> c.SetAttrib "xPos", Mouse.CursorX
> c.SetAttrib "yPos", Mouse.CursorY
> ****************************************************
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to e-prime+unsubscribe at googlegroups.com.
> To post to this group, send email to e-prime at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/e-prime/-/lwr7HbvmBxcJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130203/8aef3e88/attachment.htm>
More information about the Eprime
mailing list