Post

How Does Animal Crossing Generate Your Town?

Before terraforming, we had to reset for hours to get an ideal Animal Crossing town… Let’s take a look at how town generation works in the original game.

This video includes mistakes, misinformation, or oversights! See below for corrections.

Mistakes & Corrections

Whenever I say things are “flagged”, “masked”, or “mapped” to each other, it’s just to explain it easier. Most things I described here are not bitmasks or custom structures with attached variables, but instead exist separately in lookup tables and arrays.

I use graphics of Paper Mario and Pokémon Sapphire as an example of battery based save cartridges. Both of these games actually use flash memory to save, and real examples of games using battery-based saves would be the first two generation Pokémon games on the Game Boy and Ocarina of Time on the N64.

01:53 - Note that “gates” are not attached to acres from the start, but instead exist in a lookup table for each block type later on.

Video

Thumbnails

directory directory

 

Additional Resources

Numerical Recipes in C:
https://cnl.gmu.edu/facility/NumericalRecipesinC.pdf

 

This post is licensed under CC BY 4.0 by the author.