Speedy concept completion
Covers entire concepts of 11th & 12th classes.
Extensive practice from basic to advanced
Deep practice for critical problem solving
For all the XI Appearing Students, ETOOSINDIA brings the best 12th class Course for NEET 2024. This course is prepared by the top faculties of Kota. Cover the entire syllabus of Physics, Chemistry & Biology Topics in the best way. This course is improvised with various advanced features.
To crack NEET level of exam it always requires to follow the best mentors in this field. At Etoosindia the experience of Faculty and NEET academic planner prepared by them helps students to plan year-long strategy and covers entire syllabus of class 11th & 12th for the preparation of Pre-Medical exam. The curriculum is specifically designed for the NEET aspirants which will provide extensive practice from basic to advanced. To strengthen conceptual knowledge and enhance critical problem solving skills, this course is the best option.
In an era dominated by massive online battle royales and gigabyte-heavy console downloads, there is a quiet revolution happening right in your web browser. It’s called GitHub.io, and it has become the ultimate haven for retro, minimalistic, and surprisingly deep 2 player games.
Whether you are looking to settle a score with a sibling, enjoy a quick gaming session with a friend during lunch, or test the limits of your relationship with a chaotic physics game, the combination of "2 player games" and "GitHub.io" offers a treasure trove of free, accessible, and endlessly entertaining experiences.
This article dives deep into the world of two-player browser games hosted on GitHub Pages, why they are exploding in popularity, and the essential titles you need to play right now.
Here's a simple example of a 2-player Tic-Tac-Toe game in JavaScript, HTML, and CSS:
// Tic-Tac-Toe game logic
const gameBoard = [];
const players = ['X', 'O'];
function createBoard()
for (let i = 0; i < 3; i++)
gameBoard[i] = [];
for (let j = 0; j < 3; j++)
gameBoard[i][j] = '';
function handleMove(player, row, col)
if (gameBoard[row][col] === '')
gameBoard[row][col] = player;
return true;
return false;
function checkWinner()
// Check rows and columns for a winner
for (let i = 0; i < 3; i++)
if (gameBoard[i][0] === gameBoard[i][1] && gameBoard[i][1] === gameBoard[i][2] && gameBoard[i][0] !== '')
return gameBoard[i][0];
if (gameBoard[0][i] === gameBoard[1][i] && gameBoard[1][i] === gameBoard[2][i] && gameBoard[0][i] !== '')
return gameBoard[0][i];
// Check diagonals for a winner
if (gameBoard[0][0] === gameBoard[1][1] && gameBoard[1][1] === gameBoard[2][2] && gameBoard[0][0] !== '')
return gameBoard[0][0];
if (gameBoard[0][2] === gameBoard[1][1] && gameBoard[1][1] === gameBoard[2][0] && gameBoard[0][2] !== '')
return gameBoard[0][2];
return null;
<!-- Tic-Tac-Toe game HTML -->
<!DOCTYPE html>
<html>
<head>
<title>Tic-Tac-Toe</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Tic-Tac-Toe</h1>
<div class="game-board">
<div class="row">
<div class="cell" id="cell-0-0"></div>
<div class="cell" id="cell-0-1"></div>
<div class="cell" id="cell-0-2"></div>
</div>
<div class="row">
<div class="cell" id="cell-1-0"></div>
<div class="cell" id="cell-1-1"></div>
<div class="cell" id="cell-1-2"></div>
</div>
<div class="row">
<div class="cell" id="cell-2-0"></div>
<div class="cell" id="cell-2-1"></div>
<div class="cell" id="cell-2-2"></div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
/* Tic-Tac-Toe game CSS */
.game-board
display: flex;
flex-direction: column;
align-items: center;
.row
display: flex;
.cell
width: 50px;
height: 50px;
border: 1px solid black;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
This is just a starting point, and there are many ways to improve and expand upon this basic example. Happy coding!
Here’s a short story inspired by the phrase "2 player games github.io" — that nostalgic corner of the internet where shared keyboards become battlefields.
Title: The Last Shared Keyboard
Leo texted the link at 11:47 PM:
2playergames.github.io/crisis-tank
No context. Just that.
Alex clicked it anyway. Old habits. The page loaded in under a second — no ads, no trackers, no “rate us five stars.” Just a pixel-art tank, gray on black, and a line of text:
PLAYER 1: WASD + F | PLAYER 2: ARROWS + M
Below it, in tiny monospace: “For two people. One keyboard. No excuses.”
Leo sat on the left side of the couch. Alex on the right. The same laptop they’d used for a decade — stickers peeling, the ‘H’ key slightly sticky from an energy drink incident in 2019.
“You’re going down,” Leo said.
“You’ve said that since Mario Kart on the Wii.”
The game didn’t have music. Just the low hum of the laptop fan and the thud-thud-thud of their fingers mashing keys. Leo’s tank was blue. Alex’s was red. The arena was a tiny square maze with destructible walls and one power-up that spawned every fifteen seconds.
First round: Leo won. A cheap shot through a smoke cloud.
Second round: Alex won. Revenge via ricochet. 2 player games github.io
Third round: sudden death. The timer hit zero. Both tanks had one health bar left. The power-up spawned directly between them.
They didn’t speak. The only sound was the rhythm of the keyboard — clack clack clack — Leo dodging left, Alex chasing, both reaching for the same glowing square.
Alex’s finger hit ‘M’ a millisecond before Leo hit ‘F’.
The red tank fired. The blue tank exploded into eight-bit shrapnel.
RED WINS.
The screen froze for a moment, then displayed a simple message:
“Rematch? Press R.”
Neither of them pressed R.
Leo leaned back. “That’s 847–846. You’re still losing overall.”
Alex laughed. “You keep count?”
“Someone has to.”
They closed the laptop. The room felt quieter now — not empty, just done. Outside, the city slept. Inside, two players sat in the kind of silence that didn’t need filling.
Leo reached over and bumped Alex’s shoulder. “Same time tomorrow?”
Alex smiled. “Same link.”
Because that’s what 2 player games github.io really was: not a website. A place. A promise. Two people, one keyboard, and no excuses.
This guide shows how to host simple 2-player browser games on GitHub Pages (username.github.io), with a complete, ready-to-run example: a turn-based Tic-Tac-Toe game that works locally and when published to GitHub Pages. It includes structure, code, deployment steps, and brief suggestions for extending to real-time play.
Contents
Project overview
File structure
Complete code
index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Tic-Tac-Toe — 2 Player</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main>
<h1>Tic‑Tac‑Toe</h1>
<section id="controls">
<label>
Game mode:
<select id="mode">
<option value="local">Pass & Play (local)</option>
</select>
</label>
<button id="newBtn">New Game</button>
<div id="status" aria-live="polite"></div>
</section>
<section id="board" role="grid" aria-label="Tic Tac Toe board">
<!-- 9 cells injected by JS -->
</section>
<footer>
<small>Click a cell to place. X starts.</small>
</footer>
</main>
<script src="script.js"></script>
</body>
</html>
style.css
:root
--bg:#0f1724;
--card:#0b1220;
--accent:#06b6d4;
--text:#e6eef6;
*box-sizing:border-box
html,bodyheight:100%
body
margin:0;
font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
background:linear-gradient(180deg,var(--bg),#071226 80%);
color:var(--text);
display:flex;
align-items:center;
justify-content:center;
padding:32px;
main
width:360px;
background:var(--card);
border-radius:12px;
padding:18px;
box-shadow:0 6px 30px rgba(2,6,23,.6);
h1margin:0 0 12px;font-size:20px;text-align:center
#controlsdisplay:flex;gap:8px;align-items:center;justify-content:center;margin-bottom:12px
#statusmin-width:160px;text-align:center
#board
display:grid;
grid-template-columns:repeat(3,1fr);
gap:8px;
margin:8px 0 12px;
.cell
aspect-ratio:1/1;
background:linear-gradient(180deg,#071427,#0b1b2b);
display:flex;
align-items:center;
justify-content:center;
font-size:48px;
border-radius:8px;
cursor:pointer;
user-select:none;
transition:transform .08s ease, box-shadow .08s;
box-shadow:inset 0 -6px 18px rgba(0,0,0,.35);
.cell:hovertransform:translateY(-2px)
.cell.disabledcursor:default;opacity:.9
footerfont-size:12px;text-align:center;color:#9fb6c6
button,selectpadding:6px 8px;border-radius:6px;border:1px solid rgba(255,255,255,.06);background:#06232b;color:var(--text)
script.js
// Simple Tic-Tac-Toe (pass & play)
const boardEl = document.getElementById('board');
const statusEl = document.getElementById('status');
const newBtn = document.getElementById('newBtn');
let board = Array(9).fill(null);
let turn = 'X';
let over = false;
function init()
boardEl.innerHTML = '';
board = Array(9).fill(null);
turn = 'X';
over = false;
statusEl.textContent = "Turn: X";
for(let i=0;i<9;i++)
const cell = document.createElement('button');
cell.className = 'cell';
cell.setAttribute('data-i', i);
cell.setAttribute('aria-label', `Cell $i+1`);
cell.addEventListener('click', onCell);
boardEl.appendChild(cell);
function onCell(e)
if(over) return;
const i = Number(e.currentTarget.dataset.i);
if(board[i]) return;
board[i] = turn;
render();
const winner = checkWinner(board);
if(winner)
over = true;
if(winner === 'draw')
statusEl.textContent = 'Draw!';
else
statusEl.textContent = `Winner: $winner`;
highlightWinning(winner);
disableBoard();
else
turn = turn === 'X' ? 'O' : 'X';
statusEl.textContent = `Turn: $turn`;
function render()
board.forEach((v,i)=> '';
if(v) cell.classList.add('disabled');
);
function disableBoard() boardEl.querySelectorAll('.cell').forEach(c => c.classList.add('disabled'));
function checkWinner(b)
const lines = [
[0,1,2],[3,4,5],[6,7,8],
[0,3,6],[1,4,7],[2,5,8],
[0,4,8],[2,4,6]
];
for(const [a,b1,c] of lines)
if(b[a] && b[a] === b[b1] && b[a] === b[c]) return b[a];
return b.every(Boolean) ? 'draw' : null;
function highlightWinning(p)
const lines = [
[0,1,2],[3,4,5],[6,7,8],
[0,3,6],[1,4,7],[2,5,8],
[0,4,8],[2,4,6]
];
for(const [a,b1,c] of lines)
if(board[a] && board[a] === board[b1] && board[a] === board[c])
[a,b1,c].forEach(i=>
const el = boardEl.querySelector(`[data-i="$i"]`);
if(el) el.style.boxShadow = '0 6px 20px rgba(6,182,212,.18), inset 0 -6px 18px rgba(0,0,0,.5)';
);
break;
newBtn.addEventListener('click', init);
init();
How it works
Deploy to GitHub Pages
Extensions
Minimal server example (Node.js + ws)
// server.js (very small)
const WebSocket = require('ws');
const wss = new WebSocket.Server( port: 8080 );
const rooms = new Map(); // roomId => [sockets]
wss.on('connection', (ws, req) =>
ws.on('message', msg => (rooms.set(room,[]), rooms.get(room));
if(!arr.includes(ws)) arr.push(ws);
// broadcast to others in room
for(const s of arr)
if(s !== ws && s.readyState === WebSocket.OPEN) s.send(JSON.stringify(data));
);
ws.on('close', () =>
for(const [k,arr] of rooms)
rooms.set(k, arr.filter(s=>s!==ws));
if(rooms.get(k).length===0) rooms.delete(k);
);
);
console.log('ws server on :8080');
Wrap-up
If you want, I can:
While there isn't a single official "paper" published on the broad topic of 2 player games on GitHub.io, many open-source projects hosted there provide documentation, "README" guides, and GitHub Topics that act as technical papers for their development.
If you are looking for a paper-style game you can play or a resource on how these are built, here are the top findings: 🎮 Top 2-Player Game Repositories (Technical Guides)
Developers often use GitHub to share the "how-to" and logic behind their games. You can explore these to see the underlying "paperwork" (code and logic) for 2-player titles:
2-Player Games Unblocked: A dedicated portal hosted on GitHub.io featuring popular categories like racing, sports, and fighting. The Ultimate Guide to 2 Player Games on GitHub
MindMate Chess: A tactical 2-player chess game using chess.js and chessboard.js for game logic and interface.
Tic-Tac-Toe (React): A classic example of a responsive 2-player mode built with modern web frameworks.
Classic Uno: A multiplayer card game project using Node.js and Socket.io.
GitHub Game Off Submissions: Documentation and source code for hundreds of experimental mini-games created for GitHub's official game jams. 📝 2-Player Games You Can Play on Paper
If you literally need a "paper" game to play with a friend offline, these classic paper-and-pencil games are popular alternatives to digital versions: GitHub Game Off Submission Stream for Open Source Friday #2
Here are the most popular and highly-rated 2 player games available on GitHub.io (typically hosted under the gh-pages branch of repositories).
Since there are thousands of games hosted on GitHub.io, the best way to find them is often through curated lists. Here are the direct links to the best repositories and playable games:
GitHub Pages was designed for developers to host documentation and portfolios. But clever indie coders realized: "What if I just… upload an HTML file?"
Because the platform is static and free, nobody is trying to sell you gems or energy refills. These games are passion projects:
They are flawed, beautiful, and perfectly functional. You can play Connect 4 against your roommate without Wi-Fi (once loaded). You can duel in Pong using a laptop trackpad and sheer will.
While this article focuses on "local" (same device) 2 player games, the GitHub.io ecosystem is evolving. Developers are now using WebRTC to create peer-to-peer connections. Soon, you will click a "2 player games github.io" link, send a code to a friend across the country, and play without a central server.
For now, though, nothing beats the analog magic of sitting next to someone, shoulder to shoulder, screaming at a pixelated car crash.
The "io" domain extension has become synonymous with a specific genre of web games, largely popularized by titles like Agar.io and Slither.io. However, the subdomain github.io represents a distinct category of web hosting provided by the software development platform GitHub. While primarily used for hosting documentation and portfolios, GitHub Pages has inadvertently created a massive, decentralized library of browser games. Specifically, the 2-player game genre has found a fertile home here. These games, accessible instantly via a URL without downloads or installations, offer a range of experiences from competitive fighting games to cooperative puzzle solvers, all built on open-web standards.
While the single-player version is famous, the 2-player racing variant on GitHub.io is a hidden gem. You swing through levels using a grappling hook, racing to the finish line.
During a free period in the school library, these games are a lifesaver. Because they run on GitHub.io, they often bypass school web filters that block "gaming" sites (though policies vary). They require no installation on school computers.
Several GitHub developers have created legal, open-source clones of fighting game mechanics. Look for titles like "Minimal Fighter" or "Pixel Brawler." /* Tic-Tac-Toe game CSS */