Page 1 of 1

Acceptable symbols for sprite names?

Posted: Thu Aug 13, 2020 6:03 am
by Gabenslair
I know for sure that decorate accepts the alphabet and numerals, but since it also accepts things like * and !, i want to know just how many symbols can be registered into DECORATE/Zscript classing.
I Assume that if it does ultilize the ASCII format, then we're likely dealing with 255 symbols correct me if im wrong.

The reason why im asking this is because i want to try and make sprites that won't conflict with other sprites in other mods, and if i use lesser used symbols, then I'll have a better chance that whatever sprite im naming wont collide with another's sprite. Would give more arm space if i tried something like "*&£DA0" or "@AEDA0" and that would register into the decorate/zscript format

Re: Acceptable symbols for sprite names?

Posted: Thu Aug 13, 2020 8:10 am
by Gez
Gabenslair wrote:I Assume that if it does ultilize the ASCII format, then we're likely dealing with 255 symbols correct me if im wrong.

Technically ASCII is 128 values, not 256; and a full 32 of those are control characters that are not usable at all in names. Notably, £ which you used in an example, is not an ASCII character. Then you can also exclude space and quote marks. Then it's not case-sensitive, "boss" and "BOSS" will be interpreted the same, so you can remove a further 26 characters from consideration. Finally, "TNT1", "____" and "####" are reserved values used for special sprite behavior, and "^" is not usable in lump names since ZDoom interprets ^ as a substitute for \.

Re: Acceptable symbols for sprite names?

Posted: Thu Aug 13, 2020 8:36 am
by Enjay
The best way to do this, IMO, is to use names that have a good chance of being unique to you (e.g. using letters from your username/mod name etc.). Obviously, it's not a guarantee, but it's reasonably effective.

Re: Acceptable symbols for sprite names?

Posted: Sun Aug 16, 2020 9:27 pm
by SanyaWaffles
Does anyone know how many theoretical unique sprite values you can have with all that? I was trying to discuss the sprite name limits for standalone TCs.

Re: Acceptable symbols for sprite names?

Posted: Mon Aug 17, 2020 12:10 am
by NiGHTMARE
Unless there are any other unusable characters not mentioned in Gez's post, there are 67 possible characters.

If that's the case, then the number of different possible sprite names is 67 x 67 x 67 x 67 - 2 = 20,151,119.

I believe you can only use A - Z, [, \, and ] for the fifth character, which would mean there are 584,411,451 possible frames.

Of course, you'll need to reduce these figures by the number of existing sprite names and frames in the game your project is for.

Re: Acceptable symbols for sprite names?

Posted: Mon Aug 17, 2020 12:57 am
by SanyaWaffles
What characters are usable? I was under the impression only A-Z and numbers were usable for sprite names.

Re: Acceptable symbols for sprite names?

Posted: Mon Aug 17, 2020 3:48 am
by NiGHTMARE
Gez already provided the answer in his post. In summary, all standard ASCII characters except:

- control characters (0 - 27)
- space (32)
- " (34)
- ^ (94)
- lower case letters (97 - 122)

I'm assuming DEL (127) also can't be used ;)

The other standard ASCII characters are those which can be found on a normal QWERTY keyboard: ` ! $ % & * ( ) _ - + = [ { ] } ; : ' @ # ~ , \ | < . > ? /

Re: Acceptable symbols for sprite names?

Posted: Mon Aug 17, 2020 3:03 pm
by SanyaWaffles
Some of those might be tricky to use due to certain file systems not allowing colons and slashes and other symbols unless you store them in a WAD format.

Re: Acceptable symbols for sprite names?

Posted: Sun Feb 27, 2022 9:42 am
by Gabenslair
I tested the DECORATE file for any acceptable sprite names.

You are only allowed a singular case of letters and numerals for the first 4 symbols. 36 in total.
Any sort of ascii symbol that is other than the accepted symbols described above will incur an error that displays "Sprite names must be exactly 4 characters"
since DECORATE is deprecated and in general GZDOOM's development is in a state of stagnation, case is closed.