I now have some models for the Phishers, and some basic animations for them. Here’s a screenshot of one popping out of a pipe to throw a spear:
And here’s a very quick video of their current animations:
I haz a prototype! So far, it has the following features:
I’ve uploaded a Windows and a Linux build to GameJolt, plus some screenshots. It’s very rough around the edges – some of the controls do nothing, and I’m still using default shapes/textures. There’s also some issues around the sound effects, but that’s relatively minor.
Been a while…I blame hardware issues.
Back in January, I decided to update my Linux kernel to include some patches for Spectre. Unfortunately, this screwed up my graphics card drivers, so I couldn’t run Unity (or even some of my games). I thought I’d wait for a bit and get Mint 19 when it’s stable.
Just two weeks ago, I decided to try upgrading Mint to 18.3 (which is stable, and will be supported until 2021), but that didn’t make things any better. Eventually, I gave up and did a fresh install, overwriting my entire hard drive. I missed one or two projects (particularly a project for a generic AI framework and automated test bed for it), but most of my stuff was backed up. Including the stuff I actually wanted to work on 🙂
So, I’m starting The Phishers’ Gauntlet again. This time, I’ve set up a Git repo for version control, and have given myself a year to finish it. I’m planning the 0.1 release to be at the end of this month, though I’m already ahead of where I wanted to be thanks to backing things up 🙂
I’ve decided to do a spinoff version of Spamocalypse for my next project. It’s based around an enemy I wanted to add, but had no time for beyond an off-hand joke: Phishers.
For anyone who doesn’t known, phishing involves misrepresentating a site or other trusted entity to steal personal information (login details, financial information – anything!). OWASP have a definition and examples here. Generally, if you get an email asking you to sign into your account…delete it.
Now I have that out of the way, the game I have in mind is currently titled “The Phishers’ Gauntlet”. The idea is that the player is cut off when a city is evacuated in the face of a invasion by the Word of Turscar, and forced to make their way through the Phisher-infested alleyways to a ROFLcopter that is waiting. The Phishers, an offshoot of the Turscarites, will either lurk on top of rooftops and wait for something to hit their Phishing Rods, or stalk the player on the ground.
A lot of this will be taken from Spamocalypse, but there will be a few differences:
In Spamocalypse, I had only one player character – an expy of Garrett from the Thief games. This time, I have at least three in mind. Two of these are parodies of some IT security people I tend to read.
I heartily recommend reading the people I’m spoofing. Troy is a security researcher who runs the database breach notification site HaveIBeenPwned, and does a lot of security training for developers. He has a fair amount of information about data breaches, password management, and general web security. I’ve developed an interest in that in my day job, but he’s quite readable, so worth reading even if you aren’t very technical.
Brian is a journalist who, among other things like reporting on malware like Stuxnet and Mirai and investigating spam networks, once managed to foil a plot to frame him for possessing heroin…by lurking on the forums where the plot was being hatched. It reminds me of a certain level in the original Thief, where you rob a crime lord who just ordered a (failed) hit on Garrett…
I’m planning to give myself a year to develop this, starting from next Saturday. I have a very rough game design document done (available here).
I haven’t worked on anything major since I finished Spamocalypse – I just needed a break, and work has been burning me out a little in the meantime. However, I’ve started working on two new projects, trying to decide which I like more. One is best described as a smaller-scale version of Hearts of Iron, and the other is a real-time tactics game. Both are set in a fictional world I’ve had kicking around my head for a few years now.
The original premise of this world is that some hills in my part of Ireland were once inhabited by dwarves, or humans who started living underground during the Iron Age. However, during the mid 19th Century, something goes wrong, and the whole area turns into a S.T.A.L.K.E.R.-style forbidden zone. Among the many, many things that have changed is that humans in the affected area have turned into orcs (AKA Fomorians…or trolls).
Galway is controlled by the Anglo-French Empire, the result of the British and French forming a military, then political alliance in the face of the Habsburgs of Spain/Austria forming a superpower. The Firtollán League, the alliance of the dwarven city states of Ireland, has been forced to ask them for help in keeping the Fomorians locked up in the peninsula.
The first one (Governor) player is the recently appointed governor of Galway, some time around the turn of the 19th/20th century. After a long, distinguished career in the Anglo-French colonial administration, Galway is your final posting before retirement. But can you last that long? All you have to do is approve various budget decisions, and try to avoid being sacked.
This would be based on managing several different factors: your popularity with the locals, the opinion of the press outside Galway, what the dwarves/Firtollan League thinks of you, your budget and your troops. The first three influence what your superiors think of you; if that becomes too low, you will be sacked, forced to resign or…forced to face a Full Independent Inquiry!
I was originally going to do a turn-based tactics game in the style of Jagged Alliance 2 or XCOM, but I’ve changed this to a real-time version. The only definite part is that it will build on what I learned from Spamocalypse – in particular, planning out systems so I can test more efficiently, using mock components. However, it will probably focus on hunting various monsters, including the Fomorians. I’m leaning more towards this one, purely because I can recycle some of my previous AI code.
So, it’s taken me three months to write this. I should probably decide on one of these and get on with it 🙂
So, I finally released Spamocalypse last week, after two years of working at it in my free time. Now is as good a time as any to look back and see what went well, what didn’t, and what I would do differently.
There were three goals I set myself when I started. The first (LOS) was to figure out how to make the bots see the player, while taking lighting into account. The second (Sound) was to figure out how to make them hear the player, and the third (Brain) was to find a way to make different NPC types react differently to specific stimuli. All of these have actually been achieved, though not without some work.
My original method for determining if the bots could see the player was to use an extruded box for their vision range, and storing the lighting inside a customised pathfinding system. It worked at first, but there were two problems: twenty or more MeshColliders in a scene for line-of-sight checks is expensive, and converting the player’s position into a Node consistently took about four milliseconds, which slowed the main thread down enough to be noticeable.
My fixes for these were to use capsule colliders for the humanoid NPCs, and to create a physics-based light calculation mechanism. Capsule colliders involve only two distance checks (one for the radius and one for the height), as opposed to the eight required by the extruded box (one for each vertex). The physics-based LightRadius mechanism is based mainly off trigger colliders and raycasting, which is considerably faster.
This did require ripping out my pathfinding code and converting the AI to use Unity’s builtin NavMesh. However, that works a lot better, so I probably should have done that from the start.
The sound detection originally used an octagonal mesh to manage their hearing range. I made their ability to detect the player be inversely proportional to distance, giving the player a chance to avoid them at longer distances. That part has not changed. I also originally made them only react to Sockpuppets, but when I started adding other alert sounds, I realised that a ScriptableObject was the ideal way to store these. From that alone, I’ve learned how to use Unity’s ScriptableObjects for holding common data.
The one major performance change I made was to not use OnTriggerStay for processing sound events. OnTriggerStay runs on the physics timestep, which by default is every 50th of a second. However, I found it ran much better if I ran it on a Coroutine every 5th of a second.
Originally, I used a C# delegate to distinguish between the different AI responses. Delegates in C# are a way to call a different implementation of a method at run time; in this case, each NPC type had a different search and attack method. However, this became a bit too convoluted when I started adding different effects: the bots were supposed to play smoke when moving, the spammers are supposed to vomit when attacking, and so on.
Currently, moderators and bots are subclasses of the main SpammerFSM class. The only difference here is that their search and attack methods override the search and attack methods in the SpammerFSM, allowing me to subtly change how they react to a sockpuppet, or when they start attacking. However, it’s still a bit clunky. I think that for my next project, I’ll use interfaces instead, which should allow me to customise the NPC types more effectively.
So, apart from the three goals I set myself, what worked? Well, I found a more efficient way to calculate light intensity. I figured out a basic way of doing player objectives, and I found some basic mechanisms for making it clear that the player can interact with something. All of these are going to be useful in future projects.
The biggest problem is that I had too much scope creep. I kept thinking of new ideas to add in, each of which added their own bugs. The project just became too damn complicated for me to test by myself. Which leads me into the next problem: I have a problem getting people to try it. I hate nagging people, so I tend to just announce projects and see if anyone plays it. I still don’t know if the Mac build works! (That said, the analytics on GameJolt tell me that I’ve had 3 downloads out of 23, with no complaints…)
What can I do about this
The first thing I could try is to scope things better, i.e. decide what I’m actually going to do. That’s something that will probably come with practice. I deliberately refused to give myself any deadlines, mainly because my day job has some pretty
unrealistic tight ones, but I may have to consider this.
Another, more concrete thing would be to try decoupling the systems. For example, the SpammerFSM class and its subclasses rely on the LevelManager class – but that has to include objectives for a level, which makes testing the AI in isolation tricky. A way around this would be do what I did for the light calculation: create an interface that defines what methods the class will have. The key thing here is that any class that implements it will include those methods, but the exact details will vary.
I’m also thinking of setting up my own Git server for source control. Source control is basically a way of keeping track of who changed which line of code, and when. In particular, that would have been very handy for figuring out when and how I made the NPCs deaf for over a month! I do have some stuff on GitHub, but I’d prefer to keep my full projects private for now.
So, there’s some things I can improve, but I’d say this was pretty successful overall. Not least because I actually finished it!
Finally, two years since I started working on it, Spamocalypse has reached version 1.0.0. My brother tested 0.8.1 and made some suggestions, some of which I have implemented:
Anyway, this is the official release of Spamocalypse. Here’s the release trailer:
I’ve been working on Spamocalypse for two years. I’ve run out of things to add…so this is going to be my last test release before the Big One.
Most of the changes are fixes for gaps in the scenery, and rebuilding some models so the nav mesh could go inside some buildings. I’ve also updated the player’s footsteps so sprinting and walking have different noises, and the SQLer aiming camera is a little higher so it doesn’t clip through the stock.
I am an eejit. While trying to fix the performance issues a month ago, I think I broke the spammers’ sound detection. However, I didn’t realise this until I tried making them go on alert if they heard a SQL round miss. I’m not even sure if that’s when it happened!
The root cause of this bug is that I had converted their sound detection to use a Coroutine with a 0.2-second interval, rather than OnTriggerStay. OnTriggerStay runs on the physics timestmp, which by default is 50 times a second – which is a bit more intensive than I wanted. However, when converting it, I forgot to actually make it run more than once! So, the spammers were effectively deaf, which pretty much defeated the point of the game.
Another thing that was broken was their Sockpuppet detection. This was a physics issue – I had set the Spammer layer to ignore collisions with the Decoy layer. However, that’s the layer which is supposed to contain the Sockpuppets!
There are two things that would have helped with this:
Finally, I have a new build to show off. I originally built this on Sunday and uploaded to GameJolt, but when trying to take some screenshots, I found a few bugs that required a patch.
As if I didn’t have scope creep already, I went and added more: