A Sprawling Videogame City Filled With Buildings Made by Generative Algorithms




Game designer Cedric Kerr had a brilliant idea for a video game called Project Sprawl where specialized teams of players would attempt to pull-off high-stakes heists in a stylish, unscripted, neo-noir city governed by emergent NPCs. Imagine a cross between Ocean’s 11, Grand Theft Auto, and 1980s paper-and-pencil cyberpunk RPGs and you’ve got the rough outline. The only problem was this vision required a sprawling CG city populated with 3-D buildings to keep the gameplay fresh.


Kerr’s options were to painstakingly model a city from scratch or leverage expensive stock models of homogeneous high-rises to fill out a skyline, but both solutions were non-starters for a time-strapped indie dev. Instead, Kerr decided to develop software that could auto-generate complex cities, from street maps to skyscraper architecture, for his characters to inhabit.


His goal was to create logical, but not predictable, levels like those found in procedurally generated 2-D games. The solution to Kerr’s urban planning problem came in the form of Unity, a game engine often used to design game worlds from the size of a room to entire solar systems for AAA console games. “I had to build all the geometry algorithms from scratch,” says Kerr. “Beyond that, using Unity gives me a lot of flexibility.”


The result was a set of building blocks that could be pulled and stretched in any direction with facades that would update in real time. Kerr could quickly sketch an outline of a foundation and in seconds have a unique building automatically populated with windows, doors, and other architectural details. “The idea is that each building is decomposed into a set of rules forming a grammar that describes each stage of the process,” says Kerr. “These rules are hierarchical so a building is made up of facades, facades are made up of floors, floors are made up of tiles, tiles contain windows and so on.”


While the buildings can scale dramatically, the result is always rectilinear. “The constraints actually come from the implementation of the generation system which currently can only handle buildings that consist of right angles,” says Kerr. “Combined with the dystopian nature of the game’s setting made the blocky, imposing forms of the Brutalist style an obvious choice.” This is only a temporary constraint and Kerr fully expects to explore a broader range of architectural styles as time permits.


Despite the limitations, Kerr has imbued his system with architectural intelligence. Stretch a building too far horizontally, and the homogeneous facade is split in two to create a more striking silhouette. He even took care to add historically accurate sky bridges to span the gaps and slightly exaggerated cantilevers to make the buildings feel more accurate.


Project Sprawl is in the early stages and has no announced release date, but Kerr has set up a development log where those interested in neon-infused capers or programmatic mass customization can follow his progress.



No comments:

Post a Comment