Obbe Vermeij, a retired top developer from GTA, openly discussed his years at Rockstar North on his blog, Insider Rockstar North.
Background
Rockstar North began its journey as DMA Design in Dundee, Scotland back in 1987, founded by David Jones. It was acquired by Take-Two Interactive in 1999 and later rebranded as Rockstar Studios Limited in 2002. They later bought more studios and merged them under the “Rockstar” brand.
Obbe was part of the team from 1995 to 2009, during the heydays of GTA I, GTA II, GTA III, GTA Vice City, GTA San Andreas, and GTA IV.
GTA I and GTA II, both older games, differ from the 3D open-world style synonymous with GTA today.
GTA III and GTA Vice City were groundbreaking for being the first open-world games, granting players extensive freedom. However, city changes prompted pesky loading screens. The cities were essentially separate maps within the game. Moreover, swimming resulted in the player’s untimely demise, likely to avoid expansive seas and keep the game maps compact. Flying was also challenging to downsize the game.
Then came GTA San Andreas, offering unparalleled freedom. Players could swim, explore deep seas teeming with fish and aquatic flora, soar to great heights, and switch cities swiftly without encountering any loading screens.
Gta1 had 3 cities and we wanted to do the same. There was one particular meeting that I still have nightmares about. In R*N we would usually make the big game decisions with 5 people. We had a meeting where 3 people wanted the cities to be on different maps. This would save memory as the models for the skylines of the cities wouldn’t need to be in memory at the same time. Gta1 had 3 cities on different maps. The player would take planes/buses/trains to travel between maps.
Obbe Vermeij
I wanted the cities to be on the same map as it is important to be able to drive between cities. Even if this meant we’d have to find some memory elsewhere. The 5th guy wasn’t there that day. I wasn’t able to convince the others. It was super frustrating as it seemed we were about to make a massive mistake.
The following day we had another meeting. The 5th guy agreed with me and was much more persuasive than me. He talked them round and the cities ended up on the same map. Disaster averted.
This player freedom didn’t come easily for the developers.
The 3 cities with the country side in between, almost killed the map artists. gtaIII and Vice had maps of 4x4km and even then there was loads of water. The SA map was 6×6 and densily packed.
Obbe Vermeij
However, it was precisely this freedom that everyone relished in the game, including myself. Developers and game artists found inspiration in this as well.
We took the code from Vice City as the foundation for SA. Many things were improved but no structural improvements were needed.
Obbe Vermeij
R*NY organized another ‘research’ trip. They hired a bunch of town cars and we drove between Vegas, LA and San Fransisco. The artists took pictures. It was loads of fun.
Those games became akin to a metaverse of their era. I fondly recall spending Christmas playing GTA:SA multiplayer online, forming friendships there.
A digital realm, closely resembling the real world yet a replica, can boast intriguing deviations. In GTA San Andreas, many of us were aware that shooting the moon with a sniper could alter its size. Remember that? Here’s the story behind it.
The artists gave me a texture for the moon in III. I placed the moon in the sky, made sure it was visible at night and that it was a reasonable size.
Obbe Vermeij
A few days later 4 artists were at my desk asking me to change the size of the moon.
“No problem” I said.
It turned out they couldn’t decide what the size of the moon should be. 2 of them wanted it smaller to be more realistic. The other 2 wanted it larger to be more cinematic.
This went on a bit and I suggested to make the size of the moon changeable in the game. This way they could decide in their own time and let me know the conclusion. Since I was working on the sniper rifle, I made it so that the moon toggled through 3 sizes (small, medium, large) as the player sniped it.
The artists never got back to me so I just left it in. It was still there in SA.
Streaming (loading of objects)
To craft such an extensive game, developers needed to leverage their ingenuity and employ various techniques.
For instance, from GTA III to GTA San Andreas, the game could manage until 7 different car models around the player simultaneously, due to lack of RAM memory at that era. This meant that during intense situations, like when the police were chasing you and the game had to load police cars and helicopters, the number of pedestrian cars loaded decreased, often to just one or two.
For instance; if the player has a 6 star wanted level, the game would load the fbi car and the helicopter.
Obbe Vermeij
There may still be police cars and swat vans around from when the player had a lower wanted level.
If there are any injured pedestrians, the game had to load the ambulance.
Before you know it, the game only has 1 or 2 models left for regular civilian cars.
Even without the wanted level, the game was often forced to load certain car models.
In an expansive open-world game, managing data loading poses a significant challenge. Picture this: as the player moves, numerous textures, backgrounds, and 3D models must be loaded. Back then, using a slow CD-ROM, loading the entire game into RAM wasn’t feasible due to limited memory capacity.
To tackle this, developers devised several strategies:
- they designed a sophisticated algorithm for efficient loading and unloading,
- they meticulously arranged data on the CD, ensuring that elements closely linked in the 3D game world were also physically close on the CD for simultaneous reading, and
- in problematic areas, they fine-tuned details, such as creating inclines or increasing air resistance, to slow down vehicle movement subtly (without the player realizing the reasons behind it).
The major issue with CDs is that data is read as the disc spins. Consider this scenario: if data points are scattered across various locations (e.g., points A, B, and C), accessing them involves traversing back and forth, consuming valuable time during reads.
Their solution was clever; they grouped related data together. By doing so, a single spin could fetch everything needed—from point A to point B and even point C—without constant back-and-forth movements.
We all recall the CD reader’s distinctive whirrs and clicks during these read operations—quite an experience to imagine!
Obbe Vermeij :
The hardest technical challenge to solve during the development of gta3 was the streaming. Streaming involves loading and un-loading models as the player moves over the map. The streaming was coded by Adam Fowler.
Obbe Vermeij
When we started out with gta3 the hope was that the entire map would fit in memory. The map would simply be loaded at the start of the game.
Memory was limited on the PS2 and the artists were forced to reduce the texture sizes and to re-use textures everywhere. This resulted in the city looking bland. They eventually asked Adam whether he could develop a streaming system.
The idea of streaming is to load the map only around the player. As the player moves, the models for nearby models are loaded from the CD into memory and buildings that are now far away are removed.
Streaming is also used for vehicle models, pedestrian models, sound effects, music and scripts but the map posed the greatest difficulty as this involved more data than everything else combined.
Unfortunately the CD was quite slow in loading the models. The loading speed depends on the location of the models on the CD (the track). Models that are close together are loaded quickly but models that are far away are slow. (This is because the CD needs to accelerate/decelerate as the head moves to a different track). This is causing a lot of the sounds coming from the CD drive when playing gta.
Adam spent a lot of time ingenuously moving the models around on the CD. The idea was to place models close together in the CD if they were also close together in the world.
Even after all these optimizations, streaming was still not fast enough. You can literally think of it as a race between the player travelling and the streaming loading the models. At times the player would be too fast and the world just wasn’t there yet. These problems seemed to get worse with older CDs.
If we couldn’t speed the streaming up any further, we had no option but to slow the player down.
In Portland (first island in gta3) there used to be a big strip running all along the island. This was a worst case scenario. The player could go fast and there were loads of buildings to load. The streaming couldn’t cope here. Eventually the artists had to change the layout and basically put a building on top of the strip. The player had to go around which would slow him down allowing the streaming to catch up.
Over time we identified other areas where the streaming was not coping and we would set up zones here. Within these zones we increased the drag (air resistance) on the vehicles a little. Maybe 5 or 10%. It was hardly noticeable but it helped.
Cheats
Another noteworthy aspect to remember are the cheat codes. Interestingly, they were stored as hashes, cryptographically encrypted values within the game, making them challenging to discover. This is why certain cheats have two or three different cheat codes. This phenomenon is known as hash collision, occurring when two distinct texts result in the same hashed value.
💡 Hash collisions occur when different inputs or data produce the same hash value after undergoing a hashing process. Imagine a hashing function as a machine that turns any input (like words or numbers) into a unique code (the hash). However, because hash values have a fixed length, occasionally, different inputs can end up creating the same hash. It's similar to different keys unlocking the same padlock. Though rare, hash collisions highlight that multiple inputs can produce identical hash outputs, despite being distinct data, showing the limits of hashing functions.
The cheats in the trilogy were activated by simply typing a sequence of characters.
Obbe Vermeij
On PC the sequence would be something like
ILOVESCOTLAND to make it rain or
GUNSGUNSGUNS to give the player loads of weapons.
The game remembers the last 20 or so keypresses and every time a new key is pressed, these keypresses are compared with the cheats. If there is a match, the cheat will activate.
The straightforward way of doing this would be to compare the string “ILOVESCOTLAND” with the string of keypresses. This approach would mean that the strings for the cheats would be in memory as readable text. Any hacker could easily find the cheats and they would all be discovered on the day of release.
This is why I used ‘hash codes’ to store the cheats. A hash code is a number that is calculated from a string. As an example; a simple hash algorithm could add up the ASCII values of each character of the string.
The hash code for ILOVESCOTLAND would be 983.
For GUNSGUNSGUNS it would be 951.
This is just an example. The actual Hash algorithm used is more complicated.
The game would also calculate the Hash code for the last 20 or so keypresses and compare the numbers.
The good news is that it is harder to hack the cheat because the code only stores the number (ie 983) and not the full string (ILOVESCOTLAND). This part worked because the cheats were not hacked. (They were eventually discovered by people trying random input until a cheat happened)
The bad news is that different strings can result in the same hash code.
This is why initially when cheats were discovered people found random strings (ie HDLMAAXOPK) and not the string I had set up (ie ILOVESCOTLAND)
This also meant the cheats triggered more often than I had planned. This caused cheats to sometimes happen unintentionally. This has actually happened during peoples’ speed runs. These speed runs had to be aborted as the rules are clear. No cheats.
Weather
The weather turned up to be a fine-tuned look-up table inside the game.
Every in-game hour, the next weather type is picked from a table. The table is 40 (or maybe 34, can’t quite remember) entries long. If it is raining now, it will be raining again in 40 in-game hours.
Obbe Vermeij
The visual effects for the weather type will transition over the hour.
For instance:
At 2:00 it would be 100% sunny.
At 2:15 it would be 75% sunny and 25% overcast
At 2:30 it would be 50/50
etc
The table frequently has the same weather type for several hours so the weather isn’t always in-flux.
There are script commands to override the weather type. This allows the level designers to force the weather type for a particular mission or cut-scene.
That’s the thing about making games
Here we can see that the company got a chef for people working until late and the satisfaction they had when the product got relased.
For most of the time development was manageable. Certainly less stressful than Vice City. To finish it off a good stretch of crunch was required. The company got a chef to provide a good meal for those working late. That really helped.
Obbe Vermeij
On the day of release, stores opened at midnight. It was a cold, rainy night but I went to have a look anyway at one of the big stores in Edinburgh. (Virgin on Princess Street). I didn’t expect it to be too busy but there was a line of 50 meters or so. I bumped into 2 artists from the office doing the same thing. We were standing there looking at all these people being so excited. People got their game and hurried straight home to play the game we’d made, all through the night. It was magical.
That’s the thing about making games. You’re just working away in an office and it’s hard to gage the excitement of players out there. Especially before the internet, you just didn’t have that feedback.
“Greetings from Vice City”
The purpose of this post is not to make you full but to leave you hungry. If you really like the story behind first GTA games, consider checking Renderware engine tutorials. This is how they were working. 😉
Read also :
- “Object detection in Grand Theft Auto San Andreas using AI” https://medium.com/predict/object-detection-in-grand-theft-auto-san-andreas-using-ai-f3800eb3ca0c