A modular Drupal RPG and Trading Game engine - Wk 4 of 4

For the final week of developing the process pipeline, I copied all the config files, made some databse backups, upgraded to Drupal 10 and extended the Claro Admin template so I can clean up the paragragh types.

At this stage I can start adding random stats as fields and entities as Content types or Paragragh types. For a level designer I think Drupal makes the perfect content manager.

(I've started looking at twig for the various layouts required. At present, Character statistics updated by Phaser/Vue don't show in Drupal until a cache refresh.)

There's always an element of Cargo coding in something this big. So in using a tutorial for Node project file structures etc, I got everything to work, but I can't say I understood exactly all the process. To the point where one file was missing and the assumprtion was I as a developer should be able to make this file. This was nort the case, luckily the tutorial came with a git repo.



This is something i need to return to until I totally understand what is going on.

This approach also necessitated renaming folders and merging others until I had combined five or six different tuitorials into one cohesive system.

Regardless, the result is the ability to drop subscribers into a folder that will receive the Heartbeat (An event emitted to run the game controlled via Agenda.js)

These subscribers update Population, Climate, Bank rates etc.

So we have Drupal creating all the content and the content types. This means the game is not just built but designed via Drupal.
Once the content is designed and created. It is up to NodeJs/Phaser/Vue modules from a single Drupal page (the Game content type) to consume that data in realtime and serve it to the players.

These two techniques should equal an extendable, modular online game system:

  • content design via Drupal
  • database updates via NodeJs Subscribers