Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Destruction Derby 2 (PC) LEVEL.DAT

Featured Replies

  • 1 month later...

@mrmaller1905

I have looked into this for a while.

The race tracks are not stored as big 3D models. Here's how the game works:

1. When a track loads, the respective LEVEL.DAT file gets loaded into a big area of RAM. It contains compressed data but I think it consists of compressed chunks with headers between them.

2. Based on the player's car position values, chunks of the track get loaded in on the fly. Seems like the game decompresses the chunks into a ring-buffer.

I tried to make sense of the data and verify its structure to write an extractor, but I wasn't able to find correct vertex data yet. I'm almost certain, that I my decompressor isn't working, but it's not HOW it decompresses data but WHAT data it decompresses. One would likely have to determine and verify headers to make sense of the data structure and THEN decompress the respective chunks.

Also, see my comment here:

I'm not that good at reverse engineering and the project started to consume too much time. I had to pause it for now. If anyone wants to help out,  you're very welcome.

  • Supporter
On 11/26/2025 at 3:48 PM, mrmaller1905 said:

What is LEVEL.DAT from Destruction Derby 2 and does anyone have an idea to start a new tool to extract car and track models into or edits maps or create and export custom car models?

 

destructionderby2_leveldat.zip 158.9 kB · 4 downloads

# Script to extract Destruction derby 2 .DAT files - Rabatini

get END_OF_TABLE long
goto 0

# Lê o primeiro
get OFFSET long

for
    savepos CURR_POS
 
    if CURR_POS >= END_OF_TABLE
        get FILE_END asize
        xmath SIZE "FILE_END - OFFSET"
        log "" OFFSET SIZE
        break
    endif

    get NEXT_OFFSET long
    
    xmath SIZE "NEXT_OFFSET - OFFSET"
    
    log "" OFFSET SIZE
    
    math OFFSET = NEXT_OFFSET
next

You can use this BMS script to unpack the archives. It also works on sub-containers. For example, if an extracted file is another container, just use the script again to reveal the actual files inside.

example is the first file.

DD2.zip

Edited by Rabatini

  • Supporter
23 minutes ago, shak-otay said:

Thanks, but around 10kB is rather small to contain bigger meshes, if any.

yes!, Op just sent one file.

Here's the extracted DIRINFO, containing all game resources.
LEV0 to LEVF contain race track data, with the exception of LEV0, LEVC and LFV - they seem to contain generic data for menus, maybe the car model, etc.

Each LEV directory contains a LEVEL.DAT file. That's where the models are. The TXx and TXC files are textures and CLUT.
There is also a LEVEL_DECOMP.BIN - that's just from my script after running the decompression against the LEVEL.DAT file, what is most likely the wrong approach. You can ignore these files.
The script also runs the DD2.BMS script posted here before against each LEVEL.DAT, that's where the qbms_out folders are from. That's where will continue research.

PW: reshax

PS: I overlooked that this thread is for the PC version of the game. I'm working with data from the PSX version. I can't tell if that will cause any discrepancies. 

EDIT: In case you want to take a look at it, this gist of mine contains the game's decompression algorithm, ported from Ghidra output. I think it is correct but I wasn't able to actually confirm it yet. https://gist.github.com/AcidicVoid/944c05c40c2ff5d3bb46abcb015d307c

dirinfo_extracted.7z

Edited by ashijikuboido

  • Supporter
1 hour ago, ashijikuboido said:

Here's the extracted DIRINFO, containing all game resources.
LEV0 to LEVF contain race track data, with the exception of LEV0, LEVC and LFV - they seem to contain generic data for menus, maybe the car model, etc.

Each LEV directory contains a LEVEL.DAT file. That's where the models are. The TXx and TXC files are textures and CLUT.
There is also a LEVEL_DECOMP.BIN - that's just from my script after running the decompression against the LEVEL.DAT file, what is most likely the wrong approach. You can ignore these files.
The script also runs the DD2.BMS script posted here before against each LEVEL.DAT, that's where the qbms_out folders are from. That's where will continue research.

PW: reshax

PS: I overlooked that this thread is for the PC version of the game. I'm working with data from the PSX version. I can't tell if that will cause any discrepancies. 

EDIT: In case you want to take a look at it, this gist of mine contains the game's decompression algorithm, ported from Ghidra output. I think it is correct but I wasn't able to actually confirm it yet. https://gist.github.com/AcidicVoid/944c05c40c2ff5d3bb46abcb015d307c

dirinfo_extracted.7z 6.46 MB · 1 download

tks.

the compression algorithm is the same.
00000000.dat@0000000000.png.2374b4615826f4f16f6c76a5823f5e51.png

drivers.zip

  • Supporter
26 minutes ago, ashijikuboido said:

Tx0, 1, and 2 are uncompressed files; you can easily open them in MumuggTool.

Drivers.bin is compressed with LZSS.

I think the level file is compressed too, or at least the subfiles inside it are.


image.png.8d1c6dafc462f7cfbaa66388e7e39a7d.png

I'm writing a tool to extract all DD2 race tracks and save them as textured 3D objects but I still struggle with the compressed files and the data structure.

I tried to find compressed streams with Offzip:

offzip.exe -S -a -z -8 LEVEL.DAT offzip_out 0

Then, I ran my decompression script on all files:

python decompress.py offzip_out

 

Here are all resulting (original and decompressed) files:
offzip_out.zip

Help is very welcome.

Edited by ashijikuboido

  • Supporter
33 minutes ago, ashijikuboido said:

I'm writing a tool to extract all DD2 race tracks and save them as textured 3D objects but I still struggle with the compressed files and the data structure.

I tried to find compressed streams with Offzip:

offzip.exe -S -a -z -8 LEVEL.DAT offzip_out 0

Then, I ran my decompression script on all files:

python decompress.py offzip_out

decompress.py 2.77 kB · 0 downloads

Here are all resulting (original and decompressed) files:
offzip_out.zip

Help is very welcome.

As I mentioned earlier, the only compression method I found was a custom LZSS format. To proceed, you'll need to unpack the container files first, and then apply the tool to the extracted data.

lzss_dd2_decomp.py

Edited by Rabatini

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.