Skip to content

OLD Architecture specs

Damian A. Pastorini edited this page Dec 17, 2019 · 1 revision
  • Upgrade Colyseus to last version 0.11.x. [DONE]
  • Upgrade Phaser to last version 3.x. [DONE]
  • Modify code structure: now we will have two main folders "pub" just for the client index and assets, and "src" for every single module. The modules will be divided in features which will be independent and contain the full code related, so in a single folder you will find both client and server side classes. [DONE]
  • Implement a query builder (Knex JS), or an ORM (Sequelize), or both (Objection). [DONE] > Decided to move on Objection JS a relational query builder, simple and beautiful, it also is based on Knex JS so we will get the best of both worlds, query builder / ORM without the issues from the second. [DONE]
  • Remove db-migrate and use migrations from the new implementation (Knex, Sequelize or Objection). > Objection uses Knex migrations! Just perfect! 😄 [DONE]
  • Modify the current classes and create new ones to get decoupled functionalities. For example, the "player-server" class would have an "entity" property which will be the ORM Model, then a "body" property that will contain the physics body, a "sync" property that will be the player Schema (which will handle the sync with the client), etc. At the same time and related to the previous item, the same module will have a "player-client" class which will have an "engine" property for the player updates and so on. > So far the general classes on the modules are: "manager" (to handle collections actions), "model" (Objection Models / storage functions), [entity-name] (this would be the functional part, for example users, players, chat, etc). [DONE]
  • Replace Promises by async/await to clean up the code and avoid Promises callbacks hell. [DONE]
  • Add server side validation to check if all the basic configurations are available (like database access), and if not then redirect to a setup page. [PARTIALLY DONE] > for now I'm including an automatic setup on the first run in the NPM branch, the automatic setup will get the missing skeleton files from the 'node_modules/reldens' folder.
  • Add forgot password feature.
  • Add scene label in the database and the scene name in the game. [DONE]
  • Add an option in the game config file to show/hide the scene label. [DONE]
  • Add example animations (doors and river). [DONE]