Giter Site home page Giter Site logo

longwelwind / swords-and-ravens Goto Github PK

View Code? Open in Web Editor NEW
108.0 2.0 28.0 245.74 MB

An online platform to play the board game "A Game of Thrones: The Board Game 2nd Edition"

Home Page: https://swordsandravens.net/

License: GNU General Public License v3.0

Dockerfile 0.05% JavaScript 0.30% HTML 2.49% TypeScript 89.94% CSS 2.40% Python 3.41% Shell 0.04% SCSS 1.36%
board-game online multiplayer game-of-thrones

swords-and-ravens's People

Contributors

dependabot[bot] avatar gdagosto avatar gereon77 avatar jasongros619 avatar longwelwind avatar mmasztalerczuk avatar mrhappyasthma avatar norielbit avatar nwesterhausen avatar skeptic-robot avatar sneweis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

swords-and-ravens's Issues

Implement automatic deployment in the CI

At the moment, the Docker images are built in the pipeline but never used. To deploy, we use Dokku to build the images and deploy them.

It has some disadvantages. The main one is that the docker images are built on the production machine and thus impact the performance of the application when we deploy a new version.

The goal of this issue is to implement a proper deployment flow using Github Actions.

Extended logging

A more detailed log should be available where you can see the all the movements/combat resolutions. This is especially important in non-live games where you might need to check other players previous combats and movements to remember what your next move was.

Garrison value is not calculated to battle strength

image

At least the march initiates a battle but the garrison is not calculated to Lannis battle strength.

Additional hint: When you want to split your army where one part initiates a battle you have to do the non battle move before the battle move, otherwise the march is rejected. that follows the rules but might be confusing. maybe it can be pre-evaluated if the first move will initiate a battle and disables the others units to be selected. would make it a bit more clear.

Implement Wildling Cards

Cards to implement:

  • Massing on the Milkwater
  • A King Beyond the Wall
  • Mammoth Riders
  • Crow Killers
  • The Horse Descends
  • Skinchanger Scout
  • Rattleshirt's Raiders
  • Silence at the Wall
  • Preemptive Raid

Add PBEM mode

Multiple things need to be done to implement this:

  • Declare a common interface for GameState to list the players that need to act
  • Detect when a new GameState was created after a player action, so that the list of players that have to act can be extracted and sent to the website
  • Make an API in the Django's website that would allow the game server to send an email when it is the turn of a player.

Strange game states

Unfortunately I can't reproduce them but I saw following strange scenarios:

  • Westeros event "Game of Thrones" triggered by "Dark wings, dark words" didn't work
  • Wilding victory Preemptive Raid lead to a stalled game (1player...)
    image
    Cant continue here...

CP* does not work as expected when it shall be used for gaining PTs

  • The option to get power tokens still appear after one muster point is already used

  • Toggle between "Get 2 Tokens" and "Get 1 Token" depending if there is a star symbol on the area or not

  • No power token is retrieved when choosing this option at all

  • CP* can be played on normal areas and then you can muster to every castle you control but cant Confirm and game is stalled
    image

Optimize the size of images used in the app

Some image fields are bigger than what we need in the application (Westeros map, ...).

The goal would be to make sure that images are resized to an appropriate size (and maybe compressed) when the build is created. Something like a build step in Webpack would be perfect. Multiple version of images could also be created, like for House cards where we constantly display a small version and show a bigger image when the user hovers the card.

Add an indication that a single mustering can be removed by clicking the item in the list

DE790A0A-F2BE-45D0-842E-CF806AB9D84D

Due to supply i can’t use the last muster point as desired. Instead of the footman I want to reconsider my decision and upgrade this footman to an Knight. So please either provide an undo button or an additional upgrade action for this footman. Current work around is to reload the page but then all previous musters are also gone. Nevertheless => low prio.

Game does not work on Android

The buttons (muster units, select areas to move, house cards etc) are not visible on android, even when using desktop-mode feature in Chrome Android. So can't resolve anything.

Improve the documentation of the project

There are multiple things that could be done to improve the documentation of the project:

  • Describe how to setup a local environment of the project:
    • Just the Game server
    • The whole infrastructure
  • Describe the general architecture of the code
  • Describe the environment variables used by all components.

Testing strategy

There are tests in the project that cover some part of the game mechanics (the criteria for whether a piece of code has coverage is whether I got the courage to do it when I coded it). They have some flaws:

  • They only test the logic of the game client-side and server-side. The UI is never tested.
  • The syntax to write the tests is a bit cumberbose. I made helper functions as I went by to make it cleaner, but a rewrite could help.

The idea of this issue would be to rewrite the way the tests are written. More specifically:

  • To test a case, create a game with 4 houses by spawning 4 versions of the UI as well a server. Messages that should normally be transferred with the Websocket are catched and routed to the appropriate GameClient, in the same way it is done now.
  • Use react-testing-library to test the UI.
  • Setup helper functions and classes to make the syntax of a test as clean as possible.

Changing orders should be acknowledged by a button

Right now you only have to acknowledge your orders the first time. Any changes to your orders are sent directly to the server which might lead to a critical state.
It would be better if your changes will be submitted on a button which appears when you changed your already sent orders.

Add Vassals

The goal of this issue is to implement the Vassals mechanic, as added by the Mother of Dragons extensions. This would allow players to turn unpicked houses into Vassals in the game.

Implement the limitations of units

At the moment, you can have as much footmen/knights/ships as you want. It should be limited. Some notes:

  • In MoD, different houses can have different numbers of available units.
  • The wildling card "Crow Killers" interacts with this limitation.

UI issues

  • Sometimes hovering over the revealed wilding card in game log doesn't increase it but make it blinking. Screenshot doesn't make sense here. All other cards are increased.

  • CoK bid slider is weird when user has no PTs left. For position 0 it shows the previous bidden value and can't be moved. Was not able to test if it bids 4 or 0 then on confirm. Maybe this bid can be skipped as it is clear that user will bid nothing when he has no PTs
    image

  • Action Panel doesn't Update Westeros card after winter is coming
    image

Garrison token is missing

There needs to be garrison tokens for all houses in their home areas. Also I don't think the +2 def is added as STR during combat right now.

Also, if you lose your home area, the garrison token is destroyed.

Implement restrictions for port regions

Port regions have multiple restrictions, some are implemented, some are not. Here is the list:

  • A port can't support the adjacent land area.
  • Enemy ships can't march into the port if the adjacent land area is enemy-controlled (even if this port is empty).
  • If a enemy takes control of the adjacent land area and if there are ships inside the port, the enemy can convert any ships present in the port to his house.
  • If a house was controlling an enemy capital adjacent to a port, and mustered ships inside the port, but then decide to entirely move his land units out of the capital without leaving a power token, the enemy would then immediately take back control of the capital. The enemy must then choose to convert the ships to his house or destroy them.

Retreat of a routed unit crashes the game

When a routed unit needs to retreat it is killed. In the current version it offers adjacent areas to retreat (which is ok because there might be non routed units in the army which can retreat and I also wouldn't implement a difference here) but after confirming the game crashed and can't be rejoined. It always says "Authenticating..."

Email notification doesn't work

In the game "Test game with Jason77" I activated PBEM but didn't receive any email. I am registrated via Discord and I guess you use the email from there as the homepage doesn't offer sth to register an email under "Your profile" section.

Today I changed my discord email to my mobile email address with push notification to be notified immediately. So I thought this might be related to the issues and I checked the old Discord mail address and both spam folders. Nothing...

Jason77 also told me that he received nothing.

Replace database sharing by using the API

At the moment, the website and the game server shares a database in order to transfer information. It would be better to make the API of the website more powerful, and modify the game server so that it uses this API.

Add base game 3 player mode

I don’t really like 3p anymore but the benefit of this game mode is that it usually gets finished within less than 2h. And it’s fairly balanced in comparison to standard 4p and 5p.

Therefore it’s a good mode for newbies or for those who want to play live but don’t have that much time.

Of course later you should be able to switch between standard 3p or vassals.

Overlapping units

Some areas have non-optimal unit placements, causing them to overlap other areas/other units/orders. See GJ/Lanni game.

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.