Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
fiend-o-hell

Aligning weapon sprites in xwe?

Recommended Posts

Ive noticed on other wads how the weapon sprites are devided up into an upper and lower portion. What is this and how do i do it? Thanks, I appreciate the help.

Share this post


Link to post

Using the latest beta version of XWE (if you don't have it, read this thread), you can click and drag the weapon sprites around on the screen to align them. When XWE has Weapon mode on (with the large box in the center of the screen, instead of the cross), the boxes are supposed to represent the game screen. The line running horizontally just above the bottom represents the top of the status bar. Typically, if the bottom of your weapon sprite touches that line, then the gun will generally look okay in game.

Share this post


Link to post

I'm curious what the point of the two bottom lines are now. Weapons are never barren at the bottom if they touch the second line from the bottom... so why two? Obviously the higher line is the maximum viewable size... so what gives with the lower?

Share this post


Link to post

The full frame (including the lower line) is a 320x200 size box, which was the original Doom screen size. The weapons have to be aligned to the upper line though, IIRC it's because of the status bar.

Share this post


Link to post

Related to sprite aligning - I just tried XWE's ability to align a PNG sprite. It seemed to do it, however the sprite was converted to Doom's palette in the process. This particular one was just a test - I made a trooper a pale greeny-blue colour, set its offsets with Randy's "setpng" tool and stuck the paletted PNG into a WAD. It looked as expected in GZdoom. I then opened the WAD, used XWE to realign the sprite and the colours were converted to the Doom palette - defeating the purpose of using a png in the first place and creating lots of holes in my trooper to boot.



How it should be followed by what happened with XWE.

Is there a way of preserving the palette in the png when using XWE to change offsets?

Share this post


Link to post

This topic (PNG file alignment) came up several times already... I know a lot of people are waiting for it. I'd like to fix up all the PNG stuff before releasing the new version.

You can now import PNGs (load them as RAW files), so XWE doesn't try to convert them.

Note: if you load a PNG and save it, it will be saved as a doom image, XWE can't save PNGs.

I've added preliminary support for the alignment based on the info I got from Randy. It's in the latest beta. This would eliminate the need for the setpng tool. We just need more testing (and then possibly a bugfix).

If you change the alignment on a PNG, and then apply the alignment (again, be sure to click Image|Apply alignment and not Image|Save), then XWE will add the new PNG extensions to the image, if it's not already there. So you should try this on a file which you have NOT adjusted with setpng.

Once I know it works, I can make it more user friendly by changing the save function: if it detects that only alignment was changed, it would do an Apply Aligment only and not a full save. I just want to work out the actual PNG extension stuff first.

Share this post


Link to post
Csabo said:

If you change the alignment on a PNG, and then apply the alignment (again, be sure to click Image|Apply alignment and not Image|Save), then XWE will add the new PNG extensions to the image, if it's not already there. So you should try this on a file which you have NOT adjusted with setpng.


Assuming that's the beta WildWeasel linked to, when I tried "Apply Alignment" it looked as if the image was OK, so I quit and tried it in GZdoom, and the alignment was wrong. When I went back to XWE, the alignment was still at 0,0 which indicates to me that "Apply Alignment" didn't do anything.

Share this post


Link to post

Actually it does, but reading back the values from the PNG is also on the todo list.

What we need to try is this: get an unprocessed PNG. Align it with Randy's tool, that'll be our file #1. Then load the original unprocessed one into XWE, apply the same alignment, and export it as RAW (so it doesn't save as a BMP, but stays a PNG instead). That one will be file #2. Then we just do a file compare and see if they are the same. If not, I'd have to look at the differences and figure out what got messed up.

I really wish I'd had the time to do this. I'm going to try to steal an hour from somewhere as soon as I can (unless you could do it for me, possibly emailing me the two files ;-)

Share this post


Link to post

OK, in the zip:

Original.png - as I made it with PSP.
1.png - with offsets 18 50 (same as possa1 in Doom2.wad) set by setpng
2.png - an attempt to set the offsets using "Apply Alignment" and exporting as raw data in XWE.
pngtest.wad - a simple WAD with 3 Zdoom decorate items. The left most one uses original.png as TESTA0, the middle is 1.png as TESTB0 and the right most is 2.png as TEXTC0 (all imported as raw data with DeePsea (sorry ;) ). If you check in GZdoom only the middle one is visible. If you check in Zdoom, you can see the other 2 but clearly their offsets have them below the floor (which is why they can't be seen in GZdoom).

Interestingly 1 and 2 have the same size - both are slightly larger than original.png. However, 1 is the only one offset in a way that Zdoom displays it as intended. So XWE did something to the PNG, but not what Zdoom needed, I guess.

http://www.zen64060.zen.co.uk/pngtest.zip

Share this post


Link to post

Thanks for your help! That WAD file and the PNGs were exactly what I needed. XWE did actually add the necessary chunk into the PNG file, and it was a byte exact copy of what Randy's tool did, but it added it to the end. I don't remember Randy telling me anything about the position of the chunk, I guess it's one of those "gotchas". So I rewrote the logic to put the chunk to where Randy's tool is putting it. Also finished up the rest: the alignment values are read back, you can actually just "save" and it only applies the alignment, etc.

Something is up with my FTP though, I can't log in. Still don't know what happened to the 3DDownloads servers, so I can't upload there either... I emailed you the latest beta, zipped. If you could try it out it would be great. Thanks again!

Share this post


Link to post
Csabo said:

Something is up with my FTP though, I can't log in. Still don't know what happened to the 3DDownloads servers, so I can't upload there either...

Neither do we. The main Doomworld login for 3D Downloads hasn't worked for a looong time.

Share this post


Link to post

Meanwhile I managed to upload it to my site using their web-based upload tool, so here's the link: http://ca.geocities.com/xwe@rogers.com/xwe_beta.zip. Anyone interested in the PNG stuff can check it out. Once I know this is working, a new version release will be coming very soon.

So, regarding 3DDownloads, is there another place where hosted sites should be using for the binaries?

Share this post


Link to post

i can't seem to align my png sprites at all and Im doing everything as mentioned above, ('apply align' with xwe beta) but when i try them out on gzdoom, the sprites are always below the floor. When i check back on xwe, the png stays on 0x0 like enjey's results. Also, Im also having problems defining and scaling high resolution sprites. I enter in all the right permaeters and everything in the hirestex lump, but it does nothing...?

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
×