Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Very cool! Do you think it’s possible to do lakes and waterfalls?
  • Definitely! I'm planning for more landscape features for next versions. I think rivers will be a great addition, and waterfalls/rapids sound really interesting too. In the end it's a matter of adding a few classes and designing some sprites.
  • 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

  • Stratagus has an android port at least ...
    by o11c
  • The controls would take some serious reworking to make it work on mobile - I could see adding a ‘pause’ feature to give you time to scrub your fingers all over the screen to issue all your unit and build orders, performant pinch to zoom would nearly negate the need for a mini map, lots of reworked GUI for building stuff and managing workers
  • 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?
  • It looks like a layout/style/composition issue with the browser engine.

    In Safari I'm seeing 91% CPU time on paint, 6% on layout, 2% on styles. It looks like it's taking somewhere between 100-200ms on my machine to chunk through a state change each time.

    > 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?

    For Safari, you would go to the Web Inspector and navigate to the Timelines tab. Chrome has a similar thing.

  • Really cool, especially when I realised you could rotate the terrain and do some zooming as well.
  • 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%).
  • it's effectively a cpu 'renderer' with gpu painter
  • 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.

  • Reminds me of Populous!

    Very cool

    by mpeg
  • I just came here to say the same thing. The raise and lower tools in particular reminded me of it.

    For anyone who hasn't heard of it before: https://en.wikipedia.org/wiki/Populous_(video_game)

  • Thank you! Populous and Transport Tycoon were two big inspirations for sure :)
  • 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

  • This is incredible - looks like SimCity 2000.
  • Does it? All the tiles are usually a yellow brown aren’t they? 3000 has green land
  • Lots of javascript for a "css-only" tool. Looks like just the rendering is css-only.
  • Yep. Can confirm this does not work with JS disabled. I'm disappointed by the misleading title.
  • Not to mention of all of those pesky HTML tags and images, clearly not CSS-only, what a fraud.
  • I guess it'd be more accurate to call it a "Generator for CSS-Only Terrain", as the generator itself is not CSS-only.
  • You can open up your terrain in codepen with nothing but CSS/HTML, and it renders fine. It's just not interactive / draggable anymore.

    So the JS is only being used, essentially, as a nice UI for configuring your terrain and the camera angle from which it's viewed.

    This is still an incredible feat.

  • 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!

  • This is exactly what I thought of
  • I like it's also really 3d, while looking like older 2.5d games.
  • For me, "Briefing" from Ace Combat 2 played back in my head straight away.

    https://youtu.be/5uPVGs7bq3s?t=8

  • Funny, my mind went to OpenTTD
  • Reminded me quite a bit of Populous[1] as well.

    1. https://en.wikipedia.org/wiki/Populous_(video_game)

  • I really miss these building games that used an isometric grid. RC Tycoon, Zoo Tycoon, Sim City, TTD, …

    Yes, it's less realistic, but it is so pleasant to work with. Everything you build aligns perfectly and if you want, you can neatly fill the entire map.

    In comparison, (even with many mods) my Cities Skylines or Planet Coaster creations never look quite right. Building the roads and paths is always awkward and frustrating.

    (I've commented this before.)

    by yreg
  • 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/ .