This describes how data is being manipulated, how it is saved / loaded to / from database in the game.
This is sub-layout for documentation pages
Following ER diagram displays the structure of major part of the database.
Fields displayed in blue color have on delete cascade constraint.
That means, that if row is deleted from table, to which is the foreign key, then the value with the blue field will also be deleted (if there is valid / any FK).
Following ER diagram displays the structure of translations table:
There are 3 main entities. nodeJS game, SQL database, Game Webpage.
That is a project written using NodeJS and EJS templating system.
The project itself is hosted on Heroku.
To create the GUI and buttons, lists, game hud, HTML is used (using EJS templating system)
The game, however, requires resources and data, such as weapon names, database table names and column names, textures, css styles....
Some of the resources are required by the Game Webpage as well.
That is a project written using Nette.
Allows users to log in, see game statistics, forums and so on.
The page requires resources as well, and some of them are common for the nodeJS game as well.
These are for example:
For game these are monsters, health, abilities, damage, drop tables... But the webpage needs to acess that as well, to, for example, list all the items available in the game
This describes how database data is being manipulated within the nodeJS gameWarning: This diagram is no longer up to date, just because the amount of data loaded is increased every day so quickly, so that it si not possible to keep it up to date...
Data is loaded from the SQL database only once, and upon starting the server.
Following diagram shows the action of loading various data. When it is loaded, and in what order.
This describes the idea behind the MonsterDatabaseModel in the game code.
Abilities are being loaded only once from the database at the start of the game server.
Then, all game ability class instances are created according to data from database and saved in memory for later use.
All the ability data is being sent to the client, regardless if the ability is for monster only, or not (as client needs to be able to recreate monster attack on the client side).
The data is sent to the client when the client connects.
The data transportation is being explained in networking
User data is being explained here
Data retrieval from database can be optimalized in same way, as explained in localization optimalization