| Post 1 | New | Posted December 4th, 2005 |
|---|---|
zeroXP
| Hi everyone, as you can see I am new to this scene; I'm not actually modding, the far-away goal is to rewrite an engine capable of playing GTA1 (using the data from the free version). If it ever comes anywhere close, I release the source under an open license; just to make it clear that this is no commercial project. Right now I can display (part of) the city (just the static tiles making up the blocks) using OpenGL, though still lots of errors. If there are no objections, I keep coming back, asking more questions; this seems one of the last places where to find people with the knowledge I may need. So to start with questions: * Can anyone tell me more about the height/size of blocks as drawn in-game? Currently I texture a unit-cube, but that doesn't look right (may have other causes). * When looking at the "slope type" bits in "type_map" (CDS.DOC) I am not sure howto interpret something like "1- 2 = up 26 low, high"; is it 26 degrees, pixel or another unit? * Concerning the FON files; the GTA hacking handbook (http://gta.mendelsohn.de/Reference/Fil_index.html) seems to define them, but the link is broken; the older (zip) version doesn't contain that file. Is that fileformat documented somewhere? I'd appreciate any answers or links to more documentation (I do have the two docs from NMA plus "Corrections and Notes regarding DMA's technical doc..."). Thank you |
| Post 2 | New | Posted December 25th, 2005. Updated August 5th, 2011 (asdf) |
|---|---|
| Delfi Programmer ![]()
| i emailed you all this but am posting it here just-in-case: hi, i declare myself an expert on gta1 and gta2 map format, i can help you with anything you ask, email me at fffffffffffffffffdsdf@gmail.com, let's get straight to answers: * Can anyone tell me more about the height/size of blocks as drawn in-game? Currently I texture a unit-cube, but that doesn't look right (may have other causes). one gta cube is 1*1*1 unit big * When looking at the "slope type" bits in "type_map" (CDS.DOC) I am not sure howto interpret something like "1- 2 = up 26 low, high"; is it 26 degrees, pixel or another unit? use it like this: * 1- 2 = up 26 low, high * 3 - 4 = down 26 low, high * 5 - 6 = left 26 low, high * 7 - 8 = right 26 low, high * 9 - 16 = up 7 low - high * 17 - 24 = down 7 low - high * 25 - 32 = left 7 low - high * 33 - 40 = right 7 low - high * 41 - 44 = 45 up,down,left,right there are 3 types of slopes in gta1, (90?, 45? and 7?) all change level for just one cube. take parts 1 and 2, these when used together make a pass from lower to upper level over 2 cubes, cube 1 is lower and cube 2 is upper part for this. * Concerning the FON files; the GTA hacking handbook (http://gta.mendelsohn.de/Reference/Fil_index.html) seems to define them, but the link is broken; the older (zip) version doesn't contain that file. Is that fileformat documented somewhere? this is very easy format: Quote: type TFon_file_header = packed record NumPics:byte; height:Byte; end; type TFon_image_header = packed record width:byte; end; the file starts with TFon_file_header which tells you num pics and all pictures height then for NumPics there are repeatitous data for characters starting with TFon_image_header that tells you character width, following that you get charwidth * fontheight of 8 bit bitmap data. last 768 bytes in a file is palette (RGB format) i have sound format as well: Quote: grand theft auto .sdt format this file is copyright 2002 Delfi delfi@volja.net data types are named as used in borland delphi's object pascal language warning! this is for GTA1 and GTA:L only gta2 and gta3 use different format... sdt files contains info for raw sound data files with same name but raw extension divide size of sdt file by 12 to get number of sound records each record contains information on how to use raw file here is delphi packed record: Tsoundentry = packed record rawstart: longword; rawsize: longword; samplerate: longword; end; you can export sound like this: make new empty file and write wav file header: TWave_data = packed record ChunkID: array[0..3] of char; // 'RIFF' text ChunkSize: Longword; Format: array[0..3] of char; // 'WAVE' text Subchunk1ID: array[0..3] of char; // 'fmt ' text Subchunk1Size: Longword; AudioFormat: Word; NumChannels: Word; SampleRate: Longword; ByteRate: Longword; BlockAlign: Word; BitsPerSample: Word; Subchunk2ID: array[0..3] of char; // 'data' text Subchunk2Size: Longword; end; set info in header Wave_data.ChunkID := 'RIFF'; Wave_data.ChunkSize:= 49188; Wave_data.Format:= 'WAVE'; Wave_data.Subchunk1ID:= 'fmt '; Wave_data.Subchunk1Size:= 16; Wave_data.AudioFormat:= 1; Wave_data.NumChannels:= 1; Wave_data.SampleRate:= sample rate of entry Wave_data.BitsPerSample:=8; Wave_data.ByteRate:= sample rate of entry Wave_data.BlockAlign:=1; Wave_data.Subchunk2ID:= 'data'; Wave_data.Subchunk2Size:= raw data size now copy raw data and write it after this header if you did everything correct you will be able to play wav file with any program... something interesting from GTA Wave gta sound editor readme file: In GTA, all the sounds are in 8-bit mono format, except for those in LEVEL000. The sounds in this file are 16-bit, the first three being stereo. i'm onto a similar project, a gta1 / gta2 clone project, but gta formats are too limiting for me, and i went onto coding my own gta game clone, you can get screenshoots & demo http://gtatools.com/tdc/, it is written with opengl and delphi 4, i've gotten rendering pretty much perfect, and made my own map and sprite editor, but won't be compatible with gta file formats, but converters can be easily done, here is a picture: gtatools.com/tdc/tdcware.jpg best regards, Jernej L. ------------------ www.mathpudding.com |
| Post 3 | New | Posted September 23rd, 2006. Updated October 12th, 2006 |
|---|---|
zeroXP
| Do you like screenshots? Thanks to a lot of help from Delfi I have made a little progress (hunting bugs and growing features ;-) skybound.portland.co.uk/ogta/screen_history.html#bottom Current state of the renderer is proof of concept that I read the files correctly; in other words: a mess of 'glVertex' calls. There is nothing playable at all. Update: The latest version displays some objects and has an optional FPS 3D mode: you can fly through the city (and find errors). The good news is: you can now do it yourself (and it is fun :-) source is available. The bad news is: there are still so many errors left, you can hardly make a screenshot without a bug in it. |
| Post 4 | New | Posted September 27th, 2006 |
|---|---|
Sektor
| Nice work. I know it's still very work in progress but can you use SDL to make it easier to port? ------------------ Stealing cars is the easy part |
| Post 5 | New | Posted September 29th, 2006 |
|---|---|
zeroXP
| Thanks. One goal is to keep it portable; So far my 'required software' is * OpenGL [ www.opengl.org/ ] * SDL ( & SDL_image ) [ www.libsdl.org/ ] * PhysicsFS [ www.icculus.org/physfs/ ] * Loki [ sourceforge.net/projects/loki-lib/ ] * g++ ( GNU C++ ) [ gcc.gnu.org/ ] * GNU Make [ www.gnu.org/software/make/ ] The choice of the last two already hints as much: I am developing under Linux |
| Post 6 | New | Posted September 30th, 2006 |
|---|---|
| Delfi Programmer ![]()
| Seems you got most of stuff right now, i still see some flipping problems on some pictures, but i guess those are fixed, as the last one looks pretty ok :) if you have more questions, just send me another email :) ------------------ www.mathpudding.com |
| Post 7 | New | Posted November 24th, 2006 | another screenshot |
|---|---|
zeroXP
| I thought I'd share this one with you: img135.imageshack.us/img135/8946/loadingmods20061123hd9.jpg With some help (thanks to Delfi) I can load the G24 format as well; so many (bright) colours ;-) Still nothing playable. |
| Post 8 | New | Posted January 2nd, 2007 | server down |
|---|---|
zeroXP
| As my freehoster seems to be experiencing technical problems (...again) I am trying to move things to better suited locations. The image gallery (some old, some new) is now picasaweb.google.com/under.northern.sky/OpenGTAScreenshots Note that some screenshots are based on a version newer than the one below. For the moment the actual files are: upload2.net/page/download/uPXSSxwPraKjuQe/ogta_sneak-preview-2006-12-10_win32.zi p.html upload2.net/page/download/jfycJO84N53uf6E/ogta_sneak-preview-2006-12-10_linux.ta r.bz2.html upload2.net/page/download/KBBbAbkW80A4zok/ogta_src_2006-12-10.tar.bz2.html I am sorry about the download wait period; looking for better hosting. Assuming you are using Windows and have GTA1 installed you only need the first file; unzip it into your GTADATA directory. Anyway I think using this topic (in the 'editing' section) is no longer appropriate; this is no longer about file formats. Unless told otherwise I will resume this thread in the general discussion area when more progress is made. My next goals involve peds and the related violence: shooting, blood and fear should become digital reality soon. |
| Post 9 | New | Posted January 3rd, 2007 |
|---|---|
| Delfi Programmer ![]()
| Nice progress, if you need any hosting i can help you with it, i could let you use gtatools.com webspace / ftp - if you want tell me over email. and about the explosions i see, how many frames of it there are? if i remember right, the last (24th?) 4 pics of explosions aren't really used by the game(just a small thing i noticed making my own explosions for a gta1 mod). ------------------ www.mathpudding.com |

