Skip to content

anders94/lightning-quake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightning Quake

A Lightning Network-enabled Quake clone where players stake satoshis in Lightning channels and compete in first-person shooter matches. The winner takes all the staked satoshis.

Features

  • Lightning Network Integration: Players fund Lightning channels to participate
  • Real-time Multiplayer: Fast-paced Quake-style FPS gameplay
  • Satoshi Stakes: Players stake satoshis per match, winner takes all
  • 3D Graphics: Three.js-powered 3D rendering with physics
  • Secure Escrow: Lightning channels act as trustless escrow for match stakes

How It Works

  1. Fund Channel: Players create and fund a Lightning channel with satoshis
  2. Find Match: Players specify stake amount and get matched with opponents
  3. Battle: Real-time FPS combat with movement, shooting, and health systems
  4. Winner Takes All: Match winner receives the combined stakes from both players

Installation

npm install

Development

# Start both client and server in development mode
npm run dev

# Start server only
npm run server:dev

# Start client only  
npm run client:dev

Production

# Build client
npm run build

# Start production server
npm start

Lightning Network Setup

To enable Lightning Network functionality, you need:

  1. A running LND node
  2. Set environment variables:
    export LND_HOST=localhost:10009
    export LND_CERT_PATH=/path/to/tls.cert
    export LND_MACAROON_PATH=/path/to/admin.macaroon
    export NODE_PUBKEY=your_node_pubkey

Without Lightning setup, the game runs in demo mode.

Game Controls

  • WASD: Move
  • Mouse: Look around
  • Click: Shoot (after pointer lock)
  • Space: Jump

Architecture

  • Client: Three.js + Cannon.js for 3D graphics and physics
  • Server: Node.js + Socket.io for real-time multiplayer
  • Lightning: LND gRPC for Lightning Network integration
  • Physics: Shared game state with client-side prediction

Security

  • Lightning channels provide trustless escrow
  • Server validates all game actions
  • No direct handling of private keys
  • Channels can be closed to withdraw remaining balance

License

MIT

About

A Lightning Network-enabled Quake clone where players stake satoshis in Lightning channels and compete in first-person shooter matches. The winner takes all the staked satoshis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors