[HN Gopher] Show HN: Little Procedural Pixel Worlds
       ___________________________________________________________________
        
       Show HN: Little Procedural Pixel Worlds
        
       Author : jasonjmcghee
       Score  : 146 points
       Date   : 2022-05-23 16:57 UTC (6 hours ago)
        
 (HTM) web link (jason.today)
 (TXT) w3m dump (jason.today)
        
       | bitwize wrote:
       | Makes me think of Temple of Apshai and similar RPGs from the
       | early PC and Commodore eras.
       | 
       | ("Oh, man, my hit points are like, inexcusable in this dungeon,
       | man. I need to find some elixors or something.")
        
         | drewzero1 wrote:
         | It should date me fairly well to know that I'm familiar with
         | Temple of Apshai, but only because of the other reference.
         | "Man... I throwed up all over this maze."
        
       | TrustPatches wrote:
       | Love it, procedural world generation is a ton of fun
        
       | bradford wrote:
       | Nice work!
       | 
       | Are you familiar with the procedurally generated worlds in Dwarf
       | Fortress (they have some similarity to your project)?
        
         | jasonjmcghee wrote:
         | I haven't played it before, but from my understanding, it's an
         | incredibly complex simulation.
         | 
         | This is much simpler! Just hand-picked thresholds of some
         | parameterized perlin noise.
        
           | deathanatos wrote:
           | Definitely has a Dwarf Fortress feel to it, but I think it's
           | mostly the colors/"ASCII1 art" feel.
           | 
           | Almost like a pristine world, still unsullied by the various
           | races & evils that inhabit a usual DF map. Peaceful.
           | 
           | 1not really ASCII, ofc.
        
       | bovermyer wrote:
       | Love this! Are you using Simplex noise maps for altitude,
       | temperature, and humidity? What's the process like?
        
         | jasonjmcghee wrote:
         | Nothing so creative / complex! You can check out the source
         | code, I didn't obfuscate it. It's just hand-picked thresholds
         | for perlin noise, leveraging the built in noise function in
         | p5.js
        
           | Folcon wrote:
           | Really great use of tiles and colours to make a great looking
           | effect :)...
        
       | cracrecry wrote:
       | I like it but it would be more interesting for me if you provided
       | some web page with the documentation of that.
       | 
       | I am more interesting in the explanation of your code that the
       | code itself.
        
       | jasonjmcghee wrote:
       | Took a break from the falling sand simulation blog posts this
       | week to work on another small project. It's a little pixel world
       | generator- each time you visit, you'll see a new little world. I
       | really like this stuff and had a blast building it yesterday!
        
         | natly wrote:
         | I've been playing around with something similar recently and
         | I'd encourage you to look into doing this with pure webgl
         | rather than p5.js. It's surprisingly simple (this would just be
         | a `gl.drawArrays(gl.POINTS,...)` call it with some buffer setup
         | and texture `texelFetch` reading) and freeing and empowering to
         | work from the groud up without frameworks. It's also really
         | nice to offload player offset and zoom to the gpu/shaders (it
         | handles it really smoothly and with basically more
         | straightforward than you'd have to do to only draw things
         | that's on the screen with canvas rendering).
        
           | jasonjmcghee wrote:
           | Great idea. This would be dramatically lighter weight in
           | terms of client download and more performant. I believe color
           | variation logic could also be offloaded to a fragment shader.
        
         | Yhippa wrote:
         | Really cool stuff. I kept refreshing and it took me back to the
         | days of all those ZZT games but this evokes much more
         | geography. Crazy what you can do with ASCII characters and 256
         | colors.
        
           | fb03 wrote:
           | ZZT!!! one of my first coding experiences!
        
           | Minor49er wrote:
           | And beyond, as demonstrated by MegaZeux, the spiritual
           | successor to ZZT
        
       | Aperocky wrote:
       | Nice one, I like the coloring, it'd be nice if it was dynamic or
       | things could live on it, maybe next step? I have a few random for
       | fun projects lying around:
       | 
       | map gen and hydrology project hydrosim:
       | 
       | http://aperocky.com/hydrosim/
       | 
       | pet map gen and having "people" living on it:
       | 
       | http://prehistoric.tech/
        
       | pupppet wrote:
       | Immediately makes me miss my old MUDs.
        
       | all2 wrote:
       | Is it open source? I want to add clouds and birds and weather and
       | time!
       | 
       | [edit] Also I'm getting a lot of "out of bounds" errors when I
       | resize my window.[/edit]
        
         | jasonjmcghee wrote:
         | The source code is all there and not obfuscated. You can just
         | download and edit it!
         | 
         | I'm probably going to continue working on it as a personal
         | creative project, so I'm not planning on taking PRs- I hope
         | that's ok!
         | 
         | Maybe I should make a community fork?
        
           | meetups323 wrote:
           | If possible could you include a license? I don't like
           | touching code without one, as sharing modifications and/or
           | derivatives is a potential copyright violation.
        
             | jasonjmcghee wrote:
             | I will make a community repo with a license!
        
             | jasonjmcghee wrote:
             | Here it is - the community repo:
             | https://github.com/jasonjmcghee/little-worlds
        
         | jasonjmcghee wrote:
         | Regarding the out of bounds. Indeed. I should fix that- middle
         | of the work day / week now though!
        
       | notum wrote:
       | Nice, but every world is a swamp for me. So much water :)
        
       | nirvanist wrote:
       | love it , inspiring , I think it can be done just with css also
       | :)
        
       | Tagbert wrote:
       | This reminds me of the character graphics you would get on
       | Commodore computers in the 80's
        
       | jpeg_hero wrote:
       | Love it. Ultima III !
        
       | TheRealNGenius wrote:
       | borked on safari
        
         | Tagbert wrote:
         | I'm seeing it fine on Safari 15.4
        
         | jasonjmcghee wrote:
         | Interesting! Could you provide some more info? Seems to work on
         | Safari on iOS and Mac for me.
        
       | rpastuszak wrote:
       | Now I regret "being productive" on my day off instead of playing
       | Dwarf Fortress.
       | 
       | This looks lovely, well done!
        
         | jasonjmcghee wrote:
         | Thank you!
        
       ___________________________________________________________________
       (page generated 2022-05-23 23:00 UTC)