A block-style FPS deathmatch game similar to Counter-Strike GO, built with Three.js and Bun.
This project uses:
- Bun as the runtime and WebSocket server
- Three.js for 3D rendering
- Vanilla JavaScript (no frameworks)
- Make sure you have Bun installed:
curl -fsSL https://bun.sh/install | bash- Install dependencies:
bun install- Start the development server:
bun dev- Open your browser and navigate to
http://localhost:3000
- Client: Three.js for rendering, WebSocket for real-time communication
- Server: Bun WebSocket server for game state management and synchronization
Cowboy V Samurai is a fps deathmatch game similar counter strike go. It's a block style game. Once player open our website, player can choose which team to pick.
- player type in display name, display name are floating text above player's head
- player can move with WASD classic movement
- player can use trackpad or mouse to aim camera also while simultaneously moving
- classic left click to shoot/melee attack.
- each players are given equal health of 100 HP with +1 regen per 2 second while not in combat
- time limit for each gameplay cycle is 1 hour, until it resets and shows leaderboard of how many kills by each team and members and decide who was the winner.
- default health 100 HP
- Cowboys are equipped with handgun and knife, can switch by pressing <1>, <2>
- movement speed is 1 scale
- press to jump
- left click mouse to shoot/melee attack
- default health 100 HP
- has additional stamina stat for 100 SP
- Samurai are equipped with katana and a knife, can switch by pressing <1>, <2>
- movement speed is 2 scale
- press to jump
- left click to shoot/melee attack
- right click to block incoming attack (bullets or knife) drain 10 stamina/s
-
let's add additional hotkey for left click and right click with j or k for those who don't have access to trackpad or mouse
-
let's implement minimum players for each team is 8 therefore if it isn't filled, it will be filled with AI. the max quantity for each team is TBD unlimited for now.
-
game round runs in 45min max, after that prints the high scores, leaderboard and announce winner for the last round in a modal in the center, since we don't implement game exit it will just be a modal popping up with close button titled "LAST ROUND"
-
respawn mechanism copy CS mechanism
Let's copy Counter Strike famous deathmatch map