Coder Social home page Coder Social logo

webludo-server's People

Contributors

oniskanen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

webludo-server's Issues

Feature: Game variants

Allowing players to choose different rules during game setup has been raised a few times now.

Some initial variants:

  1. Penalty on out of turn rolls
  2. Allowing suicide
  3. Fair vs pop-o-matic probabilities on rolls
  4. Choosing piece to send back during a raise
  5. Applying penalty at end of turn (when rolling several 6's and eating a piece in Start space)

Improvement: Add delayed announcements

Some announcements would come logically only after the frontend has finished animations. Let's add a new delayed_animations object under changes whenever broadcasting a new game_updatedevent.

Cannot play with less than four players

I don't if it even should it be possible at this point :)

But, moments ago tested playing with 3 players on the live site at https://webludo.katris.dev/.

After creating a new game, players were able to join the game. The first player started with only 3 players were present. They were able to start the game and get their first piece moving. But after their turn, it seemed like it became the missing 4th players turn. No present player got a chance to throw or move after that.

Improvement: Track penalties per player

Current logic allows incrementing and decrementing a collective team penalty value. We should keep incrementing team penalty as is, but allow players individually to mark their own penalties done. Team remaining penalties can be calculated by # total team penalties - (sum # player penalties done) / team player count

Improvement: Simulating Pop-o-Matic probabilities

Let's improve the random number generator distribution to more closely mirror the real life Pop-o-Matic. Two studies on the topic: https://kvantti.ayy.fi/archive/2013_3.pdf (p. 23) and http://statistition.com/?p=440

The actual probability distribution is most likely out of reach for this hobby project, but giving the same number at 1/13 - 1/9 probability, neighboring numbers at uniform 1/6 to slightly below 1/6 and the opposite number at 1/4 - 1/3 probability is probably "good enough".

We'll need to track the previous roll across game changes to support this, but that shouldn't be too tricky.

Extra roll granted to miska

Miska had 3 ylintä maalipaikkaa, oli syöntiruudussa, tuli 6 ja korotusmahdollisuus, mutta painettiin roll mutta tuli vielä uusi roll

Improvement: Grace period for calling missed hembo

Currently any other player can call out a missed "Jag bor i Hembo" call after the move animation has started for the move. As per the regular rules, the player calling Hembo has time until the next roll to call it. In addition, there should be a short grace period for calling "Jag bor i Hembo" without a penalty even after someone calls a missed Hembo.

Feature: Add team support

Multiple players should be able to join a single team. Initially we should target having the possibility to join a random team or join a pre-determined team.

On the frontend side, this will expand the pre-game selections quite a bit. Setting a name and clicking "Join" will enter you into the list of players, but without a set team. You will be able to toggle whether you wish to play or only spectate. You will be able to manually join a team # 1-4. The creator of the game will be shown as the host, with additional options. The host can choose to manually or randomly assign the players into teams. The game starts when the host clicks "Start game" (and there is at least one team set). When starting the game, the numbered teams are randomly assigned a team color and a random team is chosen as the starting team.

For the backend implementation, we need to split Player into Player and Team. Team contains 1..n Players. A Player has a name and can roll for / choose to move pieces / choose to agree to a new raising round / mark penalties done. A Team accumulates penalties and each Player can mark penalties done, accumulating their personal finished penalties (which are summed and compared to the Team penalties to see if the team has finished).

There's a potential pitfall with two or more players simultaneously finishing penalties summing up to more than the required amount. Allowing marking fractional penalties might help.

A Player will be able to toggle whether or not they wish to participate in the game, which is recorded as a new database field.

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.