Vorticons TileInfo Format

Request patches for Keens 1-3.
Post Reply
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Vorticons TileInfo Format

Post by CommanderSpleen »

Anybody got some documentation about this? I'm gonna need to know it for a couple of features I'm implementing into Vortlev.

The first two layers seem fairly straightforward, and with a bit of experimentation I should be able to work out the rest, but it would be good to know exactly what is what.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Indeed. I am also interested in this, specifically the difference in formates between Keen 1,2 and 3 If I wanted to use Keen 2 tileinfo in Keen 1, what would I need to do?
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

I can't remember if I ever wrote any documentation about this or not; you can get the source for tileinfo, though (VB5 -- if you don't have it, you can edit it and run it with VB5CCE (help files here), though you can't compile it to an exe).

IIRC, the tileinfo is, in C terms:

Code: Select all

#define TILECOUNT 611
#define LAYERS 6
#define ANIMATION 0
#define BEHAVIOUR 1
#define TOP 2
#define RIGHT 3
#define BOTTOM 4
#define LEFT 5
short int tileinfo[LAYERS][TILECOUNT];

/* for example */
tileinfo[BEHAVIOUR][tile_number] = 0;
The tileinfo code is pretty straightforward; note that the lists of properties are stored in the form itself, so you need VB to see them.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

So why is Keen 3 tileinfo so much larger on a per tile basis than Keen 1 or 2?
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

Maybe it has something to do with the way doors and point items are done on a per-line basis? Or the extra pick-ups, like the Ankh, single shot, etc? Also, don't only certain tile-types block the limbs of the Mangling Machine? :)
Stealthy71088
Posts: 583
Joined: Thu Mar 17, 2005 11:54 pm
Location: NY

Post by Stealthy71088 »

Here's an interesting thought. If a larger number of tiles are in keen3, and are compatible with tileinfo, and the 3 games are similar enough that keenedit can edit all 3 the same way, is it therefore somehow possible to edit the number of tiles in a given mod?
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

What are you suggesting--getting -more- tiles somehow? Because we don't need a patch to go less... just self control. :)
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

Although a patch to decrease the amount of tiles would be handy for the purpose of saving memory in mods that don't need that many tiles, for use with larger sprites and such.

I believe LL is experimenting with the possibility of increasing the amount of tiles, but there's the matter of finding space for the extra tileinfo data.
User avatar
Freeyorp101
Posts: 159
Joined: Thu Nov 24, 2005 2:12 am
Location: New Zealand

Post by Freeyorp101 »

I believe LL is experimenting with the possibility of increasing the amount of tiles, but there's the matter of finding space for the extra tileinfo data.
wasn't that a april fools on the pckf?

http://p072.ezboard.com/fpubliccommande ... 1217.topic
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

Nay, she was talking about it on MSN the other day. Though I was doubtful that it would be as simple as she speculates--I'm sure there must be some other limit in the code that needs to be addressed besides simply expanding the tile data.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Likely the memory addresses -- to allow more tile data and such, likely all the other offsets need to be moved forward (in case there is still free memory). Just a guess, though.
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

It might well be possible in Keen3, as the tileinfo has a fair amount of spare room (don't ask me why). Levellord's suggestion of loading the tileinfo from an external file is interesting, but I'm not sure it's practical: the tileinfo data is looked up all over the place in the code; and you'd have to patch each static lookup with a dynamic pointer-based lookup. Depending on how the tileinfo data is currently looked up, this might be possible or insanely hard.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Maybe it has something to do with the way doors and point items are done on a per-line basis? Or the extra pick-ups, like the Ankh, single shot, etc? Also, don't only certain tile-types block the limbs of the Mangling Machine? :)
MM tile blocking is stored with the MM code, at $4F00ish; the doors are no different in code space than Keen 1, same with the points. The extra pickup codes are stored elsewhere, so thats not it.
is it therefore somehow possible to edit the number of tiles in a given mod?
I can esily make *less* tiles. I can also import Keen 3 tile properties into Dangerous Dave, but not vice versa, as there is not enough space in Keen 3. If the tileinfo file was made external, it is easy to add more tiles.
I'm sure there must be some other limit in the code that needs to be addressed besides simply expanding the tile data.
Indeed, there are several variables that tell the game how many tiles there are, these must be changed. Alos, there is a tile maximum at about 1'000 tiles, then memory quits.
the tileinfo data is looked up all over the place in the code; and you'd have to patch each static lookup with a dynamic pointer-based lookup. Depending on how the tileinfo data is currently looked up, this might be possible or insanely hard.
Thats the big problem; some replacements are easy, they use less code, others I have no idea about, they need more room. An external .tli file is a long way off. *sigh*

But yes, tell me more about this spare space in Keen 3; as far as I can tell it serves no purpose, like the junk space in the sound file.
Post Reply