Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Linguica

Arbitrarily aligned flats

Recommended Posts

https://www.doomworld.com/linguica/hax/flats.zip

I realized it would be fairly trivial to allow arbitrarily aligned flats by having lumps point to a start other than the beginning of flat data (with a second copy of the flat immediately following in the WAD for it to spill over into). For just 8192 bytes (technically 8191 if you're being anal), plus defining a new lump for each desired offset, you can align a flat to any position on the grid you want.

For comparison, putting in a new flat for every possible offset the normal way would require 16.7 megabytes.

This is pretty pointless unless for some reason you really need to have a flat be offset in 100 slightly different ways or something.

Seems to work in every source port I threw it at.

Share this post


Link to post

It was pointed out to me that any offset besides a straight Y-offset produces a 1-pixel seam in the graphic, so it's of even less use!!

Share this post


Link to post

Clever! Is it certain that SLADE3 wouldn't break the trick when copying lumps between wads?

EDIT: Oh, the 1 pixel seam - I immediately thought that it's strange that any offset would work flawlessly, but I decided to believe you. Still useful for fully non-tiling flats. (Or for Y-axis-only offset, as you said.)

Share this post


Link to post
On samedi 9 avril 2016 at 9:28 PM, scifista42 said:

Clever! Is it certain that SLADE3 wouldn't break the trick when copying lumps between wads?

It is certain it would break it if you copy the lumps, or insert some lumps before them, or do any other operation that will force a rewrite of these hacked lumps.

Share this post


Link to post
On 4/9/2016 at 9:28 PM, scifista42 said:

Clever! Is it certain that SLADE3 wouldn't break the trick when copying lumps between wads?
 

SLADE3 isn't the only tool that can extract or rewite WADs.

While this is certainly clever, all it actually does is cut down raw WAD size. It doesn't even do that much to overall distribution (i.e. zipped) size because most of the data could be compressed away as it is merely a copy from some other lump. And it certainly doesn't do anything to in-memory organization.

 

I don't really think it's worth the drawbacks that come with a "do not touch this file or else..." caveat.

 

Share this post


Link to post
1 hour ago, Graf Zahl said:

While this is certainly clever, all it actually does is cut down raw WAD size.

Nothing gets by you, eagle eye.

Share this post


Link to post

Nice, but only really useful for plain old vanilla Doom. In Boom you can just scroll the texture a bit near the startup (before the player can see it) to achieve the desired alignment.

Share this post


Link to post

Yeah, you posted something alluding to that a couple of days ago. I was going to ask, but I don't have to a any longer. Cool!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×