yum13241 wrote: ↑Tue Sep 03, 2024 6:06 am
2. You can have infinite textures (until you run out of memory), while you can run out of DoomEdNums. (-32768 to 32767, why do programmers add signed-ness when they don't need it?)
Running out of editor numbers is a very theoretical concern.
Official classes include less than 700 entries. Even if you decided to give all the things a unique editor number in all games, even those they're not normally present in, that would still put you at barely above a thousand numbers.
Then let's add in
all of Realm667 stuff. There's 13 pages of the armory, with twenty entries per page. That's 260. Let's assume each weapon comes with a big and a small ammo pickup, so we can triple that to 780, and round it to 800. Heck, round it up to 1000.
Bestiary has 20 pages, so that's 400 monsters. Now most of them have one single monster, but there are a few that are packs with a few variants. You know what? I'll just multiply by five. There's no way the average distinct placeable thing per monster pack is 5, but who cares. That's another 2000.
Item store has eight pages, so 160. Again, most of them are individual items, but some are packs, so I'm going to go with 10 times for 1600 more numbers, even if that's absurdly overestimated. I'll round it up to 2000.
Prop stop, eleven pages, 220. Those are usually packs, so I'm gonna go with twenty times just to be sure to overshoot how much unique IDs one would actually need. 4400. Round it up to 5000.
Finally, SFX shop. We've got just two pages, so 40. Highest claimed number of variants was 23, so I'm going to massively overshoot by giving them an average of 50 editor number per pack. Another 2000.
The fonts and textures are not things. The sounds aren't things either, but let's assume we convert them all into ambient sound things. There's a single page, so 20. Biggest amount of variants listed was 59, so I'll multiply by 60. +1200. Round it up to 2000.
So we have:
2000 standard things (I'm just basically doubling it, this way we can account for new ID24 stuff and whatever gets added).
+1000 from armory
+2000 from bestiary
+2000 from item store.
+5000 from prop stop.
+2000 from SFX.
+2000 from extra SFX from sounds.
We arrive at a total of 16000 editor numbers used. That's for all the standard actors from all supported games, plus the entirety of the Realm667 resources, and that's with deliberately overestimating how much we actually need.*
We still have another 16000 editor numbers to go. Just in the positive range. By using unsigned numbers, or allowing negative ones (same result), that's another 48000 numbers available.
Does your mod project needs more than 48000 extra thing types in addition to all the standard things and all the Realm667 content?
So MUSINFO taking up a few dozen editor numbers is
not a problem. And it gives us a lump where we can see all the extra music used in all maps, so finding out about how a soundtrack is arranged requires only looking at MAPINFO and MUSINFO.
Scripted music changes now also requires looking at each map script.
ID24's line types now also requires looking at every single map line.
Also map validators that check the maps for if it uses missing textures will need to know about these new line types that use fake textures.
Yeah no, I actually prefer the MUSINFO approach.
Another thing about the ID24 music changing lines is that some of them behave completely differently from all previous music change functions. They've got these "change to this music but play it only once". So now to comply with specs the game must keep track of how long a music has been playing and cut it off when it ends? ZDoom has been happy to just tell the music engine to change which track to play, but otherwise ignore it, there's been no communication in the other way with the music engine telling the game engine that a music has stopped playing. Also it's not clear what happens after the music has ran its course -- does it mean to go back to the default map music, or does it mean to be silent?