Skip to content

Commit

Permalink
Minor updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jun 24, 2024
1 parent 42dd777 commit c55c3cb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
5 changes: 3 additions & 2 deletions examples/flappy-bird/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -409,6 +409,7 @@ def call(id, data)
end

class MultiplayerState
MINIMUM_PLAYERS = 1
GAME_START_TIMEOUT = 5

def initialize
Expand All @@ -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

Expand Down
26 changes: 12 additions & 14 deletions examples/flappy-bird/gems.locked
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)

Expand All @@ -100,4 +98,4 @@ DEPENDENCIES
sqlite3

BUNDLED WITH
2.5.5
2.5.9
11 changes: 8 additions & 3 deletions examples/flappy-bird/public/_static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ body {

position: relative;
overflow: hidden;

transform: translate3d(0,0,0);
}

.flappy .score {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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;
}

0 comments on commit c55c3cb

Please sign in to comment.