← All work/Case 02

Roleplay server

Game systems and in-game interfaces for GTA: San Andreas multiplayer

A roleplay server built from scratch: the game logic on the server, and the screens players use inside the game, from the bank and phone to the character creator.

Type
Self-initiated project
My role
Game systems, UI, database
Platform
open.mp (GTA: SA multiplayer)
Scope
28 modules, 20+ in-game screens
Character creator: choose your character’s appearance, with arrow buttons and a gold confirm button over a night-city background
Character creator, step 1Interface language: Ukrainian
#01

The task

Roleplay servers depend on how believable the world feels and how easy it is to use, yet most still rely on text menus and chat commands.

I wanted a full in-game economy, with interfaces like a phone, a bank and an inventory that feel like modern app screens rather than pop-up text boxes.

#02

What I did

I wrote the server systems, designed and built the in-game interfaces, and set up the database and deployment.

The game logic is around 21,000 lines of Pawn across 28 modules. The interfaces are around 15,000 lines of HTML, CSS and JavaScript, rendered inside the game through CEF.

#03

Key features

  • Player economyBank accounts and cash machines, card payments in shops, and a market.
  • BusinessesShops players can buy and run, including a taxi company with a fleet, hiring and franchise tiers.
  • Jobs with progressionTaxi driver with dynamic routes, electrician and loader, with passenger and driver ratings.
  • Housing and vehiclesHouses, personal vehicles with fuel saved to the database, and moped rental.
  • World and communityFactions, a city hall with passports and complaints, radio, VIP and a donation shop.
  • New player questsNPC quests for newcomers, and NPC trains running on recorded routes.
  • InventoryItems across backpack, pockets, car boot and safe.
  • Admin toolsOver 150 chat commands for running the server.
#04

Stack

Game server
  • Pawn (open.mp)
  • MySQL / MariaDB
In-game UI
  • HTML
  • CSS
  • JavaScript
  • CEF
  • Vue
  • Tailwind
Infrastructure
  • Docker
  • Node.js runner
#05

Challenges

  1. Interfaces that sometimes disappeared

    ProblemThe phone, bank, cash machine, passport and quest screens would intermittently fail to show.

    SolutionI worked through it methodically. The logs ruled out reconnects, and comparing them with screens that always worked showed the in-game browser was being hidden in the same tick it was created, before it was ready. I fixed it in every affected module.

  2. Building twenty screens without a tangle

    ProblemEach interface needs to talk to the game server, and tightly coupled code would make every change risky.

    SolutionEach interface is a separate page, and the server and UI talk through named events. Screens can be built and tested on their own.

  3. Data that stays correct

    ProblemVehicle fuel was only saved at refuelling, so the stored value could fall out of date.

    SolutionFuel is now saved as it’s used, and every way a vehicle can spawn sets it explicitly.

  4. Two players, one taxi

    ProblemTwo players could try to start a shift in the same car at the same moment.

    SolutionStarting a shift re-checks the vehicle and the player at the moment of confirmation, so only one can claim it.

#06

Result

A working server with a full set of game systems and more than twenty in-game screens.

It’s packaged with Docker, and the database configuration is generated from environment variables, so it starts the same way every time.

#07

Screens

The in-game interface language is Ukrainian. All shops, banks and services in the game are fictional.

Running a game community?

HUDs, phones, inventories and server systems for open.mp and SA-MP. Message me with your platform and what you need.

Send a message