Find User here you can look for a user

Playing with Terrain Generation

4y
#1
Have been messing around with terrain generation for MC2. I am developing a world "seeding" mechanism, in which a unique seed will generate the exact same world terrain + biome placement every single time. In this way, not only can players share world seeds that they enjoy, but the game also does not have to internally store it's topography information, allowing for much smaller save file sizes given the potential "infinite" size of MC2 planet maps.


This is just a sample MC2 red planet with some ice patches, a few tiles of which are actually liquid surface water.

Anyway, I still have some work to do on terrain/biome generation, but if I can get it to always create the same thing every time with a given seed, it will cut down massively on the amount of data needed for save games, not to mention the amount of data which needs to be transferred from server to clients, as it would be a lot easier for the server to simply transfer a single seed string VS a bunch of compiled terrain data.

I still need to decide if lower-level terrain features, such as natural resource placements/rocks/trees/etc will also be determined by the seed, or if those would vary by game. I can't really let the client generate those based on the seed, since they will always be changing. For instance, trees can spread or be cut down, resources can be consumed, etc.

I have thought of other technical considerations as well. For example, if MC2 v1.0.0 ships with a Red Planet that has 5 available biomes, and then the v1.1.0 update comes along and adds 4 new biomes, the game seed may end up assigning incorrect biomes to different places. For example, if chunk x:y is designated as a winter tundra biome, but the new update changes the number of biomes, the generator may get confused and change chunk x:y into a canyon or something.

One solution would be to keep a record in the game file of all assigned biome locations, although the downside is the added data being stored in the game file. Another solution is to keep a list of available biomes in the game file that is stored when the game is created, and if new biomes are added, they will not be available on existing maps.

Anyway, these are the technical parts of MC2 I am working on before I even get into adding an interface, buildings, or rovers!
Owner of Ape Apps, LLC
4y
#2
You could have resource generation use a separate seed for each biome so each biome gets their correct resource, though there will be added data.
4y
#3
Or....Mc2 can have resource nodes underneath the surface of the planet, making it so that you dont have to see the resources in order to gather them. (Taking ideas from No Mans Sky)
Join my Commonwealth! WAst4IOO : and join the NOZ discord: https://discord.gg/Vy6UZhhfA2
Owner of Komet Labs!
4y
#4
Love to see work on MC2 is doing great! Can't wait to see more :P

As for the problem with terrain generation and save files size, go simple and save the terrain. It would be too painful for long time players to not be able to profit from new features.

What you could do to save some space is instead of saving the entire terrain (all the blocks) you just save the version at which the chunk was generated, and from that the game would figure out which biomes did exist at that time, and get the correct terrain (just like it was generated the first time). Does that make sense ?
Creator of Coloniae
Admin of the MC2 translation project
3y
#5
Or.. you can use some topographical trick for save the map. Using some algorithm you should be able to save the map, using low data volume.
Welcome
Ape Apps, LLC is an independent software development company founded in 2010 by Brandon Stecklein. Over the years, Ape Apps has published over 400 apps and games across various platforms. You can get in touch with Brandon on Twitter or by leaving a post on his wall @bastecklein
App of the Day