Ingame world maps, level maps, map layouts.. and their format

Anything relating to CD-i can be discussed in this forum. From the multiple hardware iterations of the system to the sofware including games, reference, music and Video CDs. Maybe you hold an interest in Philips Media and the many development houses set up to cater for CD-i if so then this is the forum.
Post Reply
User avatar
Shikotei
Burn:Cycle Activated
Posts: 23
Joined: Mon Mar 01, 2010 5:01 pm
Location: Netherlands

Ingame world maps, level maps, map layouts.. and their format

Post by Shikotei » Mon Sep 04, 2017 3:30 pm

Perhaps I should've done this a lot sooner... but better late than never!
The many games I've played had incredible maps such as overworld maps, dungeon maps, race-layout maps, or a complex system of multiple areas making one giant world.
Games such as Alice In Wonderland is one of those latter. Oh the times I got lost (or family for that matter) trying to find my way forward (after having to backtrack 10+ screens)...
Zelda's Adventure has one of the most beautiful maps out on the CD-i, but many of those available on the 'net are low quality and small in dimensions, and simply don't do it justice.
Sometimes having a map would have made things so much easier in games such as Dimo's Quest and Micro Machines.

For games with a giant map I used a script to divide the ginormous image into hundreds and hundreds of smaller images to make it viable for viewing on the web.
The viewer of this map has a bit of (experimental) JavaScript. It may not work on every browser out there, but at least it works on Firefox 54, Chrome 60, IE11 (must allow ActiveX though..) and probably some versions that are a little older.
Use your mouse (perhaps it works with fingers on a tablet/phone) to scroll through the world.
There's a minimap to the right to show you where you are.
You can also drag the minimap for fast-travel!

I'll add a little bit of information on how the map data is stored/encoded. It's not supposed to be a full explanation, but just a bit of insight on what incredible (sometimes complex) methods were used.

Zelda's Adventure
Giant map
Original size: 12288x8000 pixels and about 72MB.
Each piece is 198x200 pixels and range from 1kB-5kB (nigh empty) to 125kB (the biggest). A grid of 4x4 pieces is shown. 2520 pieces total.
Encoding method:
- DYUV, one screen at a time (384x240 pixels per screen)
- 305 screens total in over.rtf
The file over.rtf contains WAY MORE than just images! Audio sectors detected.

Dimo's Quest
List of maps.
Size per map: 1152x704 pixels, ranging between 17kB and 115kB.
Encoding method:
- 1 level in levNN.rtf (NN=01..51)
- Level is 72 by 44 tiles
- Stored diagonally mirrored (Xout=Yin, Yout=Xin)
- Level tiles are indexed, 2 bytes per tile
- 1 set of tiles in gfxsetM.blk (M=NN/10+1) (ie N=34 -> M=2).
- Tile set is CLUT stored

The Apprentice
List of maps.
Size per map: 360x3980 pixels, ranging between 461kB and 904kB.
Encoding method:
- 1 level in mapN_M.dat (N=1..7, M=1..3 for N<=6, M=1..5 for N=7)
- 3 layers per map: background, foreground (platforms, decorations, etc), interactibles
- Background: 2 bytes per tile, 6 tiles per row, 200 rows (1 wide, 4x3 wide, 1 wide)
- Foreground: 2 bytes per tile, 16 tiles per row, 200 rows
- Interactibles: 2 bytes per tile, 16 tiles per row, 200 rows
- Layer tiles are indexed (background has gaps: tiles that are 3 'normal' tiles wide 'cost' 3 indices -> subsequent background: 0,3,6,9 instead of 0,1,2,3)
- Tiles are stored compiled in 2 pieces (top half, bottom half), 20x10 pixels per piece (20x20 total)
- Tiles (all layers) are stored in levelN.dat (N=1..6, b (b for bonus levels: map7_M.dat M=1..5))
levelN.dat contains WAY MORE images than just the level tiles! Monsters, Marvin, effects (basically every required image for that level).
Only the first tower was 'fully' completed. It is the only one where I replaced the interactibles with the actual interactibles. The other towers (and bonus levels) only have their index.

List of games that have CLUT-stored maps
These images are easy to extract and thus I won't show 'em here. Besides, there's no added insight or overview on 'where to go' for these games.
- Link: The Faces of Evil
- Zelda: The Wand of Gamelon

The list:
Zelda's Adventure overworld map
Dimo's Quest level maps
The Apprentice level maps
Micro Machines level maps
Alice In Wonderland world map
Buzz Off level maps
Room Service level maps

Games that are added later will be on the above list, while the details will be in their own post.

Currently working on processing Micro Machines (list of maps) and Alice In Wonderland (giant map).

-- edit 08/09/'17 --
Added MicroMachines and Alice In Wonderland to the list of games.

--edit 09/11/'17 --
Added Family Games II: Buzz Off and Room Service to the list of games.
Last edited by Shikotei on Thu Nov 09, 2017 12:13 pm, edited 2 times in total.

User avatar
Shikotei
Burn:Cycle Activated
Posts: 23
Joined: Mon Mar 01, 2010 5:01 pm
Location: Netherlands

Re: Ingame world maps, level maps, map layouts.. and their format

Post by Shikotei » Fri Sep 08, 2017 5:27 pm

Well, this took quite a bit longer than expected. Partially due to MicroMachines' weird CLUT pixel format, but mostly due to Alice's stupidly obscene connection.
Anyway:

Micro Machines
List of maps.
Size per map: 3072x3072 pixels, ranging between 212kB and 1478kB.
Encoding method:
- 1 level in ROUNDN.M (N=1..7, M=1..3 for N=1..5, M=1..5 for N=6..7) (with a few exceptions)
- Level is 32 by 32 blocks
- Level blocks are indexed (only 0x00 to 0x7F are used: 0x80 to 0xFF are treated as 0x00 to 0x7F), 1 byte per block
- Block is 6 by 6 tiles, indexed (1 byte per tile)
- Block is defined in BLOCKS/N.BLK (N=BEDROOM,BREAKFST,GARAGE,GARDEN,PATIO,POOL,SAND,SCHOOL,SPORTS) (first block of 'index' data)
- Tile is 16x16 pixels
- Tile is stored in BLOCKS/N.BLK (N=BEDROOM,BREAKFST,GARAGE, etc) (second block of 'index' data)
- Tile is CLUT stored - color index is 0x00 to 0x8F, index 0x80 to 0xFF are treated as 0x00 to 0x7F. These indices indicate special purpose (races go below it, fall/drown/sink, or transported elsewhere).

Alice In Wonderland
Giant map
Original size: 8200x9600 pixels and 4MB in size. Small size (MB) because over 90% is empty space.
Each piece is 200 by 200 pixels and range from 1kB-5kB (nigh empty) to 21kB (the biggest). A grid of 4x4 pieces is shown. 1968 pieces total.
The green lines indicate where each door (and sometimes map edge) leads to. Arrows indicate one-way tickets. The brown arrows are guestimated (the only ones that weren't in the Let'sPlay I watched).
Encoding method:
- All screens in alice_rooms.rtf (320x160 pixels per screen, 251 screens total)
- 1 screen is 40 by 20 tiles, indexed (2 bytes per tile)
- Tile is 8x8 pixels (CLUT stored)
- Tile is stored in fpc.rtf
- fpc.rtf contains 21 sets of tiles
- Tile index has unknown relation to set index
- Each screen had 21 variations, correct one hand-picked.

The list:
Micro Machines level maps
Alice In Wonderland world map

User avatar
Shikotei
Burn:Cycle Activated
Posts: 23
Joined: Mon Mar 01, 2010 5:01 pm
Location: Netherlands

Re: Ingame world maps, level maps, map layouts.. and their format

Post by Shikotei » Thu Nov 09, 2017 12:12 pm

I had hoped to have done this faster, but I've been stuck at Family Games II - Room Service for a long while.
This time I've looked at the Family Games II games and even though there's a bunch of games on it, there's really just two that I think require a map.
Mortal Pong, Power Bucket, and the Exploding Pizza games don't even have maps (just game screens)!

Buzz Off
List of maps.
Size per map: 9300x512 pixels, ranging between 2075kB and 2646kB. Level 8 is 8800px wide though.
Encoding method:
- 1 level in levelN.rtf (N=1..8 )
- Level is stored as CLUT7, in sections of 100px wide (93 sections (88 for level 8 )).
- Level is stored as single background with interactibles visible
- Lower half contains collision data (used colors to make this clear).

Room Service
List of maps.
Size per map: 2848x2848, 2720x2720, 2800x2800, ranging between 718kB and 1116kB, and between 751kB and 1161kB with control numbers.
Encoding method:
- 1 level in roomN.rtf (N=1..3) (/RTF/ROOM/<file>)
- Level is variant in size, but always 2 bytes per tile. (178x178, 170x170, 175x175)
- Level size (nr tiles by nr tiles) is stored in first 4 bytes of roomN.rtf (N=1..3)
- Tiles are CLUT stored, 16x16 pixels.
- Color table in roomN.dat (N=1..3) (/DATA/ROOM/<file>)
- Tile index is bitwise rotated right 1 bit. 7 MSbs are suspected control/action bits.
IE: source=0x9096 -> rotate left 1 bit -> index=0x212D&0x01FF = 0x012D, control=0x212D&0xFE00 = 0x2000
(I could be wrong and have switched the MSB and LSB, in which case the tile index is the 9 MSb and the control bits the 7 LSb
IE: source=0x9680 -> index=0x9680&0xFF80 >> 7 = 0x012D, control=0x9680&0x007F = 0x0000)

Shown numbers on map are the control values. Some reveal the hidden coins in Level 3, but not the changes made by picking up keys. Those are probably in the .dat file.
Interesting tidbit is that in Level 3, not all teleport pads (yellow 'W' markers) are active. Most notably the area with the ton of time and coins!
Oh how many times I tried to get there, testing out every teleport pad in the giant field (32 pads). Just saw that all but one goes to 'home'.

The list:
Buzz Off level maps
Room Service level maps

Post Reply