2014-08-10 20:26:30 -04:00
|
|
|
if !ladderGame
|
|
|
|
.form
|
|
|
|
.form-group.checkbox
|
|
|
|
label(for="multiplayer")
|
|
|
|
input#multiplayer(name="multiplayer", type="checkbox", checked=multiplayer)
|
|
|
|
span(data-i18n="multiplayer.multiplayer_toggle") Enable multiplayer
|
|
|
|
span.help-block(data-i18n="multiplayer.multiplayer_toggle_description") Allow others to join your game.
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
|
2014-08-10 20:26:30 -04:00
|
|
|
hr
|
2014-08-08 14:36:41 -04:00
|
|
|
|
2014-08-10 20:26:30 -04:00
|
|
|
div#link-area
|
|
|
|
p(data-i18n="multiplayer.multiplayer_link_description") Give this link to anyone to have them join you.
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
|
2014-08-10 20:26:30 -04:00
|
|
|
textarea.well#multiplayer-join-link(readonly=true)= joinLink
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
|
2014-08-10 20:26:30 -04:00
|
|
|
p
|
|
|
|
strong(data-i18n="multiplayer.multiplayer_hint_label") Hint:
|
|
|
|
span(data-i18n="multiplayer.multiplayer_hint") Click the link to select all, then press ⌘-C or Ctrl-C to copy the link.
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
|
2014-08-10 20:26:30 -04:00
|
|
|
p(data-i18n="multiplayer.multiplayer_coming_soon") More multiplayer features to come!
|
2014-08-10 19:27:33 -04:00
|
|
|
|
2014-08-10 20:26:30 -04:00
|
|
|
if ladderGame
|
|
|
|
if me.get('anonymous')
|
|
|
|
p(data-i18n="multiplayer.multiplayer_sign_in_leaderboard") Sign in or create an account and get your solution on the leaderboard.
|
2014-11-17 18:07:10 -05:00
|
|
|
else if realTimeSessions && realTimeSessionsPlayers
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
button#create-game-button Create Game
|
|
|
|
|
|
|
|
hr
|
|
|
|
|
|
|
|
div#created-multiplayer-session
|
|
|
|
h3 Your Game
|
2014-10-31 19:33:43 -04:00
|
|
|
if currentRealTimeSession
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
div
|
2014-10-31 19:33:43 -04:00
|
|
|
span(style="margin:10px")= currentRealTimeSession.get('levelID')
|
|
|
|
span(style="margin:10px")= currentRealTimeSession.get('creatorName')
|
|
|
|
span(style="margin:10px")= currentRealTimeSession.get('state')
|
|
|
|
span(style="margin:10px")= currentRealTimeSession.id
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
button#leave-game-button(data-item=item) Leave Game
|
|
|
|
div
|
2014-11-17 18:07:10 -05:00
|
|
|
- var players = realTimeSessionsPlayers[currentRealTimeSession.id]
|
2014-10-31 19:33:43 -04:00
|
|
|
if players
|
|
|
|
span(style="margin:10px") Players:
|
|
|
|
- for (var i=0; i < players.length; i++) {
|
|
|
|
span(style="margin:10px")= players.at(i).get('name')
|
|
|
|
span(style="margin:10px")= players.at(i).get('team')
|
|
|
|
span(style="margin:10px")= players.at(i).get('state')
|
|
|
|
- }
|
|
|
|
else
|
|
|
|
span No Players?
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
else
|
|
|
|
div Click something above to create a game.
|
|
|
|
|
|
|
|
hr
|
|
|
|
|
|
|
|
div#open-games
|
|
|
|
h3 Open Games
|
2014-10-31 19:33:43 -04:00
|
|
|
//- TODO: do not let you join ones with same-team opponent
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
- var noOpenGames = true
|
2014-10-31 19:33:43 -04:00
|
|
|
- for (var i=0; i < realTimeSessions.length; i++) {
|
|
|
|
if (currentRealTimeSession && realTimeSessions.at(i).id == currentRealTimeSession.id)
|
|
|
|
- continue
|
|
|
|
if levelID === realTimeSessions.at(i).get('levelID') && realTimeSessions.at(i).get('state') === 'creating'
|
|
|
|
- var id = realTimeSessions.at(i).get('id')
|
2014-11-17 18:07:10 -05:00
|
|
|
- var players = realTimeSessionsPlayers[id]
|
2014-10-31 19:33:43 -04:00
|
|
|
if players && players.length === 1
|
|
|
|
- noOpenGames = false
|
|
|
|
- var creatorName = realTimeSessions.at(i).get('creatorName')
|
|
|
|
- var creator = realTimeSessions.at(i).get('creator')
|
|
|
|
- var state = realTimeSessions.at(i).get('state')
|
|
|
|
- var item = realTimeSessions.at(i)
|
|
|
|
div
|
|
|
|
button#join-game-button(data-item=item) Join Game
|
|
|
|
span(style="margin:10px")= levelID
|
|
|
|
span(style="margin:10px")= creatorName
|
|
|
|
span(style="margin:10px")= state
|
|
|
|
span(style="margin:10px")= id
|
|
|
|
div
|
|
|
|
span(style="margin:10px") Players:
|
|
|
|
span(style="margin:10px")= players.at(0).get('name')
|
|
|
|
span(style="margin:10px")= players.at(0).get('team')
|
|
|
|
span(style="margin:10px")= players.at(0).get('state')
|
Real-time multiplayer initial commit
Simple matchmaking, synchronous multiplayer PVP, flags!
Rough matchmaking is under the game menu multiplayer tab, for ladder
games only. After creating a 2-person game there, you can exit that
modal and real-time cast to play against each other.
If you’re the first person to cast, you’ll sit at the real-time level
playback view waiting until the other player casts. When they do, you
both should start the real-time playback (and start placing flags like
crazy people).
If in a multiplayer session, the real-time simulation runs the players’
code against each other. Your multiplayer opponent’s name should be up
near the level name.
Multiplayer sessions are stored completely in Firebase for now, and
removed if both players leave the game. There’s plenty of bugs,
synchronization issues, and minimal polish to add before we push it to
master.
2014-08-29 02:34:07 -04:00
|
|
|
- }
|
|
|
|
if noOpenGames
|
|
|
|
div No games available.
|
|
|
|
|
|
|
|
hr
|
|
|
|
|
2014-08-10 20:26:30 -04:00
|
|
|
.ladder-submission-view
|
|
|
|
else
|
2014-11-29 15:53:57 -05:00
|
|
|
a.btn.btn-primary(href="/play/ladder/#{levelSlug}#my-matches", data-i18n="multiplayer.victory_go_ladder") Return to Ladder
|