Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
maggot202

How to find out if my wad is running in zdoom or in gzdoom?

Recommended Posts

Hello
I remember once seeing a gzdoom wad that had a script to find out whether the player was using software or openGL rendering. Unfortunately, i cannot remember which wad was this, and browsing through the zdoom wiki didn't provided me with any answers, so i ask you, does anyone knows how to find out wich renderer the game is using?

Share this post


Link to post

script 1 ENTER
{
    if(GetCVar("vid_renderer") == 0)
    {
        SetPlayerProperty(1, 1, PROP_TOTALLYFROZEN);

        SetFont("BIGFONT");
        HudMessage(s:"This WAD will not work using a software renderer\n\n\nPlease switch to an OpenGL renderer and restart"; HUDMSG_PLAIN, 1, CR_WHITE, 1.5, 0.2, 0);
        
        Terminate;
    }
}
Will display a message if the game is not running in OpenGL, continue on it's merry way otherwise.

Share this post


Link to post

I'm wondering, is it appropriate for me to do this same thing, but check for software instead? If, say, i am absolutely 100% sure that i want my zdoom wad to be played in software mode only (and know for a fact that opengl screws up a thing or two), could i use such a script to force this upon the players? I already technically did this and it works (thanks exl!), but i thought maybe some people would strongly object to such a decision.

I ask mainly because i remember how a lot of people back at iddqd.ru were angry at Plutonia 2 for disabling jumping for zdoom with mapinfo. Granted, that was the comments section and not the actual community, and it was really dumb of them, but still...

Share this post


Link to post

You should never have to detect which renderer the player is using. Even if your mod is known not to work well in one or the other, you must consider that the capabilities of either renderer may change at any time.

Share this post


Link to post
Ralphis said:

Why would the capabilities of the software renderer change? Aren't most software tricks universal?

Someone wants to prevent people from playing in software mode because the map uses some OpenGL feature like 3D floors -- but 3D floors may end up being supported in software mode! Inversely, someone wants to prevent people from playing in hardware mode because the map uses some tricks unsupported by the OpenGL renderer -- but one day these tricks may become supported!

So yeah, the capabilities of either renderer can change and allow what is now impossible.

Share this post


Link to post

OK, that is just annoying. Put which version is supported in the txt file and leave it at that.

Share this post


Link to post

It's not even just tricks, the thing is that the maps are being made with only software in mind, since even with texture filtering disabled opengl mode makes them look a lot worse, in my opinion. It changes the lighting for the worse, whatever preferences i choose, and the levels get so much more dull and flat - also partly because it doesn't use the palettes for fading to darker shades, everything is always brighter than it needs to be, too.
Plus, it screws up some sprites, that either get cut into the floor, fly above it, or constantly jump with their animaion playing. I really can't stand knowing that somebody will choose to play like this, it gets so bad. And it looks far from how i intended it, too, which is very important for me.

I know that even if i put that into TXT, lots of people won't read it, or will simply ignore it.
I guess i could just bear with them, but i like how the script works so much! D: I mean, i even forced noskystretch to all maps, so people don't stretch them horribly, which screws up the feel of the level a lot (and the levels don't require vertical mouselook at all), and i'm not removing that "annoyance" - might as well go all the way... Why leave a choice to the players, when i know one option is wrong, and one is right anyway? Why not limit such a choice?

Share this post


Link to post

Those are just the usual issues people consider when choosing to play any vanilla map in GZDoom. If they decide to play a ZDoom wad in GZDoom, you shouldn't stop them just because of how you feel about the GL rendering.

I sometimes play GL wads with the software renderer, too. I converted Sapphire's skybox to a sector-based one and played through it (until I fell thru the 3D bridge..), and more recently, I've been playing ZPortal with the ZDoom 3D floor branch. With a new computer on the way, I hope I don't lose my love for 2.5D...

Share this post


Link to post

I dunno, is it really just about how i feel, when the levels start looking differently, not like i want them to, a few things here and there bug out and some sprites get glitched? I won't even say "ugly" here, since that's subjective, but i don't see how anybody would prefer that. I mean anybody who chooses openGL here rewards himself with a worse experience, but i just don't see what's so bad if i, the author, have a say in how my maps are gonna be played. It's just removing the choice to make the game worse for yourself. And if i add that to the readme, most people won't even encounter this script.

Nobody probably cares, but unless there are some stronger arguments about this, i'll leave that in.

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
Sign in to follow this  
×