About Terrain Generation...
3 years ago
United States

So, I've been reading and looking into the function that generates the terrain in the game. First, certainly seed-able, but it would need some adjustments to how it picks when to generate terrain. The hard thing about the function is figuring out what number correlates to what tile. It's hard to tell what is actually being generated without being able to edit the code and run the game. Interesting knowledge, I'm sure someone has counted it at some point but earth generates down to -7500 feet. Always wondered what that depth actually was. Also, the wall between the earth and Satan is at 7300 feet. I'm pretty sure we already knew that too though, so nothing too useful.

All in all, its hard for me to figure out what the spawn rates for various materials are, when I can't tell what value is what material. Also, frankly, the function is kinda messy so it's hard to read as is.

Edited by the author 3 years ago
United States

Since I imagine it's of interest, and I figure someone may be able to read this better than I can, here is the whole terrain generation function. https://ibb.co/DW6RC0F

Darktigr likes this
United States

So, I noticed the speedrun guide made by emanfman included a manually counted table of distribution for terrain where he stated that he has determined a 32% distribution for air under ground. I figured I'd go ahead and validate that 2 or more hours of his life that he said he'll never get back by confirming in the code that, at least for the air part, he's basically correct. There is a 1 in 3 chance that any given block will be air.

Edited by the author 3 years ago
Darktigr likes this

Hey, is there anyway I could get a copy of the source code from you? I really like this game and want to learn more about it but can't find a solid link to the source anywhere. I understand if it's not possible, thanks!

Speedox12 likes this
Ontario, Canada

Hey guys sorry I've been away for so long. I was really disappointed to find that terrain generation is not very cut-and-dry. I have the full code from the original game. If there's interest I can take a look at it again and try to either rewrite it to pseudocode or just de-obfuscate it. It is generated based on some kind of randomness that appears to be somewhat susceptible to manipulation, however it is not consistent and I cannot for the life of me figure out how to set a seed for flash's random number generation functions.

Speedox12 likes this
Game stats
Followers
51
Runs
109
Players
31
Latest threads
Posted 3 years ago
Posted 2 years ago
3 replies
Posted 2 years ago
0 replies
Posted 3 years ago
1 reply
Posted 3 years ago
5 replies
Posted 3 years ago