Skip to content

palrogg/snake-multi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake-Multi

Quick multiplayer snake with Colyseus and Phaser.

Sprites by Bas de Reuver

Run locally: cd server; npm run cd client; npm run

Build client: cd client; npx parcel build index.html --public-url /snake/ --dist-dir snake

  • Synchronize player movements

  • Spawn food

  • Client-side physics with server-side validation

  • Make snakes grow when they eat

  • Create death sequence

  • Fine-tune server-client sync

    • Server validation should take snake tails into account
    • Sync available food (for now: not synced with other players than the one who ate it)
  • Mobile-friendly (sort of)

  • Add a leaderboard

    • React or Phaser? Phaser
    • LeaderBoard template
    • Connect with Player schema
    • Sync score updates
    • Update score after 200ms timeout, or at a timed interval
  • Start screen with debug toggle

  • Fixes

    • Collide vs overlap for enemies
    • Solve head vs tail issue: take head direction into account
    • Head-to-head: both should die
  • Make it cleaner and better

    • New players should not spawn directly in front of existing players
    • Snake class should contain everything snake-related

    Ressources

    Phaser Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages