Page 1 of 1

[2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Mon Dec 03, 2018 1:27 am
by TDRR
RandomSpawners, they are certainly a mixed blessing. On one hand, it transfers all map-set flags to the spawned object, for max compatibility with maps. But on the other hand, they aren't very customizable and can only spawn one object at a time without the ability to alter it's position.

But what if we went back to the old days before there were RandomSpawners to find a more customizable method? Well, that's exactly what i will do today.

Since it is a method from those days, i also took the chance to do a ZDoom Classic (2.1.4) compatible version.

Spoiler: Simple method (RECOMMENDED)


Spoiler: GZDoom 1.8.6 to current version

This GZDoom 1.8.6 method works with all modern versions too, i tried to make the spoiler title self-explanatory, but apparently it isn't obvious enough.

Spoiler: ZDoom 2.1.4 (OLD) version

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Mon Dec 03, 2018 7:09 am
by Blue Shadow
I have to admit, this tutorial makes me cringe in a way. Instead of teaching people how to do things the right way, it teaches you how to do things the inefficient and hacky way. And for what? For the sake of compatibility with ancient versions of ZDoom and GZDoom.

Missed opportunity, I'd say.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Mon Dec 03, 2018 11:15 am
by TDRR
Blue Shadow wrote:I have to admit, this tutorial makes me cringe in a way. Instead of teaching people how to do things the right way, it teaches you how to do things the inefficient and hacky way. And for what? For the sake of compatibility with ancient versions of ZDoom and GZDoom.

Missed opportunity, I'd say.


I think you missed the point, RandomSpawner doesn't allow you to set your own offsets from the calling actor and only restricts you to one item at a time, nor allows you to have toggleable spawns (Want do disable that nasty monster or that boring weapon from spawning? No problem!)

It really wasn't for compatibility with ancient versions of ZDoom, but since the method already existed for that old ZDoom i added it, after all i'm going to be using it for a TC i'm working on (don't worry it will be 2 separate versions for modern and classic (G)ZDoom)

Now that you mention it, though, i may add a tutorial for the normal version of RandomSpawners so people don't get misleaded thinking this is the way they should do it for simple random spawns with no offsets or anything.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Tue Dec 04, 2018 6:10 am
by Blue Shadow
TDRR wrote:I think you missed the point, RandomSpawner doesn't allow you to set your own offsets from the calling actor and only restricts you to one item at a time, nor allows you to have toggleable spawns (Want do disable that nasty monster or that boring weapon from spawning? No problem!)

Use ZScript, then. The RandomSpawner class is fully exported, which means you could write your own spawners using its code.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Tue Dec 04, 2018 8:18 am
by Graf Zahl
Blue Shadow wrote:Missed opportunity, I'd say.



I have to agree. This will teach people all the wrong ways to do stuff, and in the end make things harder for everybody because hacky workarounds later always end up causing problems.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Tue Dec 04, 2018 9:32 am
by TheMightyHeracross
There's no reason for ZDoom 2.1.4 compatibility, even Zandronum is more up to date than that.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Tue Dec 04, 2018 10:50 am
by TDRR
Okay, if Graf said it, then maybe he's right.

Anyways i will use this in my mods (but sparingly and when necessary) because i already know what are the downsides and (few) upsides of this method.
I added warnings to the main post. If you still don't want this code anywhere near these forums, then alright, delete this thread.

And yeah i know there's not much reason to do ZDoom 2.1.4 compatibility, but i want to do it and it doesn't harm anyone, so why not? I already have a couple 2.1.4 compatible mods but i won't upload them for reasons already said in this thread.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Sun Dec 09, 2018 5:03 am
by drfrag
TDRR wrote:It runs on more computers, for instance, a 486 40MHz is able to run ZDoom Classic at 320x200 in low detail mode.

Really? I got a report from someone saying it ran at 10 fps on a 100 MHz DX4 and the last version is not even optimized for 486. But may be without sound and 4x4 low detail mode... :mrgreen:
But hey i think i should release a new version with a new 3x1 low detail mode, that really would be useful. :lol:
And the new Normal Nx scalers too. Besides i want to revert a few things.
I could update it to 2.1.7 but there was a nasty crash related to some decorate thing.
But that engine was mostly to play limit removing wads, runs on win95 and GL 1.1 (not all cards) and has the 1.0.17a renderer. Also has a preliminary previously unreleased D3D backend. I added some cheats and resurrect fixes among other things, i think i included wad compatibility fixes too.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Sun Dec 09, 2018 1:56 pm
by TDRR
drfrag wrote:
TDRR wrote:It runs on more computers, for instance, a 486 40MHz is able to run ZDoom Classic at 320x200 in low detail mode.

Really? I got a report from someone saying it ran at 10 fps on a 100 MHz DX4 and the last version is not even optimized for 486. But may be without sound and 4x4 low detail mode... :mrgreen:
But hey i think i should release a new version with a new 3x1 low detail mode, that really would be useful. :lol:
And the new Normal Nx scalers too. Besides i want to revert a few things.
I could update it to 2.1.7 but there was a nasty crash related to some decorate thing.
But that engine was mostly to play limit removing wads, runs on win95 and GL 1.1 (not all cards) and has the 1.0.17a renderer. Also has a preliminary previously unreleased D3D backend. I added some cheats and resurrect fixes among other things, i think i included wad compatibility fixes too.


I never said it ran well :D

Thanks for the heads up on ZDoom Classic, really hope you update to 2.1.7.

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Sun Feb 24, 2019 1:44 am
by DabbingSquidward
@TDRR

Thanks for directing me here, but I have one question. Forgive my ignorance, but why does CustomSpawner inherit from Inventory and not CustomInventory?

Re: [2.1.4] RandomSpawners, the customizable/classic way

PostPosted: Sun Feb 24, 2019 1:18 pm
by TDRR
DabbingSquidward wrote:@TDRR

Thanks for directing me here, but I have one question. Forgive my ignorance, but why does CustomSpawner inherit from Inventory and not CustomInventory?


There's no need to, Inventory works perfectly fine for this purpose. Also, i think custominventory adds a minuscule amount of CPU burden so why bother.