shinyquagsire23 / DesktopAdventures

A recreation of the Desktop Adventures engine in C
GNU Lesser General Public License v2.1
47 stars 4 forks source link

World Generation #6

Open shinyquagsire23 opened 7 years ago

shinyquagsire23 commented 7 years ago

Yoda Stories has a megafunction at 0x422210 for generating the world. While this probably won't be imported directly into DesktopAdventures, this engine will need some kind of world generation similar. The basic function of the world generation is as follows:

Other Notes

shinyquagsire23 commented 7 years ago

Some experiments with these mins/maxes:

World with width max/min set to 3 and 1. Doesn't quite look like a width...

Width max/min set to 2 and 2

After checking how those are used, the final value for that parameter ends up being (rand() % 3) + (rand() % -4) + world_min_width + rand % (world_max_width - world_min_width + 1). Modifying the value directly doesn't seem to show a width or anything immediately obvious.

Setting all values to 0 gets this result:

shinyquagsire23 commented 7 years ago

Looking at the last screenshot, it looks like there's at least a minimum of two item exchanges. I might keep setting values to minimums to get an idea of the minimum requirements for worlds.