The work behind the scenes#

We write HC’s phones, inventory, vehicles and other gameplay systems from scratch. They share a TypeScript framework that we’ve heavily modified to handle requests, connect the systems and save changes.

Why we use TypeScript#

TypeScript helps us catch missing information and disagreements between systems while building. Changing the details a payment needs, for example, can flag other code that still expects the old version.

We use automated checks alongside in-game testing.

Systems that work together#

HC’s systems share payment, inventory and access rules. Shop purchases, phone top-ups and workshop bills use the same economy, while vehicle chargers check the engine’s state.

Businesses and stock →

The server checks the request#

The server holds the records of money, items and permissions. For a purchase, it checks the price, stock, carrying space and available funds. Workshop work requires a qualified, on-duty mechanic with access to the vehicle.

These decisions stay on the server instead of trusting the player’s game to report the outcome. That helps block tampered requests for fake prices, unpaid items or permissions the player does not have.

Preventing duplicate purchases#

The server records a purchase’s payment and item changes together. Repeating a completed request returns the recorded result without processing the purchase twice, helping protect against duplicate items and charges.