GithubHelp home page GithubHelp logo

unshifty / wordgame Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.46 MB

Online version of the Codenames board game.

Home Page: https://playword.net/wordspy

Elixir 72.98% CSS 5.76% JavaScript 2.82% HTML 12.91% Dockerfile 3.23% Batchfile 1.24% Shell 1.07%

wordgame's Introduction

Overview

This is an online version of the Codenames board game. It's meant for two teams, with at least 2 players on each team. Right now it's a party style game, so everyone needs to be able to talk, e.g. over video chat (or in person one day).

Architecture

The game is implemented in Elixir, using the Phoenix web framework, and Phoenix LiveView for updating the game board. In addition to the standard Phoenix structure, there are additional modules in wordspy_game that contain the functionality for running multiple games

  • GameSupervisor is the top level supervisor that manages all game servers
  • GameServer manages the state for an individual game and is implemented as a GenServer
    • GameServer's stay alive for one hour after the last update.
      • On each update to the game state, the timeout resets.
  • The Game module contains the functions for manipulating a Game struct, which houses the actual data for a game
  • GameSupervisor
    • GameServer > Game
    • GameServer > Game
    • ...

Building and Deploying

  • If changing domain for deployment update new domains in
    • config/prod.exs
    • lib/wordplay_web/Endpoint.ex

Publishing Docker Image

  • Edit docker.bat with new version
  • Run ``docker.bat build` to build the image
  • Run docker.bat push to publish
  • sign in to host
    • edit docker-compose.yml and update image version
      • image: "docker.pkg.github.com/okadoke/wordgame/wordgames:<NEW_VERSION>"
    • docker-compose down
    • docker-compose up -d

TODO: Add description

wordgame's People

Contributors

dependabot[bot] avatar unshifty avatar

Stargazers

 avatar

Watchers

 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.