
We then place Walls around all the Floors. For example: a tile in the desert can spawn either a Bandit, Maggot, Corpse, Scorpion or a group of unwise Bandits warming themselves around an explosive barrel. Enemy type and rarity depends on the area. We just check all the Floors and give them a random chance to spawn some Enemies depending on the current difficulty. The Player is simply spawned on the place we spawned the first FloorMaker.Įnemies can spawn anywhere far enough from the Player as long as there are no chests there. WARNING: The way we did this is very dumb.

STEP 6: placing the Player, Enemies and Walls The amount of Floors divided by 110 is the percentage shown while the game is loading.īecause we still place one more set of Floors after reaching 110, the game usually loads to 101%. We kept that in to show the world we put a lot of extra effort into our games. When a FloorMaker notices there are more than 110 Floors it does one more step and then destroys itself. In our case, the max is 110 Floors per level. Whenever the level is reaching its final size, FloorMakers spawn Experience Canisters.Īfter the level generation is done all but the furthest (with a bit of a random offset) chests of each type are removed.įun fact: When making the animated gifs for this posts we found out that the weapon chests are placed after turning 180 degrees and moving one tile, instead of on the tile of the turn itself. Whenever a FloorMaker destroys itself, it spawns an Ammo Chest. Whenever a FloorMaker turns 180 degrees, it spawns a Weapon Chest.

The way we did this is horrible but effective. We wanted to spawn these in interesting places (mainly dead ends) in the levels, to reward players for exploring.

Usually one of each is found in every area. We have Weapon Chests, big Ammo Chests and Experience Canisters. There are three types of chests found in levels in wasteland kings. If more than one FloorMaker exists, they get an increasingly large chance to destroy themselves, to make sure the levels don’t have too many long hallways heading in different directions.

Sewer for example has a lot of corridors, because we allow it to spawn a lot of FloorMakers. The chance of a new FloorMaker to appear depends on the amount of FloorMakers already active and the area we are in. Every frame a FloorMaker has a small chance to create a new FloorMaker. It turns out he used a very similar technique for his levels! In the Scrapyard there is a 11% chance for 3×3 Floors to spawn, creating little rooms, perfect for interesting shootouts and tight dodging.Īt the Game Developers Conference in San Francisco (we’ll have a write-up on GDC and PAX soon) JW talked to Beau Blyth about his game Shoot First, one of the many inspirations for Wasteland Kings. In the Desert there is a 50% chance for it to place 2×2 Floors. To allow for more interesting gameplay, FloorMakers have a chance to place Floors in a shape. For example, the Scrapyard has no 180 degree turns and thus moves straight forward more frequently, giving it a lot of long, straight corridors. Depending on what area (Desert, Sewers or Scrapyard in this case) it is generating there will be different chances for it to turn 90, -90 or even 180 degrees. Every area starts by creating a FloorMaker.Every iteration a FloorMaker will move 1 tile forward and make a Floor.
