GTAMP.com

Grand Theft Auto Media Press
It is currently Sat Apr 19, 2014 4:28 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Jan 01, 2012 10:47 am 
Offline
Ped

Joined: Sun Jan 01, 2012 10:39 am
Posts: 3
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!


Top
 Profile  
 
PostPosted: Sun Jan 01, 2012 11:02 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1063
Location: GTAMP.com
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


Top
 Profile  
 
PostPosted: Sun Jan 01, 2012 1:17 pm 
Offline
Ped

Joined: Sun Jan 01, 2012 10:39 am
Posts: 3
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...

http://imgur.com/5HsWx


Top
 Profile  
 
PostPosted: Sun Jan 01, 2012 2:33 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 449
Location: Estonia
http://gtamp.com/GTA2/gta1-gta2-tool-source-code.7z

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
PostPosted: Sun Jan 01, 2012 3:25 pm 
Offline
Ped

Joined: Sun Jan 01, 2012 10:39 am
Posts: 3
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...


Top
 Profile  
 
PostPosted: Thu Jan 12, 2012 3:27 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1063
Location: GTAMP.com
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.


Top
 Profile  
 
PostPosted: Wed May 02, 2012 4:49 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1063
Location: GTAMP.com
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group