I am working on a tiny cube-based engine like Minecraft. I was wondering if there is a way for me to get large blocky terrain in a text format that I can use for rendering on my engine?

I don't want to start on procedural generation now, I just want a resource where I can get the coord list for a pretty looking terrain.

Alternatively, is it possible for me to parse the Minecraft world files and use that data to generate terrain/buildings in my code?


You could just use plain text files and consider each character in the text file a small tower, with the character saying how tall the tower should be, and pick the material randomly or something..

That's the easiest route I can think of. Apart of procedural generation, which is probably easier.

If you want to use minecraft maps, the format is documented here on the minecraftwiki.net, and a bunch of editors and similar programs are also available, most with source code too, so if the level format is hard to decipher, you have plenty of code as a reference.

  • \$\begingroup\$ i have made a simple map maker where i convert an ascii map into cuboidal layers. however, i dont have the chops to make something really pretty and as such i was wonderng if i can use the schematic files for minecraft in some ways. The out put i need is simply an array of (x, y, z, blocktype, blocksize). Alternatively, if there is any nice terrain generator which can give me this array, it will help me in my coding a lot. \$\endgroup\$ – Rishav Sharan Nov 22 '11 at 9:39
  • \$\begingroup\$ I have looked at ost of the editors but none of them allow export to a non native (to minecraft) file format. I am just starting programming and as such, i can only parse simple text based file types like csv, xml etc \$\endgroup\$ – Rishav Sharan Nov 22 '11 at 9:48
  • 1
    \$\begingroup\$ I didn't mean you'd use the editors; I meant you can look at their source code for reference on how to load the data. \$\endgroup\$ – Jari Komppa Nov 22 '11 at 12:17
  • \$\begingroup\$ Thanks Jari. i understand what you are saying. However, my skills are very nascent and as such i really didnt want to write my own importer. I just wanted a program which gives a simple text file output. \$\endgroup\$ – Rishav Sharan Nov 22 '11 at 12:39
  • 1
    \$\begingroup\$ @RishavSharan Honestly I would say learn to parse the files that come out of the editors.. Text is actually -more- complicated to parse than a binary format when you can look at most of the editor's source code (They are in Java afterall) and see how they are put together.. usually just a data structure or order for reading the values out instead of reading a text value and changing it into another value. Secondary Note: You can also find the file formats for most Minecraft files on the minecraft wiki from the modding community. \$\endgroup\$ – James Nov 22 '11 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.