76

Forensic Friday 76: Finalised Combat

📣Dillan

Hey Readers! #

Hola a todos

I was never very good at Spanish, so I’ll leave the Spanish there. You know there’s an insane amount of content that needs writing in a blog when I’m writing the intro instead of David… It’s been almost a month since Forensic Friday 75, but so much has happened in that time! From menu UIs and inventing line algorithms, to missile strikes and full-on combat battles, there’s so much to write about - and we aren’t time-limited, to an extent - so strap in (metaphorically and, optionally, physically) for a lot of content! The road to a playable pre-alpha build that we can playtest on is insanely close, so let’s get the ball rolling with the finalisation of gameplay stories :)

📣David

Finishing up Gameplay Stories #

This path month has been fully dedicated to finishing up the gameplay stories, which we have finished now. This means we are only mere days away from a playable build. Exciting to say the least! The only things left on the agenda are adding sounds (me from the future says this is done already), and some base content for anomalies, but let’s not get ahead of ourselves…

But that means this image I keep reusing will soon stop appearing in these blog posts. Woo!

📣Dillan

Researching #

As part of finishing up the research gameplay story, we’ve made research more anomaly-centric now, since… you know… that’s the main premise for why there’s a facility in the first place!

This change means that we now have 3 different kinds of research in-game:

  1. Experiment Pre-requisite: research from experiment results. After conducting an experiment, researchers will suggest possible research related to that experiment.

  2. Anomaly Pre-requisite: if an anomaly is on site, researchers will randomly reveal nodes that aren’t linked to experiments directly, but are still linked to the anomaly in some way.

  3. No Pre-requisite: Research not related to any experiment or anomaly.

While what you suggested is limited by these prerequisites, the level of experience of your researchers will heavily influence how likely you are to get more lucrative suggestions.

There are a lot of systems at play here, and we hope that can make subsequent playthroughs feel very unique and centred around which anomalies you have on-site!

📣David

To further Dillan on that, I’ve also validated all the mechanics behind researching. Research tasks now have a progress bar, and handy status displays to show the state of research. Neat!

We also changed the mechanics behind how research is actually done. Introducing. The lowly office region.

They basically had no purpose in the game other than to act as a home for NPCs. Well, now they do have a purpose. We’ve decided to make offices be areas where jobs do various adjacent jobs. So, the researcher’s main job is to create research papers, but in their offices they do research. A doctor’s main job is to tend to patients but in their office, they may write medical reports, which you can read to learn about the general health of your facility, or maybe to set up meetings with NPCs. Right now we’ve only implemented office work for researchers, but in future alpha updates, we’ll be able to dial in this feature more!

New modes of science #

I also added some new science-related objects, which allow you to specialise in your labs, like the particle accelerator, which contributes to physics research points. The gene sequencer is another object that contributes to biology research points.

You can also place new chemistry lab desk objects to specialise in chemistry points.

And all the rest of the science-related objects can be found in the new science architect menu. Neat.

The system isn’t completely finished yet. No mechanics exist to reward or punish the researchers you assign to labs. Heck, you can’t assign researchers to specific labs yet! We’d also love to have researchers specialise personally in different scientific skills that you have to cater for, and also have research preferences that you also have to cater for; such as researchers preferring to work with other researchers of the same science field. BUT. All of that is way out of scope, but we are pretty happy with the current system so far.

Fixing beds #

Issues with sprites when NPCs are sleeping have been fixed, which isn’t the most glamorous thing, but it is definitely one of those things no one is going to appreciate at all…. ahh that’s how game development goes…

But one thing players will also not appreciate is the new bed sprites. Which looks a lot more clean and final!

NPC Career Menu #

The Career menu for NPCs has also been spruced up. Transforming from literally non-existence to existence. It’s pretty simple, but gives you a convenient way to keep up to tabs with the experience system in the game. Maybe you’ll find ways to abuse it and train your staff up to level 100 in a day. Who knows. We sure as hell, don’t know how many bugs are lurking around waiting to be discovered. I should also mention schedules are viewable from the NPC inspector too.

You can even change ID card access levels from the career menu which is handy!

NPC Stats & Work productivity #

In the vein of touching up the NPC inspector menu, I also delved into implementing a new mechanic to bridge the gap between a few systems. Namely the beauty system and NPC work. Now the beauty around an NPC affects their work productivity and this is all viewable from the new “Stats” tab in the NPC inspector (along with a bunch of other metrics you might want to know about).

The work productivity factor is not just based on surrounding beauty, but also health condition, and overall needs satisfaction. So keep your staff in tip-top shape!

Containment Breach Security Levels #

Above me are the 3 new security levels I’ve added to the game. They are as follows: Maximum, a breach is called if they leave containment at all; Minimum, they can leave containment but cannot harm or injure anyone; None, the anomaly must simply not leave facility grounds.

Hopefully, those security levels make enough sense and fill all the security levels you’d need at a most basic level.

Whilst adding this feature I made the realisation, why don’t lights go red during a breach? So now they do! It was after watching this video:

I have no clue why I never thought of it, but to quote Dillan on it “It really sets the mood”. I think it is in fact really nice! Here’s a picture of how it looks.

New fire #

The fire system was completely redone. Here is a comparison:

The mechanics with fire behave roughly the same, but with the reimplementation comes a lot of performance improvements. The old system pretty much had no regard for performance, so overall things are looking up in the fire department. Fire also spreads vertically now which is terrifying, to say the least.

We’ll definitely expand on the ruleset for fire, to introduce more mechanics, but right now the additional mechanics I’ve added are but not limited to:

  1. Fire heats up tiles around it
  2. If a tile is hot enough it ignites
  3. Fire uses up any burnable substances on a tile
  4. If there is no more fuel left, the tile becomes charred and cannot burn again until replaced
  5. Fire embers can jump 2 blocks and cause more fires
  6. Fires can ignite objects in a room if the room gets sufficiently hot enough
  7. Fires damage walls, objects and items. Destroying anything in their path.

I’ve also gone and made NPCs a bit smarter and they’ll actively avoid fires now (rather than blinding walking through them)

That’s enough about all the small changes. Onto the biggest change of the month: Combat

The Final Iteration of Combat #

Combat improvements took a great deal of work, but have yielded very satisfying results. So much so we can say (other than performance), combat feels quite nice. At least to us! We have bias so don’t take our word for it, playtests reveal all!

But in all seriousness, the main aim of the half-redesign half-touchup was the validate that combat works in large group fights, but the also felt compelling in small fights too. That was the main design goal that I was striving for. I can’t say we are 100% the way there because it hasn’t been playtested, but we have the perspective of comparison. For that, I say it’s a solid improvement.

I started with improving the bullet effects, they used to just be white streaks but now have a nice “hot flaming lead” effect with a smoky trail which makes them “feel” a lot juicier. You can get a nice look at the effects in the stills below.

Sandbags have also made a reappearance, turns out they didn’t really work as intended so a bit of rework was needed, but happy to say they do now.. in fact… work as intended. I really wasn’t sure exactly where to put this, I just want an excuse to show this still that I really like for no particular reason.

The last mention of Fashioncorp #

This will probably be the last mention of “Fashioncorp” which we famously coined back in Forensic Friday 4. Apart from improving combat involved remaking the inventory system to remove a lot of the jank that existed. To that end amending the apparel system was necessary and naturally giving security proper clothes came about.

In the images above you can see some examples. The armour they wear affects what injuries they receive from bullets, if at all! Armour is quite strong. However, it eventually wears down and breaks completely!

When items break whilst an NPC is wearing it, they currently disappear into the aether, but you can imagine in the future we’d have a system where you can train Category C to repair broken items. Hmmm, better write that idea down somewhere.

New Weapon types #

Whilst adding armour and other apparel, I also added some new weapons. The current gas-powered weapons we have are the SMG, SNIPER RIFLE, PISTOL and ASSAULT RIFLE. Each of these weapons has a multitude of varying attributes that change how they are used by NPCs. In the image below you can see what the sniper rifle looks like on an NPC.

In some of the stills you’ll see further on you might be able to make out some other weapon types so keep your eyes peeled!.

📣Dillan

Massive Battles #

The first full, larger-scale battles have been really promising, with NPCs fighting raiders in larger groups. We have some decisions to make on how deadly fighting should be - since in the video it is a blood bath (although admittedly the raiders aren’t wearing clothes here so perhaps it was to be expected!)

Below you can see some stills from other large battles.

So far the combat seems to scale pretty well, but as I said earlier, balancing the deadliness of combat will be an ongoing process as survivability is quite low. A piece of helmet armour can be the difference between life and death!

Projectile Changes & Crazy Line algorithms #

More of a behind-the-magic curtain work, but we have a new line algorithm (shocked reaction here).

Our original line-of-sight algorithm had an issue where if a line crossed a voxel very slightly, then that voxel would be skipped, meaning that bullets could travel through walls which is quite confusing to see as a player!

Our new line algorithm was a bit of a headache, with most existing algorithms only having pseudocode/implementation for a 2d line. However, with Containcorp having multiple floors, this is something that we needed a 3d implementation for, which wasn’t exactly like the usual Bresenham algorithm, since this was guilty of the same problem of skipping corners.

After doing a lot of googling and research, we came to the conclusion that we needed an anti-aliased line algorithm to catch all these corner edge cases, but finding a 3d anti-aliased line algorithm was surprisingly difficult, so we did the only normal and sane option… and invented our own one :D

It’s based on Xiaolin Wu’s line algorithm but ported into 3d space, giving us an intensity score for how “strongly” a line intersects a coordinate in the world. If a line goes through the centre of a tile, then it gets a weight of 1 (the black voxels in the images). If the line touches the edge of the tile, then it’ll score 0 (the lightest green voxels). We can then threshold this number to get the coordinates that we want, or alternatively use the weightings to calculate the probability that a bullet hits a certain area.

📣David

Ordnance Effects #

To finish up the combat system changes (and some gameplay stories pertaining to ordnance delivery), I had a chance to polish up the effects of ordnance. I’ll let the visuals speak for themselves.

Pretty cool effects (Future Me says these have been improved further since!), and the sound design for it is even cooler! Ordnance actually has sprites for the individual missiles that launch (even though you only see them for a second) but it goes a long way in making it feel more JUICY

OSTF Fashioncorp #

The OSTF Beta-64, “Final Call”, your last hope when your site falls to ruin have made a dive into fashioncorp. I know I said earlier it would be the last mention but everyone needs their time under the sun.

The OSTF have a custom van now.

Which looks very snazzy. But onto the main fashion focus. The OSTF now adorn gas masks along with their bulletproof vests and helmets, which really gives them a covert ops feel. Right now gas masks don’t do anything special but once we reintroduce asphyxiation and gas volume-related mechanics in a more formal capacity, they’ll without a doubt become a vital supply for your facility.

Saving and loading! #

As a little side note, the game is now fully savable, and by extension loadable too. It was a monumental amount of work. Took me roughly 50 hours of straight coding to get the entire game savable. You can trust I didn’t have many nights of good sleep through that 4 day period. 50 hours in 4 days is not healthy! But I can say that it is done and something we never have to think about again.

It was really the last major hurdle in making the game playable. The only other hurdle that exists is optimisation, but not as much of an issue. It’s one of those things that can be improved continuously as development progresses.

Oversight with construction #

As I was finishing up on the gameplay stories I realised there was an oversight with construction. Objects in the game could only be constructed with one single item of a single type. Which really made no sense. Now objects can require any number of items to be constructed which lets us balance the economy a lot easier, and is just overall better game design. Now we can make many things with a few items which makes items more meaningful.

There are quite a few items as you can see in the image above! The resources and item needs can be viewed on its inspect menu as you can see below (Future Me says this image is outdated and the presentation of it has been tweaked slightly to make it more clear).

You can see the resources a construction would take in the architect menu when hovering over an object. Neat!

Storyteller events #

The very last gameplay story…ironically is about stories. Or well… story events. The storyteller is meant to be the heart of our game, the very thing that creates the story generation that we seek (outside of emergent mechanics). To this end, I’ve gone and implemented 50 or so storyteller events which should be enough to get an idea of how it works (and hopefully to generate interesting stories). The events are:

  • Unexpected Sinkhole
  • Construction Accident
  • Blueprint Error
  • Electrical Fire
  • Room Infestation
  • Battery Discharge
  • Power Line Shock
  • Bzzt!
  • Generator Failure
  • Pipe Burst
  • Structural Collapse
  • Structural Weakness Detected
  • Earthquake
  • New Grant
  • Stipend Received
  • Bankruptcy Declaration
  • Site Delivery
  • Lost Shipment
  • Delivery Delay
  • Superstition
  • Beauty Hype
  • Volunteer Shortage
  • Unexpected Volunteers
  • Research Proposal
  • Experiment Success
  • Experiment Failure
  • Research Breakthrough
  • Bad Hire
  • Overqualified Candidate
  • Hiring Freeze
  • Stray Researcher
  • Cave-in
  • Staff Strike
  • Food Poisoning
  • Catering Mishap
  • Medical Emergency
  • Sudden Collapse
  • Work Anniversary
  • Inspired
  • NPC’s Birthday
  • NPC Celebration
  • Neighboring Facility Fund Request
  • Category C Transfer Request
  • Raid
  • Mental Break
  • Medical Recovery
  • Pay Rise Request
  • Drain Flood
  • Bailed

Phew! Quite a lot. Didn’t take too long to implement them all and a lot of them could be improved further. I have probably also left out a few from this list too! It would be too much to go into detail about all these events so it is something you’ll have to experience yourself wink

You can see what the event messages look like with the various images below:

Game over #

The full stop with finishing the gameplay stories in its entirety was game over conditions, of which there are 3: Nuke game over, employee dead/missing game over, bankruptcy game over. You can see below:

Main menu #

To close off the meat of this Forensic Friday, I’ll show you some work I’ve been doing with the main menu of the game. A lot of it is centred around selecting storytellers and generation settings. I’ll walk you through it.

First, you choose a scenario. The pre-alpha will only contain one, but I’ve included the ones we’ll have in the future for completeness’ sake.

Then you pick a storyteller. The pre-alpha will only have 1, but we have 3 planned for the first alpha build, and potentially up to 5 by the time 1.0 hits! You can choose the difficulty setting which scales up the difficulty of events you get. We’ll eventually have the option to make difficulty adaptive which will definitely help keep challenges balanced and players in a flow state during play.

Lastly, you get an overview where you can name your save and begin play! Awesome!

📣Dillan

Options menu #

The options menu is the kind of task where the ultimate goal is that a person only has to use it minimally / hardly ever! However, it definitely needed doing, so we have it now!

It is just a JSON file, so it’s possible to add extra menus and features quite easily from a modding perspective, as well as set values manually if launching into the game is too much effort! We’ve had a couple oversights such as a “reset defaults” option, but it’ll be trivial to add in the coming week.

📣David

Sounds (Keep your eyes peeled next week!) #

Next Forensic Friday (which will likely be in exactly a week), we’ll go over all the sound design we have done for the game in a very non-typical Forensic Friday which will be a video? Yep, just a video. Very casual video in fact. Hopefully a lot better than the videos we tried to make a few years back. I am tempted to save my embarrassment but we’ll keep them up just for historical sake.

📣Dillan

Case closed #

I hope you’re still with us after all of that! It feels like we’ve been saying this forever, but the finish line is within literal touching distance and it’s incredibly exciting! Maybe we didn’t jinx ourselves as we thought in Forensic Friday 62 :D

Thanks to everyone for the support as always, whether you joined our community this week, or have been painfully watching us stumble around for years, we appreciate all the interest!

We’ll do our best for more regular updates, but as long as the game is making progress, that’s the most important thing. In the meantime, have a good week/month/year/decade, and we’ll catch you for the next Forensic Friday at another point in time in the future!

Case Closed.
The Team
Plasmarc Studios

PS. David here, new main menu background! Neat! Credit to Alex Cockshott