Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Udary

Scaled world generation

9 posts in this topic

As has been discussed in numerous places, stone seems to spread a loooooong way in the new builds. This leads to more exploration, but travelling by foot is something that is slow and can be dangerous. If you need to travel a really long way, pray to the server admin you can have multiple /sethome's.

 

So.....

 

I did some experimentation and started to "scale" the world generator.

 

Sorry, I am going to be a bit nerdy and talk code for a bit here, so most of you will probably just close the thread now....

 

Still here? Ok, up front I would like to say I would really like Dunk's, Kitty's or preferably the creator Bioxx's feedback on what I'm going to discuss. I hope they follow the forums, even if 2 of them are very quiet these days. If they don't, maybe Kitty can you nudge them  ;)

 

tl:dr: Scaling: found it, tweaked it, works well, has issues, looking for help!

 

WorldCacheManager.java is responsible for the creation of the rock, trees, and pretty much everything you see in the game, except the actual layout of the "seed" landscape. I've yet to find anywhere that works, so I assume it's vanilla Minecraft stuff. As I said it's responsible for rock formation, which got me thinking as to how it did it.

 

return this.rockCache[index].getDataLayerAt(rocksIndexLayer[index], x, y);

 

This is how... so it relies on an x and y and seems to be the chunk reference, could be player, but I don't really care for this series of tests. Whatever is in the rockCache for this position is presented to the world. I created a world with a known seed, and get a feel for the landscape. I happened to be at an intersection of 3 rock types, ironic really... Then went in to the code and changed it to:

 

return this.rockCache[index].getDataLayerAt(rocksIndexLayer[index], x * 10, y * 10);

 

Sure enough the stone was completely different! not just scaled, but COMPLETELY different. Then I realised I was at a z of 7000. So I got to my original world, head to 0,0 and check out the stone layers. It's all one stone for a really long way. Make the change and see what happens... The stone layer changed pretty close to the spawn. I didn't want to go too far and see if it was the same shape as in all but north the stone went for a realllly long way. So, it's based from 0,0 and expands from there, this is good!

 

I carry on tweaking the numbers and stone does indeed change, I went crazy and changed the scale to 100 and pretty much every chunk was a different stone. I'm getting pretty excited by now... until I realise debris was all....how do I put it...screwed! Debris didn't match the stone it was over. So I fiddle more and scale pretty much all the LayerGeneratorData methods to include the same scale factor. This all seemed to work, except everything else is broken...climate is all screwed now. Locally it's fine, but go 1000-2000 north and it's tundra/arctic, go further and it's tropical!

 

So, this is where I need a professional's opinion. I assume climate is related to loadEVTLayerGeneratorData? But then getTreeLayerAt would have a direct relationship to this. If you change the climate you'd need to change the seeded trees? But I don't want to change the climate in the same scale, only the stone. Somewhere in this is the Debris generator, but this doesn't seem to be linked to the loadRockLayerGeneratorData as this didn't work on test 1 and 2. Regardless, could someone more intelegent than me please help me understand? My new world's are brilliant, new rocks every few hundred blocks or more if I want, but a little screwed up with regards to climate, unless you only worry about local changes and not the overall big picture, in which case it's fine.

 

I've settled for "fine", but would like to understand a bit more, as I feel I've broken TFC's core.

 

BTW, thanks for exposing your code and allowing me to do things like this. You don't have to, but from one nerd to another, I really appreciate that you have opened it up for a fantastic mod.

1

Share this post


Link to post
Share on other sites

I agree, I had to ride a boat for at least 15 minutes to get out of marble.

1

Share this post


Link to post
Share on other sites

Honestly if you're looking to adjust the rock layers, there's a better way. Go to the class "com.bioxx.tfc.WorldGen.GenLayers.DataLayers.Rock" and reduce the number of zoom levels. Every time we zoom the genlayer we are in effect doubling the area covered by the rock type. It starts at 5, reduce it to 2 or 3 and see if you like that better.

0

Share this post


Link to post
Share on other sites

Is it possible to actually scale the entire world ? Right now it feels a bit small, 1k blocks is traveled within a day by horse if not far more. Traveling from the arctic to the equator within 2 days is a bit boring.

0

Share this post


Link to post
Share on other sites

Is it possible to actually scale the entire world ? Right now it feels a bit small, 1k blocks is traveled within a day by horse if not far more. Traveling from the arctic to the equator within 2 days is a bit boring.

 

The distance from the actual equator (z=0) to the arctic, is 30,000 blocks. According to the vanilla wiki, horses only travel at 34.83 km/hour (real life hour, not in-game). So it would take about 3 in-game days of straight riding, without hitting any oceans to travel from arctic to equator.

 

Edit: If the player is on foot, it will take them about 4.5 days if they're going in a straight line, on flat terrain, sprinting the entire time. If they are going by boat it will take about the same time as sprinting.

0

Share this post


Link to post
Share on other sites

There is this story you know... *caugh* "Around the World in Eighty Days".

0

Share this post


Link to post
Share on other sites

There is this story you know... *caugh* "Around the World in Eighty Days".

 

Ok, let's take that story then and scale it to TFC. In order to travel around the world in 80 days, assuming that you never stop at any point, and that the radius of the earth is 6,400km you have to be travelling at an average speed of 20.94 km/h.

 

Now, we don't need to go around the entire world, we're just going from north pole to equator, so that's only 1/4 the trip, and therefore should only take 20 days.

 

20 days is 2/3rd's of a month. In TFC, a month using default configs is only 8 days long. 2/3rds of 8 days is 5.33 days.

 

At 20 real-life minutes per day, that's 106.66 minutes, or 1.77 hours.

 

1.77 hours, at 20.95 km/hour = 37,234 meters (blocks)

 

So in essence, the scale from the north pole to the equator would be about 40,000 blocks. Now in TFC, 30,000 blocks does not represent the north pole, it represents the arctic circle. The distance from the equator to the arctic circle is only 3/4 the distance of the distance from the equator to the north pole.

 

What's 3/4 of 40,000? That's right, 30,000. 30,000 blocks from the equator to the arctic circle, which is already the scale of TFC worlds.

 

Perhaps we did the math when we chose that value?

3

Share this post


Link to post
Share on other sites

lol kitty, sometimes you take things a biiiiit too seriously ;)

0

Share this post


Link to post
Share on other sites