I'm PeeGee and to put it shortly, I've got some explaining to do. I've been working with TerrainControl for about 9 months now and I only just found this forum! I started using TerrainControl because I wanted a world with a sea level of 90 so that a giant glass dome would fit underwater but then I got to thinking about the possibilities. Over the course of the next 3 months I experimented with TerrainControl (random mode, not FromImage mode because I want things 100% randomised) and made an island world. It took a while to get things the way I wanted and the settings were quite confusing but eventually I made islands of just the right size, nicely distributed, with each island using a basic template for its terrain. Each island uses different biomes and an island template consists of a "beach" biome (beach/cold beach/stone beach/mushroom island shore), a "base surface" biome (any of the vanilla biomes but made more flat) and several "inner" biomes (cloned vanilla biomes but with different size/volatility settings) that form large and small, tall and flat mountains, hills and valleys. I've got an island for pretty much every vanilla biome now and also some mixed-biome islands like the jungle-swamp island which has a very bayou-like feel. I've also made some custom biomes such as the hell biome. If you sail to it on the ocean and get near it you will see the sea turn from clear water to boiling hot lava which cascades down like a waterfall into a seemingly bottomless pit, at the bottom of which there is a hellish black and red landscape of lava geysers and lava lakes among islands of obsidian filled with the damned (okay, they'r really zombie-pigmen, but you get the idea).
Sounds cool already? Well I was really just getting started at that point and I'm leaving out half of the story. The thing is, I had a pretty hard time working with TerrainControl, editing all the text files by hand quickly became a tedious and time-consuming task and since the effects of certain settings were hard to determine I had to do a LOT of trial-and-error testing, constantly rebuilding and inspecting worlds to see what had changed. Thing is, I'm a professional programmer and I realised early on that if I wanted to make any kind of large project using TerrainControl I was gonna need some better tools. So the first 3 months I didn't just spend creating my island world, I also made a graphical user interface that lets you edit all the world and biome settings files, you can even make groups of biomes and apply certain settings to all biomes in that group. Here's a quick run-down of the features:
TerrainControl Editor features:
* Edit all world and biome settings from a graphical user interface
* Create groups of biomes and apply settings to multiple biomes at the same time
* Save and load all the settings you've configured
* Different kinds of input fields for ease of use and clarity. So textboxes for text input, drop down lists for settings with multiple options, group boxes for lists of things (like resources or biomes), etc.
* (limited) Input validation makes sure that users dont accidentally enter illegal characters like text characters where numerical values are expected, doesnt let you add illegal entries to lists (like the ResourceQueue) etc.
* "Set to defaults" button allow you to re-set a value to the default-value for that biome/world
* Mouse-over comments, all the comments from the world and biome files can be seen in the editor by positioning the mouse above the name of a field.
* Override/merge settings. You can make multiple biome groups and have them override or merge certain settings depending on the order of biome groups. For instance you can make a biome group "Land" containing all land biomes (incuding mountains) and remove all ore from those biomes. Then you can make a second group "Mountains" with only mountain biomes and add ore to those biomes. In this case the second group overrides the first group and adds ore to the mountains (all non-mountain land biomes have no ores). You can also merge settings, for instance you can add only Gold ore to the land biomes group and then add only Diamond ore to the mountain biomes group. If you select "merge values" for the mountain biomes group then the mountains will contain Gold ore AND diamond ore. The merge settings are available for certain settings only (like the ResourceQueue), details about their use can be seen when positioning the mouse cursor over the "merge" button (comments appear).
* Spiffy soundtrack that I probably won't be able to include in the release version because of copyright issues.
* Can be made to work for any version of TerrainControl (in theory) by creating an xml file for that version of TC. The xml file contains information about the fields used in the specific version of TC. So ideally users can make this editor compatible with their version of TC themselves by copying an xml file and editing it so that it works for their version (I'll make tutorials for that). I did this so that I wouldn't have to constantly keep updating the editor and it would be "future-proof" even when I can no longer support it.
* Some more minor features that I may talk about later
So that's the editor for you, I didn't stop there though. Once I had the editor working I could work much faster with TC (I also had a lot more oversight and insight into what I was actually doing) and eventually I got my island world the way I wanted it. That's when I started looking into BO3's. I wanted to add stuff to my world and was trying to find out how far I could push things. I was using TC for minecraft 1.7.2. for which BO3 support was very limited and a bit buggy. I've seen BlackEagle's more recent posts (gorgeous world btw!) and it looks like there have been some improvements in the BO3 section, when I started working with TC though I could hardly get a structure to spawn and if it did then often half of it would get cut off. Also, memory consumption very quickly increased when I added BO3's and I was quickly getting OutOfMemoryExceptions. In short, it didn't work very well, support for BO3's was there but seemed very minimal. So I decided to make a few..... "improvements", I downloaded the TC source and have been working on it for the last 6 months or so. I basically ended up gutting the whole BO3 and spawning mechanisms and implementing a whole new system. It still uses the BO3 file format and the branch-system, don't worry, you should be able to use your old BO3 files with the new system, but I did disable some settings and added some new ones. Here's a quick run-down of the new BO3 features:
- No structure size limit*
- No limit to the number of structures*
- No structures getting cut off (except maybe a missing chunk due to a very rare bug every once in a while)
- 99.9% memory neutral. There is a slight increase in memory usage as more BO3's are added and more of the world is explored but the basic memory footprint of this mod is very small. I made some optimisations that reduce caching, implemented lazy loading for certain things and added disk-persistence mechanisms for other things so that not everything has to be cached all the time. You can easiy run it on machines with 1Gb of ram if you want to spawn small maps with basic structures, however if you want to spawn an entire world with thousands of structures then you may want a couple of gigs of RAM. Complex structures with "advanced features" also cost more memory, I'll explain the advanced features later . In any case, my current test world uses about 12.000 BO3 files (about 250 different structures, each BO3 file is exactly 1 chunk in size) without breaking a sweat, I believe it should work comfortably with about 2GB ram, still have to do some more testing though.
- Plants and trees spawn after structures so they will be spawned on top of your BO3. So you don't have to include grass/trees in your BO3, just include grass and the plants/trees native to the biome will be placed on the grass. This makes your BO3 blend in much better with the surrounding environment!
- Smoothing area feature. This is a big one that took a lot of time. I noticed that even though you can use source blocks and set a spawn height, using Random mode (not FromImage) oftentimes BO3's would spawn in awkward places such as in a hole in the ground with vertical walls or on top of a tiny hill with the sides of the BO3 sticking out and hanging in mid-air. To solve this I added a setting, you can now set a "smooth radius" in blocks for every BO3. TC then determines the "footprint outline" of your building based on the lowest layer of blocks in your BO3 (the whole structure, including all branches) and plots a line with the length of the smoothradius starting from each block in that footprint outline and going outwards from the BO3. To visualise this, think of putting a plate (symbolizing your BO3) on a piece of paper and drawing a line around it with a pencil, this line is the footprint outline. Now take a radius, say 20 blocks, and draw a second circle that is 20 blocks larger on each side around the first circle. TC then looks at each block in the outer circle and finds its height (this is the height of the terrain surrounding the BO3) and the height of each block in the inner circle (the height of the footprint of the BO3) and creates a smooth slope of blocks going from the inner to the outer circle. This results in a smoothing area that either looks like a hill (if the BO3 was placed higher than the surrounding terrain) or a hole (if the BO3 was placed lower than the surrounding terrain) with walls that have a perfectly gradual/even slope. The smoothing area tries to leave as much of the surrounding terrain intact as possible (such as little hills, outcrops, caves and crevices) so as to blend in and look natural. Trees and plants spawn after structures and smoothing areas so first your BO3 gets placed, then it gets a smoothing area so the surrounding terrain flows nicely to the BO3, then it gets plants and trees spawned on top of that to really make it blend in with the environment and make it look natural, like it was always supposed to be there. Oh and by the way, the blocks in the smoothing area use the blocks native to the biome the smoothing area is spawned in, there is also a setting for the blocks used in the smoothing area in the BO3 file if you want to set them manually, you can use that setting to make pillars to stand on for things like bridges, more on that later. In any case, smoothing areas make your BO3 blend in with the environment, no complicated world-editing required!
- The way that BO3's are distributed across the terrain has been completely reimplemented to try to make sure that as many BO3s as possible spawn (I also had to do this to get certain things to work like smoothing areas and spawning trees and stuff after structures and also this fixed some major performance issues).
So that was the first major improvement I made to the BO3 section of TC. I wasn't quite done yet because what kind of terrain/structure generator would be complete without a procedural dungeon generator? So yeah, I made that too. First of all I had to change the way BO3 branches were spawned, I also added some settings for advanced features. The way things used to work is that if a BO3 has branches in each of 4 directions (north, east, south, west) then each branch would get spawned in its entirety 1 by 1. That means that all of branch 1 could spawn first and could wrap itself around the origin structure, then when branch 2, 3 and 4 would try to spawn they wouldnt be able to because branch 1 was already blocking the way. So I changed the spawning mechanism so that for each "branch spawning cycle" every branch gets only 1 new child branch attached, TC does as many of these cycles untill all branches are complete. You can visualise this as a flower growing from the inside to the outside, each side growing at the same time. I also added some advanced features, for instance if a branch cannot spawn because its on a biome border or because another structure or branch is in the way then the parent branch can check if it has any other (smaller) branches queued for spawning in the same location and tries to spawn those instead. You can also mark a branch as "must spawn", for instance if you have a room consisting of 4 BO3's that must always spawn together then if you have Room-BO3-nr.1 that contains the 3 branches for the other parts of the room you can set those branches as "must spawn". In this case, if one of the BO3's cannot be spawned then none of them will be spawned at all. Using the "must spawn" setting you can create a minimum size for buildings ("spawn every part of this building, or don't spawn this building at all'). You can then attach branches to that building that do not have the "must spawn" setting (as randomised parts of the building), and even in those randomised parts you can add branches that have the "must spawn" setting enabled (like the room consisting of 4 chunks). So for example, if you have a BO3 that is a room with a door to the next room then you can make a branch that contains the next room. You could actually make multiple branches for the same location; a very large room, a large room, a small room and a dead end. TC will first try to spawn the very large room, if that doesnt fit it tries the large room, then the small room and if none of those work it spawns a dead end. If you've configured the dead-end BO3 as a "must spawn" branch then if that can't spawn the branch will be rolled back (shortened by 1 branch/level), the branch parent then checks if it has any other branches that can spawn in this location and cycles through its available branches, if those have "must spawn" branches that cannot be spawned then the branch will be rolled back yet another level, in some cases this rolling-back goes all the way back to the origin BO3 of the structure in which case the structure cannot spawn at all. So in any case, you can spawn any kind of dungeon you like with any kind of layout and any amount of different sized rooms, you can ensure that branches always have nice endings (like a dead end) and never get cut off and there are some additional settings for spawning branches inside other branches (for spawning randomised interiors in rooms for example). I probably forgot to mention some things, ofcourse I'll make tutorials for the dungeon/city/maze (whatever you like :)) generator as soon as possible.
So, this post is getting really long, are we done yet? Nope, there's a few more things.. First of all, if you go crazy with the amount of structures, smoothing areas and the procedural generator then things start getting a bit slow. I've tried to optimise things as best I could, but with all the fancy features turned on and a large amount of blocks spawning lag is kind of unavoidable. So I made a pre-generator. It's imperfect and only works for Forge (have only tested single-player) but it does the job. You can configure a radius in chunks in the terraincontrol configuration file and the first time you try to log in to your world the pre-generator will generate a square area around the spawn-point with the radius in chunks you've defined. There's only one problem with the pre-generator at the moment and that is that it needs to be restarted every 15 minutes or so to clear memory (it crashes itself safely and intentionally), so if your build takes a couple of hours you'll need to check in every 15 minutes and give it a nudge. I hope to fix that ASAP though. The pregenerator can take quite a while to spawn complex worlds, but it should still be WAY faster than exploring the world, it basically spawns everything before the world is loaded and players can join, so it should be skipping a lot of block updates/lighting/rendering work which should (at least in theory) make it a lot faster (would have to benchmark it vs other generators to see how fast it really is though).
So we've come to the last feature and that is the schematic to BO3 converter. It's a little stand-alone Windows app at the moment but I will integrate it with the editor (the graphical user interface) before I release it. I'm currently in the process of downloading every high-quality schematic I can find, converting them to BO3's (the converter automatically slices the schematics into chunks and saves them as BO3's including branches) and importing them into my world as a demonstration for what this mod can do and as a stress-test. By the way, I've also added a little feature to the editor that allows you to drag and drop schematic and BO3 files onto the editor to automatically add them to a biome, makes life a lot easier :). When I release this mod I want to make a lot of (monetised) tutorial- and demonstration videos and start a youtube channel for it, I also want to release a giant pack of BO3's that people can use with it. Like I said I'm at about 250 structures totaling some 12000 BO3 files at the moment and I expect to pretty much double that number before I'm done.
Which brings me to my last point. At the moment this mod ony supports forge singleplayer for minecraft 1.7.2 (multiplayer will be supported asap, just have to do some more testing to be sure) and it has a lot of features that standard TC doesnt have. Therefore, I would like to differentiate this mod from standard TC by calling it "Minecraft Worlds" (as in "the minecraft worlds mod"). The first reason for this is to differentiate it from standard TC, the other reasons are A. it describes what the mod does much better imo (it makes completely customised worlds), B. a name like that seems much easier to sell to the public. Ofcourse I have no problem whatsoever with crediting TerrainControl and you guys everywhere I possibly can, but I would like to call this mod Minecraft Worlds, so I hope you guys don't mind me doing that. Also, I would be very happy to share my code with you guys however I'll need some time to finish up the last stuff, tidy up the code, add comments etc, give me at least a couple more weeks. By the way, I'm afraid that some of the features I made will be Forge only, but I believe I can make all the major features work for Bukkit as well. I don't know if I'll have the time to make this mod Bukkit-compatible or help you guys make all these features fully integrated with standard TC (if you would like that) but I will definately share any code and knowledge that might make that happen.
Anyways, I think I've written more than enough for now! I'm probably just confusing people at this point :D. What you no doubt want to see is videos and screenshots. Unfortunately i'm at work at the moment (this post courtesy of my boss ) so I'll post some screenshots later today and tomorrow. What I can show you now is a video I made a while ago, however it doesn't really show very much. You can see the world, the smoothing areas and the dungeon generator in action however I only had a few BO3s at that moment that Id made myself and I'm really not a very good builder so it doesnt give a very good impression. The 250 structures I have now are at least 100x more awesome. Anyways, you can watch the video to get a basic idea of some of the features and I'll post some screenshots later showing you the full actual awesomeness of what I've got cooking at the moment :D. I hope you guys are excited!
By the way, I may say some things about TerrainControl in this video that aren't exactly accurate, like "TerrainControl won't allow you to spawn structures", sorry about that, the video was made in 1 take and I screwed up a few lines (I shouldve phrased that way differently). This is just a sneak-peek video though, Ill take this video down as soon as I've made a real presentation video.
Mah video: https://www.youtube.com/watch?v=-s9YTUzvECk
By the way, I saw @NLBlackEagle's posts about his Test world and it is truly awesome, I especially liked the quarry and the harbor. What I definately don't want to do is release this mod with about 500 structures right before the showcase for that world and completely overshadow it. So once you've taken in everything from the video and everything I've just written tell me what you'd like to do BlackEagle, it'll definately be a few more weeks till I can release anyway.
** Technically there is no lmit to the number and size of BO3's, and I've loaded fairly extreme numbers and sizes of BO3 without problems, but you can actually make a BO3 with so many blocks or a biome with so many BO3s that loading takes forever.