Signal Nine Dev Diary #1: City Simulation

 Dev Diary, Signal Nine, Text-Based Games  Comments Off on Signal Nine Dev Diary #1: City Simulation
Jul 252020
 

A key aspect of cyberpunk is the idea that the main character is just one minor player in a very large setting. There are lots of other people around and every one of them has a story, even if you don’t necessarily ever learn it.

One of our design goals for Signal Nine is to create this feeling that everyone, not just you, has a part to play in the world. Also, in terms of game mechanics, certain systems will benefit from involving non-player characters with knowable and consistent identities.

In other words, our goal is to simulate an entire city. At the same time, we want to avoid the overhead and bloat that could result from an overcomplicated system. So we’ve built our city out of basic building blocks — each simple by itself, but creating complexity when combined.

Buildings

Buildings are entities unto themselves with their own individual characteristics. They may be residential or commercial, office buildings, factories, or warehouses, or buildings for city services. There are also arcologies, large buildings that are essentially self-contained ecosystems, containing living space, food, places to work, and everything else needed to live.

In terms of mechanics, buildings represent not just a collection of rooms but may also contain things like apartment complexes and other businesses. These happen to be our next building block!

Businesses

If you’re familiar with Star Conquest or similar text-based games, you’re used to stores just being rooms that seem to magically dispense items. Signal Nine is a little different in this regard, in that many stores will not operate unless staff are present. Of course, with such a healthy night life, most places are open twenty-four hours a day.

Stores have a few different types of behavior. Some will simply let you buy an item immediately much like you’re used to, with the clerk just there to passively complete the sale. Some will let you examine and carry around the merchandise before you complete the purchase. And then there are restaurants, where food will be prepared and then served to you.

Of course, stores and restaurants are just a couple of examples. A city has all sorts of activity going on in it, and our business system makes it easy to define all of these different locations and functions.

So how do businesses know who they want and when they want them? Businesses create jobs!

Jobs

There are several things that jobs help define: location, as in where you go to work; shift, the stretch of time you are there; pay and the social class your wage allows you to enjoy; and behavior, or what you do while you are at work. A job is essentially a role to fill at a business, and the same job may be performed by different people over several shifts. Each job for each shift is essentially a slot that someone can fill.

Many jobs are quite basic. For example, a store clerk’s job is really just to go to the store and stand there until their shift is over. Others can be much more complex. For example, while a beat cop’s job is technically at the police precinct, their job behavior will be to patrol the streets, and new tasks may be added dynamically based upon what they encounter.

This brings us to the simulation’s final basic component: NPCs.

Non-Player Characters

The city simulation generates an NPC for each unfilled job slot. This covers everything from low-level employees on subsistence wages all the way up to powerful megacorp CEOs. In an abstract sense, even things like being unemployed and homeless can be a job, in that there is no reason not to use the same system to generate and define the behavior of all sorts of NPCs.

NPCs have unique appearances and may even have cyberware. They wear certain styles of clothing depending on their social class and personal taste. Just like a player, they choose a place to live based on what they can afford — you’ll be living alongside them. They also have a need for leisure, and will visit a place that appeals to them in their off hours.

As an example, meet Humberto Henderson. He’s a 47-year-old American citizen who has residence in The Sprawl. He works at China Tom’s, a noodle bar franchise typically worked by one employee per shift. This particular noodle bar is in Gray Acres Arcology, a large concrete monolith of a building. Humberto, the poor soul, also lives in the same building, up in Apartment 33. It’s a small place, but he’s single, so it’ll do. He’s an expert at customer service and has also picked up a lot of street knowledge in his line of work. In his off time, he likes a drink as much as the next guy, but being a sole proprietor of a popular franchise, his income also allows him to partake in some finer shopping now and then.

As you can see, each NPC will appear to have his or her own little story, thanks to a system of procedural generation that keeps the details consistent. Humberto will probably never be at the forefront of any plot, but he’ll be there in the background doing his everyday activities, and what he’s up to will make sense in his implied story. Humberto was picked at random, but every NPC will have these details. NPCs can also generate as roommates, romantic partners, or spouses of existing NPCs. Along with their coworkers, this gives them a web of relationships, something we’re likely to expand on as the system develops.

Why do all this? Because sometimes it’ll be important! Imagine some middle manager has a key to a place you need to get into. Rather than breaking in and fighting through security, your decker can hack the guy, find out where he lives, and surprise him where he sleeps. Scenarios like this can only work if the NPCs have identities, addresses, and lives.

Putting It All Together: The Scheduler

The activities of non-player characters will often appear to be random and spontaneous, but behind the scenes, it’s all predetermined like the spinning of the Fates! In order to minimize overhead, what the NPCs will be doing minute by minute for the next day is worked out all at once in a schedule bake that takes place in the wee hours of the night. While it sounds boring and not very spontaneous at all, this can also help to ensure that exciting events take place: make sure someone is in this dark alley at the same time as this thief, and then this detective will be investigating the scene two hours later!

Of course, the system also leaves room for dynamic events. If a player is shot in the street, their favorite private EMT service can dynamically respond, traveling to the scene and trying to save their life. If combat erupts, NPCs will certainly be reacting to that rather than slavishly keeping to their schedule, and once they’re safe, they’ll attempt to resume what they’re meant to be doing. The daily baked schedule simply sets the scene, letting background events play out with minimal overhead while other things happen in and around them.

Future Development of the City Simulation

What’s been described here so far is already a finished system, aside from some of the more specific job behaviors. And it is good enough for alpha and beta tests; we don’t want to be knee-deep in luxurious feature bloat when there are still core systems to complete. But once higher priority tasks are completed, there are planned aspects of the city simulation that we’re eager to develop:

  • Children. Some of the NPCs should have kids! A childless world will seem strange.
  • Needs. While NPCs visit food service establishments while seeing to their leisure need, they don’t need to eat as such, and don’t require much of anything else. We would like to make their behavior more organic by giving them more needs they’ll seek to fulfill, even doing things like carrying snacks or stocking their home with meals.
  • Individualizing. Similarly, we would also like NPCs to be able to buy and place furniture at their home, buy changes of clothes that fit their style, and so on.
  • More detailed behavior. NPCs, when they go home, pretty much just stand there as if nobody will be watching them, which is fine for now, as mostly nobody will. Eventually, we would like to see them doing things like visiting friends, cooking meals, watching television, and so on, so that if a player does bust into the apartment, spy through a window, or hack a camera, the NPCs are doing things that make sense. With the schedule bake system, even things like this can be done with little extra overhead.
  • Relationships. NPCs should track who they know, what type of relationship they have, and how much they like those people, and this should influence their behavior.
  • Life changes. Details like an NPC’s job, living situation, whether they’re romantically entangled, and so on are largely determined at the time of generation and then remain static. We would like to see these things be able to change over time: promotions, divorces, new relationships, and so on. Of course, this will tie closely into relationship tracking.

And that concludes our first dev diary! We picked this topic because it gives a broad overview of the city you’ll be playing in: streets, buildings, and residents! We’ll plan on another soon, taking a look at a different core system, giving some insight into the game’s design and what you can expect when we’re ready to open it to players.

 Posted by at 12:44 am