il 2020 >
With the pandemic in full swing and being stuck at home pretty much 24/7, I thought I might as well supplement the incredibly wholesome activities I’ve taken up (Acrylic and Watercolour Painting, An epic amount of gardening and this very site) with a healthy dose of gaming, my once favourite hobby. Life seems to have shoved this relentlessly off my timetable with other more sociable activities in the past few years. The epic game store gave away Grand Theft Auto 5 for free recently, so this was an easy choice.
I rather loathe online features of these sorts of games, so once I’d ploughed through the storyline, the game somewhat lost its appeal. The next step was to dive into the creativity of the modding world, of which I’d only lightly touched in other games such as Prison Architect and the Total War games in the past.
I’d be going into area I’d never really worked on before, coding using the Visual Studio suite and using C++ with a .NET framework, but there seemed to be a relatively supportive community around setting things up, so I was confident I’d get something to show for it. I decided to start small; my first project was to have the player vehicle indicate as they turned left or right, as this seems to be something that the AI do all the time but rather broke my immersion while playing, since it’s not possible to do in the vehicle a player is driving.
(Image of an AI indicating)
I toyed around with a few ideas, starting out with a dedicated button for each indicator. In play testing this turned out to be a massive headache, as indicators don’t really work like this in real life. Let and right indicators are mutually exclusive, and they turn themselves off if you turn the wheel past a certain angle.
A much more successful attempt was to just make the indicators completely automatic. If you turn the steering wheel to the left, the left indicator goes on. To stop indicators while driving round bends, they would only activate if the vehicle was going under 30mph. This worked surprisingly well, as you only ever take turns at slower speeds anyway.
(See this project on my Github)[https://github.com/thomas-o-chan/bus-driver]
My next project was a little more ambitious. I wanted to create a set of Bus driver missions. You’d start the mission, get into your bus and drive to a set of stops, collecting or dropping off passengers at each one. This involved a lot more discovery of the API, which offers a surprising number of useful functions like getting the closest position on a road or pavement(sidewalk) for spawning people or cars. There was a fair degree of frustration with getting AI passengers to actually get onto the bus, as they have a habit of forgetting the command you gave them if they are unable to complete it. This led to situations where multiple passengers would race to the bus door, the first would get on, and the rest would then proceed to just stand around waiting for nothing at all. For a mission where I wanted to eventually time the player, this wasn’t going to cut it. I ended up resorting to just teleporting the passengers inside if they took too long, which didn’t look all that nice but at least prevented the interruption of the flow of the mission.
All in all, this was one of my more successful explorations into a new technology. I’d come away with a bit more knowledge of the world of programming in a C-based language, and had made a couple of neat little mods to enhance my gaming experience. It wouldn’t prolong my GTAV gaming experience admittedly, but I’d had fun learning how things worked under the hood.
For a bit of comedic spice, here are few of the bugs I bred along the way:
(Image of multiple passengers) I think the operator needs to schedule more buses…
(Image of buses piling up) I must remember to stop spawning buses…(Image of Burnt-out buses) Gates don’t like buses.