logoalt Hacker News

Show HN: A CSS-Only Terrain Generator

371 pointsby rofko11/04/202582 commentsview on HN

Comments

senfiaj11/04/2025

When I turn off JS, it shows a loader instead of the terrain. Is this really CSS-Only? I mean it's still a high achievement even with JS, but was expecting it would also work without JS. This one, for example, truly works without JS https://benjaminaster.com/css-minecraft/ .

show 2 replies
forthwall11/04/2025

Wow this really feels like roller coaster tycoon!!! (I can see lots of people refer to this to their favorite sim game though)

Great work!

show 8 replies
cmiller111/04/2025

Lots of javascript for a "css-only" tool. Looks like just the rendering is css-only.

show 4 replies
julius-fx11/04/2025

This is incredible - looks like SimCity 2000.

show 1 reply
RugnirViking11/04/2025

Really reminds me of openttd, especially the sandy border around the water

Looks really cool and runs great on my phone.

Seems like there's some kind of rendering bug in the corners sometimes causing the walls to intersect the grass

mpeg11/04/2025

Reminds me of Populous!

Very cool

show 2 replies
bodge500011/04/2025

I've used a few terrain generators before but I think this one might be my favourite. Obviously the fact its a "CSS only" demo project restricts things a bit, but its got enough going for it regardless.

It actually comes at a really good time for me, I'm currently trying to make the transition from 2d game dev to 3d and things like this are really helpful.

show 1 reply
ModernMech11/04/2025

This thing is killing my CPU, what's the actual bottleneck here for CSS? Is it the number of elements visible and rendered at once? Is it the calculation engine backing CSS is super slow? Or just that most of the work is being done on the CPU it seems (on my machine, rotating around the map, my integrated GPU goes to 20% but CPU stays around 40-50%).

show 1 reply
paulbjensen11/04/2025

Really cool, especially when I realised you could rotate the terrain and do some zooming as well.

em3rgent0rdr11/04/2025

Impressive, but there is a noticeable lag after modifying the terrain or moving the camera. Is there a way to know if the browser is using the GPU or CPU for rendering, and is there are way to see the milliseconds per frame?

show 1 reply
EGreg11/04/2025

Can someone please reimplement something like Warcraft 2 on a mobile web device?

It would be a hit, I’m telling you. Even from 1995.

Some people are still playing it 30 years later, obsessively.

And myth ii by Bungie is a classic too

show 2 replies
nefarious_ends11/04/2025

Very cool! Do you think it’s possible to do lakes and waterfalls?

show 1 reply
kataqatsi11/04/2025

for those interested in more CSS-Only art, Lynn Fisher makes some neat stuff

https://a.singlediv.com/

w4yai11/04/2025

I got some rendering issues, but otherwise very cool !

https://i.imgur.com/qT6ozyh.png

Firefox 144.0.2, Windows

show 1 reply
throwaway203711/04/2025

It is giving Sega Genesis "Populous" vibes.

ryukoposting11/04/2025

Dark Reader mutilates the rendered output, but only certain tiles. No clear pattern as to what tiles get mangled. Peculiar.

docmars11/05/2025

The next obvious step will be SimCity 2000 completely implemented using web tech. One can hope!

stefs11/04/2025

1. what's a layou tit?

2. does it sometimes raise / lower by 2 units?

3. the "flatten" tool is missing.

ForgetItJake11/05/2025

Reminds me of RCT, very nice!

hersko11/04/2025

This is super cool! Wonder how hard it would be to use with an RTS game.

iagorodriguez11/04/2025

Amazing job by an amazing developer!

cluckindan11/04/2025

Nice! Now do collision checks ;)

show 1 reply
robertheadley11/04/2025

This is really cool.

worldai11/04/2025

Impressive work

jimmydin711/04/2025

looks sick! great job :)

sherinjosephroy11/05/2025

[dead]

jheriko11/05/2025

[dead]

OldGreenYodaGPT11/04/2025

Crazy that vibe coding can make things like this now! 2026 going to be crazy! There is no AI bubble