- It is better to work in IDE which supports Javascript well, like WebStorm
- It is better to have a good database manager like MySQL Workbench
- It is better to have a Postman for checking HTTP requests
- You must have suitable Node.js and NPM versions installed
- In order to make code clean and standardized, make sure you have a standard.js installed and use it before committing the code to the repository
typemasters-game's Introduction
typemasters-game's People
typemasters-game's Issues
Player's race result is saved into database, even though they had decided to leave the race
Think about better approach.
When a user signs up, there is a sequelize error of saving a race data into database
During sign up on a client side, the user is not added to the database, thus causing FK error
Highlight input text when it is wrong/right for better UX
Make game stop earlier if all players are winners
Correct time and timezones in client
If nickname is taken already, we must show valid error message to the user
Make the game server fetch database data from a web server
It will add up a new (maybe unnecessary) layer for security check, and database related work. However, there are only 2 tasks that are done: text fetch and saving race data. We could make the game server more computing-heavy (network-heavy), and the web server more responsive for web connections (how?).
Also, the web server will have a firebase token user sign up processing and it will create a user "before" the race data will get saved (for non-existent user). One important notice of this is that the communication between servers can be always secure, because they will have whitelisted IP addresses.
Task list
Personal Page:
- Show last race date (1 day ago) (MadinaB) P.S. Write tests
- Show best race ever (by cpm) (MadinaB)
- Races won
- Allow country specification (Aibek)
- Design points system (IN NEXT VERSION)
- Design accuracy system (Aibek)
- Make a user's input colored on inaccurate typing, and vice-versa (Aibek)
- Show last race's wpm/cpm (Madina) - Allow conversion from wpm to cpm (IN NEXT VERSION)
- Allow showing first race's date (Aibek)
- Show a graphic of improvement (of races)** (Aibek)
Settings:
- Language selection* (Scores for different languages should be separate) (Aibek)
Leaderboard:
- Show last 20 best racers (include only today's races) (Aibek)
- Show best races of all time (Aibek)
Other:
- Design/develop a way of recording a winner of race (Aibek)
- Make it possible to end game if a user goes 'back' or stops the game. (Aibek)
-
Develop a friend system*** (IN NEXT VERSION)
-
Check API request's parameter's length, and security
-
Allow viewing other users' profile pages** (IN NEXT VERSION)
-
Create a group of races (IN NEXT VERSION)
-
Create individual races (IN NEXT VERSION)
-
Add social tools (Facebook, Twitter)
- Add adds, monetize** (Aibek)
- Add bots for gaming* (Aibek)
- Make anonymous playing possible (Aibek)
- After a game ends, show a window of general post-race info (Aibek)- Show a best wpm made for a text (IN NEXT VERSION)
-
Show available texts (IN NEXT VERSION)
-
Make possible to choose specific texts and race on them (IN NEXT VERSION)
-
Show time of finishing some text/race (IN NEXT VERSION)
-
Add tests***
- Conduct load testing on all servers, make tweaks
- Add unit tests
- Add end-to-end tests?
-
Add notifications support***
- Check if a user can play from two devices at the same time
- What happens if a user enters an app and do not visit personal page, will them be able to play game and save data? (Aibek) -
Add sounds (IN NEXT VERSION)
-
Write a shell script for initializing a working environment (like IP change)
What happens when a player finishes game earlier than timeout?
Think about anonymous users security issues
Add bots when a new room created with small amount of players
Add nickname support
The ads on modal window load too slow
We could make it download before the modal is actually show.
And make the ad as a different component.
A player can enter in one room several times
If a user disconnects during "find partners" phase, and connects again, there is a chance that they will play against themselves. Their cpm will be zero.
Strange behavior on Game.js during accidental network loss
If a user enters a game, then the network is lost (for example wifi is off), then after some time a user reconnects again, the client will ask for two new games.
The player is however disconnected from old game.
Bug when selecting a country New Zealand
Also error object is not rendered normally, should made as string
On the first app entry, when clicking 'Play' it doesn't trigger game start
Make app work in offline
App currently works only in online, without the connection to the Internet, it does not work
Common application behavior tests
Write here
-
All clients disconnect before game ends -> The game should immediately stop, and no results should be saved into DB, the game entry in Redis should be deleted
-
There are multiple clients, all except one disconnect -> The game should continue, there should not be an entry in redis, and the data of single player should be saved into DB.
-
All players finish the game, one loses and another wins -> Both players should be saved into DB, no game record should be left in Redis
-
One player creates a room, then immediately exits it, and then enters again while the room has not yet started -> An (authenticated) user should be able to enter the room, however should be replaced. However, when playing anonymously should not be replaced, the result from disconnected players just has to be not saved into DB. The client should disconnect from a room, which was written in its socket._serverData.roomKey during creation of room or assignation to it. The client should flush the roomKey after gameEnd/disconnect.
-
If user (both anonymous and authenticated) is disconnected, then they should be marked in redis as disconnected. They should be not saved to DB.
-
Game was created, however all players left -> the game should not even start
-
First player creates a new game, after it starts, second player creates another game -> There should be two completely separate games.
-
Bots should be created, if there less than some amount of players
-
Anonymous limiter (maximum 50 games from one IP) should be present, check this if a user signs up then, or signs in
-
Maximum players in room should be checked
-
Disallow same ip address from creation of too many rooms
-
Make game-server encrypt data between client and server, and make it unfakeable
-
Test for leaked timers periodically, delete them automatically
-
When a game finishes, all sockets should be closed
-
When a user send too many racedata requests -> The user should be blocked and connection should be closed, the player also needs to be removed from room.
What happens if a user enters another game while already playing?
When no game is playing but user presses back button, error occurs
Undefined socket value
If text is not existent in game server, then error is thrown
at createNewRoom (/home/ec2-user/game-server/index.js:158:20)
On the first app entry, client shows a sign in form on personal page
The email address is not changed on PersonalPage
The GameTextInput is buggy when text is loading
Line GameTextInput.js:47
Make a reasonable Firebase sign up
Add nicknames, and other info
Add support for anonymous users
Think on ways to do that with existing architecture.
Make final race result modal fade away
It must fade away on back click on android, and if clicked on the background
Race condition on when a user disconnects from game server before the room/game was started
Players are not saved in DB if they are not winners (finish text), but still it is a buggy behavior.
There are many other race conditions..
Add reset password feature
When a user is being logged in, a loading button should be shown
On personal page, on the first app entry, the user sign in form is being showed up. Instead, it should show a loading button or image and then show the correct page.
If a bug occurs it should be recorded in the cloud and then fixed afterwards
Probably using Firebase Logs would help
Serious bug with authentication
On a first app entry, when a user signs in to the app, there is a inconsistency between firebase and the web-server. The user is not persisted in the web-server.
For example, if a client sends request in order to get the basic information of the user, it receives 400 error and crashes.
It can happen both when a user signs up or signs in.
We actually must send a request to create the user on the webserver (on sign in/up), and only then send the requests for their info.
Forbidden action game server
Error: Forbidden action game:5598d57b-9988-4c74-9df6-d6c255f84d6f:en
File "/Users/admin/Documents/UNIST/8semester/typemasters-game/game-server/index.js", line 325, in _validateClient
const err = new Error('Forbidden action ' + data.roomKey)
File "/Users/admin/Documents/UNIST/8semester/typemasters-game/game-server/index.js", line 250, in Command.callback
if (!_validateClient(room, data, socket)) {
...
(8 additional frame(s) were not displayed)
Watch on sentry
When a player finishes a game before timeout, his CPM is computed as if he still plays
When a user wins/finishes a game quickly (before timeout), his CPM is still computed by game server as if they are still playing. Instead, the game server should save his data and stop updating it, also record his winning position.
Make anonymous (unregistered) users play only for specific amount per day
Detect ip addresses of anonymous users and put limits on amount of times they can play per day. For example, 50. Also, send a message to client that their limit is expired, so they better sign up.
In client, sometimes when typing a word correctly, it does not automatically become deleted
There might be some race condition
The chart of cpm improvement shows incorrect date because of timezone
The MySQL datetime is stored in UTC, however we somehow need to convert it to the local time
When a user plays a game and clicks on the main bottom link, the game window is lost
The game window is lost and the race is still saved to DB, not interrupted.
Desing a good authentication policy for react native app
Bug when a text gets deleted from MySQL table
The statistics queries stop showing information, because of failed joins
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.