Project Highrise – Architect’s Notes for July 8, 2016

by matt v, July 8th, 2016

“Your living space is not defined by your real needs. It is defined by your economic situation.”
– John Macsai

This week is all about a residential tower. We’re working on tuning the scenario mode of the game and this is the result of a partial play through of one of the apartment building scenarios. Clicking on any of these images will open a giant version in a new tab. Enjoy!

First let’s start with a zoomed out view of the entire tower at night.

sss-7816_01

If you click on the larger version, you’ll notice one of the main things that differentiates an apartment building from an office building – there are people in it at night! Let’s get a bit closer on some of them in the early evening.

sss-7816_03

This is mid-evening in some of the building’s studio and one-bedroom units. We’ve got residents making dinner, relaxing and of course spying on the neighbors across the street. Let’s go forward in time a bit and upward in the tower.

sss-7816_05

Here it’s the middle of the night. Most people are already in bed and the few night owls that stayed up too late are also turning in.

sss-7816_02

And now it’s a beautiful morning. Residents are heading out for another day at the office while those that work in the building are arriving.


Project Highrise – Architect’s notes for June 30, 2106

by robert, June 30th, 2016

God is in the details.
Ludwig Mies van der Rohe

A very fast overview of our fast AI
One of our main goals in Project Highrise has always been to make buildings feel alive, filled with people whose daily comings and goings create an irresistible bustle. In addition to the aesthetic feel of that, the people’s daily activity drives the economy of the building.

Our “living building” objective requires a large number of people. We gave ourselves a performance goal: the game needed to be able to run with 1000 NPCs at 60 FPS on a reasonably recent desktop-grade personal computer.


1000npcs
1,000 NPCs at 60 FPS. Click to make the madness larger.

This posed an interesting implementation challenge. We’re a tiny team with only one programmer whose job is not just AI, but also to build the entire rest of the game as well. So we needed a system that was very fast to build, required very little ongoing maintenance once it was built – and primarily, helped us reach our goal.

We wanted to have our people live very stereotyped, routinized lives – following a predictable daily routine that will give rise to that feeling of a bustling highrise building. We also wanted to have a lot of designer control over those daily routines, to enhance the fiction of the game – so that worker and resident behavior would match their socio-economic status, but at the same time, have a lot of variety and quirks for “flavor”.

This is called an “action selection” problem, which is something that game character AI has to do all the time: figure out “what should I be doing at the given point in time?” In Project Highrise, we built this in layers. First we build individual actions (like “go somewhere” or “sit down”), which are simple and atomic. We then assemble those actions into stereotyped scripts, which are descriptions of simple daily activities such as “going to the office”, “going to a sit-down restaurant and sitting down to eat”, “processing a repair request from a tenant”, and so on. Finally, those scripts are then be bundled together into various daily schedules, with simple logic for picking the right script based on current conditions such as time of day, and equally simple “working memory” (which remembered, for example, where the character wants to go, where their current job is, where their current home is, and so on). In terms of computational cost, this selection process is trivially inexpensive.

So an office worker at a basic office only has a few things to do in their daily schedule:

{ from 8 to 16.5 tasks [ go-work-at-workstation ] }
{ from 16.5 to 8 tasks [ go-stay-offsite ] }

From 8 am until 4:30 PM. they go do work at their office. Then at 4:30, they go “offsite” (by that we mean “home”). While at the office, there could be several things that could impact their routine. For example, if the office is run down, the worker will react negatively. If there are too many stairs they have to climb to get there, that will make them upset. And there are many more things that might impact the happiness or unhappiness of the worker.

They also can have a series of one-time actions that are possible, so for example the basic office worker that we looked at above also has this:

{ at 12 prob 0.5 tasks [ go-get-lunch ] }

That means that at noon, there’s a 50% chance that the officer worker might want to go get lunch. So is there a place to get lunch? If there is, great! The worker will head there and buy lunch, and the restaurant will benefit from being patronized by a customer. If there’s no place to have lunch or the lines are too long, then the worker will get unhappy. We can control all of that behavior by simply adding the one-time event of “go-get-lunch” into the daily schedule.

We can then begin to chain these things together to make more complicated schedules that have more complex outcomes. Let’s look at how we schedule an resident who works out of the apartment in a home office:

{ at 10 prob 0.5 tasks [ go-get-coffee ] }
{ at 10 prob 0.25 tasks [ go-get-breakfast ] }
{ at 13 prob 0.25 tasks [ go-get-lunch ] }
{ at 16 prob 0.1 tasks [ go-run-errand-2h ] }
{ at 19 prob 0.5 tasks [ go-visit-retail ] }
{ at 20.5 prob 0.25 tasks [ go-get-dinner ] }

This is a much busier day than our office drone. There are probabilities that they’ll want to at various times of day get a coffee, get breakfast, get lunch, go shopping and get dinner. Plus maybe a few errands here and there.

These schedules represent the ideal routine for each resident or worker. Players must try to accommodate these routines. If they succeed, the people will be happy. It’s when the routines break down that unhappiness begins to seep in. Unhappy apartment residents may soon seek a new home. Unhappy office workers may contribute to an office moving out.

With the action selection question answered, we moved on to pathfinding. Once our (potentially) hundreds of people had decided what to do, how would they go there without causing a huge hit to performance?

The game takes place on what is essentially a 2D grid – a cut-away side view of a building, which can be, say, ~100 stories tall and several hundred tiles wide , depending on the scenario. A naive implementation of A* pathfinding on the raw grid representation quickly turned out to be insufficient, with hundreds of NPCs trying to navigate the grid at the same time.

So we reformulated pathfinding so that, instead of using a simple grid, we built a specialized compact graph representation, which had support for the user changing the path graph all the time (as they built, altered or expanded their highrise). Based on the game’s design, the pathable space divided up into distinct floor plates, which were contiguous sequences of tiles on the same floor, such that the character could do a straight-line movement inside a floor plate. Additionally, each floor plate was connected with those above or below it via stairs, escalators, or elevators, together known as connectors. Floor plates and connectors became nodes and edges in our high-level graph, respectively, and movement inside each floor plate became trivial.

paths
A path! A path! Click for larger.

This search space reduction was significant: for an example of a dense building 100 stories tall by 150 tiles wide with four elevator shafts, we reduced the space from 15,000 graph nodes to only 100, with 400 edges between them. This made pathfinding performance fast enough that we could still just run A*, but on a much more compact data model.

Finally we wanted to take care of the worst case scenario, which is when a lot of people accidentally all want to perform pathfinding at the same time (imagine a movie theatre, when the movie ends and everybody wants to go home). If this happens on a single frame, even an efficient pathfinding system would have a lot of work to do – and in order to maintain 60 FPS, we must limit each frame to take ~16ms in order to prevent framerate hiccups. So we resolve that by implementing a simple job queue system with a limiter, such that in the case of that worst-case scenario, we spread the queue of pathfinding requests over multiple frames, instead of doing them all at once.

And there’s a very fast overview of our fast AI! Next time we’ll talk about the design side of things, and the kinds of design variety that we can get out of this system.

(PS. If you want to read more about our AI, we’re going to have a much more detailed paper coming up in the upcoming book “Game AI Pro 3”: http://www.gameaipro.com/ )


Project Highrise – Architect’s Notes for June 23, 2016

by matt v, June 23rd, 2016

Architecture should speak of its time and place, but yearn for timelessness.
– Frank Gehry

It’s a day in the life of a Project Highrise skyscrape in animated gifs! Click on any of them to open larger versions in a separate tab or window.

Over the course of a day, you’ll see a lot of varied activity as residents, workers and visitors go about their lives. Let’s start in the morning. Here we’ve got a few latecomers getting to work as well as some visitors arriving for some very important business appointments.

morning

Some say that breakfast is the most important meal of the day. But if you’re the developer of an office building in Project Highrise, that honor is definitely reserved for lunch. Make sure that there are enough restaurants to meet the demand at the lunch rush!

lunch

We leave you this week with the serenity of late night. After the workers have gone home and the janitors have done their work, the only sound audible over the din of the city is the soft splashing of the fountains. Soon another day begins anew in the tower.

night

Next week we’ll get technical about how we got all of those people moving about in the tower.


Project Highrise – Architect’s Notes for June 14, 2016

by matt v, June 14th, 2016

Less is more.
– Ludwig Mies van der Rohe

It’s time for some show and tell in this week’s post! Click on any image in this post to view a larger version of it.

This post starts off with a quote that has fewer letters than the name of the man who said it. Project Highrise visual design was highly influenced by Mies’s architecture and design philosophy. We’re based in Chicago where he spent the more prolific part of his career and there are many examples of his work in our fair city.

Recently, we’ve been working on several visual refinements to the game. First of all, we’ve implemented a new outer skin to the building. When designing the visuals for the exterior of a building in Project Highrise, we took Mies’s maxim quoted above to heart.

0512-03

A key tenet of the architectural style championed by Mies is that the building’s structural elements should be sufficient in terms of decoration. We tried to follow that when creating the outer skin of our building. So the windows are simply framed by structural columns and the roof decoration is limited to the ventilation shafts.

Moving downward to the subterranean portion of a building….

0512-02

There are also new support pylons that act as the foundation of your skyscraper. If you’re building an 80 story tall building, it’s important to make sure it’s well-anchored in bedrock. So we also included bedrock which you can see in the bottom of this image.

In an earlier Architect’s Notes, we talked about utilities and the pipe and wire infrastructure of a building in Project Highrise. In this rainy day image, you can see the conduit that brings electricity, telephone, cable TV, water and gas service into your building from the city’s utility grid.

0512-08

Also, if you’ve ever seen one of Mies’s skyscrapers in person, one of their more striking features is their soaring glass-encased lobbies. One of the finest examples is the IBM Building here in Chicago. So of course we had to have glass lobbies to Project Highrise.

0512-04

And finally, we’ve added clouds and did some refining of the day and night cycle. So we’ll leave you with an animated gif of a day swiftly rushing by. Click here or on the image to view a higher quality movie clip.

sunrise-sunset


Project Highrise Steam Page Announcement

by matt v, June 2nd, 2016

We’ve got some exciting news to share that we figured warranted a break from our regular posting schedule. So, without further ado…

Project Highrise is now in preview on Steam. You can’t buy it (yet), but you can add it to your wishlist and follow it for more updates as we move toward our launch later this summer.

If you clicked through to the Steam page, you might have also noticed that our friends at Kasedo Games have made a teaser trailer video for Project Highrise.


Project Highrise – April 2016 Architect’s Notes

by matt v, April 27th, 2016

Cuius est solum, eius est usque ad coelum et ad inferos.
(Whoever’s is the soil, it is theirs all the way to heaven and to hell).
Accursius

A question we get frequently when people first see Project Highrise is an obvious one when your game is based on building skyscrapers: “How high can I build?” On the technical side of the game, that’s mostly up to you as the player – how tall can you or do you want to build?

But it’s also more complicated than that, because city laws and rules also impact you as tower builder and manager. That opening quote in Latin forms one of the core tenets of modern property law – that if you own a piece of land, you own everything that’s above it and below it. However, that doesn’t mean that you’re completely free to do with it as you please. Cities set rules, limits, regulations and statutes that govern construction of everything from backyard sheds to gleaming towers of steel and glass.

sss-423-02
The city regulates how much tower you can build. Click the image for larger.

Almost as soon as steel frames liberated builders from the rather modest height achievable with masonry load bearing walls (see the Monadnock Building building in Chicago for the limits of masonry walls), cities began imposing limits on how tall these new buildings could rise. In 1920, that was 264 feet in Chicago and between 600 and 700 feet in New York.

In addition to the limit on height, there is also the concept of air rights. These are a set of rules and calculations that permit a given number of square feet to be built on a lot based on its dimensions and location. The combination of these two things largely defines how much tower you can build.

As an aspiring developer in Project Highrise, you’ll have to be keenly aware of those limits as you plan and construct your tower. You will only be able to build a set amount of floor space, and up to a certain height. So do you go as tall as possible and maximize for height? Or do you max out your floor area first and building height second? Maybe you build a large base and a skinny tower (or two)?

ss-heightcap
This large building is nearing its city-imposed limit on height. Click the image for larger.

In Project Highrise’s campaign mode scenarios (and to a more limited extent in sandbox), you’ll be confronted with building lots of many different configurations and sizes. Some come with their own special city limitations for you to work with (or around). Your challenge will be to create a prestigious, prosperous tower within the constraints of size, zoning and other civic constraints.

Of course, there are ways to massage those rules in your favor. You can hire consultants that can use their influence with City Hall to allow you a valuable exemption. You can agree to build some public space in exchange for an increased allocation of air rights. Often the city will also be looking to encourage specific types of construction – tall residential towers or expansive office buildings. You should use these initiatives to your advantage.

A successful developer will have to manage more than just the tenants in the building, but a whole host of external pressures. More on those other external pressures next time.


Project Highrise – March 2016 Architect’s Notes

by matt v, March 30th, 2016

When it comes to getting things done, we need fewer architects and more bricklayers.
-Colleen C. Barrett

In previous notes, we’ve met workers who will help you build and run your tower – such as construction workers and service workers. Today we’d like to introduce you to your management team – the consultants who will assist you with various aspects of building management and improvement.

Good building management is key to becoming a highly prestigious, sought-after address. To project an aura of sophistication and modernity, and to improve the aesthetics of your building, you will want to hire an interior designer who has the right connections with all the right galleries. Good relations with City Hall will also prove invaluable, and you should hire a lobbyist who has the ear of City Hall to arrange for certain lucrative concessions or exceptions from pesky city regulations. Finally, you should optimize your building through experienced building management. From hiring more construction workers to increasing service capacity, a good building manager can make things in your building happen more efficiently and with greater speed.

buidling-manager-500
Building managers managing a building.

These consultants are essentially management mercenaries. But while they’ll work for cash, they won’t work for just anyone. In Project Highrise, you need to prove that you have enough cachet to attract them and their services. In other words, you need to have influence.

So, how do you get it? Influence comes from having important tenants in your building, such as big corporations or rich residents, and keeping them happy. The more important tenants you have, the more influence you will have, which in turn will make your building an attractive place for consultants to ply their trade. Once you have the right management team in place, you can then begin to parlay your accumulated influence into various building improvements, amazing artworks, or valuable exemptions to city regulations.

After the interior decorator has decided to join your team, you’ll be able to get those sought-after pieces to adorn your lobbies and hallways. This will greatly increase the prestige of your building.

aesthetics-500

Or how about a metro station in the basement of the building? That would certainly increase the value of your building for current and prospective tenants. Your lobbyist can work on leveraging your influence with City Hall to make that happen.

civics-500

Extra construction workers would also make everything go faster – from building expansion to moving in tenants. Your building manager consultant can arrange for that.

building-500

World-famous towers need world-class management. Influence and a good team of consultants will be crucial if you want to create a famous address.


Project Highrise – February 2016 Architect’s Notes

by matt v, February 23rd, 2016

The desire to reach for the sky runs very deep in our human psyche.
César Pelli

This month, we’re taking a quick break from our usual posts to announce some exciting news about Project Highrise.

Exciting News #1
We’re proud to announce that we’re teaming up with Kasedo Games, a division of Kalypso Media, to release Project Highrise. If you’re not familiar, Kalypso is the company that brought us the lovely and wonderful Tropico series of games. While this doesn’t mean that El Presidente will have an office in your tower, it does mean that we’ll have a lot of help from them as we work toward releasing Project Highrise this summer.

You can learn more more about Kasedo and the other games they’ve released or are in the pipeline by visiting their website at www.kasedogames.com. They’re on twitter at @KasedoGames. You can also see the press release about our partnership here.

Exciting News #2
We’re going to be at GDC in San Francisco next month to demo the game. If you’re in the media business and would like to spend some time with us and see the game in vivo, contact Lindsay Schneider at Kalypso for an appointment. And to all of our Bay Area friends, we’ll see you in a few weeks!

Exciting News #3
Project Highrise has got a logo! Eddie Einikis, the artist that created all of the offices and other tenants in the game also created this amazing logo for the game. Pretty neat, right?

logo_v4_coolGray_withStroke
We’ll return to posts about the ongoing development of the game next month when we’ll delve into the beginnings of the game’s campaign mode.  


Project Highrise – January 2016 Architect’s Notes

by matt v, January 29th, 2016

If a building becomes architecture, then it is art.
Arne Jacobsen

350 5th Avenue.
233 South Wacker Drive
30 St Mary Axe
600 Montgomery Street
1 Sheikh Mohammed bin Rashid Boulevard

Recognize any of those addresses? No? Ok. How about these:

The Empire State Building
The Sears Tower
The Gherkin
The Transamerica Pyramid
The Burj Khalifa

They represent the fusion of glass and steel with fame and prestige. In Project Highrise, it’s your job as the architect to add your building to that list. But how exactly do you transform mere plots of land, these anonymous address coordinates, into names recognized the world over? What differentiates an Empire State Building from a nameless point on the Manhattan skyline? In this month’s Architect’s Notes, we’ll examine the features of your tower that bring fame and renown.

As your building grows and becomes more complex, you’ll begin to gain prestige. When you achieve certain population milestones, you’ll see your prestige rise. More people living and working in your building will mean that more people will know about your building.

sss-12916-morning
A high population starts the prestige gains. Click for larger.

When your tower is starting out, you’ll only be able to attract some basic tenants to rent space. These are tenants who aren’t picky about their address and will rent pretty much anywhere, but they also don’t want to pay much. Do you want to attract higher-end and higher paying tenants? You’ll need to gain prestige. Want to attract the headquarters of a famous company? You’ll need to gain prestige. Do you want a fancy French restaurant with curated menus or a chic jeweler to grace your shopping concourse? You’ll need to gain prestige.

While money can’t buy fame in Project Highrise, it can buy famous art pieces – from fountains to paintings to statues. Small artworks will add a minimal amount of prestige: they’re nice pieces for the tenants and visitors to notice as they walk by, but nothing too terribly impressive in their own right. By contrast, large works of art will add significantly to your prestige level. You can project your fame by placing a statue in your plaza or commissioning a famous mural for your lobby. These will not only impress the tenants, but they’ll attract visitors in their own right to come and behold your good taste.

sss-12916-evening
A chic lobby speaks of status and taste. Click for larger.

Prestige will also unlock other avenues of development. There will be many city contracts that will only be available if your building has earned enough prestige. Some building advisors (who can greatly improve the function of your building) will only work with you if you have reached a required level of prominence.

Building up prestige is one way that your tower will go from mere high rise building into a skyscraper recognized the world over. There are other ways to help boost fame, but we’ll save those for another installment.


Project Highrise – November 2015 Architect’s Notes

by matt v, November 27th, 2015

The love of glory gives an immense stimulus.
– Ovid

In addition to the workers and residents that you’ll see day in and day out, your tower will also start to attract visitors from the city at large. Businesses like this newsstand will draw in shoppers to leaf through the latest issues. Once they’re done, they might want to grab a coffee or quick drink while they read their purchases.

ss-112715-04

Also, some of your businesses will begin to draw in clients, patients and colleagues from the city for appointment and meetings. Once the appointment is concluded, they may grab lunch. Or if the meeting wraps up, it may be time to head to the bar to continue discussions over a beer.

If a visitor to your building had a great experience, then there’s a chance their visit will generate a buzz point or two. Once your buzz total reaches a high enough level, you’ll be able to leverage your building’s popularity and notoriety into coverage in the media by launching a campaign.  

ss-112715-02
What’s the buzz? (click for larger)

Media campaigns will last a set period of time and during that time, you’ll be able to reap certain benefits – cheaper construction costs, reduced utility bills or increased restaurant patronage. As you gain experience, campaigns will progress and become more powerful.  

ss-112715-03
Broken elevators are bad news.(click for larger)

So keep a sharp eye on your residents, workers and visitors. Make sure that they can get to where they need to go efficiently. Keep you building in good repair. Ensure that your restaurants and retail outlets aren’t getting mobbed. Put up some nice artwork here and there. You’ll find a happy building is a profitable building.


Older Posts Newer Posts