Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

tile encoding
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade
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.

PostPosted: Fri May 14, 2004 7:34 pm    Post subject: tile encoding Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri May 14, 2004 10:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
MultiColoredWizard
Come back, baby!
The Breastmaster



Joined: 01 Feb 2003
Posts: 1232

PostPosted: Fri May 14, 2004 10:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat May 15, 2004 2:01 am    Post subject: Reply with quote

Ahh, but that is tilemaps, not tilesets.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Flamer
The last guy on earth...




Joined: 04 Feb 2003
Posts: 725
Location: New Zealand (newly discovered)

PostPosted: Sat May 15, 2004 3:17 am    Post subject: Reply with quote

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 Raspberry!
(no offense to anyone that was mentioned)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Sat May 15, 2004 1:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat May 15, 2004 1:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat May 15, 2004 4:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Tue May 18, 2004 12:12 pm    Post subject: MXS/TIL format Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Tue May 18, 2004 4:25 pm    Post subject: Reply with quote

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 Happy.

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
View user's profile Send private message Send e-mail Visit poster's website
Me
HI.




Joined: 30 Mar 2003
Posts: 870
Location: MY CUSTOM TITLE CAME BACK

PostPosted: Tue May 18, 2004 4:33 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Shadowiii
It's been real.




Joined: 14 Feb 2003
Posts: 2460

PostPosted: Tue May 18, 2004 5:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Tue May 18, 2004 8:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue May 18, 2004 9:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Wed May 19, 2004 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade All times are GMT - 8 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group