View previous topic :: View next topic |
Author |
Message |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Fri May 14, 2004 7:34 pm Post subject: tile encoding |
|
|
can anyone tell me how the tilesets are encoded? I am just curious about that?
thanks in advance _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri May 14, 2004 10:00 pm Post subject: |
|
|
Well, the maptile files are always an exact multiple of 320x200 bytes. Thus they must contain no header, just the maptiles. It seems that each maptile is just stored as one 320x200 256 colour bitmap. The 'whatsnew.txt' confirms this - there was a bug where the airbrush tool could spray on the tiles next to the one you were working on.
I'm pretty sure that thats the format, though there's always the tiny chance that it's wrong, I wouldn't worry about it. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Fri May 14, 2004 10:54 pm Post subject: |
|
|
Aeth once talked to me about them being in arrays, say you have two tiles. The grass is 0, and the water is 1. A sample map would be like:
1111111
1000011
1100111
1000011
1111111
etc. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat May 15, 2004 2:01 am Post subject: |
|
|
Ahh, but that is tilemaps, not tilesets. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Flamer The last guy on earth...

Joined: 04 Feb 2003 Posts: 725 Location: New Zealand (newly discovered)
|
Posted: Sat May 15, 2004 3:17 am Post subject: |
|
|
i think the method used in storing tilesets is almost the same as storing tilemaps.
where each pixel in the 320x200 tileset (or bmp, whichever way you put it) is represented by a number, that number would point to a number in the master palette which is the colour that pixel will take on.
similair to tilemaps, where each tile points to a 20x20 tile on the tileset, which is represented by a number. _________________ If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch
(no offense to anyone that was mentioned) |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Sat May 15, 2004 1:42 pm Post subject: |
|
|
I am pretty sure that the tileset file(the extention is "*.txx" where xx is number of tileset, are in not in 320*200 format, and also they have header because the first two characters in a file are "ýK". I just need someone to explain how they are encoded. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat May 15, 2004 1:58 pm Post subject: |
|
|
OH.
Those are called TILEMAPS not TILESETS.
Well of course they aren't in 320x200 format, the tilemap is stored in a map equal to the size of the map. I tried it out, and found that a 32x20 tile map gave a 651 byte file.
So yes, there is a header, but I can't help you. E-mail James Paige, or drop Minnek a question. Minnek knows them, I believe. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat May 15, 2004 4:32 pm Post subject: |
|
|
Well, after some talk on IRC it turned out he did want tilesets afterall.
But the encoding is not what I thought, as Fyre pointed out. For anyone interested see http://www.livejournal.com/users/fyrewulff/78667.html. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue May 18, 2004 12:12 pm Post subject: MXS/TIL format |
|
|
Neo's description for Fyrewulff of the format is the best I have seen yet. I actually do not understand the format in detail myself. The crazy "planar" pixel ordering is because the .MXS and .TIL format is a raw dump of Mode-X VGA memory. I never have to think about the format, because I have a couple of Assembly language routines for saving and loading 320x200 blocks of Mode-X graphics into that format. The routines were written by Brian Fisher (Brian AT HamsterRepublic DOT com) but I don't know how well he remembers the format. You are welcome to ask him.
Last edited by Bob the Hamster on Mon May 24, 2004 9:37 pm; edited 1 time in total |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Tue May 18, 2004 4:25 pm Post subject: |
|
|
thanks to fyrewulff I was able to write the program that loads the tileset and saves it into bmp format, I wrote it using vb .
here is a screenshot of the maptile that I loaded using my program.
The only problem is, if I release it to the public, the thing can be used to steal other people's graphics, which is a bad thing, and no password can protect them.
but I will try to make it so it wouldn't, which wouldn't be very good.
anyway, here is the screenshot and the best part about the program, is that you can have the maptiles be just like you would use a print screen, only without the little arrow
so tell me what you think, is it ok to release such a program?
umm. I am using the geocities, so copy the link
www.geocities.com/yuriym3/images/SAMPLE.JPG
make sure sample.jpg is in all caps
well tell me what you think? _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
Me HI.

Joined: 30 Mar 2003 Posts: 870 Location: MY CUSTOM TITLE CAME BACK
|
Posted: Tue May 18, 2004 4:33 pm Post subject: |
|
|
Ooh. Release it. It'll be great for making better backdrops (import as tileset, add detailing, export via Ysoft program, reimport as backdrop). _________________ UP DOWN UP DOWN LEFT LEFT RIGHT RIGHT A B START |
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue May 18, 2004 5:57 pm Post subject: |
|
|
For the record, I would KILL to ahve that program, as it will make day/night cycles that depend on loading new tilesets every hour of the day MUCH easier (I guess I could always print-screen, then reimport as a new tileset, but that tends to muck up the quality)
Nice work though, if it works. _________________ But enough talk, have at you! |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Tue May 18, 2004 8:05 pm Post subject: |
|
|
ok... I just have to beautify the program for now
I was also wandering if anyone here knows how many planes are there in each of the graphics files
like pt0 and so on
it would really help, as I plan on not only making the program read tiles, but also read other formats too, like walkabouts and so on.
any help would be appreciated.
maybe I can even make the program write back the graphics to the file.... but thats pointless cause custom has its own importer.
also I would love to someday make the walkabouts save under 4 bit bmp... but thats after I learn to manually save the bmps. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Tue May 18, 2004 9:42 pm Post subject: |
|
|
Ah, most cool. I can see this program becoming very useful, especially in the future.
I believe that all the graphics besides the tilesets and backdrop are encoded relatively normally (4bit of course), except that there was something about the extra pixels at the end of odd-sized rows. Your going to have to look at it. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Wed May 19, 2004 7:05 am Post subject: |
|
|
Yes TMC, it is going to be useful for the XP users, which I hope is the case, since I am running winme I have no way of testing it out on XP.
as for the walkabouts and other graphics, they are not stored normally, but rather somewhat confusing, as they do not go in left to right order, but rather top to bottom order.
if anyone her knows how exactly they are stored, let me know, that way, xp users(hopefully) can now copy their own graphics from their games.
a demo/complete program will be out as soon as I find the way to decode the rest of the graphics.
edit: I think some of you misunderstood the function of the program, all it will let you do, is view the graphic and save it into different formats(for now, bmp only). Sort of like exporter. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
|