Giter VIP home page Giter VIP logo

titan's Introduction

Videos To Show Off Various Game Features

Create, Join, and Spectate Games

  • The player who creates the game is always blue
  • The player who joins the game is always red
  • Any player after the first two who join a game is a spectator (cannot move any pieces)
Create_And_Join.mp4

Players can only move their pieces during their turn

  • Every move is updated on each player/spectator's board without the need to manually refresh
  • The blue/red circles above are highlighted (in green) to show which player is meant to move next
  • Spectators can ONLY spectate. They cannot move any pieces
Move_Mechanics.mp4

Players can rejoin the match and will be able to resume with their correct pieces

  • The player name can be seen as an ID. Once a player creates/joins a match, if they are assigned to that color, the REDIS database will remember which pieces they control
Joining_Feature.mp4

Commands

(Latest version = 0.7.0)
  • mvn clean install -DskipTests

  • docker build -t ivorytoast3853/titan-amg:0.7.0 .

  • docker push ivorytoast3853/titan-amg:0.7.0

  • docker run -p 8080:8080 ivorytoast3853/titan-amg:0.7.0

  • docker-compose -f docker-compose.yml up --build -d

  • docker-compose down

What is Titan

A backend service which emulates the game Stratego. All through REST endpoints, one can perform the following:

Features Added

  • Create a new game session
  • Join an existing game session
  • Spectate an existing game session
  • Move pieces that belong to you
  • Java Client
  • NodeJS Client
  • Pub/Sub mechanism which sends out all board updates which the session id as the topic

Features To Be Added

  • Replay existing games
  • Have UI cover piece values which do not belong to the user
  • Update serialized board string to include when a flag was captured

Why Contribute

It is currently running on a Digital Ocean Droplet which is connected to a Digital Ocean managed PostgreSQL database and (in the future) be connected to a Digital Ocean managed Redis cluster. Right now, Redis is run through docker-compose.

Therefore, you can experiment with the game. See what changes you would like to have implemented and go make those changes.

Technologies Used

  • Java
  • Spring
  • Docker
  • Redis
  • ZeroMQ
  • PostgreSQL

API Docs

Urls

  1. UI -> https://pluto-ivorytoast.vercel.app/
  2. Backend -> http://proxy.titan-backend-nyc.com:8080

Endpoints List

GET

  • /game/v1/board/{id}
  • /game/v1/players/{id}

POST

  • /game/v1/new
  • /game/v1/move
  • /game/v1/update
  • /game/v1/join

Interesting Features To Point Out

Running on Digital Ocean Infrastructure

Summary

  • Has 1 Droplet (Titan)
  • Has 1 Managed Database Cluster
  • Has 1 Google Domain (titan-backend-nyc.com)

Security

  • Firewall Setup:
    • SSH on Port 22 only allowed from my IP and titan itself. This was necessary because it is exposed to the internet there were thousands of login attempts per minute on the droplet from global IP addresses
    • TCP (Port 81) from my IP address. This is to allow myself to manage the Nginx Proxy Manager application
    • TCP (Port 443 -> HTTPS) for all IPv4 and IPv6 addresses to allow any user to interact with the Vercel front end UI
    • All requests are proxied through an Nginx proxy to allow a client to hit a HTTPS endpoint even though Titan runs on HTTP

The login css came from: https://tailwindcomponents.com/component/login. All credit to Cristian Mosquera Mosquera for creating such a nice login layout

titan's People

Contributors

ivorytoast 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.