COLI Filetype Breakdown (F-Zero GX)

All your homebrew software needs & discussion
Post Reply
User avatar
StarkNebula
Posts: 69
Joined: Fri Feb 21, 2014 5:58 am
Location: Toronto, Canada
Contact:

COLI Filetype Breakdown (F-Zero GX)

Post by StarkNebula » Sun Feb 22, 2015 11:19 pm

// WIP //

This thread is going start out being a bit of a information dump. Long story short, Panzerhandschuh and I have been tackling F-Zero GX's collision data since sometime January and have made a lot of progress, though that has stopped lately due to college. However, we've compile a lot of information, and we've both made some tools to help understand the format better. First off, I'm just going to paste links to Google Docs we've compiled:

Header Format (WIP): https://docs.google.com/spreadsheets/d/ ... sp=sharing
COLI Header Extracts: https://docs.google.com/spreadsheets/d/ ... =719228113 (multiple tabs)
COLI [ST01] - Collision Triangles & Quads: https://docs.google.com/spreadsheets/d/ ... edit#gid=0
COLI [ST03] - Collision Triangles & Quads: https://docs.google.com/spreadsheets/d/ ... 1292935836
Spline Data Structure [ST03]: https://docs.google.com/spreadsheets/d/ ... edit#gid=0

I made a script in Processing (Java) to convert all offsets to byte, octet, word, and string formats. I'll link it to the converted output spreadsheet. If need be, I can post the script. TSV and CSV formats.
https://cloudup.com/c5MAo1_srWf

This is Panzerhandschuh's tool. Using Unity (3D), you can visually see the stage's track spline, tangents, and misc. collision, such as boost pad, heal-pit, etc.
https://github.com/Panzerhandschuh/FZero-Unity-Tests

Going to update this later with a more accurate explanation of the header format, and what we know.
FYI - CosmoCortney, we still need a RAM dump and the offsets you were editing. ;)
Last edited by StarkNebula on Mon Feb 23, 2015 2:39 am, edited 1 time in total.
Panzerhandschuh
Posts: 1
Joined: Sun Jan 25, 2015 1:39 am

Re: COLI Filetype Breakdown (F-Zero GX)

Post by Panzerhandschuh » Mon Feb 23, 2015 1:54 am

Here's a download to the full Unity project: http://www.mediafire.com/download/k9x15 ... eroTest.7z
It requires Unity 4.6+ though it might still work on older versions with some missing features.
Basically this tool just reads and displays all of the info in a coli file that we understand currently. There's also a save feature that will update the coli file with updated values changed from Unity's inspector. Currently, only track spline and object edits are saved though. I recommend reading the source code if you want to get a better understanding of the structure of coli files.

Instructions:
- Open the project in Unity
- Load the Scene file
- Click Main Camera in the object hierarchy and change the course number value to select a course
- If you are missing scripts on the main camera, select EditorCamera.cs, DebugHelper.cs, and CollisionParser.cs for the missing scripts
- Make all edits in Unity's edit mode (game mode only lets you look around)

Update 2/27/15: Uncommented code that loads mesh collisions and made it easier to load courses by editing a value in the inspector (requires having course files in the "Input" folder).
Update 3/1/15: Added FZObject class for loading 3D object info

Chapter 8:
Image

LLC:
Image

Also, here's a coli excel file for course03 that's almost fully labelled using discovered patterns and offsets: http://www.mediafire.com/view/4a9mnychl ... 35B97.xlsx
Last edited by Panzerhandschuh on Sun Mar 01, 2015 10:01 pm, edited 6 times in total.
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: COLI Filetype Breakdown (F-Zero GX)

Post by emu_kidid » Mon Feb 23, 2015 2:10 am

Nice work guys, maybe we'll see a SNES track in F-Zero GX at some point ;)
Image
User avatar
CosmoCortney
Posts: 87
Joined: Sun Nov 11, 2012 9:09 pm
Location: under your bed
Contact:

Re: COLI Filetype Breakdown (F-Zero GX)

Post by CosmoCortney » Sun Mar 01, 2015 11:15 pm

this is all nice :)
I've been testing out a lot of things on the console too, while the coli-data were loaded into RAM.
As discussed with StarkNebula on Twitter before, I have figured out a few things about positioning and scaling 3D objects. But there are still a few oddities about this: http://gamehacking.org/vb/threads/11862

I can maybe help by checking out various values when the game is running by accessing the RAM through the USB Gecko.
Also known as Lawn Meower
Yoshimaster96
Posts: 17
Joined: Fri Jan 09, 2015 3:09 pm

Re: COLI Filetype Breakdown (F-Zero GX)

Post by Yoshimaster96 » Sat Mar 14, 2015 8:11 pm

Well this is different from SMB! The collision and objects in SMB are located in one file, and the collision triangle format is very different. It just has an extension of .lz, not .gma.lz, not .tpl.lz, just .lz. I'm working on a converter, when I get done with it, I'll share it. Also, there are two 4 byte words, that determine the end of the header, I'm guessing, since SMB1 has an 0xA0 byte header, and SMB2 has a header longer than 0x800 bytes (!), this was used for compatibility, so they could reuse the engine (to an extent).
mightytyphoon
Posts: 2
Joined: Mon Feb 01, 2021 2:12 pm

Re: COLI Filetype Breakdown (F-Zero GX)

Post by mightytyphoon » Mon Feb 01, 2021 2:22 pm

StarkNebula wrote:
Sun Feb 22, 2015 11:19 pm
// WIP //

This thread is going start out being a bit of a information dump. Long story short, Panzerhandschuh and I have been tackling F-Zero GX's collision data since sometime January and have made a lot of progress, though that has stopped lately due to college. However, we've compile a lot of information, and we've both made some tools to help understand the format better. First off, I'm just going to paste links to Google Docs we've compiled:

Header Format (WIP): https://docs.google.com/spreadsheets/d/ ... sp=sharing
COLI Header Extracts: https://docs.google.com/spreadsheets/d/ ... =719228113 (multiple tabs)
COLI [ST01] - Collision Triangles & Quads: https://docs.google.com/spreadsheets/d/ ... edit#gid=0
COLI [ST03] - Collision Triangles & Quads: https://docs.google.com/spreadsheets/d/ ... 1292935836
Spline Data Structure [ST03]: https://docs.google.com/spreadsheets/d/ ... edit#gid=0

I made a script in Processing (Java) to convert all offsets to byte, octet, word, and string formats. I'll link it to the converted output spreadsheet. If need be, I can post the script. TSV and CSV formats.
https://cloudup.com/c5MAo1_srWf

This is Panzerhandschuh's tool. Using Unity (3D), you can visually see the stage's track spline, tangents, and misc. collision, such as boost pad, heal-pit, etc.
https://github.com/Panzerhandschuh/FZero-Unity-Tests

Going to update this later with a more accurate explanation of the header format, and what we know.
FYI - CosmoCortney, we still need a RAM dump and the offsets you were editing. ;)
Hi, I am very sorry to unbury this old topic, but I would like to understand better how FzeroGx is made. I try to do an hovering race car game.
So far I found 4 possibilities to implement the physics under unreal engine. They are here :

1. use built in physics for vehicle or third person gamer to make a hover car (this kinda works but needs adjustements and it's difficult to get to the same feeling as Fzero)
2. use a raycast to get the floor and then adapt height and rotation of the race machine accordingly using normals OR barycenters (which gives the best result for now)
3. use splines and make the car follow these (not tested yet)
4. use raycasts to hover above floor (which give something more like Wipeout)

So I want to test the third possibility, using splines, and I found your subject. I would like to hear more on your understanding on this matter. I would like to know if F zero GX handling is made using splines or raycasts. I think it's really either one or the other even if I could be wrong.

thanks a lot in advance for your response.
Post Reply