Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/498141761785823233
Missed some spacing.
Source Link
Anko
  • 13.5k
  • 10
  • 56
  • 82

I'm studying a little about procedurally generating levels and decided to start with a vertical scrolling game.

I would like to position some platforms vertically in my scene. So far, I've used a basic method: Random positions, with some maximum y-distance between them. However, that means platforms at the same height can still overlap. I would like to be able to have morethanmore than one platform onat each height:

desired outcome

I thought about using sets of platforms including unique platforms, combined platforms (2 or 3 per y, and so on), and randomly position those sets. However, this would not prevent the overlapping and I really would like to do it properly procedurally.

Even so, I cannot guarantee that each platform is accessible by the player character from the previous one.

How can I proceed?

I'm studying a little about procedurally generating levels and decided to start with a vertical scrolling game.

I would like to position some platforms vertically in my scene. So far, I've used a basic method: Random positions, with some maximum y-distance between them. However, that means platforms at the same height can still overlap. I would like to be able to have morethan one platform on each height:

desired outcome

I thought about using sets of platforms including unique platforms, combined platforms (2 or 3 per y, and so on), and randomly position those sets. However, this would not prevent the overlapping and I really would like to do it properly procedurally.

Even so, I cannot guarantee that each platform is accessible by the player character from the previous one.

How can I proceed?

I'm studying a little about procedurally generating levels and decided to start with a vertical scrolling game.

I would like to position some platforms vertically in my scene. So far, I've used a basic method: Random positions, with some maximum y-distance between them. However, that means platforms at the same height can still overlap. I would like to be able to have more than one platform at each height:

desired outcome

I thought about using sets of platforms including unique platforms, combined platforms (2 or 3 per y, and so on), and randomly position those sets. However, this would not prevent the overlapping and I really would like to do it properly procedurally.

Even so, I cannot guarantee that each platform is accessible by the player character from the previous one.

How can I proceed?

Better matching title. Removed repetition and irrelevant detail. Grammar and word order. Scaled image down.
Source Link
Anko
  • 13.5k
  • 10
  • 56
  • 82

Procedural positioning of platform in a vertical scrolling game How do I randomly position objects without overlap?

(:

I'm trying to learnstudying a little bit about procedurally generating levels and I decided to start with a vertical scrolling game.

What I would like to do is to position some platforms vertically in my scene. So far, I was doing theI've used a basic, i.e. method: Random positions, positioning them randomly usingwith some y maximum distancey-distance between them. However, doing that, the means platforms at the same height can still overlap and I just have one platform at each generated y position. I just would like to be able to generate something like this using the proper techniquehave morethan one platform on each height:

enter image description heredesired outcome

I thoughthought about using a setsets of platforms including unique platforms, combined platforms (2 oor 3 per yy, and so on), to beand randomly positionedposition those sets. However, this would not prevent the overlapping and I really would like to do it properly procedurally. Besides

Even so, I cannot guarantee that oneeach platform is accessible by the player character throughfrom the previous one, or if there is an accessible path.

I'm wondering howHow can I proceed.

Thank you.?

Procedural positioning of platform in a vertical scrolling game

(:

I'm trying to learn a little bit about procedurally generating levels and I decided to start with a vertical scrolling game.

What I would like to do is to position some platforms vertically in my scene. So far, I was doing the basic, i.e., positioning them randomly using some y maximum distance between them. However, doing that, the platforms can overlap and I just have one platform at each generated y position. I just would like to be able to generate something like this using the proper technique:

enter image description here

I though about using a set of platforms including unique platforms, combined platforms (2 o 3 per y, and so on, to be randomly positioned. However, this would not prevent the overlapping and I really would like to do it properly procedurally. Besides, I cannot guarantee that one platform is accessible by the player character through the previous one, or if there is an accessible path.

I'm wondering how can I proceed.

Thank you.

How do I randomly position objects without overlap?

I'm studying a little about procedurally generating levels and decided to start with a vertical scrolling game.

I would like to position some platforms vertically in my scene. So far, I've used a basic method: Random positions, with some maximum y-distance between them. However, that means platforms at the same height can still overlap. I would like to be able to have morethan one platform on each height:

desired outcome

I thought about using sets of platforms including unique platforms, combined platforms (2 or 3 per y, and so on), and randomly position those sets. However, this would not prevent the overlapping and I really would like to do it properly procedurally.

Even so, I cannot guarantee that each platform is accessible by the player character from the previous one.

How can I proceed?

Source Link
pceccon
  • 131
  • 4

Procedural positioning of platform in a vertical scrolling game

(:

I'm trying to learn a little bit about procedurally generating levels and I decided to start with a vertical scrolling game.

What I would like to do is to position some platforms vertically in my scene. So far, I was doing the basic, i.e., positioning them randomly using some y maximum distance between them. However, doing that, the platforms can overlap and I just have one platform at each generated y position. I just would like to be able to generate something like this using the proper technique:

enter image description here

I though about using a set of platforms including unique platforms, combined platforms (2 o 3 per y, and so on, to be randomly positioned. However, this would not prevent the overlapping and I really would like to do it properly procedurally. Besides, I cannot guarantee that one platform is accessible by the player character through the previous one, or if there is an accessible path.

I'm wondering how can I proceed.

Thank you.