-
Notifications
You must be signed in to change notification settings - Fork 38
Collision
In EarthBound (or MOTHER 2), each 32x32 map tile is divided into smaller 8x8 tiles, each of which can have its collision properties independently configured. These properties, referred to as surface flags in some contexts, are represented as bit flags. Each individual bit in a collision entry corresponds to a specific function. Below is an explanation of each bit, presented first in hexadecimal format (as used in the EB Project Editor), followed by its binary equivalent:
0x80 (10000000) = Solid collision (impassable tile)
0x40 (01000000) = Unused, functions identically to solid collision
0x20 (00100000) = Unused, no observable effect
0x10 (00010000) = Allows placement of a "map object" (e.g., door, ladder, stairs)
0x08 (00001000) = Water tile (alters sprite appearance and movement)
0x04 (00000100) = Causes sunstroke when walked on
0x02 (00000010) = Hides the upper half of sprites behind the tile’s foreground
0x01 (00000001) = Hides the lower half of sprites behind the tile’s foreground
By combining these bits using a programmer’s calculator in hexadecimal mode, you can create a single 8x8 collision tile with multiple simultaneous effects. Below are a few examples illustrating how these combinations work:
-
Blocking access around a door:
Combine0x10
(map object placement) with0x80
(solid collision):
0x10 + 0x80 = 0x90
.
This creates a collision tile for a door that is both impassable and interactive, meaning players cannot walk through or around it. -
A hidden door in the trees:
Combine0x01
(hide lower sprite halves),0x02
(hide upper sprite halves), and0x10
(map object placement):
0x01 + 0x02 + 0x10 = 0x13
.
This setup creates a concealed door that obscures the player’s sprite as they pass through the tile. -
An "anti-tree" effect causing sunstroke in its shade:
Combine0x01
(hide lower sprite halves) with0x04
(sunstroke effect):
0x01 + 0x04 = 0x05
.
Walking over this tile causes the player’s lower half to be hidden while also inducing sunstroke.
- Combining
0x80
(solid collision) with0x02
(hide upper sprite halves) creates a "countertop" effect, allowing interaction with NPCs on the opposite side. If this effect is not desired, replace0x80
with0x40
, which has the same solid collision properties without the interaction feature. - Combining
0x08
(water) with0x04
(sunstroke) results in0x0C
, creating a "deep water" effect that causes HP loss instead of sunstroke.
00 = Walkable tile
01 = Tile with an object obscuring the lower part of sprites (e.g., fence, mailbox)
03 = Tile that fully obscures sprites
04 = Desert terrain (causes sunstroke)
08 = Shallow water (alters sprite appearance to waist-deep)
09 = Shallow water with partial sprite occlusion
0B = Shallow water with full sprite occlusion
0C = Deep water (causes HP loss, fully submerges sprites)
0D = Deep water with partial sprite occlusion
0F = Deep water with full sprite occlusion
10 = Allows map objects (e.g., doors, stairs)
80 = Impassable tile (e.g., walls)
82 = Solid, interactable tile (e.g., countertops or desks)
90 = Non-walkable tile with map object placement
Select the desired preset and click-drag it across the map to apply the collision properties. When creating custom maps, it is advisable to refer to the default collision settings for consistency. Keep in mind that the more frequently a tile is reused across the map, the more optimized the tileset will be. Any modifications you make to a tile will apply globally to all instances in which it is used.
- Overworld Sprites
- Battle Backgrounds
- Battle Sprites
- Title Screen
- Window Graphics
- Logos
- Fonts
- Animations
- Swirls
- Introduction
- Translating The Main Text
- Trying Out Your Translation
- Translating Enemies and Items
- Modifying Game Fonts
- Translating Misc Text
- Translating and Adjusting Menus
- Export and Modify Compressed Graphics
- HP/PP text box graphics
- Cast Credits
- Staff Credits
- Translating "THE END... ?" Animation