Chunks and World Generation
Streets of Rogue 2's open world is built from handcrafted chunks stitched together at runtime. Twelve chunk sizes, a hired modder-turned-builder, and a roadmap for player workshop tools all feed the system.
Loading...
Created by hexbloom
1 revisionsIt lacks sufficient information and needs to be expanded. You can help by adding more content.
Streets of Rogue 2 is an open-world game that combines procedural generation with handcrafted building blocks. The developer has described the approach as procedurally generating maps while handcrafting the individual pieces, then stitching those pieces together at runtime. The pieces are called chunks.
A chunk is a section of the Streets of Rogue 2 map: a building interior, a park, a road intersection, a dungeon room, or any similar discrete piece of the world. Chunks combine to form regions, and regions combine to form the procedurally generated island nation that makes up the world.
Twelve chunk sizes are currently supported. The first game shipped with three. The size hierarchy works as follows.
Scale | Description |
|---|---|
Smallest chunk | 8x8 tiles |
Normal chunk | 16x16 tiles |
Largest chunk | 64x64 tiles (the size of the smallest region) |
Smallest region | 4x4 normal-sized chunks |
Largest region | 16x16 normal-sized chunks |
Smaller chunks were added in alpha demo patch 29b to help fill out cities without overloading them with insignificant buildings, addressing complaints that earlier alpha builds left cities feeling too open.
Chunks are created with a greatly expanded version of the level editor that shipped with the original Streets of Rogue. The editor includes quality-of-life features such as automatic orientation of locked doors, context-aware object variants (the editor will give a chair the right look for the chunk type it is placed in), and randomization controls for object damage (a pristine table in the President's office versus a damaged table in a drug den). For quest objects, the level designer drops a marker and the game populates it at runtime with a chest, a safe, a kidnapped person, or whatever the quest requires.
When designing chunks for missions, the team aims to provide multiple ways to approach a quest: a vent for syringes, a PC to hack, windows to break, and so on. The material a building is made from (wood, brick, steel) affects how easy it is to break in or ram through, with sturdier materials concentrated in higher-tier regions.
The developer has framed an open question for every piece of the world: 'is it worth spending time writing a system to generate this procedurally, or would the results be better, and potentially more efficient, if I just made this myself?' In Streets of Rogue 2 the answer leans heavily toward handcrafted chunks for individual pieces, combined with procedural layout for the world that contains them.
Procedurally-generated dungeon maps composed of smaller chunks are also planned, and much of the programming for them has been completed. The developer has chosen to hold off on further development of procedural dungeons until after the Early Access launch so the game can ship.
Dungeon types confirmed in dev posts include Mayor's offices (huge multi-floor chunks that double as boss-encounter sites), cannibal hideouts, house basements (sometimes with luxurious touches like a swimming pool), and cave dungeons with caves featuring overhauls to diagonal walls and the addition of cave lakes. Sewer and crypt dungeon environments have also been shown. See Dungeons for the dungeon catalog.
World generation versioning was added in alpha demo patch 29. Each saved world records which version of world-gen rules it used, so the game can update world-gen without invalidating prior saves. Players can also choose which world-gen version to use when starting a new game.
Cities are denser in current builds than they were in earlier alpha versions, thanks to smaller filler chunks. Dirt walking paths now properly connect to concrete roads and to unique-chunk paths, and unique chunks themselves can extend dirt paths from one chunk to another for more natural connections. Biome transitions (forest, sand, sewer, crypt, urban) have received repeated patch work to smooth out edge tiles and texture seams.
All the tools the team uses to build chunks are intended to become accessible to the community in the future via the player-facing level editor. Players will be able to create new chunks and entire levels for the game, as was possible in the original game. Workshop support is planned to roll out at some point after the Early Access launch.