Page 1 of 1

WebGL GTA1 (GTA1 in your web browser)

Posted: 01 Jan 2012, 10:47
by niklasvh
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!

Re: GTA 1 .G24 style file format

Posted: 01 Jan 2012, 11:02
by Sektor
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

Posted: 01 Jan 2012, 13:17
by niklasvh
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...


Re: GTA 1 .G24 style file format

Posted: 01 Jan 2012, 14:33
by B-$hep

Re: GTA 1 .G24 style file format

Posted: 01 Jan 2012, 15:25
by niklasvh
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...

Re: GTA 1 .G24 style file format

Posted: 12 Jan 2012, 15:27
by Sektor
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.

Re: G24 style file format WebGL GTA1

Posted: 02 May 2012, 16:49
by Sektor
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". [frenzy]

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.