Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

One easy way to do it would be to use the midpoint displacement algorithm:

  1. Start with a line representing the ceiling.
  2. At the midpoint, displace it some random amount leaving the end points where they are.
  3. Now take the resulting 2 line segments and do it to each of those (divide them in half and displace their centers by a random amount).
  4. Continue doing this until you have a shape you like. Do the same for the floor.
  5. Repeat the process for the floor, but displace upwards instead of downwards.

Also, see this answerthis answer.

One easy way to do it would be to use the midpoint displacement algorithm:

  1. Start with a line representing the ceiling.
  2. At the midpoint, displace it some random amount leaving the end points where they are.
  3. Now take the resulting 2 line segments and do it to each of those (divide them in half and displace their centers by a random amount).
  4. Continue doing this until you have a shape you like. Do the same for the floor.
  5. Repeat the process for the floor, but displace upwards instead of downwards.

Also, see this answer.

One easy way to do it would be to use the midpoint displacement algorithm:

  1. Start with a line representing the ceiling.
  2. At the midpoint, displace it some random amount leaving the end points where they are.
  3. Now take the resulting 2 line segments and do it to each of those (divide them in half and displace their centers by a random amount).
  4. Continue doing this until you have a shape you like. Do the same for the floor.
  5. Repeat the process for the floor, but displace upwards instead of downwards.

Also, see this answer.

Source Link
user1118321
  • 2.6k
  • 14
  • 16

One easy way to do it would be to use the midpoint displacement algorithm:

  1. Start with a line representing the ceiling.
  2. At the midpoint, displace it some random amount leaving the end points where they are.
  3. Now take the resulting 2 line segments and do it to each of those (divide them in half and displace their centers by a random amount).
  4. Continue doing this until you have a shape you like. Do the same for the floor.
  5. Repeat the process for the floor, but displace upwards instead of downwards.

Also, see this answer.