speedrun.com speedrun.com speedrun.com
  • Games
  • Streams
  • Forums
  • More...
    Home Games Streams Forums
    News Knowledge Base About Support Hub SRC Supporter Speedrun Shop
    Night Mode
    Social
    Twitter Discord
  • Log in
  • Sign up
Language (Beta)

български

Català

Čeština

Dansk

Deutsch

ελληνικά

English

Español

Français

Gaeilge

Gàidhlig

Bahasa Indonesia

Italiano

עברית‎

Latviešu valoda

Lietuvių kalba

Nederlands

日本語

Norsk

Polski

Português

Русский

Suomi

Svenska

Türkçe

中文 (简体)

中文 (繁體)

български

Català

Čeština

Dansk

Deutsch

ελληνικά

English

Español

Français

Gaeilge

Gàidhlig

Bahasa Indonesia

Italiano

עברית‎

Latviešu valoda

Lietuvių kalba

Nederlands

日本語

Norsk

Polski

Português

Русский

Suomi

Svenska

Türkçe

中文 (简体)

中文 (繁體)

Cancel
Motherload
Motherload (2004)
Motherload series
Web
Webgame
Leaderboards
    Full Game Leaderboard
News Guides Resources Streams Forum Statistics Boosters
Motherload Forum  /  About Terrain Generation...

Speedox12Speedox12

United States

  Speedox12Speedox12
30 Jul 2020, 03:39 (edited: 10 Aug 2020, 01:54)

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.

 

Speedox12Speedox12

United States

  Speedox12Speedox12
30 Jul 2020, 03:54

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

DarktigrDarktigr likes this. 

Speedox12Speedox12

United States

  Speedox12Speedox12
1 Aug 2020, 02:46 (edited: 4 Mar 2021, 04:15)

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.

DarktigrDarktigr likes this. 

hlsiirahlsiira

  hlsiirahlsiira
5 Nov 2020, 03:02

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!

Speedox12Speedox12 likes this. 

[user deleted]

  [user deleted]
27 Dec 2020, 16:27

So after taking a look at the code, I noticed a few things:

I assume this code is for the Goldium version of the game, and this is because the bottom code I believe consists of the 3 mazes that exist under the "challenge" mode (towards the bottom, of the 0's and 1's).

In addition, I notice the scroll spawn is likely the extreme negative number if statement (-1050, -1080).

Are there any other files that contain any sort of generation related to the game? Perhaps there is a table that translates these magic numbers into the actual ores that they are.

Speedox12Speedox12 likes this. 

emanfmanemanfman

Ontario, Canada

  emanfmanemanfman
8 Feb 2021, 23:13

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.

Speedox12Speedox12 likes this. 
Latest News
View all
No news
Recent Threads
View all
Thread Author
For Community Consideration
Last post 14 Nov 2021
Speedox12Speedox12
0 replies
About Gas Pockets...
Last post 12 Nov 2021
Speedox12Speedox12
3 replies
Set Seed Category Rule Update
Last post 4 Nov 2021
emanfmanemanfman
0 replies
MotherLoad Speedrun Edition!
Last post 27 Feb 2021
emanfmanemanfman
1 replies
About Terrain Generation...
Last post 8 Feb 2021
Speedox12Speedox12
5 replies
Moderators
DarktigrDarktigr  emanfmanemanfman  Otterstone_GamerOtterstone_Gamer 
speedrun.com speedrun.com
Overview
Games Forums Streams News
Support
Knowledge Base About Support Hub Partnerships
More
Become a Supporter Speedrun Shop Privacy Policy Terms of Use
Socials
Twitter Discord
Copyright 2023
Elo Entertainment Inc.