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

Another Sprites/Code Pointers Question

Recommended Posts

Lets say I want to take the chaingun and use 4 frames instead of the 2 frames for the firing sequence,

1st, Can it be done simply?

2nd, Will I have to find frames elsewhere that I don't intend to use to point to?

3rd, If I add frames to the firing sequence, will Doom still 'fire' the weapon with these new frames as well?

In short, using dehacked, how can I make the chaingun's firing sequence have 4 frames and make it still work......

or can't I?

Thanks In Advance!

Share this post


Link to post

If you want to make it without weapon *flash* sprites added over the normal firing sprites, you can do it without a problem, but if you want do add flashes, then I think you have a problem here.

Nigel will surely point you to lots of unused frames out there.

Share this post


Link to post

Perhaps making every other frame have muzzle flash pointing to 2 other frames opposite the normal firing frames? wonder if that would work...

Any takers? I hope i was'nt the one who came up a real stumper on the board! I'm just a newbie after all!

Please Help!

Share this post


Link to post

Yes you can. it's not complex, just add the sprites , and time the muzzle flashes to match the animation of the chaingun. Yes you have to find the 2 extra frames elsewhere.

Share this post


Link to post

Hmmm, there is something odd about the chaingun flash (and the plasma flash but that is different again). Can't remember the details of what it is though.

If you look at the chaingun flash, the frames do not follow on from each other in the frame table (ie they both have a next frame of 1, and not each other). Messing with these tends to give a crash rather than the desired effect. Other flashes (such as the shotty one) are easy to mess with.

Extra frames, there are loads if you look hard enough. There are a few totally unused frames in the game anyway - the pain elemental respawn frames 720-725, frame 887 is used for a grey stalagmite which does not appear in game, 892 and 893 both show player death sprites but are not part of the player death sequence, or used for the dead marine object. You can find plenty more too if you want to start messing with the frame table a bit.

Share this post


Link to post
Enjay said:

892 and 893 both show player death sprites but are not part of the player death sequence, or used for the dead marine object. You can find plenty more too if you want to start messing with the frame table a bit.


Hmm, interesting, must be related to the split body death sprites...

Plenty more? I doubt there's many more (if any) non-used frames. But who knows, maybe I should mess with the frames table a bit (more.)

Share this post


Link to post

Then too, for newbies like myself who may be reading, 'unused sprites' could also mean sprites not being used in a particular wad being edited.

I think Commander Keen is a good example of both sprites AND sounds that could be used by something new without sacrificing much, or anything from the game.


ok, maybe adding frames to the chaingun won't work... on to new ideas I guess. If anyone has any luck though, fell encouraged to post it!

Thanks everyone

Share this post


Link to post
myk said:

Plenty more? I doubt there's many more (if any) non-used frames.


I think you are probably right, that's why I said "if you want to start messing with the frame table a bit".

I meant you're going to have to create a few. Eg, get the teleport flash and item respawn fog to use the same frames. Redefine all the static decorations using a Zdoom DECORATE lump (frees up about 50 frames with no impact on the game - zdoom only though). Reducing the number of frames for animated items that don't really need animation - eg pick up items - you can get 6 from the armour helmets and health bottles alone, and 6 from the keys too. In Zdoom you could get them to "floatbob" if you still want them moving. If you are not using an archvile, then you get loads of frames. All the Archies animations (which are the most extensive of any monster) all his attack fire frames (also extensive) and the respawn frames for almost every monster in the game...

Share this post


Link to post

[ Ebola Said ... I added alot of frames to the chaingun I made in Nimrod. and the muzzle flares synch. ]



So does that mean that if I used, say 4 frames for the firing sequence, the flashes will automatically be assigned to the new frames as well as the old? perhaps due to the coding in Doom that assigns the flashes whenever the firing sequence is invoked?

i guess i'm confused about the flashes being in synch. did you add the frames, but only used the stock 2 flash frames to work with the new gun frames?

Share this post


Link to post

yes.. there's a section in dehacked for firing frame and shooting frame. Firing frame tells it which sprites to paste over the top of the shooting frames. I think there's a certain codepointer assigned to the shooting frame that gets the firing frames pasted over. I'm not a super coder, but I believe that's how it works.

Share this post


Link to post

Thats what I was trying to say earlier. The chaingun is odd. Most weapons have a firing sequence that simply gets pasted over the top of the gun. The first frame of that sequence is identified in dehacked, and frames 2, 3, 4... simply follow on. These can easily be messed with. The chaingun does not work like that.

It has 2 flash frames that do not follow on from each other. One of them is identified in the dehacked weapons section, but the frames are not set to have each other as next frames but they are adjacent in the frame table. Randy Heit did explain to me a while back how this all works, but I can't find my notes ATM.

There are ways of adding frames (and Ebola has obviously done it) but I forget how to do it. I know that very recently I tried a patch posted by someone on the Zdoom forums. It tried to add to the flash by simply making additional frames that were adjacent to the original ones. This patch managed to either crash every port I tried it in or have odd effects like the weapon not being selectable, or making a chainsaw sound when it fired. I tried Doom.exe, BOOM, PRBoom, MBF, Legacy, Zdoom 1.22 Zdoom 1.23 b33 and Zdoom 2. None of them worked. So like I said, it's tricky, but not impossible. (Apparently the patch had worked in one version of Zdoom, but I couldn't make it happen.)

The plasma gun is different again. It's firing frames replace the weapon graphics, and are not simply pasted as bright sprites over the top of other ones like most weapons are.

Share this post


Link to post
Enjay said:

The plasma gun is different again. It's firing frames replace the weapon graphics, and are not simply pasted as bright sprites over the top of other ones like most weapons are.

Actually, it's the same as the chaingun, except that they're shown randomly.

Share this post


Link to post
ravage said:

Actually, it's the same as the chaingun, except that they're shown randomly.


Are you sure? There is a slight difference.

The chaingun flashes are small, and cover only the front of the gun. The rest of the gun is still drawn using the non flash sprite.

If you replace the plasma gun firing sprites with smaller pictures, you can see that it is the only sprite being used. There is no "regular" sprite underneath.

But yeah, the method of displying the frames, I believe is the same, except for the randomness you mention.

Share this post


Link to post
Enjay said:

Are you sure? There is a slight difference.

The chaingun flashes are small, and cover only the front of the gun. The rest of the gun is still drawn using the non flash sprite.

If you replace the plasma gun firing sprites with smaller pictures, you can see that it is the only sprite being used. There is no "regular" sprite underneath.

But yeah, the method of displying the frames, I believe is the same, except for the randomness you mention.

Well here's this:

Make up some new sprites for the plasma gun, say, copy the chaingun sprites. You'll see what I'm talking about. For the plasma gun, it only seems like only the flashes are showed, but you don't notice because they are bigger than the base sprite. Trust me on this one.

Just tried it and I'm right.

Share this post


Link to post
ravage said:

Just tried it and I'm right.


Indeed you are. Tried it myself, replacing the plasma firing sprites with the chaingun ones and got the result you describe. Thanks.

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
×