The cheats in gta3 (and Vice and SA) on pc were activated by typing a sequence of characters. Ie:
ILOVESCOTLAND to make it rain or
GUNSGUNSGUNS to give the player loads of weapons.
The straightforward way for the code to detect cheats would be to compare the string "ILOVESCOTLAND" with the string of recent keypresses.
The problem with this approach is that 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 single number that is calculated from a string.
A simple (example) 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.
The game would compare these hash codes with the hash code for the recent keyboard input.
It worked. The cheats were not hacked. (They were eventually discovered by gamers trying random input)
The bad news is that completely different strings can result in the same hash code.
This is why gamers found random strings (ie HDLMAAXOPK) instead of the string I had set up (ILOVESCOTLAND)
This also meant the cheats triggered more often than I anticipated. This caused cheats to happen unintentionally, sometimes during speed runs.
These speed runs had to be aborted as the rules are clear. No cheats.
(The armor cheat was changed in an early patch from TURTOISE to TORTOISE. I had initially misspelled it)
#GTASanAndreas turns 20.
Rolling Stone spoke with @RockstarGames and the many voices in the game including Faizon Love, Young Maylay, @Shawn_Fonteno, and MC @eiht0eiht, to look back on how the game redefined players’ perception of L.A.
Story: https://t.co/KK4b0StuvW
20 years ago we released Grand Theft Auto - San Andreas.
The original plan was for the 3 cities to be on separate maps. The player would travel between the cities using trains and planes.
(Gta 1 and 2 also had three cities on separate maps)
Memory was very tight on the ps2 and with separate maps, the other cities’ skyline models wouldn’t have to be in memory.
It would also make it easier to have different police/ambulance/firetrucks for each city. Different pickups, weather types etc.
It would also be easier to contain the player until it was time for the next city.
It would also make it easier to organize the models on the DVD city-by-city which would help the streaming.
Just before the artists started working on the three maps, we had a final meeting at R* North in which we changed our minds and decided to go for a big map after all.
We still ended up doing city-specific pickups, police cars and weather.
Happy birthday San Andreas. You turned out all right.
Red Dead Redemption and Undead Nightmare coming to PC October 29.
With a host of PC-specific features, including native 4k resolution, Ultrawide and Super Ultrawide monitor support, and much more: https://t.co/EkAr9wn4ZL
I’ve always been fascinated by this beta image of GTAV - the world, rounded minimap.
They should’ve released the “Making of” documentary for this game. We rarely get any insight on development from R* themselves.
OG Loc: “I'm the man in the place, Punch you in the face, A gun in my waist... It's Loc, baby! Yo it's Loc Loc - it's Loc Loc...”
Ryder: “Damn, man, his lyrics is horrible!”
CJ: “That dude needs some work, man.”