Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode
Hi Colin,

Not just yet.  I have a few more things to work on
before trying mobile.  I will be sure to use your
suggestions below.

Thanks!

Rick

> On Mar 23, 2019, at 8:46 PM, Colin Holgate via use-livecode 
>  wrote:
> 
> Are you testing on mobile yet? There is LiveCode code that will make that be 
> faster than desktop.
> 
> 
> These sort of things:
> 
> on preopenstack
> 
>  if the environment is mobile then
> 
>iphoneSetRedrawInterval 1
> 
>set the compositorType of this stack to "OpenGL"
> 
>set the compositorTileSize of this stack to 64
> 
>set the compositorCacheLimit of this stack to 1024*1024*128
> 
>  end if
> 
> end preopenstack
> 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fastest Frame Rate?

2019-03-23 Thread Colin Holgate via use-livecode
Are you testing on mobile yet? There is LiveCode code that will make that be 
faster than desktop.


These sort of things:

on preopenstack

  if the environment is mobile then

iphoneSetRedrawInterval 1

set the compositorType of this stack to "OpenGL"

set the compositorTileSize of this stack to 64

set the compositorCacheLimit of this stack to 1024*1024*128

  end if

end preopenstack


> On Mar 23, 2019, at 6:38 PM, Rick Harrison via use-livecode 
>  wrote:
> 
> 
> I find I get equally good results
> by alternately setting the blend level
> of the blue rectangle to 100 and
> then back to 0.  It has fewer lines
> of code too.
> 
> I still see flicker though.
> 
> Rick
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode


I find I get equally good results
by alternately setting the blend level
of the blue rectangle to 100 and
then back to 0.  It has fewer lines
of code too.

I still see flicker though.

Rick

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode
You are switching the layers instead of using show and hide.

I added a quit button to stop the animation.

I tried this with both 16 milliseconds and 8 milliseconds.
(I think 8 might be slightly better.)  I still see some flicker
though, even when I turn off the development tools.
If it were fast enough I would just observe a solid purple
rectangle.

When I tried it as a standalone on a Mac it was even worse.
What’s up with that!  One would think it should be more
efficient not less.

Your thoughts?

Rick



> On Mar 23, 2019, at 5:31 PM, Niggemann, Bernd via use-livecode 
>  wrote:
> 
> Hi Rick,
> 
> rename your red and blue  graphic according to this script or change the 
> names in this script and try this. It works quite well for me.
> 
> 
> ---
> local sRed = "255,0,0"
> local sBlue = "17,137,255"
> local sRunning = false
> 
> on mouseUp
>   if not sRunning then
>  put true into sRunning
>  set the backgroundColor of grc "gRed" to sRed
>  set the backgroundColor of grc "gBlue" to sBlue
>  goRun
>   else
>  put false into sRunning
>   end if
> end mouseUp
> 
> on goRun
>   if not sRunning then exit goRun
>   if "goRun" is among the lines of the pendingMessages then exit goRun
>   lock screen -- pushes screen refresh after handler
>   if the layer of grc "gRed" > the layer of grc "gBlue" then 
>  set the layer of grc "gBlue" to top
>   else
>  set the layer of grc "gRed" to top
>   end if
>   send "goRun" to me in 16 milliseconds
> end goRun
> ---
> 
> Kind regards
> Bernd
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread Niggemann, Bernd via use-livecode
Hi Rick,

rename your red and blue  graphic according to this script or change the names 
in this script and try this. It works quite well for me.


---
local sRed = "255,0,0"
local sBlue = "17,137,255"
local sRunning = false

on mouseUp
   if not sRunning then
  put true into sRunning
  set the backgroundColor of grc "gRed" to sRed
  set the backgroundColor of grc "gBlue" to sBlue
  goRun
   else
  put false into sRunning
   end if
end mouseUp

on goRun
   if not sRunning then exit goRun
   if "goRun" is among the lines of the pendingMessages then exit goRun
   lock screen -- pushes screen refresh after handler
   if the layer of grc "gRed" > the layer of grc "gBlue" then 
  set the layer of grc "gBlue" to top
   else
  set the layer of grc "gRed" to top
   end if
   send "goRun" to me in 16 milliseconds
end goRun
---

Kind regards
Bernd
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode
Hi Colin,

Yes, I tried send in time instead of a repeat loop.
I have tried wait 0 with messages too.

The best I get is a little solid purple, then
a little too red and then a little too blue etc.
I even tried a scrollbar to give me the
flexibility to set a range of times.  It just
isn’t consistent purple like it should be.

Any other ideas?

Rick

> On Mar 23, 2019, at 1:44 PM, Colin Holgate via use-livecode 
>  wrote:
> 
> I think you would need to wait 0 with messages to get a fair test.
> 
> In my case I didn’t do it that way. I have one handler that moves everything, 
> and a shorter handler that checks the mouse position (if you’re not on 
> mobile) and calls the longer handler. Like this:
> 
> on moveworld
>  if the environment is not mobile then
>put (512-the mouseh)/100 into difx
>  end if
>  movethings difx
>  send moveworld to me in 16 milliseconds
> end moveworld
> 
> The send in 16 milliseconds means I’m trying to do 60 fps.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread Colin Holgate via use-livecode
I think you would need to wait 0 with messages to get a fair test.

In my case I didn’t do it that way. I have one handler that moves everything, 
and a shorter handler that checks the mouse position (if you’re not on mobile) 
and calls the longer handler. Like this:

on moveworld
  if the environment is not mobile then
put (512-the mouseh)/100 into difx
  end if
  movethings difx
  send moveworld to me in 16 milliseconds
end moveworld

The send in 16 milliseconds means I’m trying to do 60 fps.

> On Mar 23, 2019, at 11:05 AM, Rick Harrison via use-livecode 
>  wrote:
> 
> I was digging through the archives
> and was reminded that we fully
> funded a kickstarter for a physics
> engine.  Whatever happened to that?
> Is it even on the roadmap?
> 
> Rick
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode
I was digging through the archives
and was reminded that we fully
funded a kickstarter for a physics
engine.  Whatever happened to that?
Is it even on the roadmap?

Rick

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fastest Frame Rate?

2019-03-23 Thread J. Landman Gay via use-livecode
It could be, repeat loops are known as one of the slower structures. I'm 
not sure how you could avoid it though in this particular test.


Try it with the IDE suspended too, there's all kinds of stuff going on in 
the background when the IDE is running.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 23, 2019 11:51:33 AM Rick Harrison via use-livecode 
 wrote:



I tried wait 0, wait 1 millisecond, and wait 1 tick.
All three show inconsistent flicker results.
Nice suggestions though!

It the repeat loop slowing things down?

Thanks,

Rick

On Mar 23, 2019, at 12:39 PM, J. Landman Gay via use-livecode 
 wrote:


Try "wait 0".I've found that just calling the wait command causes a very 
short delay even without a duration. Then you could try a wait of 1 
millisecond or a bit longer to adjust it.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 23, 2019 11:29:37 AM Rick Harrison via use-livecode 
 wrote:



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode
I tried wait 0, wait 1 millisecond, and wait 1 tick.
All three show inconsistent flicker results.
Nice suggestions though!

It the repeat loop slowing things down?

Thanks,

Rick

> On Mar 23, 2019, at 12:39 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> Try "wait 0".I've found that just calling the wait command causes a very 
> short delay even without a duration. Then you could try a wait of 1 
> millisecond or a bit longer to adjust it.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On March 23, 2019 11:29:37 AM Rick Harrison via use-livecode 
>  wrote:


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Fastest Frame Rate?

2019-03-23 Thread J. Landman Gay via use-livecode
Try "wait 0".I've found that just calling the wait command causes a very 
short delay even without a duration. Then you could try a wait of 1 
millisecond or a bit longer to adjust it.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 23, 2019 11:29:37 AM Rick Harrison via use-livecode 
 wrote:



Hi Colin,

Wow Cool!

As an experiment to check for flicker, I created two
identical sized  rectangles.  One is blue and the
other one red.  I put the blue one exactly on top
of the red one and told the blue one to quickly
show and hide itself using a repeat loop.  My
expected result if I do it right is a resulting
image of a purple rectangle without any
noticeable flicker.

I’ve tried milliseconds, I have tried ticks, and
I still see flicker going on.  What am I doing
wrong?

on mouseUp
repeat with NumLoops1 = 1 to 200
show graphic “BlueRectangleCover" of this card
wait .5 ticks
hide graphic “BlueRectangleCover" of this card
wait .5 ticks
end repeat  
end mouseUp

What are you doing differently when you try to
do such things?

Thanks,

Rick

On Mar 23, 2019, at 11:00 AM, Colin Holgate via use-livecode 
 wrote:


There are 10 layers to handle the landscape, sky, and tracks. Then 100 LC 
logos on top of those.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode
Hi Colin,

Wow Cool!

As an experiment to check for flicker, I created two
identical sized  rectangles.  One is blue and the
other one red.  I put the blue one exactly on top
of the red one and told the blue one to quickly
show and hide itself using a repeat loop.  My
expected result if I do it right is a resulting
image of a purple rectangle without any
noticeable flicker.

I’ve tried milliseconds, I have tried ticks, and
I still see flicker going on.  What am I doing
wrong?

on mouseUp
repeat with NumLoops1 = 1 to 200
show graphic “BlueRectangleCover" of this card
wait .5 ticks
hide graphic “BlueRectangleCover" of this card
wait .5 ticks
end repeat  
end mouseUp

What are you doing differently when you try to
do such things?

Thanks,

Rick

> On Mar 23, 2019, at 11:00 AM, Colin Holgate via use-livecode 
>  wrote:
> 
> There are 10 layers to handle the landscape, sky, and tracks. Then 100 LC 
> logos on top of those.
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread J. Landman Gay via use-livecode
I remember another version of this, it's very nicely done. Just some 
feedback for the OP, on desktop in Firefox it runs very smoothly. I just 
tried it on my Android tablet in both Chrome and Firefox where it performs 
pretty well but there are minor stutters and and pauses. They're not too 
significant but they're noticeable. On my Pixel phone the stutter is more 
pronounced and the playback is jerky.


So the results will depend a lot on the user's device.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 22, 2019 11:44:37 PM Colin Holgate via use-livecode 
 wrote:


I had a fun technical challenge, where me and my new computer in Colorado 
had a few stacks, and my old machine back in Brooklyn had a couple of 
hundred stacks, one of which I wanted to show you. I used Remotix to get my 
old machine to upload to an ftp server all of those stacks, then I 
downloaded them here.


After doing all that I was going to post something, only to find that I had 
posted a test a while ago.


So, try this in a browser, including on mobile:

http://colin.scienceninja.com/lcscrolling/Scrolling.html 



You’ll see why I remember it as being 60 fps.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread Colin Holgate via use-livecode
There are 10 layers to handle the landscape, sky, and tracks. Then 100 LC logos 
on top of those.


> On Mar 23, 2019, at 7:57 AM, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Colin,
> 
> That’s a nice demo!
> How many layers does it have?
> 
> Rick
> 
> 
> 
>> On Mar 23, 2019, at 12:42 AM, Colin Holgate via use-livecode 
>>  wrote:
>> 
>> http://colin.scienceninja.com/lcscrolling/Scrolling.htm 
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread Rick Harrison via use-livecode
Hi Colin,

That’s a nice demo!
How many layers does it have?

Rick



> On Mar 23, 2019, at 12:42 AM, Colin Holgate via use-livecode 
>  wrote:
> 
> http://colin.scienceninja.com/lcscrolling/Scrolling.htm 
> 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Fastest Frame Rate?

2019-03-23 Thread hh via use-livecode
That's why "tick" is 1/60 seconds ...

A native display (as a browser widget in LC) or a browser (as Colin used)
may be a good test object.

See also https://www.testufo.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode