GTA1 is one of my all time favourite games and I'd always wondered if it's possible to make a GTA1 style game in Clickteam Fusion. I should clarify of course that my intention is not to recreate GTA1 - while using flat cars and peds, the buildings in GTA1 are still 3D meshes, and I'm pretty sure that (without using P3D) it's not going to be possible to make something that looks Exactly like the original game.
Personally I'm more interested in recreating the feel of being in a dynamic city - cars driving around, pedestrians walking about etc.
Anyway, I'd put it to the back of my mind for ages, but a couple of other example projects got me thinking about it again.
The first is an excellent car/road example
The author doesn't credit themself in the MFA and I can't find the original upload, but whoever you are, thankyou! It's worth taking a look, it's a really clever implementation.
The second is the 3D shader from Sketchy, sadly, I can't get this working, so I wonder if an update has broken the shader, but whatever, it inspired me to give the whole GTA style traffic thing a go.
I hope Sketchy doesn't mind me reposting the MFA and Shader here:
I've basically made some improvements to the original GTA traffic MFA so that you don't need to have a direction tile in every section of road that you want the cars to drive on - this allows the map to be much bigger.
I've also added variable speed in the cars, as well as allowing them to detect other cars so that they don't crash into each other or overlap.
Finally, I've added acceleration and deceleration, so that the cars don't just stop start, but look more natural.
In addition, I've added a new AI behaviour into the system for pedestrians. Works in a similar way to the cars, but the pedestrians navigate the pavements and urban areas instead of roads.
The 2 systems interact, so cars stop for people (albeit a little close right now, but it can be easily tweaked) and people only cross roads at certain points.
Last step with the pedestrians has been writing a palette swap shader, which makes each pedestrian's top/pants/hair a unique colour. Using a shader instead of replaceRGB means that the pedestrians are a 4 frame active with 1 direction, with each instance dynamically altering their own palette.
If you wanna check out the shader, it's HERE
It will replace true Red 1,0,0 Green 1,0,1 and Blue 0,0,1 with whatever colours you fire it at runtime.
i.e. all Red 1,0,0 pixels will be replaced with whatever values you pump into oRED,oGREEN,oBLUE etc
At the moment its running about 40 cars and 90 pedestrians at the same time, at 60FPS. The only extensions used are advanced direction and array.
Obviously I've got a lot of stuff left to do... all the graphics are currently placeholder. I'd like to add some gameplay (more on that in a later post) and also add some additional behaviours - emergency service vehciles with different pathfinding, Pedestirans that stop and chill for a bit etc. Loads of sound design I want to do too.
Here's a little video of where I'm up to
Once I've debugged everything a little more, I'll try and get an example of teh basic improvements to the original tutorial to post here.
For now though just interested to see what people think.
If you can't be bothered to watch video, here's some screenies, but it's cooler in motion
Left the Debugger on this one, so you can see a steady 59-60FPS
Here's a zoomed out view so you can see more of what's going on (still not the whole city)
Annnd on a side note...
If anyone does have any idea how to get the above 3D shader working, I'd be really interested to hear from you. I once had it running (years ago), but on my current rig, the sides of the buildings skew into triangles.