ColePowered Games Ltd.
  • Navigation
    • Shadows of Doubt
    • Concrete Jungle
    • Older Projects
    • Jobs
    • Bug Report/Support
    • Contact
  • Search Icon
Search Icon

ColePowered Games Ltd.

The Game development adventures of Cole Jefferies.

Shadows of Doubt DevBlog #30: The Top Shadows of Doubt Development Challenges Part I

Shadows of Doubt DevBlog #30: The Top Shadows of Doubt Development Challenges Part I

March 4, 2022 colej Comments 2 comments

Shadows of Doubt is a detective stealth game set in a fully-simulated sci-fi metropolis! There’s been a murder and it’s up to you to solve it by any means necessary, with the condition that you keep a low profile. A unique mix of procedural generation and hand-crafted design enables every room of every building to be explored. Be sure to wishlist on Steam, join our Discord or read previous dev blog entries here!

Hello everyone! Welcome to a fresh new edition of the Shadows of Doubt dev blog. This month I’ve put together a list of some of the most challenging aspects of creating the project so far. I should probably note this doesn’t include challenges for writing, voxel modelling or audio work, ie the stuff I largely don’t do. Perhaps we’ll visit some of those in future blogs with the relevant team members. This one is more about my role, which is mostly design, coding and project management. I’ll also say that just because these bits have been difficult, it doesn’t mean they haven’t been fun to work on; in fact, they’ve provided some of the best learning experiences of the project so far.

Lighting

Shadows of Doubt is a procedurally generated game. That’s great and everything, except when it comes to the technical challenge of lighting. Most non-procedurally generated games feature baked lighting (and not just lighting actually, it means you can do all sorts of yummy baking). Baking essentially means precalculating tricky things into a bunch of data the game can read when you play. Much faster than trying to figure out all those calculations in real-time.

Lighting is a big one as it means you don’t have to ask the game engine to bounce light everywhere when playing. Although it’s common for a game to feature a mixture of both baked and real-time lights anyway, the nature of the levels where nothing is predetermined means Shadows has to use 100% real-time lighting: That’s a big performance hog.

So what are the solutions?

Simply use fewer lights. If calculating all this is expensive, then use less of them right? Fortunately, having fewer lights creates some nice heavy shadows which kind of lends quite well to the noir genre. There are a few cases where this is tricky, however; mostly the street scenes. In this scenario, however, I’ve come up with a way to ‘fake’ having a bunch of ambient lighting. Over every street is a large area light, which casts a colour down on the street. This is designed to mimic a mixture of all the ambient lights in the street. Every object that spawns in the street (for example a red paper lantern) can alter the ambient colour of the overhead area light slightly. It’s not perfect, but this method helps to light up the street with additional ambient light.

Limit lighting and shadow distance. Fortunately, in Unity you are able to set distances for lights to be active. This isn’t my favourite compromise as it means the lights essentially turn off as you reach a certain distance, but it is a good ‘catch all’ method for making sure we don’t have too many lights shining at once.

Another Unity thing is light layers. This allows you to make sure lights are only cast on certain layers (any object in the world can be part of a layer). Using this, I can make individual buildings have their own light layer. Therefore ensuring that lights within an interior largely only affect things inside a building and vice versa. I’m not actually sure how much this is helping performance, but I imagine I’m at least saving the engine some amount of calculation by cutting off a chunk of active lights this way.

Object Handling/Saving/Resetting

So we have this world populated by literally 1000s of props, most of which can be moved, damaged or destroyed in some way. That’s not necessarily a problem for a modern game engine, but things get complicated when you think about how you want them to behave.

Lots of things might get moved around by the player (say the player trashes an apartment or a bar), we don’t want those objects to stay in their trashed positions forever; as this is a simulation we would probably want the AI to put things back how they were eventually, or at least imply that and have everything be reset at some point. That’s great then; tell things out-of-place to get reset to their original positions after a certain amount of time. Well, what about litter? What about things the AI have deliberately moved for good reason? Wallets? Purses etc? We actually don’t want everything to reset. In order to solve this problem I had to come up with a ‘relocation authority’ system; or a system dictating special cases on when we want items to reset and when we don’t. Generally, we have to look at the object’s owner; they have the ‘power’ to set the spawn locations of objects, so they can move them. There are plenty of special cases, however; such as if an NPC steals an item and positions it in their home or elsewhere. In short this is a bit of a special case minefield. Yay.

Then there’s save data. Due to the nature of the game, we can’t always dictate what objects are valuable sources of information for a case. Therefore when we save a game, we have to save everything. Not just objects the player is carrying or is in the immediate vicinity of, but every item in the world! Ouch.

In the next dev blog I’ll continue ranting about stuff! Stay tuned.

Twitter
Follow
Facebook
RSS

Development Blog, Police Department Game, Shadows of Doubt

Post navigation

NEXT
Shadows of Doubt DevBlog #31: An October Update
PREVIOUS
Shadows of Doubt DevBlog #29: 2021 Wrap-Up

2 thoughts on “Shadows of Doubt DevBlog #30: The Top Shadows of Doubt Development Challenges Part I”

  1. Avatar Max says:
    May 31, 2022 at 6:37 pm

    The game looks absolutely incredible! It is the game I’ve always wanted since I played L.A. Noire and Disco Elysium.

    Is there any plan for early access or a patreon?

    Reply
  2. Avatar popnlocke says:
    June 1, 2022 at 7:56 am

    Great job and insight. Would love to know more about the team working on the different aspects/systems of the game.

    Reply

Leave a Reply Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About

Indie Games developer, currently working on detective simulator game ‘Shadows of Doubt’. I also made Concrete Jungle.

Twitter
Facebook
Instagram
YouTube
IndieDB

Development Blog

  • Shadows of Doubt
  • Concrete Jungle

Previously on ColePowered…

  • October 2022 (1)
  • March 2022 (1)
  • December 2021 (1)
  • October 2021 (1)
  • August 2021 (1)
  • July 2021 (1)
  • June 2021 (1)
  • May 2021 (1)
  • January 2021 (1)
  • October 2020 (1)
  • July 2020 (2)
  • March 2020 (2)
  • January 2020 (1)
  • December 2019 (1)
  • November 2019 (1)
  • September 2019 (1)
  • August 2019 (1)
  • April 2019 (1)
  • March 2019 (2)
  • February 2019 (3)
  • January 2019 (1)
  • November 2018 (1)
  • October 2018 (2)
  • September 2018 (1)
  • August 2018 (1)
  • July 2018 (3)
  • June 2018 (2)
  • April 2018 (1)
  • August 2017 (1)
  • May 2017 (1)
  • March 2017 (1)
  • January 2017 (1)
  • December 2016 (1)
  • September 2016 (2)
  • August 2016 (1)
  • September 2015 (3)
  • August 2015 (1)
  • July 2015 (1)
  • June 2015 (3)
  • May 2015 (4)
  • April 2015 (4)
  • March 2015 (4)
  • February 2015 (4)
  • January 2015 (4)
  • December 2014 (5)
  • November 2014 (3)
  • October 2014 (3)
  • August 2014 (1)
  • July 2014 (1)
  • June 2014 (1)
  • May 2014 (2)
  • March 2014 (3)
  • September 2013 (2)
  • July 2013 (3)
  • June 2013 (3)
  • May 2013 (2)
  • April 2013 (4)
  • March 2013 (4)
  • January 2013 (1)
  • December 2012 (1)
  • November 2012 (2)
  • October 2012 (1)
  • August 2012 (1)
  • July 2012 (2)
  • June 2012 (2)
  • April 2012 (4)
  • March 2012 (2)
  • February 2012 (3)
  • January 2012 (3)
  • December 2011 (2)
  • November 2011 (4)
  • October 2011 (2)
© 2023   Copyright. All Rights Reserved. Designed by Freepik