Giter Club home page Giter Club logo

rok's People

Contributors

xird avatar

Watchers

 avatar  avatar

rok's Issues

Clean up game log

There are too many messages logged in to the game log. Clean it up.

Available cards not being updated

Buying a card makes no difference in the available cards shown to the players. The bought card should be removed from available cards, and replaced with the top card from the deck.

ROKServerGame.js:828: // FIXME The available cards aren't updated, at least not all the way to the client.

"Finish" graphics design and implementation

There are still a few things that need to be done with the graphics:

  • DONE: Lobby hasn't even been touched yet
  • There's some work to be done with the cards:
    • DONE: Owned cards in monster frames
    • DONE: Show bigger card on hover
  • NOT DONE: Logo in the bottom left corner

Leaving game crashes the server

I haven't tried this again, but this it what happened:

  • Two player game in progress
  • My secondary browser, Firefox, timed out and the monster got killed as it should
  • My primary browser, Chrome, showed that I'd won
  • I clicked "leave game"
  • Server crashed

ROKServerGame.js:1522: * FIXME: Clicking Leave Game after opponent disconnected crashed the server.

Add "Leave game" button in the lobby

For players that have been invited and that have accepted the invitation, add a "leave game" button. This can be used to free the player, in case the host doesn't confirm the game for one reason or another.

Keyboard shortcuts: Double events

  • Start a game
  • Click on "Roll 1st"
  • Press Enter to activate "Roll 2nd"
    -> The game ends up doing your third roll as well.
    Expected result: Game only does your 2nd roll, and allows you to choose dice before the third roll.

I suspect this is because the initial click on the button sets focus on the button. Then, when enter is pressed, the button gets clicked. But the keypress event handler also notices that enter was pressed, and sends another "roll_dice" event.

Improve lobby user list UX

Currently, when a user disconnects, the matching row in the users list in the lobby just disappears. This may cause a user to click on a wrong player, if the player disappears after the user has moved their mouse pointer but before the click.

To fix this:

  • Make sure new users are always added to the bottom of the list
  • When removing users, fade them out instead of blinking them out
  • If possible, fade out all removed users at the same time, and at set intervals

Define default card deck to use

The list of cards in the game doesn't match the list of cards in the current edition of the game. Add any missing cards, and make the game only use the cards in the current set by default.

Pressing L in the lobby crashes the server

  • Disable button clicks and keyboard shorcuts when they're not meant to be used
  • Add more validation in index.js socket event handlers to prevent crashing the server by sending random socket events.

Separate card data to a file of its own

The card definitions are currently in ROKServerGame.js. This clutters up the symbol browsers in IDEs, and makes scrolling up and down the file tedious.

More importantly, in order to pass card data to the front end, we need to be able to include the card data on the client side. Moving the card definitions to a separate file makes this easy.

The card data is required on the front end if we want to allow clients to render the cards themselves based on the card attributes, instead of just showing an image.

Automatic tests

It would be really nice to have automatic testing to prevent regression bugs. But realistically, who's going to write them?

Dev client adds extra monster rows

If a user is playing with the dev client, and another user triggers a call to snapState(), extra lines are generated in the monster data table.

Lobby messages are not displayed

  • Connect to server with a single browser
  • Click on Quick Game
  • See the error message in the server log
  • Note that nothing is shown in the client, except for the console.log()

Allow users to select their username

When a user connects to the game, they should be shown a dialogue box:

"Hi, [ autogenerated-username ] !"
[ That's my name! ]

By clicking on the "That's my name"-button, the user chooses to use the automatically generated moniker. The moniker is in a text box, so the user can edit the name before accepting, if they so desire. The lobby is only shown after the user accepts.

Copy texts to be written, the above are just examples.

Buying cards fixes

  • DONE: Sweeping cards
  • DONE: Disable buying animations when monster hasn't got enough money
  • NOT DONE FOR NOW: Skip buying/sweeping when there isn't enough money
  • DONE: Only show sweep button when the monster has enough money
  • DONE: Add animation for sweeping cards

Test with 5-6 players

The game has different rules and mechanics when played with 5 or six players. This hasn't been tested at all, due to that being complicated with a single development machine.

Testing this will be much easier once we have bots to play against (#2).

Write bots

In order to test the game with 5-6 players, we're probably going to need bots to play against. They should be fairly straightforward to implement, as long as we don't want them to be smart.

"initial load roll number is wrong"

ROKClientGame.js:7: * FIXME initial load roll number is wrong

I'm not sure if this is still an issue. To be checked and fixed, if necessary.

Notify users about card effects

When a card alters something in the game, the users should be notified about the change in the game log. For example:

Dragon buys "Acid attack" (#22)
Dragon only pays 5 [energy] due to Alien Metabolism

Disable buttons after they're clicked

Disabled buttons in the UI after they are clicked, and only re-enable them once a reply is received from the server. This prevents people from accidentally doing the same thing twice.

Confirming game before invitation is accepted jams the game

  • Create game
  • Invite another player
  • Confirm game

Result: The lobby ends up in a state where you can't start the game and can't go back.

Expected result: The game refuses to be confirmed while there are open invitations.

index.js:3: * FIXME: confirming a game before invitation is accepted jams the game

Special dice colours

Show special dice (dice for Lightning armor) with a different colour from the regular dice.

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.