GithubHelp home page GithubHelp logo

spite-and-malice-web's Introduction

Spite and Malice

An easy way to enjoy the playing card game Spite and Malice (also known as Cat and Mouse) with your friends online.

(This game is not done by the way...many parts are still incomplete or just plain broken - see TODO).

How to play

Just play in your browser here:
https://nunodasneves.com/spite-and-malice-web/

Technical notes

  • peerjs is used to create data connections between clients and the game server.
    • Peerjs wraps WebRTC, the standard that enables peer-to-peer connections in the browser.
    • Each player is a peerjs 'peer'.
    • The server is just the peer who created the game.
    • For now I just use PeerJS's public server for NAT punching with STUN/TURN/whatever.
    • Note there is no peer/lobby discovery mechanism at this time. You have to share the lobby code with anyone who wants to join.
  • threejs is used for all the 3D stuff.

Testing

I just spin up a server with python to get around browser single-origin restrictions etc:

cd spite-and-malice-web
python3 -m http.server 50000

Then you can open http://localhost:50000 in one tab per player and test creating/joining games, gameplay, etc.

There's also a 'test game' button. Enter the number of players, and it will start a game with local-only players (no remote connections are made).
Switch between players with the arrow keys.

spite-and-malice-web's People

Contributors

nunodasneves avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.