Hi,
I am working on a WebGL implementation of GTA 1 (currently renders all the CMP map files), but having issues getting the colors correctly for tiles fetched from the G24 (24-bit version). I've gone through the DMA CityScape Data Structure documentation, but there is really no information on the G24 format, just briefly mentions that instead of using a palette, it uses instead a palette_index and CLUT data to correctly define the colors for a tile.
If someone is familiar with the format, could they give some insight on how the colors are set for a tile? What is the relation from tile<->palette_index<->clut data?
I am currently using pre-fetched tile sprites made by other tools, but as I want the game to be able to run custom tiles in their original format, I'd want it to be able to directly fetch them from the G24 files.
Thanks!
WebGL GTA1 (GTA1 in your web browser)
Re: GTA 1 .G24 style file format
WebGL GTA1 would be cool. I'll ask some experts. Did you try looking at the OpenGTA source code? http://ogta.fifengine.de/download.html
Re: GTA 1 .G24 style file format
Thanks, I'll have a look at your link.
Got some progress on the palettes, managed to load the first 9 tiles correctly (probably just because they use the same palette or something), but at least some progress now...
Got some progress on the palettes, managed to load the first 9 tiles correctly (probably just because they use the same palette or something), but at least some progress now...
Re: GTA 1 .G24 style file format
Always wear safety glasses while programming.
Re: GTA 1 .G24 style file format
Thanks, got it sorted
A few screenies: https://plus.google.com/photos/11503058 ... 4170119697
Still some issues with the transparent palettes... appears that it isn't just transparent materials which use them...
A few screenies: https://plus.google.com/photos/11503058 ... 4170119697
Still some issues with the transparent palettes... appears that it isn't just transparent materials which use them...
Re: GTA 1 .G24 style file format
I didn't link gta1-gta2-tool-source-code.7z since I don't remember it having any GTA1 style tools.
I see you posted on G+ that you added Box2d physics. That could be fun.
I see you posted on G+ that you added Box2d physics. That could be fun.
Re: G24 style file format WebGL GTA1
Good new, Niklas released a walk around the city demo:
http://experiments.hertzen.com/webgl-gta/
Try it (takes a while to load and uses a lot of system resources)
Bad news, "I currently have no plans of continuing developing this any further in the near future".
At least the source code has been released, so others can improve it.
http://gtamp.com/2012/05/03/webgl-gta1-demo/
I get 59 FPS in Chrome, 30-46 in Firefox 12.
http://experiments.hertzen.com/webgl-gta/
Try it (takes a while to load and uses a lot of system resources)
Bad news, "I currently have no plans of continuing developing this any further in the near future".
At least the source code has been released, so others can improve it.
http://gtamp.com/2012/05/03/webgl-gta1-demo/
I get 59 FPS in Chrome, 30-46 in Firefox 12.