HighSpell is a personal project I developed in my free time, starting in late 2018. It is a browser-based MMORPG, highly inspired by RuneScape Classic (an early 2000s era MMORPG). The front-end game client was developed solely in TypeScript, using Babylon.js as the graphics engine. The backend game server runs on NodeJS, also written in TypeScript. Along with the client & server, I also developed the website, the database (MongoDB), the API, the chat server, as well as the CDN server for delivering game assets.
Client
The client is a Javascript file, allowing it to run on any modern web browser. It handles loading of game assets, world map & 3d model generation, the GUI, communication to the game server (using Socket.IO), etc. It also updates the game for the user based on the web packets sent to/received from the server.
Game Server
The game server is also a javascript file, allowing it to be run in NodeJS. It is daemonized on the actual server using pm2. The game supports being able to host multiple servers at the same time (while preventing a user from being logged in to more than one at a time), although currently there is only one live server.
All of the game logic occurs on the game server. As the game's "tick rate" is 600ms (~100 game updates per minute), it allows for many users to be online at the same time. The game server(s) also communicate directly with the API, handling actions such as loggin in/logging out, or loading/saving accounts, respectively.
Chat Server
The chat server allows all logged in users to chat with people on their friend list. While "nearby" chat (ie, chatting with other players whom are near to you in the game world) occurs on the game server, you can private message a player who is across the map, or even on another server, through the chat server. Chat server authentication is managed using JSON Web Tokens.
API
The API is used by both the game server and website. Clients do not need to directly interact with the API. It handles all functionality from reading/writing to the database, logging in/logging out of the game, authenticating game servers, getting/updating friend lists, etc. It too runs on NodeJS using the ExpressJS framework.
Website
The website runs on NodeJS, using the ExpressJS framework. It allows for account creation, logging in/out (for account management), and hosts the game client.
The home page consists of the latest game news, and it also has a HiScores page to display the top rankings for each player in their respective game "skill".
CDN Server
The CDN server is just a simple ExpressJS application that is used to deliver the game assets requested by the client, such as 3d meshes, textures, game definitions, etc. This allows for CDN handling to be handled seperately, and can make sure all clients/servers receive updates at the same time.