Jump to content
  • Advertisement

Procedurally laying-out regular room props

This is a picture of a regular room. 

Each rooms has a chance to have props with a certain layout.

If a rock is spawn the player can try to break it by exploding it. These can spawn common collectibles like money and such...

There are many different type of layout possible, including a totally random one.

The generator simply picks a shape, an anchor position and the type of prop to be generated.

The process itself is simply a 2D boolean array. We simply draw on that array like we would in a bitmap using traditional image manipulation algorithms.

Once the array is set, then we simply add a given prop for each true cell of the array 

We then finally remove every props that are either outside its room or obstructing an entry/exit point.

Right now, only two types of props can be generated, although the algorithm itself is kinda flexible.

From the album:

Vaporwave Roguelite

  • 85 images
  • 9 image comments

Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!