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

  • 64 images
  • 0 comments
  • 3 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!