Talk:Hocus Pocus

From ModdingWiki
Jump to: navigation, search

Levels

From Wombat it appears the levels are 14400 bytes long, and are stored tile-based like most games in those days. From hex-editing a level exported by Wombat it appears the levels do not store the width and height of the map. I made crude maps of the first 2 levels by copy-pasting screenshots together, and the first level is at least 188x30 tiles. The second level is at least 236x50 tiles. Given that all levels have the same size, it is likely that they are all 240x60 tiles, which is exactly 14400 bytes. Wombat also exports files that are twice the size. Maybe they store where enemies, switches and other objects are placed? Or maybe it's the other way around? This definitely needs more attention. -- Spinal 00:16, 9 March 2008 (GMT)

When you extract a level file with a size of 14400 bytes with Wombat Game Tools and you open it with the command "edit /240 levelfile" in Windows or DOS you get something that looks like a level. So I think the levels are indeed 240×60 tiles. With the level files that are 28800 bytes long it's harder to see a level in it. Calvero 10:08, 9 March 2008 (GMT)
You're right, I didn't know of that feature :) So the levels are definitely 240x60, stored left-to-right, top-to-bottom, a single byte per tile. I am not also pretty convinced that the enemies etc. are stored in the second file, using 2 bytes per tile, stored in the same way. I'll do some more tests to see if how the level bytes and tiles are connected. -- Spinal 15:56, 9 March 2008 (GMT) Scratch that, things are a bit more complicated. Turns out the files that are 14400 bytes long store the background only, including items but excluding enemies. I guess the files of 28800 bytes store the foreground and enemies, more info will follow soon. -- Spinal 16:13, 9 March 2008 (GMT)
Update: the 28800 byte file contains the enemies and items indeed, but not the walls/floors/ceilings. I noticed there are 3 times more files of 14400 bytes than 28800 bytes, so maybe some of those files contain the walls. I'll do some more testing and write down my progress here. -- Spinal 15:55, 10 March 2008 (GMT)
Okay, I understand most of it now. Take Level 1, which is called "tiles for level 1" when exported from Wombat. This contains the background layer. "tiles_2 for level 1" contains enemies, lava, treasures, keys etc (lets call them "events"). "tiles for level 37" (1+36) contains the wall, floors and ceilings. "tiles for level 73" (1+36+36) contains the same as 37. Why it is double I don't know.
What I also don't understand (yet) is (dis)appearing walls. In level 1, when you use the golden key the right wall disappears. The golden key appears on the "events layer", so does the keyhole. But the disappearing walls do not. I have no idea how this works yet, but I hope to find out soon :) -- Spinal 16:14, 10 March 2008 (GMT)
Most of the stuff "missing" in the main layer, like disappearing walls, is actually stored in other files. Each level consists of 13(!) individual files in HOCUS.DAT with file sizes ranging from 8 bytes to 28800 bytes. I'll be posting my documentation on those formats shortly. --K1n9 Duk3 20:13, 19 December 2011 (GMT)
Please do, I've been able to get a couple of the layers working in Camoto but it hasn't been as straightforward as I had hoped... -- Malvineous 22:51, 19 December 2011 (GMT)

EXE Data

If I wanted to document data structures in the HOCUS.EXE file, such as the array detailing the names and effects of items, where would I put it, and would I have to give addresses for every version (I only have Shareware v1.1, Registered v1.1 and the Beta)? MainMemory 03:19, 13 April 2013 (GMT)