Re: [haxe] Maximum framerate in Flash - running code faster than 60 FPS?

117 views
Skip to first unread message

Fernando Serboncini

unread,
Jun 19, 2015, 1:43:13 AM6/19/15
to haxe...@googlegroups.com
50ms latency is a very low latency for non-LAN online games. I'd assume that unless all your players are in the same nearby region (think US state or EU small country), you won't ever get those numbers. [The theoretical minimum across the US (speed of light, ~36ms) doesn't account for Verizon].

I don't know what your game is, but you are probably better off making a client/server system that is resilient to 100-300ms latency (there are tons of techniques out there to help with this, like movement prediction, etc, etc..) than trying to over-optimize those 16ms of the frame wait.

THAT SAID, one thing I've seen being done on old games (that either had a FPS lock or assumed they weren't able to run above 30fps), like Quake, is to call the network update code (and the input code) multiple times during a frame. Since flash is event based (as opposed to pooling based), one option would be: inside your input events, check how long has it been since the last network update, and then decide that if it has been a few ms already, update the network.

Remember that if you are on TCP, there are other micro-optimizations that may help: like TCP_NODELAY and making sure you are not chocking on waiting for ACKs. For UDP (and also for TCP), make sure you have a reasonable packet size (compared to the MTU).
 

On Fri, Jun 19, 2015 at 1:11 AM Mark Beiline <markb...@gmail.com> wrote:
Hi all,
I'm making a cross-platform game and I'm trying to reduce latency to a minimum. On mobile and desktop builds I can use threads to poll and flush to the client/server every millisecond, but on flash I can only do that 60 times per second. This results in a theoretical latency of 16 milliseconds, making the game unplayable in real-world circumstances where players already inherit around 50 milliseconds of latency due to geographic location. Is there a way to run a loop in Flash faster than 60 times a second?

Cheers!

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

der Raab

unread,
Jun 22, 2015, 3:24:28 AM6/22/15
to haxe...@googlegroups.com
To my knowledge there is no fully supported way to render flash player content faster than 60 frames per second. You can find some tweaks and hacks for different browsers but I think they might not be working since they are from the time adobe introduced this limit.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages