rok's People
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
Implement missing cards functionality
Not all cards have been implemented yet. Implement at least the cards in the default set (#8).
Notify users about cards being bought
Add an entry to the game log when a card is bought.
Alter monster graphics based on health
Make the monster faces reflect the amount of health they have left by making the monsters look more beat up the less health they have left.
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?
Finish monster attribute modifier functions
ROKServerGame.js:366: // TODO: Check for death
ROKServerGame.js:397: // TODO: Check for win
Allow buying cards only when it's time for that
Currently the monsters can buy cards at any given time, due to the limitation not being implemented yet. This hasn't been done yet to make development of buying the cards easier.
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()
Players leaving a game in progress leave the game in limbo
The game correctly detects the players leaving the game, and kills off their monster, but the game state doesn't get updated so that the monster remaining wins the game.
Discard cards are not discarded
When you buy discard cards, they are added to the monster's owner_cards, and they stay there.
Make sure all TODOs and FIXMEs are done
Before the beta is launched, make sure there are no FIXMEs or TODOs in the code.
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
Wings can only be used once
It appears that the disable-attribute is never properly cleared after the first use.
Dead monsters keep taking damage
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).
Monsters are placed in incorrect slots when reloading after a monster is killed
ROKClientGame.js:130
The code that places the monsters in the slots uses variable monster_order, but that changes after a monster is killed. As a result, if a player reloads the page after a monster has been killed, the monsters will be populated into different slots.
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
Check for win after resolving rolls
Currently you need to be "Done buying" before the game ends.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.