Difference between revisions of "Animal Crossing (NES game)"

From Pin Eight
Jump to: navigation, search
(rewrote leads of article and RAM section)
(RAM: tokumaru@nesdev pointed something out which led me to notice a math error)
Line 40: Line 40:
  
 
''ACWW'' stores 512 bytes for each "acre" (there are 16) and 1024 bytes for each "room" (there are 5 in the player's house and 8 in neighbors' houses).
 
''ACWW'' stores 512 bytes for each "acre" (there are 16) and 1024 bytes for each "room" (there are 5 in the player's house and 8 in neighbors' houses).
That's 16x16 cells by 16 bits in each cell, with two "layers" for indoor cells rooms.
+
That's 16x16 cells by 16 bits in each cell, with two "layers" for cells in rooms.
 
That makes up 21504 bytes.
 
That makes up 21504 bytes.
We could impose a restriction that there be 32 or fewer items in each acre or room, which would sort of fit in with the spirit of the limitation on "floor strength" present in ''ACWW''.
+
We could impose a restriction that there be 32 or fewer items in each acre or room, which would sort of fit in with the spirit of the limitation on "floor strength" used by ''ACWW'' to limit texture memory and geometry length.
 
Then we'd wind up with a 96-byte "acre" or "room".
 
Then we'd wind up with a 96-byte "acre" or "room".
 
Each record would have 4 bits for x, 4 bits for y, and 16 bits for what item.
 
Each record would have 4 bits for x, 4 bits for y, and 16 bits for what item.
The 13 rooms would then take up 1248 bytes in all, cutting acre/room storage by 20256 bytes.
+
There would be no need for "layers" because two objects could be put at the same (x, y) location.
This leaves 41024 bytes.
+
The 16 acres and 13 rooms would then take up 2784 bytes in all, cutting acre/room storage by 18720 bytes.
 +
This leaves 42560 bytes.
  
 
In ''ACWW'', players can send 244-byte letters to one another and to their animal neighbors.
 
In ''ACWW'', players can send 244-byte letters to one another and to their animal neighbors.
 
There are 48 letters carried at any moment: each player can carry ten letters, and each animal neighbor can carry one to show to another player.
 
There are 48 letters carried at any moment: each player can carry ten letters, and each animal neighbor can carry one to show to another player.
 
This makes 11712 bytes; I don't know what to do with it all.
 
This makes 11712 bytes; I don't know what to do with it all.

Revision as of 14:49, 9 December 2009

Nintendo's Animal Crossing series was originally developed with the Nintendo 64 in mind. Some members of the nesdev.com board claim that technical limitations of a target platform do not limit gameplay possibilities. But here I show how a homebrew clone of AC for the Nintendo Entertainment System just won't happen.

PPU

The NES PPU (Picture Processing Unit) has a display list into which the CPU can load 64 instructions to draw "sprites", or small animated images, at any point on the screen. Sprites that appear earlier in this display list are drawn "in front" of later sprites. But only eight sprites can appear on each scanline at once; if there are more, the ones in back are hidden. The "flicker" that one sees in NES games comes from the game rapidly switching which sprites are in front so that important sprites don't disappear completely. Most NES games' characters are 16 pixels wide, consisting of two sprites.

NES has a backdrop color, four 3-color palettes for background tiles, and four 3-color palettes for sprites. A few games (such as Mega Man series) overlay multiple sprites on top of each other to squeeze more colors into a small space, but that increases the flicker problem, and fewer colors are available for different objects. Already, once the player walks up next to three animal neighbors, all four palettes would be in use, leaving nothing for the tools.

For a player character, the three colors might be the outline, clothes, and skin. This doesn't allow for clothes with patterns on them, unless patterns are reduced to a 1-bit pattern of clothes and outline. And even then, we'd need to build real-time texture-mapping software render the pattern onto the clothes as the player moves. That's not going to happen on an NES. The first Nintendo console designed for a fully texture-mapped environment was Nintendo 64, on which the Japanese beta version of Animal Crossing was released. So the Able Sisters would be reduced to selling solid colors.

The Game Boy Color has Harvest Moon GBC. Its sprite palettes follow the general scheme of outline, clothes, and skin, and there appears to be an overlay sprite for additional clothes. But the GBC has a narrower screen and more sprites on each scanline (ten on GBC vs. eight on NES), making flicker less of a problem. It also has twice as many palettes (eight for backgrounds and eight for sprites).

RAM

AnimalMap is an editor for Animal Crossing: Wild World saved games. The editor's source code reveals that the game stores the state of the town in the first 0x15FE0 = 90080 bytes of a 256 KiB serial flash chip. (The rest of the save chip contains a backup copy of the last known good state of the town and numerous letters that the players have saved.) Most NES mappers, on the other hand, use a battery-backed 6264 SRAM chip, which provides 8192 bytes of nonvolatile memory. I did find a few easy cuts that one could make, but it would still need to get five times smaller to fit in a typical NES save chip:

We already know from PPU above that we can get rid of the 50 patterns that ACWW lets players design: 32 player patterns (8 for each of 4 players), 8 for neighbors' clothing (one for each player), 8 on display at Able Sisters, and one each for Blanca's face and the town flag. ACWW stores each pattern in 560 bytes: a 48-byte header and a 32x32x4-bit bitmap. There goes 28000 bytes, leaving 61280 bytes.

ACWW stores 512 bytes for each "acre" (there are 16) and 1024 bytes for each "room" (there are 5 in the player's house and 8 in neighbors' houses). That's 16x16 cells by 16 bits in each cell, with two "layers" for cells in rooms. That makes up 21504 bytes. We could impose a restriction that there be 32 or fewer items in each acre or room, which would sort of fit in with the spirit of the limitation on "floor strength" used by ACWW to limit texture memory and geometry length. Then we'd wind up with a 96-byte "acre" or "room". Each record would have 4 bits for x, 4 bits for y, and 16 bits for what item. There would be no need for "layers" because two objects could be put at the same (x, y) location. The 16 acres and 13 rooms would then take up 2784 bytes in all, cutting acre/room storage by 18720 bytes. This leaves 42560 bytes.

In ACWW, players can send 244-byte letters to one another and to their animal neighbors. There are 48 letters carried at any moment: each player can carry ten letters, and each animal neighbor can carry one to show to another player. This makes 11712 bytes; I don't know what to do with it all.