Skip to content
/ tanks Public

A multi-player tanks game built on Phoenix and React

Notifications You must be signed in to change notification settings

JJPro/tanks

Repository files navigation

Docker Image CI

Multi-player Tanks Game built with Elixir/Phoenix

Game Play

Docker

https://hub.docker.com/r/jjpro/tanks

An example docker-compose file is provided to demonstrate how to use the docker image.

Environment Variables

Variable Description Required Default
PHX_Host External URL of deployed application optional localhost
POSTGRES_HOST hostname or IP of psql server required
POSTGRES_USER database user required
POSTGRES_PASSWORD database password required
POSTGRES_DB database name required

Architecture & Techniques

Architecture Design & Techniques

Game Description

The GAME is a multi-player online tank game with a builtin chat room. It is an exciting game that requires 2 to 4 players to play. Users can either create a new game room, or join others.

A new game room is created by clicking the "Create New Room" button at the top of the page. Created rooms will be listed as cards on the home page, and any user can click a card to join that specific game.

When user enters a room, he/she can choose to be a player or observer. A room can have a maximum of 4 players. When the players seats are full, any subsequent entrants will only be provided the option to observe. It requires at least two players to start the game. The host is shown a option to start the game when player numbers satisfies the aforementioned requirements. A 7-second countdown appears after game start. During the gameplay, new comers are given the option to observe (Popup alert with button such that "Game already started, click to observe").

What players will see on screen

The Entry Page:

The main page displays open rooms and a button to create a new room.

Game Room:

The screen is partitioned into 2 main parts.

On the left is the game board. The top portion of the board shows game instructions, player name, and health level. The lower portion of the board is the gaming area.

On the right is a chat room. Players can send messages to each other with their user name (or tank color). (Each tank is assigned a color)

The game board contains player tanks and randomly placed walls of two kinds. Brick walls can be destroyed, and metal walls can't.

What kind of actions they can take

Once the player is in the game, he/she can type message and send to other players. Movement of tanks are controlled by arrow keys, and shoot missiles by hitting the spacebar.

Players can shoot other tanks or brick walls. But the metal walls are unbreakable.

Each tank are able take 3 missile hits. So a 4th hit kills the tank and the player operating that tank becomes observer of the game.

How a player can win

The last survivor wins!

About

A multi-player tanks game built on Phoenix and React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published