Inspiration
We were inspired by the medieval theme of the HackNotts25 hackathon to create a project which fit the theme. After discussion we decided to do a creative based project related to the theme and since we all had a common interest in maps and decided to make a map generation project!
What it does
The project is a website that takes a user provided seed value and ocean level to mathematically compute a fantasy world map and associated lore! The map contains details including oceans, countries, towns, lakes, cities, capital cities and a number of biomes including grasslands, forests, deserts, mountains, swamps and more! The information from this map is then passed to a generative AI model which uses it to create lore about the world! This lore includes political landscapes, cultural history and adventure hooks, all of which can be used by worldbuilders for inspiration for fantasy storytelling!
How we built it
We used Perlin noise to generate a noise map which forms the basis of terrain. The elevation of this noise map determines if it is land-based terrain or ocean. Other fields including temperature and moisture leves in concert with the elevation determines the biome of each pixel. Following on from this, towns, capital cities and countries are formed by looking at borders, rivers and coasts to determine the best placement. The names of locations are randomly generated by combining a number of syllables together. All of this information is then passed to a generative AI model which uses it in detail with a highly specific prompt to return the relevant lore for the associated world. All of this is displayed on our medieval themed website to immerse the user into the fantasy world they generated :D
Challenges we ran into
One challenge we encountered is in relation to the ocean. The ocean level determines if the elevation of the Perlin noise map being above it mean it is terrain or if it is below then it is ocean. As such, if the ocean level is very low this can result in many locations being calculated as being an optimal location for a city for example because the negative weighting of the ocean has been greatly reduced which can result in a city being placed in the ocean.
A second challenge we encountered is making the generative AI actually use the information provided from the map. We found that it sometimes liked to hallucinate its own locations rather than using the world map and as such we had to do a lot of prompt engineering to ensure that the map would be used.
Accomplishments that we're proud of
An accomplishment we are proud of is the country feature of the map. It was a challenge to make the country borders follow a natural line around a feature such as a coast, lake or biome boundary. Another challenge was making rivers and lakes that would snake from a point of high elevation (such as a mountain) and gradually move into a lower elevation biome whilst heading towards the ocean.
What we learned
We learned how to manipulate using Perlin noise maps to mathematically represent terrain and then introduce secondary maps which can be used to influence the biome of each pixel. We also learnt more about how we can use prompt engineering to precisely specify exactly what we want a generative AI model to produce.
What's next for YeOldeStoryteller - Team 0
We think the YeOldStoryteller has lots of potential for future features to be added. This includes rare structures added to the map such as temples, ruins, dungeons and such. Futhermore we could add different types of settlements including villages, hamlets, castles and forts. We could also add even more biomes like a volcanic environment!
Log in or sign up for Devpost to join the conversation.