diff --git a/examples/flappy-bird/application.rb b/examples/flappy-bird/application.rb index a4880cd..6e26212 100755 --- a/examples/flappy-bird/application.rb +++ b/examples/flappy-bird/application.rb @@ -337,7 +337,7 @@ def step(dt) end end - def run!(dt = 1.0/20.0) + def run!(dt = 1.0/10.0) Async do start_time = Async::Clock.now @@ -409,6 +409,7 @@ def call(id, data) end class MultiplayerState + MINIMUM_PLAYERS = 1 GAME_START_TIMEOUT = 5 def initialize @@ -426,7 +427,7 @@ def run! Async do while true Console.info(self, "Waiting for players...") - while @joined.size < 2 + while @joined.size < MINIMUM_PLAYERS @player_joined.wait end diff --git a/examples/flappy-bird/gems.locked b/examples/flappy-bird/gems.locked index b039ba9..6562163 100644 --- a/examples/flappy-bird/gems.locked +++ b/examples/flappy-bird/gems.locked @@ -9,21 +9,20 @@ PATH GEM remote: https://rubygems.org/ specs: - async (2.11.0) + async (2.12.0) console (~> 1.25, >= 1.25.2) fiber-annotation - io-event (~> 1.5, >= 1.5.1) - timers (~> 4.1) + io-event (~> 1.6) async-container (0.18.2) async (~> 2.10) - async-http (0.66.3) + async-http (0.67.1) async (>= 2.10.2) async-pool (>= 0.6.1) io-endpoint (~> 0.10, >= 0.10.3) io-stream (~> 0.4) protocol-http (~> 0.26.0) protocol-http1 (~> 0.19.0) - protocol-http2 (~> 0.17.0) + protocol-http2 (~> 0.18.0) traces (>= 0.10.0) async-http-cache (0.4.3) async-http (~> 0.56) @@ -55,9 +54,9 @@ GEM fiber-annotation (0.2.0) fiber-local (1.1.0) fiber-storage - fiber-storage (0.1.0) + fiber-storage (0.1.1) io-endpoint (0.10.3) - io-event (1.5.1) + io-event (1.6.4) io-stream (0.4.0) json (2.7.2) live (0.11.0) @@ -73,21 +72,20 @@ GEM protocol-http (0.26.5) protocol-http1 (0.19.1) protocol-http (~> 0.22) - protocol-http2 (0.17.0) + protocol-http2 (0.18.0) protocol-hpack (~> 1.4) protocol-http (~> 0.18) protocol-rack (0.5.1) protocol-http (~> 0.23) rack (>= 1.0) - protocol-websocket (0.12.1) + protocol-websocket (0.13.0) protocol-http (~> 0.2) - rack (3.0.11) + rack (3.1.3) samovar (2.3.0) console (~> 1.0) mapping (~> 1.0) - sqlite3 (2.0.1-arm64-darwin) - sqlite3 (2.0.1-x86_64-linux-gnu) - timers (4.3.5) + sqlite3 (2.0.2-arm64-darwin) + sqlite3 (2.0.2-x86_64-linux-gnu) traces (0.11.1) xrb (0.6.1) @@ -100,4 +98,4 @@ DEPENDENCIES sqlite3 BUNDLED WITH - 2.5.5 + 2.5.9 diff --git a/examples/flappy-bird/public/_static/index.css b/examples/flappy-bird/public/_static/index.css index 840ea68..a5bca0e 100644 --- a/examples/flappy-bird/public/_static/index.css +++ b/examples/flappy-bird/public/_static/index.css @@ -15,6 +15,8 @@ body { position: relative; overflow: hidden; + + transform: translate3d(0,0,0); } .flappy .score { @@ -50,7 +52,8 @@ body { position: absolute; background-size: contain; - transition: all 0.05s linear 0s; + transform: translate3d(0,0,0); + transition: all 0.1s linear 0s; } .flappy .bird.remote { @@ -64,7 +67,8 @@ body { position: absolute; background-size: contain; - transition: all 0.05s linear 0s; + transform: translate3d(0,0,0); + transition: all 0.1s linear 0s; } .flappy .gemstone { @@ -73,5 +77,6 @@ body { position: absolute; background-size: contain; - transition: all 0.05s linear 0s; + transform: translate3d(0,0,0); + transition: all 0.1s linear 0s; }