Arnis: Generate cities in Minecraft from OpenStreetMap

(github.com)

476 points | by jamesy0ung 127 days ago

34 comments

  • klamann 127 days ago
    I love that the OpenStreetMap community provides a mature toolscape that allows projects like this to access geospatial data for anyone, no questions asked. It's hard to overstate how valuable this kind of resource is to the free software community.

    Just to give some perspective: More than 10 years ago I built an open source project that generates cities for a different game (maps4cim [1], a map generator for Cities in Motion 2). It relies on OSM data to generate roads and buildings and stuff, and NASA SRTM data for elevations. The OSM part of the application is far more complicated, since it covers so much data that is changing every day, yet you can make the exact same query against the Overpass API and get a response with the latest data in the expected format. NASA however at some point decided to shut down public access to SRTM data, which is in the public domain, and hide it behind a non-RESTful webservice where only registered users have access.

    To me this feels like such a loss. I never would have started this open source project a decade ago if there was no free access to all the data the users would need. Yes, it's still public domain data, therefore someone could go through all the hassle of signing up for the service, scrape all the data and then host it free of charge, but right now there is no such service. Don't get me wrong, I don't feel entitled to this kind of free service, but I feel like these barriers to entry really matter and we all lose access to great tools that are built on the shoulders of giants. Very sad to lose NASA as one of the giants that once gave us free and easy access to highly useful data. More power to projects like OSM that live the spirit of open data!

    1: https://github.com/Klamann/maps4cim

    • raybb 126 days ago
      It's also pretty amazing how easy it is to contribute. Between things like street complete with gamified quests and the browser based editor on osm.org basically anyone with an internet connection can update the places around them in minutes.

      That being said, the fact that there's always something to fix just about anywhere I go tells you there's not enough people that contribute. Tbh I think the major problem is that there's no single go to app that people use all the time and then notice the issues. Though that's changing a bit with Organic Maps. Tesla self parking also had a bunch of new people mapping places, or so I heard.

    • m4rtink 127 days ago
      Looks like its is possible to download the full SRTM dataset - would that not work ?

      https://www.reddit.com/r/gis/comments/qg4b6j/is_it_possible_...

      Also I know Geonames has a service for elevation lookup based on SRTM & other data: http://www.geonames.org/export/web-services.html

      But if you need to semple a big are in detail, that could potentially run into API limits or overload the service. But it demonstrates its possible to get the dataset & provide an API on top of it by a third party. :)

  • abotsis 127 days ago
    I'm just here to say thanks, as I'm not above taking credit for creating our neighborhood in Minecraft for my 8yo. There's nothing in the GPL that prohibits creating false heroes AFAIK.
    • rollcat 126 days ago
      GPL does not restrict how you can use the program (freedom #0), unless (as is the case with lexer/parser generators) the output contains a part of the program's own source - e.g. GNU Bison's license has an explicit exception to allow that.

      In case of Minecraft, you do have Redstone and Command Blocks at your disposal, and people have built things like an 8086 or Tetris. I wonder if there's an edge case with those WG tools, where the generated world becomes GPL-contaminated.

      (Personally I'm a fan of BSD/MIT licenses, for those kinds of reasons - I'd rather not have anyone pay a lawyer to answer a simple question like, "can I actually use this program?")

  • redundantly 127 days ago
    It would be awesome if it could generate street signs at intersections. I’d love to use it to help my kids get more familiar with our area. Theyre tired of me constantly asking for street names or which way to turn. Sometimes, they even give me full turn-by-turn instructions, and we have only gotten lost a couple of times so far ;)
  • dadoum 127 days ago
    IGN (a French public institute) also has its service to generate a Minecraft map from real places. [0]

    It's probably not as detailed though.

    [0]: https://minecraft.ign.fr/

  • matt3210 127 days ago
    This project really likes to mention that it's made in rust wherever it can.
    • djfergus 127 days ago
      “ I decided to port the project to Rust to learn more about the language and push the algorithm's performance further. We were nearing the limits of optimization in Python, and Rust's capabilities allow for even better performance and efficiency”

      So there is an existing solution in Python, seems reasonable to flag why this is different up front.

    • urbandw311er 127 days ago
      Q) How do you know if somebody is a Rust coder? A) They tell you.
      • poincaredisk 127 days ago
        Seriously, I consider a programming language mature when projects written in that language stop feeling the need to stress that. I mean, for some time projects listed "written in rust" (or "written in go", etc) as the main feature. Now rust is more normalized, finally.
      • calebio 127 days ago
        I wonder if there is an overlap in the Rust and Arch Linux community then :D
        • wongarsu 126 days ago
          From personal/professional experience this is true. Your typical rust developer uses Arch and Neovim. Yes, he will tell you about both.
          • n8henrie 126 days ago
            NixOS and helix!
            • wongarsu 126 days ago
              And has a github repo with dotfiles
        • OfficialTurkey 127 days ago
          I'm sure one of them will comment here and tell you. Just as soon as they fix their wifi driver, and oh shit the bluetooth is broken too, okay time to open up the local copy of the arch wiki..
        • n_plus_1_acc 126 days ago
          Definitely. Pacman and ALPM are currently being rewritten in Rust.
    • snappysnap 127 days ago
      I don't think we're anywhere near the equivalent of any library or application being named starting with a J when it was written in Java - and not even actual words beginning with J - just slap a J at the start of any old name.
    • core_dumped 127 days ago
      It should be a part of the Rust style guide at this point
    • xboxnolifes 127 days ago
      Not really? It has 6 occurrences of "Rust" in the README, and half of those are in the paragraph of the FAQ explaining why they ported to Rust from Python. There's actually an equivalent number of references to Python.
    • tucnak 127 days ago
      [flagged]
  • DannyPage 127 days ago
    Just like Microsoft's latest batch of Flight Simulator games, I'd love if there was a version of this for creating race tracks out of real areas in the world.
  • westurner 127 days ago
    Re: real-time weather, flight, traffic, react-based cockpits, and open source Google Earth GlTF data and flight sim applications like MSFS and X-Plane: https://news.ycombinator.com/item?id=38437821

    Probably easier to determine whether a verbal or (lat,long,game) location reference is a reference to an in-game location or an virtual location in a game with the same name.

    From https://developers.google.com/maps/documentation/tile/3d-til... re: Google Maps GlTF 3d tiles:

    > Note: To render Google's photorealistic tiles, you must use a 3D Tiles renderer that supports the display of copyright attribution. You can use [CesiumJS or Cesium for Unreal]

    Open source minecraft games with Python APIs:

    > sensorcraft is like minecraft but in python with pyglet for OpenGL 3D; self.add_block(), gravity, ai, circuits

    WebGL is more portable than OpenGL; or can't pyglet be compiled to WASM?

    panda3d and godot easily compile to WASM FWIU.

    An open source physics engine in Python that might be useful for minecraft clones: Genesis-Embodied-AI/Genesis; "Genesis: A Generative and Universal Physics Engine for Robotics and Beyond" https://news.ycombinator.com/item?id=42457213#42457224

    From "Approximating mathematical constants using Minecraft" https://news.ycombinator.com/item?id=42319313 :

    > [ luanti, minetest, mcpi, MCPI-Revival/minecraft-pi-reborn ]

    • anthk 127 days ago
      That was done long ago under Flightgear, but just the maps.
  • unquietwiki 127 days ago
    Weirdly enough, my apartment complex doesn't render in this; the surrounding buildings and the pool are rendered, though. I verified the data on OSM, which is even more mystifying. On the other hand, the kiddo's school isn't far away, and that is rendered in pretty good detail. Hmmm...

    Edit: I dug deeper into the OSM stuff. Apparently the building is rendered in OSM as a "multipolygon" with two different layers; but all the other stuff is rendered based on sets of nodes.

  • woopersiop 127 days ago
    Very cool, the generation of Chicago's L tracks seemed to be a challenge for the algorithm.
  • m3kw9 127 days ago
    Someone should use the point maps Japan released and match it with open street maps to create even more detailed buildings.
  • remoquete 126 days ago
    Can't describe the excitement that tools like thise bring to me. I remember when we used to create cities in Sim City 2000 and then navigate them in Sim Copter and Streets of Sim City. I'm hoping to see something similar happening with photo-realistic levels of accuracy.
    • ygra 126 days ago
      There's a few projects that do rendering and 3D geometry construction from OSM Data, e.g.

      - https://streets.gl (data outdated, sadly)

      - https://demo.f4map.com/ (commercial, no textures)

      - OSM2World (sadly not interactively on the web, good textures, lots of rendered details, e.g. street signs)

      - osmbuildings.org (no live data, no roof shapes)

      None are really photo-realistic, and there's are a bunch of problems in the map data where it's hard to infer good 3D geometry, e.g. stairs.

  • johnisgood 126 days ago
    > The script uses the fastnbt cargo package to interact with Minecraft's world format

    At first I was like damn, he made a way to interact with the world map, but apparently there is a library for that! Who would have known.

    Cool project nevertheless.

    I wonder about the performance claims though.

    > Performance Optimization: Utilize Rust’s memory safety and concurrency features to optimize the performance of the world generation process.

    Is not much of an answer of performance.

    What were the limitations in Python, and how did Rust help?

    Since it relies on third-party libraries, what are the optimizations that the author did indeed implement as opposed to the Python version?

  • voidUpdate 126 days ago
    what "powerful capabilities of Rust" does this utilise?
  • cbeach 127 days ago
    As far as I know OSM doesn't have the granular elevation data required to render buildings as shown in the screenshots.

    I'd be interested to understand how the buildings were constructed?

  • genghisjahn 127 days ago
    Hmmm. Wonder if this can be done for Valheim?
  • anthk 127 days ago
    I had that literal exact same idea one month ago, but with Minetest.
  • opless 127 days ago
    I just know a lot of children will be introduced to orienteering by their parents due to this ;-)
  • claytonwramsey 127 days ago
    Is it just me, or does the README have the ChatGPT accent? For instance:

      Whether you're looking to replicate your hometown, explore urban environments, or simply build something unique and realistic, Arnis offers a comprehensive toolset to achieve your vision.
    
    I don’t have a lot of issues with people using LLMs to generate documentation, but it does seem to have a lot of nothing-sentences.
    • idle_zealot 127 days ago
      ChatGPT sounds like that because that's what vapid feel-good corporate copy reads like, and there are mountains of it churned out by humans.
      • wjnc 127 days ago
        A legitimate question for me would be is documentation made to be read or to be written and what is the appropriate trade-off in energy invested? I might write a one off email to an individual, a email to a big audience or a presentation to the board. All three get different levels of attention. From little, to there are layers to this text nobody would expect (perhaps mostly for my enjoyment).
    • thorum 127 days ago
      You’re right, and this is unfortunately becoming very common on GitHub, even for otherwise great projects.

      Good technical writing is concise and tells you what you need to know as directly as possible. ChatGPT written documentation always reads like bad marketing copy.

      • mewpmewp2 126 days ago
        On the other hand you can prompt it to be more concise, use simpler words, etc.

        I asked ChatGPT for a concise version and this is what it did:

        "Arnis generates Minecraft worlds based on real-world locations. Select an area to recreate cities, landmarks, and landscapes in the game."

        So overall it's up to the person to decide how it should look like.

    • tucnak 127 days ago
      It seems everybody is LLM-suspicious these days, but keep in mind humans had mastered the art of nonsense long before!
    • mitthrowaway2 127 days ago
      How would you phrase it?
      • taberiand 127 days ago
        Arnis uses OpenStreetMap data and Rust to generate Minecraft worlds based on real-world geography and architecture.

        It processes large-scale data to create accurate cities, landmarks, and natural features in Minecraft, making it easy to replicate real places or design realistic environments.

        (This rephrasing generated by ChatGPT)

      • ripbozo 127 days ago
        For one, it's not a "comprehensive toolset" (focus on toolSET) - it's one tool with one config option.
      • recursive 127 days ago
        That sentence just doesn't need to exist at all. The nature of the tool is already covered. I don't think there's a reason to tell people that they could use it for this, that, or the other thing.
      • a12k 127 days ago
        Build your ideal city with Arnis.
  • tithos 126 days ago
    Cant find the Mac version. Cant up vote without it
    • SpaghettiCthulu 126 days ago
      It uses Tauri. It would probably just work if you compiled it yourself on macOS.
  • moonlion_eth 127 days ago
    This is too cool. Way to represent your rust peers
  • globalnode 127 days ago
    something like this could be made into a game to help taxi or bus drivers learn their routes or local areas.
    • rrr_oh_man 127 days ago
      Yes, so they can ride their horse carriages even faster!
  • Good228Go 120 days ago
    Анжеро-судженск
  • aduermael 127 days ago
    That's really cool!
  • alklinewebb 126 days ago
    been testing this out all day, this is sick!
  • taram53 122 days ago
    ыва
  • taram53 122 days ago
    taram53
  • lostlogin 126 days ago
    I like now you can see a massive spike in installs in the last day. The HN community mines?
  • devops99 127 days ago
    Niiice. This is like that one time my friend make a Counter Strike map of our local high school.
    • lostlogin 126 days ago
      Sounds like something that would get you on a watchlist.
      • devops99 126 days ago
        Yeah I still wish I could be half as cool as that guy.
  • Kakain 123 days ago
    [dead]
  • Stieve 123 days ago
    [flagged]
  • Stieve 123 days ago
    [flagged]
  • bru3s 127 days ago
    [dead]
  • ocschwar 127 days ago
    Right now I'm using my work Mac, which I can't install Minecraft on. My personal Mac is not in my hands, and the kid using it is the one I want to surprise with a Minecraft level of the area.

    If anyone could post a zip file of Minecraft worlds so I can fool this app into using it, I would be much obliged.