Print a message to the console if GZDoom stuff is being used

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Print a message to the console if GZDoom stuff is being used

by HotWax » Mon Aug 27, 2007 9:48 am

Agent ME wrote:EDIT: Portal didn't use 3d floors... I think I would've noticed them by now when I worked on adding in multiple portal guns for online?
Not the original demo map, no, but the one that is in development right now does.

by Macil » Sat Aug 25, 2007 6:55 pm

A simple solution to 3d floors and someone running in zdoom - in an unavoidable area near the beginning, make a 3d floor 1 unit above the normal floor that looks just like it. And set a sector action for player hits floor to start a script telling the user to play in gzdoom in opengl.

EDIT: Portal didn't use 3d floors... I think I would've noticed them by now when I worked on adding in multiple portal guns for online?

by Risen » Wed Aug 22, 2007 6:24 am

A better option for sure, but the time involved in developing it sounds much more extensive, and the benefit is really for lazy people who don't read the docs. I wasn't sure any of the coders would want to put in that much effort.

by randi » Tue Aug 21, 2007 9:38 pm

I think something like the Mac's Gestalt Manager would be far more useful than a version check. Then you could query for the specific features you're interested in without making the fallacy that features unique to one port will always be unique to it.

by Risen » Tue Aug 21, 2007 7:03 pm

I see this has already been [No]'d, but even being able to check what ZDoom version is running would be helpful.

by rivecoder » Tue Aug 21, 2007 6:54 pm

Oh, right. Forgive my ACS ignorance, it's been a while.

by TheDarkArchon » Mon Aug 20, 2007 7:19 pm

Except ACS doesn't do dynamic strings.

by rivecoder » Mon Aug 20, 2007 7:08 pm

The version and engine name should already be in version.h as constants. The simplest route would be to detect this information and feed it to ACS. This might also be backwards-compatible.

This avoids the problem of actually detecting each unsupported feature and gives the map author freedom as to what to do - exit map, warp to alternate area, etc.

by Gez » Fri Aug 17, 2007 8:20 pm

What about something like a browser's useragent? A string constant that is equal to the name of the port, and a floating point constant for the version number.

Then mods could use script with pseudocode such as

Code: Select all

if (SOURCEPORTNAME == "GZDoom" && SOURCEPORTVERSION >= 1.024)
{
   print_relevant_message_or_do_other_relevant_stuff;
}
elseif // ZDoom
{
   print_relevant_message_or_do_other_relevant_stuff;
}
elseif // Skulltag
{
   print_relevant_message_or_do_other_relevant_stuff;
}
else
{
  crash;
}


Of course, something like that may already exist, I don't know. If so, what was the point of the feature request?

by Risen » Fri Aug 17, 2007 3:14 pm

Unrelated, but it seems KDIZD could have really used the same sort of thing for Doom/Doom2, despite the clear notice in the text file.

by Penguinator » Fri Aug 17, 2007 2:53 pm

I don't know if this helps, but Phocas Island 2 has a openGL check at the start of it.

by Enjay » Fri Aug 17, 2007 2:38 pm

How about something that works the other way around: something in GZdoom that allows a map author to set something up to recognise GZdoom/Zdoom and thereby print a message warning the player if they are using the wrong port? It could even be a check for a GZdoom specific map thing.

Obviously this wouldn't "fix" older maps, but it would allow authors making maps for GZdoom to opt to tell the player things were wrong but not have a message present for people who have opened the map in the correct exe.


Although I think, on balance, I basically agree with Graf on this one.

by Graf Zahl » Fri Aug 17, 2007 2:02 pm

This isn't done intentionally because it would create other problems. There's a lot of maps out there with some invalid data. Would you want them all to break?

As for the ACS commands, all that can be done is output a message 'Unknown P-Code' and I think this is done already.

by Karate Chris » Fri Aug 17, 2007 1:12 pm

How about if an error message saying something like "Linedef special # is not recogised by ZDoom", "Sector special # is not recogised by ZDoom" or "# is not a recognised ACS command" appears? That sort of thing.

by HotWax » Fri Aug 17, 2007 1:03 pm

I can see Graf's (and other's) point that a port shouldn't have to worry about you trying to load an incompatible map made for another port, and if we were talking about (for example) ZDoom versus Doom Legacy, I'd agree one hundred percent. However, this is ZDoom versus GZDoom, which supports 100% of ZDoom's features and adds a new rendering mode and, what, a whopping 3 new features? Unlike the former scenario, or the ZDoom versus jDoom scenario given, this can easily happen to somebody grabbing a file off the ZDoom forums and making the (clearly idiotic) assumption that it should run in ZDoom. To make matters worse, the level will run in ZDoom, and depending on the usage of the 3D floors it may not be apparent that the level isn't showing up the way the author intended. In the case of Cutty's portal map, for example, I could still make it through most of the rooms without the platforms, merely by using the portals in unintended ways. It was only after Cutty informed me that I should have used GZDoom that I saw how what had been an empty room was now filled with floating platforms and went "Ooh so that's why this seemed too difficult before."

Finally, probably the best reason why this is a reasonable suggestion in this case is that the programmer of GZDoom is also a main programmer for ZDoom. I see no reason why there can't be a simple warning that says something to the effect of "This wad is attempting to use features only supported with GZDoom's opengl renderer and may not play as the author intended" displayed to the console when the map is entered.

Top