[UPDATED] ZDoom32 2.8.6a (ZDoom is undead)

Game Engines like EDGE, LZDoom, QZDoom, ECWolf, and others, go in this forum
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

WOW! That was fast, you rule! Thanks again. :D
drfrag wrote:I've done some research and i think the problem is related to a bad translation and alpha blending somehow and not in the drawers themselves.
At least i got the alpha blending part right.
I've merged your fix here:
https://github.com/drfrag666/gzdoom/com ... 36c9fd22d9

I've posted a new update with the fix:
https://github.com/drfrag666/gzdoom/rel ... 2.8.4a.zip
Also i've updated the NO GL version for ZDoom purists.
As mentioned in the LE thread the GL renderer has broken portals and mirrors but it's mostly fine.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

Well i've compiled ZDoom32 with VS 2017 and surprisingly portals are not broken so it seems it's a MinGW thing, but they work in LE. I had to revert "use lambdas for more concise code" or else the MS compiler would crash. Performance in software truecolor is the same (VS only compiles the SSE2 version).
Apparently the ZDOOM_USE_SSE2 flag has always been broken, you need to unckeck it for SSE2 to actually be used, this was for the nodebuilder.
The old GL renderer only works in Debug configuration else it crashes inmediately as soon as you start a new game. I'll try to investigate it. This is the gzdoom32 branch.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

It's crazy, the crash happens in gl_setup.cpp line 166 in static int MergeMapSections(int num).

> zdoom.exe!MergeMapSections(int num) Line 166 C++
zdoom.exe!SetMapSections() Line 208 C++
zdoom.exe!PrepareSectorData() Line 298 C++
zdoom.exe!gl_PreprocessLevel() Line 603 C++
zdoom.exe!P_SetupLevel(const char * lumpname, int position) Line 4096 C++
zdoom.exe!G_DoLoadLevel(int position, bool autosave) Line 1007 C++
zdoom.exe!G_InitNew(const char * mapname, bool bTitleLevel) Line 542 C++
zdoom.exe!G_DoNewGame() Line 367 C++
zdoom.exe!G_Ticker() Line 1073 C++
zdoom.exe!TryRunTics() Line 1946 C++
zdoom.exe!D_DoomLoop() Line 1016 C++
zdoom.exe!D_DoomMain() Line 2673 C++
zdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 1077 C++
zdoom.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, char * cmdline, int nCmdShow) Line 1332 C++

vsection = -85458944
Line 166 is sectvalid[vsection-1] = false;

Code: Select all

static int MergeMapSections(int num)
{
	FSectionVertexMap vmap;
	FSectionVertexMap::Pair *pair;
	TArray<int> sectmap;
	TArray<bool> sectvalid;
	sectmap.Resize(num);
	sectvalid.Resize(num);
	for(int i=0;i<num;i++) 
	{
		sectmap[i] = -1;
		sectvalid[i] = true;
	}
	int mergecount = 1;


	cvertex_t vt;

	// first step: Set mapsection for all vertex positions.
	for(DWORD i=0;i<(DWORD)numsegs;i++)
	{
		seg_t * seg = &segs[i];
		int section = seg->Subsector->mapsection;
		for(int j=0;j<2;j++)
		{
			vt = j==0? seg->v1:seg->v2;
			vmap[vt] = section;
		}
	}

	// second step: Check if any seg references more than one mapsection, either by subsector or by vertex
	for(DWORD i=0;i<(DWORD)numsegs;i++)
	{
		seg_t * seg = &segs[i];
		int section = seg->Subsector->mapsection;
		for(int j=0;j<2;j++)
		{
			vt = j==0? seg->v1:seg->v2;
			int vsection = vmap[vt];

			if (vsection != section)
			{
				// These 2 sections should be merged
				for(int k=0;k<numsubsectors;k++)
				{
					if (subsectors[k].mapsection == vsection) subsectors[k].mapsection = section;
				}
				FSectionVertexMap::Iterator it(vmap);
				while (it.NextPair(pair))
				{
					if (pair->Value == vsection) pair->Value = section;
				}
->				sectvalid[vsection-1] = false;
			}
		}
	}
	for(int i=0;i<num;i++)
	{
		if (sectvalid[i]) sectmap[i] = mergecount++;
	}
	for(int i=0;i<numsubsectors;i++)
	{
		subsectors[i].mapsection = sectmap[subsectors[i].mapsection-1];
		assert(subsectors[i].mapsection!=-1);
	}
	return mergecount-1;
}
Perhaps i should change the floating point model?

Edit: Well, it should work with VS 2015... I forgot to mention XInput support works with MinGW just using the include from the full DX SDK, it's in the latest release.
User avatar
TDRR
Posts: 816
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by TDRR »

I have two questions:

1- Is it possible to force the old 1.4 renderer? It would be nice because i'm testing something related to older GL versions.

2- Could you upload a mirror of the last version with GL support? I want to download it but on my network Github is far too slow, downloading at max 5kbps and most of the time the download cancels itself before even reaching 1MB!

Apologies if i'm bothering you.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

No sorry, Graf removed the GL 1.x stuff in the renderer by then. But ZDoom LE runs on GL 1.2 hardware, of course you'd need full GL 1.2 support for the renderer to work properly (else minor rendering glitches).
You could try Downthemall for firefox, but i plan to upload a more recent VS build somewhere else soon.
No need to apologize for anything. You're welcome.

On the previous crash it's a compiler bug, i added a workaround with bounds checking for that array, obviously not an acceptable solution but the game runs well. I guess i should have disabled some optimization option for the function where that vsection integer is calculated. IMHO it's better to just avoid the 2017 toolset completely for old versions.
User avatar
TDRR
Posts: 816
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by TDRR »

Oops, i think i wasn't specific enough, i know ZDoom LE runs in GL 1.2 hardware, but is that render mode always enabled or it uses a more advanced one (like 2.0) if such a GL version is supported by the GPU? If that's the case then i meant if it's possible to force the 1.2 renderer no matter if the GPU is 2.0 using a command line switch (i think there is and it's called "-gl1" but that doesn't appear to do anything on my PC)
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

So this is about ZDoom LE... i think that old renderer supported up to GL 3.0. There's no such option and -glversion was not still supported. So no it's not possible.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by Graf Zahl »

That old renderer was strictly OpenGL 1.x/2.x with a few more modern features supported through extensions.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

Thanks for the info.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

I'm going to release a new version very soon. The problem with mirrors and portals in the GL renderer was a MinGW specific thing so the next release will be a VS 2015 build (but i also plan a non GL non SSE2 MinGW build).
I've fixed linux compilation, i missed a few things, i'm using gcc 5.4 on mint mate 18.2. @Rachael: feel free to try it now... :)
Cocoa should work but i haven't tried.
I've added some extra stuff and more bugfixes. For the modern keyboard layout now i'm only adding the WASD keys (people using other layouts will need to redefine them anyway). I've changed the savegame order to reverse slot number (filename) but made it CVAR optioned (oldsaveorder) for those with forced names to sort them alphabetically. I still think this sorting works much better, also i've removed custom filenames (IMHO they were not really useful).

https://github.com/drfrag666/gzdoom/commits/gzdoom32
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by drfrag »

I've just noticed the old issue with SDL2 in fullscreen GL mode, there's no scaling and low resolutions are not stretched to the full size of the screen. Anyone could please point me to the commit where this was addressed? Thanks.
satelliclub
Posts: 2
Joined: Tue Dec 26, 2017 2:50 am

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by satelliclub »

You have the possibility zdoom marines change coulours and zdoom marines having coulours differently ?

Exemply:

Marine Chainsaw:Blue
Marine Pistol:Green
Marine shotgun:Red
Marine Super shotgun:Pink
Marine Chaingun:Brown
Marine Rocket:White
Marine BFG:Black
Marine BFG9000:Cyan
and ther colours for all other zdoom marines

is possible ?
satelliclub
Posts: 2
Joined: Tue Dec 26, 2017 2:50 am

Re: [UPDATED] ZDoom32 2.8.4 (ZDoom is undead)

Post by satelliclub »

ZDoom 2.8.5 and 2.8.5n released !

Download ZDoom 2.8.5:
https://github.com/drfrag666/gzdoom/archive/2.8.5.zip

Download Zdoom 2.8.5n:
https://github.com/drfrag666/gzdoom/archive/2.8.5n.zip

Enjoy !
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.5 (ZDoom is undead)

Post by drfrag »

Thanks but wrong links. Those are for the source code. I released ZDoom32 2.8.5 (GL 1.9.2) a couple of days ago. Both versions are in the same package now.
https://github.com/drfrag666/gzdoom/rel ... _2.8.5.zip

I've changed the executables and their names in the package (for compatibility). Now there's a full version (VS 2015 build) with the GL renderer requiring SSE2 and without ASM for SAFESEH running on XP and later and a N version without the GL renderer and with ASM for old non SSE2 cpus. That one still runs on win98.
Changing the compiler fixes portals and mirrors in GL mode. Also i've fixed linux compilation and Blzut3 could release a linux build if needed.

So now what's new? Like i mentioned there's a major bugfix for an old ZDoom bug and a few minor ones. On the features there's that mugshot in the primary HUD thing and the new skill level and that new savegame list order (now optioned with the oldsaveorder CVAR). Also i've added the trilinear (none) filtering mode and made it the default for the GL renderer. And more stuff i don't remember right now.

About those marines sorry but this is a maintenance version of ZDoom so only bugfixes and conservative features here, but i still think this is cool. :)
Wasn't that already possible with DECORATE?
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3146
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain

Re: [UPDATED] ZDoom32 2.8.5 (ZDoom is undead)

Post by drfrag »

I've released a new version mainly to fix a somewhat important bug which was already in the g1.x branch: dynamic lights did not affect certain walls, there was a missing adjustment after the renderer floatification. It was just something not easily noticeable (i noticed it playing Lizard Men 4 and with beamflashlight.pk3).
Also there are a few more fixes, including fragglescript cameras and the buffer overflow in the savegame comment. I've added stack protection for MinGW (N version) too BTW. And changed the executable name to zdoom32 again.

https://github.com/drfrag666/gzdoom/rel ... 2.8.5a.zip

Return to “Game Engines”