Search Unity

Spamocalypse: Aftermath - a first-person stealther with spammers

Discussion in 'Works In Progress - Archive' started by Philip-Rowlands, Jul 18, 2015.

  1. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Spamocalypse: Aftermath

    Spamocalypse: Aftermath is the current working title for a first-person stealther that I've been working on as a learning project since March. You play a currently-voiceless thief, hired to sneak into a zombie-infested city quarter spammer-infested forum to steal a long-lost artifact that will either become the Floppy Disc of Olo-lort or the Huta Teapot.

    Gameplay video (updated 7th of April 2016)

    The video shows a few bugs (most importantly, the mouse isn't visible when the level ends), but I'm going to fix those.

    Download it from GameJolt or Dropbox

    Being a stealth-based game, I've been focussing more heavily on the AI than the graphics for the moment. So far, the spammers are capable of hearing your footsteps, will notice you if your surroundings are bright enough, and can attack or be attacked. They will also sprout random spamminess while patrolling, searching for you, or attacking. You can read notes in the game, activate firewalls that will burn the spammers, and pick up ammo.

    Here's some (very old) screenshots.
    The player's interface
    Player Interface 1.2.2.png

    A spammer being utterly oblivious to the player.
    Patrolling Spammer.png

    A box of ammo, highlighted to let the player know they're looking at it.
    Highlighting Ammo.png

    Left: an active firewall. Right: a note concerning the firewall
    Firewall Active.png Reading Note.png

    The basic mechanics are done, but obviously I still have a lot to do. Aside from some proper models, I plan to make a proper level, with much narrower corridors and loot/treasure to pick up. I would like to give the player character a voice, a set of objectives, and different difficulty levels that would affect the AI's detection speeds and alert times, as well as the amount of loot you would have to find.

    Give it a try, and let me know what you think.
     
    Last edited: Feb 1, 2017
  2. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    I've added the loot and difficulty levels. So far, the difficulty just affects their detection speed, and is comprised of three levels: Normal, Hard, and Expert. On Hard, the spammers will detect you twice as fast as on Normal, and on Expert, they will detect you three times as fast. The values for Hard and Expert are temporary, so tell me if they make the game too hard.

    I am now going to start designing a proper level, rather than the testbed above.
     
  3. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Some minor updates. Firstly, the spammers will search a nearby area when alerted, rather than always searching in front of them. This fixes an issue I noticed where they would try to walk through a wall to reach their search target. I've also set their alert times to increase with the difficulty, but the amount of time they will be distracted by a sockpuppet is fixed.
     
  4. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    For the last month, I've been working on the actual level, which I'm calling Tinterwebz Museum. Here's a screenshot:



    First off, I know that the UV mappings for the floors aren't consistent from one section to the next. I'm still getting used to Blender. Secondly, this isn't in the game yet, as I'm still trying to develop an objective system. Once that's done, it will be added in and replace the test scene.
     
  5. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    A month later, and I finally have an objective system in place. It's based around my player interaction system for the most part: you have to interact with specific things (like a sign about the Huta Teapot), or pick up a sufficient amount of loot. Here's a screenshot of the objective screen. It's pretty basic, but I think it will do for now.

    Objective Screen.png

    I've borrowed two objective from the Thief series: firstly, the amount of loot required depends on the difficulty level. Secondly, on expert you are not allowed kill anyone, because you're supposed to be a professional! Professionals have standards.

    The download link hasn't changed, nor is the fact that it's Windows only for now. My next step is to start moving things to the main level, and then to start making models.
     
  6. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Minor update: there's a save system in place. It's based on serialisation, so it has to read from/write to a binary file. It will save:
    • the current level;
    • the health, position and rotation of each spammer and the player;
    • the amount of loot the player has found
    • the amount of ammo the player has
    • the status of each objective.
    There's still only one level, but I have also started working on another of the main levels (City Inbound), and the second one (Tinterwebs Museum) is almost done. Tinterwebs Museum is the museum in which the Huta Teapot is located, along with other priceless[1] treasures. City Inbound is going to involve the player sneaking into the spammer-infested city and making their way to the museum. There will also be another level, which I'm calling City Outbound for now, in which...well, take a guess what it involves. Leaving the city?

    Damn it, I might be suffering from scope creep here! :p

    [1] Priceless as in, utterly worthless.
     
  7. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Another update: I finally have a Linux build. I've tested it on my dev machine (running Linux Mint 17.2, a six-core AMD processor, 8 GB of memory, and a graphics card with 1 GB of memory), and it's a little buggy. There are two known issues here:
    • The mouse rotation is limited to a 90 degree arc - this seems to be an issue with Input.GetAxis on Linux, as this occurs in the Linux Editor as well. I've added in the arrow keys as a backup mechanism, which does work, but is a bit slower and has a hard-coded speed for now.
    • The mouse cursor is higher than the actual mouse position. As a workaround, UI elements are set to become a bright orange colour when highlighted, and revert to the default white when pressed or no longer highlighted. If anyone here is colour-blind, please let me know if this causes any issues.

    I've also rebuild the scenery for the main menu, so it uses part of the City Inbound level and a spammer lurching past the camera. I will have screenshots of that in a week or so, once I'm reasonably satisfied with it. Here's what the main menu looks like for now (probably a bit dark?):
    Main Menu Screenshot.png
     
    Last edited: Nov 30, 2015
  8. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    About time I updated this! The main changes are:

    • I've added in the City Inbound level, and a button on the main menu to skip the first one. It's still not entirely tested, but I had a bit of a performance issue with about twenty units active at one time - so I've added in a portal mechanism that toggles different spammers when you pass through.
    • I finished revamping the first level - here's a screenshot:
    • I added in safes, which require a four-digit code to open - these have to be found in the game world, and not necessarily nearby.
    • I created breakable glass, which will come into effect when I continue with the Museum. It makes a lot of noise, so watch out patrolling enemies!
    • The pathfinding code I wrote now takes directional lights and area lights into account when calculating light intensity. I am also considering reworking that to store the individual mesh in a ScriptableObject, rather than as a Dictionary inside a binary file.
    • The weapon script has been refactored into multiple different types: projectile, hitscan and melee. The player's melee weapon currently doesn't work, as I haven't animated the player character yet. However, the (projectile-based) SQLer does. I also added in Logic Bombs, which will bamboozle enemies, allowing you to escape - but they currently damage the player, and I don't know if I'll get rid of that.

    I've also decided that I am not going to bother with 32-bit builds - as of now, you must have a 64-bit system.
     
  9. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Added a video to the first post. It's a bit out-of-date, as it includes a graphics bug when opening safes that I've now fixed. I also think my microphone's a bit too loud. Well, it's my first video, so any feedback would be helpful!
     
  10. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Another build for Spamocalypse. This has a few changes:

    Night Vision effect
    After some feedback from the Feedback Friday threads, I added in a night-vision effect that I found on the wiki. This caused a problem where part of the UI was hidden by the scope effect, which you can see below, but I fixed that by adding a second camera which exclusively handles UI objects.
    Screenshot from 2016-03-30 19:39:50.png

    Tutorial system
    I am starting to lock down the mechanics, but I decided to add in a quick tutorial mechanism for the player, to show them how to move, crouch and jump. It's pretty basic at the moment, and it's limited to the default controls. However, this is at least a starting point for later.

    Crouching/leaning/jumping
    I had originally planned to make these animation based, but animating a humanoid would have taken too long, so I resorted to scripting them. These mostly work, but the mechanism I added to recentre the player doesn't quite work - it happens automatically, but if you look around while doing this, it doesn't fully recentre the player. However, if you tap the key to lean in the direction that you're tilted in (e.g. tap the Lean Right key if tilted to the right), it fixes this, so I'm not too bothered by it.

    Miscellaneous
    I added some more buildings and props in both of the levels. I also fixed an issue with the light calculation where it would ignore obstacles between a light and a node, causing the illumination of a node to be inaccurate. This would have resulted in a character being visible even in shadow, which defeats the whole purpose of sticking to the shadows! Finally, the main menu has also been simplified - difficulty can be selected when you start a new game, rather than going into the options settings. It still defaults to normal difficulty if nothing is selected.
     
  11. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Just fixing some bugs here. For starters, I had somehow screwed up the player's body so the sound detection and other things didn't notice them. Another bug was that the breakable glass didn't actually fall apart, due to the fact that I was using multiple overlapping Mesh Colliders. Both are fixed, and I added in a new tutorial message for the glass.
     
  12. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    New gameplay video uploaded.
     
  13. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Finally, a new build! Mostly performance changes, along with some extra additions to the second level:

    • I replaced the OnTriggerStay event in the LineOfSight class with a Coroutine that runs every quarter of a second, rather than on the physics timestep. This does help performance a little, but the underlying cause is in my pathfinding code: when converting a node to a position, I'm using Linq to Aggregate over a Dictionary of approximately 10000 Nodes. This is not a good idea, so for my next project I'll try to find a more efficient way to calculate illumination.
    • The BreakableGlass object is now animation-based, rather than physics based. Trying to apply a force in the right direction was trickier than I expected, so I created the simulation with Blender.
    • I added a lift to the second level. I haven't fully tested this yet, so if you wish to test it, it's in one of the buildings around Spicrab Square (which is marked on the map for that level). The square also has a warehouse.
    • I added more props to the second level. It's mostly stuff like furniture and bottles - filler, in other words.

    Screenshots
    Here's some screenshots I took in the Editor. From left to right: Barry's Diner/Tea Shop; Museum Square (with the orange glow caused by Firewalls); looking down Loam Street; looking into Spicrab Storage (the warehouse).
    Screenshot from 2016-05-19 21:03:57.png Screenshot from 2016-05-19 21:04:23.png Screenshot from 2016-05-19 21:08:23.png Screenshot from 2016-05-19 21:23:44.png

    Known issues
    • NPCs go flying when hit by a SQLer round. It's a physics issue, which I do find amusing, but I'll see if I can fix it.
    • The spambots occasionally get stuck along walls. This is an issue with their pathfinding code, because they don't take their width into account when choosing positions.
    • I still haven't fully fixed the player straightening up after leaning. If you happen to look around while leaning, the player may still appear to be slightly tilted after straightening. However, if you tap the leaning buttons (Q/E by default), it will straighten up again.
     
  14. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Massive update: I ripped out my pathfinding code and replaced it with the built-in version, which is a lot more efficient (although the Spambots still get stuck on corners on occasion). I also rebuilt the tutorial level so it has more than one floor, thus allowing the player to learn how to use lifts and ladders.

    Mostly importantly, I have finally uploaded it to GameJolt. The Dropbox downloads will remain as a mirror site.

    Known issues
    • The ladder mechanism might not be intuitive enough. It basically converts forwards/backwards movement into up/down while you're on it, but at the top you have to turn and move sideways to get off it.
    • The Spambots still get stuck on corners. Fixing this will require creating a second copy of the geometry for them only, so I'm probably just going to add a note expressing the Council of Turscar's displeasure at their bots' deficiencies.
    • Lifts are a bit jerky. This might just involve tweaking their speed.
     
    NickHaldon likes this.
  15. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Forgot to update this at the weekend - some fixes after I got some feedback.

    Firstly, I have the new GUI in place. I think I may need to tweak some font sizes, and I think the level intro screen (see the image below) needs a bit more work (i.e. replacing that scroll area with something...not sure what yet). However, I think it fits the setting of the game a lot better.


    I also have a 64-bit Mac build, which is completely untested, because I don't have one to test it with. I have no idea if it will work, crash to desktop, or hijack your computer on behalf of the cult of spammers who are the game's antagonists, so...don't blame me if something goes wrong! :p

    And fixes. Very important fixes:
    • I forgot to assign some buttons on the game over screens, which made it look like the game had frozen upon failure. Game-breaker! :oops:
    • I finally fixed a bug where the player could jump while leaning. This wasn’t a game-breaker, but it looked a bit odd to be jumping while leaning over at a 30 degree angle.
    • I tweaked the exhaustion mechanic after one of my workmates commented on it. It now allows you to move at a snail’s pace, but you can’t attack, run, jump or climb a ladder. I also lowered the timeout to get your breath back before you can do any of that again to a second. I may update the speed a little later, and maybe allow the player to climb ladders but at the same slow pace.
    • Ladders don’t make the player kinematic any more. Instead, they just toggle whether or not the player ignores gravity. The tutorial also tells you how to use them.
     
    KyleOlsen likes this.
  16. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    New build! As usual, it's available on GameJolt.

    What's changed
    I’ve rebuilt the start of the first non-tutorial level so you have to climb out of a sewer or a pipe. In the previous version, the sewer was just a pipe at the same level as the street, which just didn’t look right. In this version, it could be a maintenance tunnel to a canal, or something similar. You can also climb onto one of the roofs around the level, and then use that to cross some of the rooftops to avoid the spammers.

    The second level now has a sewer that leads to a dungeon under a police Moderator station. Bit of a design flaw there, but it does get you past a spambot that’s too dumb to move from it’s junction (something I need to fix). I am thinking of adding some rooftop paths, again to add some variety, since this level has only two roads you can follow.

    I also rewrote the briefings for the levels slightly, trying to make them sound more like Garrett from Thief, and I’m considering recording them. I'll try that over the coming week, and then upload the sample to GameJolt.

    Known issues
    Turns out I didn't fix that "leaning while jumping" bug after all :rolleyes:
    As stated above, one of the spambots in the Inner City level doesn't move. I don't know why, but the sewer allows you to avoid it.
     
  17. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    I played it on Windows 8.1. Indeed, it feels a bit like Thief 1/2. It works well, no glitches, good FPS. How long did you work on this?
     
    Philip-Rowlands likes this.
  18. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    @Quingu since March 2015! I think the levels are a bit empty, but I can only drop so many piles of crates into a level before it gets obvious that I don't have enough prop variety :D

    How far did you get?
     
  19. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    I just walked around a bit. Those ambient sounds are a bit annoying. Especially that industrial hit which is repeated over and over and OVER again. ;)
     
  20. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    That's the movement noises for the spambots. If you think that's annoying...I have another one which is that combined with a siren. It's not used, but avoiding that would be a good reason to not be spotted :D

    So, I need some better sounds for them - I was thinking something like a diesel engine to go with the smoke coming out of their chimney. What about the other sounds?
     
  21. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    I've recorded the player character's intro monologues for the level briefings. These are not in the build yet, as I want some feedback on them before I do that. I'm trying to emulate Garrett in the Thief games, and I probably failed miserably :D

     
  22. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    I've added the voice acting mentioned above into the build. I also tweaked the movement noises for the spambots: their main noise is now this, with propellor noises added for respawning/dying. I also tweaked their spatial blend so it's fully 3D now, which should help make it less annoying.
     
  23. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    I finally added the last level, and a post-game credits/stats scene. The last level, which I'm calling "Escape", uses the same scenery as the "City Inbound" level. There's no loot or goals in this level, except to return to the sewers you climbed out of at the start. The NPCs use different paths this time around, so you shouldn't rely on the same path as last time. On the plus side, the Firewalls that blocked part of your path last time have all been turned off - some idiot wired them up to the controls inside the Museum!

    The credits/stats scene lists your total stats for the entire game, not including the tutorial level. Here's a quick screenshot from one of my development builds - and yes, that graffiti says "STFU". It's definitely not a button. Definitely not. :p
    As you can see, it's not entirely done - it doesn't wrap them properly, but that's a graphics issue I will fix, most likely by moving the credits further back so the camera perspective allows me to display them in a wider format.


    As usual, it's up on GameJolt or DropBox.

    What's left to do:
    • MOAR PROPS! (Especially inside the museum - all those bare walls need filling!)
    • Fix an incomplete briefing in the museum.
    • Increase detection speeds - I think they're a bit slow even on hardest difficulty.
    • Find a way to visually turn NPCs inside out, and add that to the silliness settings.
     
  24. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Turns out I hadn't included the extra levels in the build - my build process was hard-coded to 6 levels, instead of 8. I've fixed that by making it use the levels that are listed in the SceneManager. Apart from that and some extra props, here's what's changed.

    Bug fixes
    • I converted the colliders for line-of-sight checks to use Capsule Colliders instead of Mesh Colliders. The Museum level had almost 30 MeshColliders for this, which really screwed up performance. The other levels were okay, but Capsules covered roughly the same area as the extruded box I was using. I really should have properly tested that sooner.
    • I also fixed a long-standing bug in the line-of-sight code that caused the spammers to spot the player as soon as they came within 5 metres - regardless of how bright the player’s surroundings are.
    • I removed the directional light from the Museum level. The component I was using to calculate its effect on NPCs and the player was ignoring the colliders on the upper levels of the museum, which resulted in the player being "in the moonlight" while indoors, in a windowless room. There’s only one part that’s outdoors in that level, and there’s other lights there anyway, so I didn’t even need it!
    New mechanics
    As if I didn’t have scope creep already, I went and added more:
    • Bushes. Yes, you can hide in bushes now. They rustle if you move into them too quickly, so no running and diving into them!
    • Light switches. I should really have added this sooner, but I didn’t think of it until I started testing it earlier. It meant changing the lighting from baked to real-time, but that does mean I can get shadows from NPCs, so it’s good.
    • Firewall controls now include a sound effect and light to make it clearer that they’ve been used.
    Known issues
    • The SQLer doesn’t quite aim where the player’s looking. I am considering adding a secondary fire mechanism that would allow the player to aim down the sights.
    • Occlusion culling might be inaccurate in one or two levels. This results in buildings "disappearing" while you’re looking at them.
    • The museum map doesn’t include the new garden on the upper floor.
     
  25. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    I found a few bugs in the Inner City level, so here's a patched version to fix this.
    • The lighting glitches out in one building, so you were "visible" inside a darkened room. I removed the street light that was just outside the building.
    • The player's compass/light gem didn't rotate properly, due to a borked attempt to prevent it going through walls. I had tried putting that in the UI layer, as the UI camera ignores everything except this layer. However, that camera doesn't rotate, and I forgot to reset the compass when finished.
    • A note on a notice board inside the Moderator Station was unassigned, leaving the player frozen in place when they try reading it. I just removed the interaction area.
    I didn't realise this until I ran through a development build to take some more screenshots. So, I only managed to get one or two before I decided that it had to be patched, but I think they're actually pretty decent.

    Screenshot from 2017-01-31 19:38:05.png Screenshot from 2017-01-31 19:44:55.png
     
  26. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    Finally, I fixed the SQLer aiming issue. You can aim by clicking the right mouse button, which switches to something similar to iron sights. I also rebuilt the scenery in the Inner City level so that you can climb onto a particular rooftop, with the city walls visible around you. Those walls are also visible in the City Inbound level.

    Iron sights image
    Screenshot from 2017-02-08 20:00:30.png

    Up on the Thieves' Highway, looking at the walls.
    Screenshot from 2017-02-08 20:32:43.png

    Known issue: I forgot to update the Navmesh for the Inner City, so there is a part where the bots probably won't chase you. I'll fix that in the next build.
     
  27. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    New version with some fixes:

    • The SQLer and compass don't go through walls any more.
    • Increased fog density.
    • Increased player jump speed to make it a little easier to get over some obstacles.
    • Some more models around the levels for local colour.
    • Made the tutorial messages sound more like the player character snarking at himself. (TODO: find somebody to voice female character).
     
  28. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    I am an idiot.

    While trying to make the bots go on alert when a SQLer round hits the scenery, I found that the sound detection was only running once, rather than at regular intervals. This meant that the bots were effectively deaf, thus rendering the whole "move quietly" thing moot. I suspect I broke it while trying to improve performance: instead of OnTriggerStay, I used a CoRoutine with a rate of 0.2 seconds, but I forgot to update the processing to keep going while they still have sounds to process.

    I also realised that I had updated the bots to not collide with the "Decoy" layer. This layer is mainly for Sockuppets, and it meant that the decoys were utterly useless. That was a relatively quick fix, and I can't remember why I disabled that. It might have been the performance tweaks I made last month.

    I really need to find a way to test this more systematically.
     
  29. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    More fixes, mainly graphical this time. There was one particularly funny bug I found where the spammer NPCs wouldn't stand up when respawning, and would just slide forwards with their face on the ground. Since this meant they would never see the player, I had to fix it...but I need to find a way to replicate that next time.

    I'd say that I think this is nearly finished...but I've said that plenty of times before. So I've probably added yet another Gremlin into it :D
     
  30. Philip-Rowlands

    Philip-Rowlands

    Joined:
    May 13, 2013
    Posts:
    353
    This is probably going to be the last test build, patching a few bugs I found in the last release.
    • Tweaked the aiming camera so it doesn't clip through the SQLer's stock.
    • Fixed a missing collider on the rooftops in the Inner City.
    • Edited some of the Inner City buildings models so the NavMesh can get inside them.
    • Gave the player a new footstep noise for walking; it's basically two of the noises in the Standard Assets combined with Audacity.