Posted:
22 Aug 2012 at 11:02

Comments

Obi1mcd on 22 Aug 2012 at 12:41

Vertical tile flipping in next JJ2+?

snzspeed on 22 Aug 2012 at 13:50

Please keep posting these. Its amazing to see this kind of teasers.

TreyLina on 22 Aug 2012 at 16:14

I thought this was just a random picture until I read the comments…lol

Jerrythabest on 22 Aug 2012 at 19:15

Except for the lightning from the bottom, this tile actually looks better upside down!

Though I must admit I wouldn’t have realised it was about vertical tile flipping just by looking at the image.

GoldRabbit on 22 Aug 2012 at 22:19

This looks amazing and there’s no doubt that it’s no easy feat. Great job, keep it up!

minmay on 23 Aug 2012 at 21:17

The absolute first thing I thought of was a part of this one JCSRef article about how vertically flipping tiles would double the filesizes and be bad

Jerrythabest on 24 Aug 2012 at 10:27

I think in the modern world it wouldn’t make much of a difference if a j2l file is 40 kB instead of 20 kB. If JJ2 can’t cope with it we’ll just have to see why it can’t and come with a solution to that. :p

Seren on 24 Aug 2012 at 12:02

Uh, I might be wrong but I’m nearly sure vertical flipping can’t double file sizes. I’m not good at technical details of JJ2 file formats but I think that even in TSF each tile uses only 13 bits out of 16 allowed by the 2 byte space they take. Information about whether a tile is vertically flipped or not will only add 1 bit to that number, so uncompressed file size won’t change at all, compressed might change slightly.

GoldRabbit on 24 Aug 2012 at 13:08

I don’t think that the value (whether a tile is Y-flipped or not) is what counts. I think I remember reading that each .j2t contains the image of the tileset, the mask, the flipped image and the flipped mask.
Add to that the Y-flipped image, the Y-flipped mask, the XY-flipped image and the XY-flipped mask and there you have it, double the filesize.
I don’t actually know if it works like this since I’ve read these things such a long time ago, but it seems plausible.

Seren on 24 Aug 2012 at 13:42

I recall JCSref says that indeed. That’s false. If it were true, you’d have seen tilesets using the flipped image for additional tiles or hidden messages long ago. And I mean literally, because I had wanted to place some tiles there myself, then got told that info isn’t true by some programmers. Including Violet, I think.

Violet CLM on 24 Aug 2012 at 17:15

@minmay: Past me is an idiot. The only thing .j2t files contain related to flipped tiles is a pointer to their flipped clipping masks. The pixel data are generated by JJ2 as it reads the list inside the .j2l file of which tiles appear flipped in the level.

cooba on 24 Aug 2012 at 22:20

Past me is an idiot.

Aren’t we all.

Zoro on 25 Aug 2012 at 03:46

“n00bed! CTF” shall be not alone anymore, soon…

Jerrythabest on 25 Aug 2012 at 22:06

Would be awesome to remake a level completely flipped vertically with reverse gravity…

Seren on 25 Aug 2012 at 23:33

Consider changing your screen orientation.

Jerrythabest on 27 Aug 2012 at 10:45

I still want the chat and HUD to remain readable, of course :p So that won’t be the solution!

minmay on 27 Aug 2012 at 17:58

I managed to get zero gravity once when I injected a dll at the wrong time. So we’re halfway there.

Slaz on 1 Sep 2012 at 08:30

lol zero gravity would be awesome, reminds me of the old trick with low-gravity for the water level event.

wKtK on 4 Sep 2012 at 07:42

A datastruct from J2L files:

struct TilesetInfo {
long PaletteColor[ 256]; //arranged RGBA
long TileCount; //number of tiles, always a multiple of 10
char FullyOpaque[MAX_TILES]; //1 if no transparency at all, otherwise 0
—> char Unknown1[MAX_TILES]; //appears to be all zeros
long ImageAddress[MAX_TILES];
—> long Unknown2[MAX_TILES]; //appears to be all zeros
long TMaskAddress[MAX_TILES]; //Transparency masking, for bitblt
—> long Unknown3[MAX_TILES]; //appears to be all zeros
long MaskAddress[MAX_TILES]; //Clipping or tile mask
long FMaskAddress[MAX_TILES]; //flipped version of the above
}

As you can see, we have 1 char and 2 longs that seem unused per tile, so 1+(2*4)=9bytes or 9*8=72bits per tile left for awesome stuff :3

Violet CLM on 4 Sep 2012 at 19:36

That’s J2T, not J2L. Which isn’t to say J2L doesn’t have plenty of unused space of its own, but hey, technical accuracy.

DennisKainz on 11 Sep 2012 at 11:13

Oh, wow! You discovered vertical tile flipping! It just took you 15 years to discover it!

15 years! The progress was never so SLOW!!!

FawFul on 11 Sep 2012 at 15:08

Gus is retarded. Time to ban?

Anyway nice progress so far on everything, I wonder when we’ll get our hands on some of these features! I hope they are not teasers of something we need to wait for a whole year, because then i find this pure torture :(.

Post a comment

You need to log in to post comments on this newspost.