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

High framerate characters

Recommended Posts

I've seen videos of some doom mods (usually running in GZDoom) that have some custom monsters that have some fairly smooth animations.  But when I was thinking about it, I was wondering how that even works.
When I've been poking around with a little bit of editing, I learned that the sprites in WAD files follow a particular system, a particular naming convention.  You only get four letters for the name of the sprite, then one letter to designate a frame, and after that there's a number to designate what angle it is viewed from.  That puts a rather finite limit on how many frames a particular monster can have.  The Arch-Ville has to resort to using other symbols just to add one extra animation.

 

But from what I've seen from my rather limited experience with editing is that mods still have to conform to that system.  Scripts still search for those four-letter names, and sprites still fit into a regular wad file.
So how does one go about extending the number of frames an object uses?  Is this dependent on the source port to add in extra features to allow this?  Is there a huge list of extra  letters to use?  Or is there some other standard to sneak past these restrictions?

Share this post


Link to post

You're not stuck with a single 4-letter code - you can transition from one to another. I seem to remember a slight hangup with this, requiring a "refresh" of sorts in the code to get the 4-letter code transition to stick, but that was nearly 10 years ago - I could be wrong. Player skins typically work like this, swapping out the 4-letter code.

 

This is VERY easy to test with DeHacked: For example, take the Baron of Hell, and change his attack frame number to that of the Hell Knight, and change the last Hell Knight frame to the corresponding Baron of Hell frame number. He should change colors during attack, if I got that right. Alternately, you could change around the 4-character codes to practically any sprite, as long a the sprite being called for actually exists in the WAD.

Share this post


Link to post

I'll advice to open the Decorate code in the Smooth Doom mod. And also check sprites and their names in this mod too. It will give you an answer how this works. It doesn't even use something "pro-scripted"

Share this post


Link to post

 

2 hours ago, kb1 said:

Alternately, you could change around the 4-character codes to practically any sprite, as long a the sprite being called for actually exists in the WAD.

 

I didn't think of that, duh, I can just call any four letters at any frame.  So I could have one character use several different four letter codes.

 

2 hours ago, kb1 said:

You're not stuck with a single 4-letter code - you can transition from one to another. I seem to remember a slight hangup with this, requiring a "refresh" of sorts in the code to get the 4-letter code transition to stick, but that was nearly 10 years ago - I could be wrong. Player skins typically work like this, swapping out the 4-letter code.


Normally I would guess that such depends on what source port and tools you are using.  But the four letter code is really a restriction with the WAD file itself, is it not?  A sprite can only have eight characters in the name, and four of those are taken by the angle/frame data.

Share this post


Link to post
2 hours ago, Marscaleb said:

But the four letter code is really a restriction with the WAD file itself, is it not?  A sprite can only have eight characters in the name, and four of those are taken by the angle/frame data.

It can't be called "restriction of WAD file", but it's a naming convention that vanilla and ports require in order to recognize and load sprites properly.

6 minutes ago, hardcore_gamer said:

If you are using source ports like gzdoom can't these limits be ignored and frames called whatever you want?

Not really.

Share this post


Link to post
4 minutes ago, scifista42 said:

It can't be called "restriction of WAD file", but it's a naming convention that vanilla and ports require in order to recognize and load sprites properly.

Not really.

 

Interesting. Does that mean it's not possible to do things like ultra smooth enemy animations with like 30 or even 60fps?

Share this post


Link to post

That's something completely separate from frame naming, but the shortest time for which a sprite can be displayed in an animation is 1 tic, aka 1/35 of a second, so that's the maximum smoothness achievable.

Share this post


Link to post

Well there are 456,976 (if my maths are correct) combinations of four letters, so while you'd have to use a few different four letter names there's more than enough to give a sprite 35fps animation.

Share this post


Link to post
11 minutes ago, Bauul said:

Well there are 456,976 (if my maths are correct) combinations of four letters,

That's if you only count letters A-Z, but even vanilla supports also digits 0-9 as usable in 4 letter sprite names, so instead of 26^4, the number of combinations is at least 36^4, possibly more, I'm not sure about other characters.

Share this post


Link to post

As best as I can tell, any character that you can save within the naming constraints of Doom's wad file would work.  I don't know exactly which characters are and are not allowed, although the Doom 2 WAD does use brackets and slash to designate the arch-vile's frames.  It stands to reason that those are available as well.  So at the very least you're looking at 39^4 combinations.  The actual limit is probably a mathematical constraint like 64 different characters that can be saved as a name.

Although you likely can't use all "64" characters; I'm sure there are some that the scripting functions of a given source port will have problems if you use certain characters that are supposed to be used for certain commands.

Also, if you can arbitrarily switch between different four-letter codes for any frame of any animation, then the fifth letter is technically completely arbitrary, because you could go from "WHAT" A to "THIS" B to "THAT" X at will.
So really you are looking at - at the very least - 39^5 different sprites, not counting different angles for a given sprite.
90,224,199 at the least, possibly as high as 1,073,741,824.
...I suspect we'd hit some technical limitation in file size or memory allocation before we could reach a limit like that.

 

7 hours ago, scifista42 said:

It can't be called "restriction of WAD file", but it's a naming convention that vanilla and ports require in order to recognize and load sprites properly.

I would call it a restriction of the WAD file because when I create a WAD file I can't give items certain names.  I can't use lower-case characters, and I can't use longer names.  Now I'm sure the restrictions of the WAD file and of vanilla Doom were made hand-in-hand, but even if I made a custom port that ignored those restrictions, I still hit that restriction within the WAD file itself before I could try to lift it with a port.

That, or Slade is renaming everything to this convention when the WAD format technically supports more characters.  But I suspect it's actually just a limit of the format itself.

Share this post


Link to post

It is a restriction of the WAD file that lump names can't be longer than 8 characters and that certain characters aren't allowed, but it is not a restriction of the WAD file that sprite names must consist of a 4 letter-or-number prefix and a 1 letter + 1 number suffix in order to be recognized and loaded properly as sprites, that's what I meant.

Edited by scifista42

Share this post


Link to post
On 1/13/2018 at 3:27 AM, Marscaleb said:

I didn't think of that, duh, I can just call any four letters at any frame.  So I could have one character use several different four letter codes.
Normally I would guess that such depends on what source port and tools you are using.  But the four letter code is really a restriction with the WAD file itself, is it not?  A sprite can only have eight characters in the name, and four of those are taken by the angle/frame data.

What I meant was that, in my source port, I seem to remember that I had to do something in the source code, when a sprite transitioned from one 4-character code to another. For example, the Id Software imp uses "TROO". I added some custom imp death frames, with sprites named "TROX****". The original code tried to play the custom death using "TROO****", as if it had cached the original frame name. I had to add a line of code that read "TROX****" from the frame.

 

What I'm saying is that I don't know if this is a limitation of the vanilla source (and therefore a problem in some ports), or if I had broken sprite handling in my source port, and therefore had to fix it later. Can anyone verify that you can use multiple named sprites, per monster, in, say, vanilla, or Chocolate Doom?

 

A better name for this thread is "Can I use multiple sprite prefixes for a custom actor in Vanilla?".

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
×