Forzala 1
An open-wheel racing simulator built from a spreadsheet, a Python script, and a growing atlas of hand-designed circuits, run as a sub-game inside the NationStates roleplay community.
What Forzala 1 Is
Forzala 1 is an open-wheel racing simulator “side project” that uses an XLSX file as input and a Python script to generate qualifying and race results.
Qualifying and race are two distinct sessions, and each one runs separately. The mechanics are probabilistic but race-grounded, built around events like:
- Safety cars
- Reliability issues that cause performance penalties
- DNFs
- Defined attack systems for passing
The XLSX holds the data on drivers, cars, and tracks that everything else is generated from.
The Numbers Under the Hood
- Cars
- Players distribute 400 points across five categories: Top Speed, Cornering, Acceleration, Energy, and Reliability, with no more than 120 points in any one category.
- Drivers
- Cars have two drivers. Each gets their own 400 points spread across Skill, Consistency, Aggression, Tire Management, and Qualifying, with the same 120-point cap per category.
- Tracks
- Tracks are scored on Straights, Fast Corners, Slow Corners, Energy, and Attrition, with no maximum. I design each track myself, around whatever I envision the circuit’s philosophy to be.
- Weather
- Weather is set separately for qualifying and race day, so it can be pouring one day and only spotty rain the next.
Built With ChatGPT
Developing this script and hosting this game has only been possible thanks to ChatGPT, which writes the Python based on my instructions. The scripts undergo rigorous testing and, in fact, are something I’m still developing.
That testing looks for trade-offs between points, the effects of novel point systems on championship compression, and similar questions that come up as I continue elevating the software.
How the Track Maps Are Designed
I developed a separate script to read the same XLSX input file for track data, the same points for each category above. That data, plus worldbuilding lore that I’ve thought of and written, goes into the track map design.
The script uses pre-built segments and shapes, defined in code, to build larger objects. Many modules are custom-made for specific tracks, but the script creates over 1,000 variants based on the inputs and chooses the best fit for each track. It’s deterministic, meaning if you run the same script with the same inputs, you get the exact same track map every time.
What has been like a personal zen garden for me are the custom modules, built by layering simple shapes into more complex icons: things like using different shades of grass to depict elevation changes representing a corkscrew, or icons for local landmarks. I got carried away with it for a little while and was actually throttled on my ChatGPT work access for a few days.
As these maps become more complex, they take longer to process. But the time-consuming part is iterating on the script to define the track customizations, since creating them takes seconds. I can add more tracks even without their own customizations, and the software will still create a new, unique map that fits its qualities.
Two Outputs, One Generator
Every track map comes out of the same script in two forms: a fully illustrated poster version, and a clean, transparent version stripped down to the racing line and corner numbers.
How the Game Is Played
Forzala 1 is a software set for a sub-game of NationStates, a writing-based game simulating nations. In our case, we’re simulating cars and drivers that come from different fictional countries. There are many mini-games like this one on NationStates, many much, much older, including a World Cup simulator, which use their own programs or are based on spreadsheet systems.
Players get a bonus for writing around the event, which gives them a small bump in their chances. Mechanically, it slices a small percentage off race time. Teams also accumulate rank if they participate across multiple championships, represented in terms of (fictional) prize money.
I’ve always loved to write, fiction and non-fiction, and I’ve been involved with the community since I was a kid.