Skip to content
Gabbi (Rickisthe1) edited this page Dec 31, 2024 · 6 revisions

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:

Example Combinations:

  1. Blocking access around a door:
    Combine 0x10 (map object placement) with 0x80 (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.

  2. A hidden door in the trees:
    Combine 0x01 (hide lower sprite halves), 0x02 (hide upper sprite halves), and 0x10 (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.

  3. An "anti-tree" effect causing sunstroke in its shade:
    Combine 0x01 (hide lower sprite halves) with 0x04 (sunstroke effect):
    0x01 + 0x04 = 0x05.
    Walking over this tile causes the player’s lower half to be hidden while also inducing sunstroke.

Notable Combinations and Unique Interactions:

  • Combining 0x80 (solid collision) with 0x02 (hide upper sprite halves) creates a "countertop" effect, allowing interaction with NPCs on the opposite side. If this effect is not desired, replace 0x80 with 0x40, which has the same solid collision properties without the interaction feature.
  • Combining 0x08 (water) with 0x04 (sunstroke) results in 0x0C, creating a "deep water" effect that causes HP loss instead of sunstroke.

Common Collision Presets:

  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.

Visual Reference for Collision Presets:

Clone this wiki locally