TUXDB - LINUX GAMING AGGREGATE
made by: NuSuey
NEWSFEED
GAMES
▪️CROWDFUNDING▪️COMMUNITY DEALS▪️STEAM DECK▪️CALENDAR
tuxdb.com logo
Support tuxDB on Patreon
Currently supported by 11 awesome people!

🌟 Special thanks to our amazing supporters:


✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Benedikt][David Martínez Martí]

Any feedback for tuxDB? Join us!

Screenshot 1
Fullscreen Screenshot 1
×
Screenshot 2
Fullscreen Screenshot 2
×
Screenshot 3
Fullscreen Screenshot 3
×
Screenshot 4
Fullscreen Screenshot 4
×
This little sandbox game generates gigabytes of procedural city, traffic and world around you as you move.
  • Use the in-game editor to define the rules for creating your terrain, grass, rocks, trees, city and traffic
  • Create your own unique look using the wide range of graphical settings from retro-pixelated to film-noir and more
  • Walk and fly around your creation
  • More features (and gameplay) coming soon...
Infinicity
Ben MorrisDeveloper
Ben MorrisPublisher
1970-01-01Release
🎹🖱️ Keyboard + Mouse
🕹️ Partial Controller Support
🎮 Full Controller Support
No user reviews (0 reviews)
Procedural Object Placement with Variable-Radius Poisson Disk Sampling and noise

When generating large procedural worlds, placing objects believably is harder than it looks.

Trees shouldnt overlap. Rocks shouldnt clump unnaturally. Buildings need breathing room. And ideally, all of this should be controllable, performant, and compatible with procedural generation.

A few years ago, while working on procedural world generation for my game, I ran into exactly this problem i.e. placing objects of varying sizes, driven by noise, with zero overlap.

This post is a write-up of how I approached that problem, what didnt work, and the solution I ended up shipping.

[hr][/hr]

The Problem

At a high level, I wanted to:

  • Place objects procedurally across a 2D surface

    [/*]
  • Allow each object to have a different radius

    [/*]
  • Guarantee no overlap

    [/*]
  • Retain a natural, non-grid-like distribution

    [/*]
  • Be able to bias density using noise or gameplay logic

    [/*]

Classic Poisson disk sampling gives you a nice \"even but random\" distribution but it assumes a fixed minimum distance between points. That assumption breaks down immediately when object sizes vary.

[hr][/hr]

Why Standard Poisson Disk Sampling Falls Short

Traditional Poisson disk sampling works by enforcing a single global minimum distance between samples. Thats great if every object is the same size.

But once you introduce variable radii:

  • A small object can sit comfortably near another small object

    [/*]
  • A large object needs more space

    [/*]
  • The minimum distance is no longer constant

    [/*]

You can try to cheat by inflating everything to the maximum radius but that leads to:

  • wasted space

    [/*]
  • overly sparse distributions

    [/*]
  • loss of detail where small objects should be dense

    [/*]

In short: the distance constraint needs to be local, not global.

[hr][/hr]

Idea: The Radius Is the Constraint

Instead of thinking in terms of \"points with a minimum distance\" I reframed the problem as:

Each object has a radius, and no two objects\' influence circles may overlap.

That seems obvious in hindsight, but it changes how you structure the algorithm.

Instead of asking:

\"Is this point at least D away from others?\"

You ask:

\"Does this objects radius overlap with any existing objects radius?\"

That means overlap tests become:

[code]distance(p1, p2) >= r1 + r2[/code]

Once you accept that, the rest of the system can be built around it.

[hr][/hr]

Adding Noise-Driven Density

Uniform distributions are fine but procedural worlds benefit from variation.

To control where objects want to appear, I introduced procedural noise as a placement bias, not as a hard rule.

The workflow became:

[olist]
  • Sample a candidate position

    [/*]
  • Use noise to decide:

    • whether something should exist here

      [/*]
    • what size it should be

      [/*]
    [/*]
  • Attempt to place the object

    [/*]
  • Reject it if it overlaps anything already placed

    [/*][/olist]

    This approach has a few nice properties:

    • Designers can control density using noise parameters

      [/*]
    • The same system works for trees, rocks, structures, etc.

      [/*]
    • Rejection sampling naturally enforces spacing

      [/*]
    [hr][/hr]

    Making It Fast Enough

    Naively checking every new object against every existing object doesnt scale.

    To keep this practical, I used spatial partitioning (a simple grid) to reduce overlap checks to nearby cells only. Each placed object is inserted into the grid cells it overlaps, and new candidates only test against objects in those cells.

    This keeps placement costs roughly constant, even as object count grows.

    The result is a system that:

    • scales well

      [/*]
    • is deterministic when needed

      [/*]
    • works in real time or during world generation

      [/*]
    [hr][/hr]

    Results in Practice

    This sampler ended up being flexible enough to use across multiple contexts:

    • natural object scattering

      [/*]
    • terrain decoration

      [/*]
    • gameplay-relevant structures

      [/*]

    Because object size, noise bias, and placement constraints are all decoupled, its easy to tune without rewriting the algorithm.

    I eventually cleaned up the implementation and published it here:

    https://github.com/bensanmorris/poisson_disk_sampler

    A couple of videos of it in action are here:

    [dynamiclink href=\"https://youtu.be/zmnLwlrep0Q\"][/dynamiclink]And here:

    [dynamiclink href=\"https://youtu.be/pCM68LITkCM\"][/dynamiclink]

    [hr][/hr]

    Final Thoughts

    Procedural generation lives in the space between theory and messy reality. Algorithms rarely work out-of-the-box once real constraints enter the picture.

    This wasnt about inventing a new sampling technique it was about adapting a known idea to solve a real production problem.

    If youre working on procedural placement and have ever fought with clumping, overlaps, or over-uniform distributions, I hope this gives you a useful angle of attack.

  • [ 2025-12-26 15:54:31 CET ] [Original Post]

    Minimum Setup

    • OS: Linux + SteamOS
    • Processor: Requires a 64-bit processor and operating system
    • Graphics: OpenGL 3.3

    Recommended Setup

    • OS: Linux + SteamOS
    • Processor: Requires a 64-bit processor and operating system
    • Graphics: OpenGL 3.3
    ⭐ SPOTLIGHT DEAL ⭐
    Florence
    Florence
    $1.15
    -80.8% OFF
    IndieGala
    GAMEBILLET

    [ 6381 ]

    8.39$ (16%)
    4.03$ (88%)
    49.77$ (17%)
    9.33$ (38%)
    16.57$ (17%)
    19.59$ (22%)
    13.02$ (13%)
    49.77$ (17%)
    25.19$ (16%)
    24.87$ (17%)
    49.77$ (17%)
    16.57$ (17%)
    3.12$ (84%)
    41.47$ (17%)
    8.39$ (16%)
    8.97$ (55%)
    1.89$ (84%)
    9.87$ (51%)
    10.91$ (16%)
    16.79$ (16%)
    24.87$ (17%)
    24.87$ (17%)
    4.48$ (78%)
    7.54$ (16%)
    13.95$ (30%)
    12.42$ (17%)
    12.42$ (17%)
    16.79$ (16%)
    16.57$ (17%)
    20.99$ (16%)
    FANATICAL

    [ 5874 ]

    24.59$ (59%)
    59.87$ (25%)
    13.79$ (77%)
    49.79$ (17%)
    8.99$ (55%)
    96.79$ (12%)
    5.05$ (77%)
    84.89$ (15%)
    14.99$ (25%)
    35.89$ (10%)
    3.44$ (77%)
    23.89$ (20%)
    14.37$ (64%)
    21.59$ (28%)
    14.99$ (25%)
    84.89$ (15%)
    6.1$ (82%)
    21.89$ (64%)
    14.59$ (64%)
    15.12$ (73%)
    26.99$ (55%)
    12.79$ (68%)
    22.49$ (55%)
    35.39$ (41%)
    57.39$ (18%)
    23.89$ (20%)
    52.79$ (12%)
    12.04$ (64%)
    70.39$ (12%)
    44.99$ (25%)
    GAMERSGATE

    [ 750 ]

    0.56$ (81%)
    1.7$ (91%)
    8.5$ (66%)
    0.56$ (81%)
    0.94$ (81%)
    1.45$ (91%)
    0.68$ (95%)
    0.26$ (91%)
    2.55$ (85%)
    2.55$ (91%)
    1.28$ (91%)
    0.56$ (81%)
    0.56$ (81%)
    0.68$ (91%)
    1.58$ (95%)
    1.7$ (91%)
    5.28$ (74%)
    4.05$ (86%)
    5.28$ (79%)
    8.93$ (70%)
    3.4$ (91%)
    0.89$ (87%)
    3.4$ (91%)
    3.83$ (87%)
    1.19$ (83%)
    1.91$ (87%)
    0.75$ (96%)
    5.72$ (56%)
    4.25$ (91%)
    3.48$ (83%)
    MacGameStore

    [ 1993 ]

    1.49$ (85%)
    1.99$ (87%)
    13.99$ (22%)
    1.59$ (92%)
    1.10$ (93%)
    8.99$ (10%)
    53.99$ (10%)
    18.99$ (24%)
    15.99$ (20%)
    4.99$ (50%)
    13.99$ (7%)
    1.19$ (88%)
    1.99$ (85%)
    1.19$ (76%)
    1.19$ (76%)
    2.98$ (80%)
    0.99$ (80%)
    1.49$ (94%)
    1.10$ (89%)
    1.89$ (87%)
    2.49$ (88%)
    9.49$ (5%)
    1.19$ (88%)
    1.19$ (76%)
    1.99$ (80%)
    1.19$ (94%)
    42.49$ (15%)
    2.54$ (87%)
    1.19$ (76%)
    1.19$ (94%)
    INDIEGALA

    [ 1017 ]

    2.19$ (72.59%)
    1.49$ (90.0%)
    1.99$ (90.0%)
    2.99$ (90.0%)
    1.99$ (90.0%)
    1.99$ (90.0%)
    3.99$ (20.0%)
    1.99$ (90.0%)
    1.49$ (90.0%)
    1.29$ (90.0%)
    0.99$ (90.0%)
    3.74$ (85.0%)
    7.89$ (68.42%)
    0.99$ (90.0%)
    2.49$ (50.0%)
    1.99$ (90.0%)
    2.67$ (33.0%)
    2.24$ (85.0%)
    2.49$ (75.0%)
    2.49$ (50.0%)
    1.49$ (75.0%)
    4.49$ (70.0%)
    0.99$ (90.0%)
    1.99$ (90.0%)
    2.49$ (90.0%)
    0.49$ (90.0%)
    1.15$ (80.8%)
    1.39$ (80.0%)
    3.99$ (50.0%)
    0.99$ (80.0%)

    FANATICAL BUNDLES

    Time left:

    356102 days, 7 hours, 12 minutes


    Time left:

    356102 days, 7 hours, 12 minutes


    Time left:

    6 days, 15 hours, 12 minutes


    Time left:

    34 days, 15 hours, 12 minutes


    Time left:

    37 days, 15 hours, 12 minutes


    Time left:

    38 days, 15 hours, 12 minutes


    GMG BUNDLES
    Indie Adventures

    Time left:

    12 days, 1 hours, 12 minutes


    HUMBLE BUNDLES

    Time left:

    0 days, 9 hours, 12 minutes


    Time left:

    7 days, 9 hours, 12 minutes


    Time left:

    13 days, 9 hours, 12 minutes


    Time left:

    14 days, 9 hours, 12 minutes


    Time left:

    19 days, 9 hours, 12 minutes


    Time left:

    25 days, 9 hours, 12 minutes


    INDIEGALA BUNDLES
    Huge Pixel 2 Bundle

    Time left:

    4 days, 22 hours, 27 minutes

    Adult Positions 2 Bundle

    Time left:

    9 days, 15 hours, 13 minutes

    Holiday Tales Bundle

    Time left:

    11 days, 14 hours, 13 minutes

    Psycho Gates Bundle

    Time left:

    16 days, 21 hours, 23 minutes

    by buying games/dlcs from affiliate links you are supporting tuxDB
    🔴 LIVE