The status of ZDoom 2.0.97

News about ZDoom, its child ports, or any closely related projects.
[ZDoom Home] [Documentation (Wiki)] [Official News] [Downloads] [Discord]
[🔎 Google This Site]
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

Sphagne wrote:How about automated level builder?
That should be easy to do: Just write a batch file that runs Slige and then ZDoom.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ

Post by DoomRater »

Graf Zahl wrote:But that was due to drawing all the sprites, not the AI.
The sprites had a lot to do with it, but the map had SO much more. In fact, during the camera scene, when it sufficiently stopped pointing at the castle the frame rate went back to smooth.

It seemed more like the level was doing a lot to make the AI think more. You know, all those crossed lines over at the top of the door and other places to make it look 3D-ish. Sigh... That wasn't right. That was the forceful upgrade from my Celeron 466 to a Pemtium 3 800 that I ended up having to do because I couldn't play Helm's Deep worth a crap on the old one. (But thankfully I got to experience ZDoom with unpegged framerates on other maps)
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

Graf Zahl wrote:And since I know VC's optimizer quite well I can say that this does not create optimal code.
Don't worry. I do check the assembly code the compiler generates. For instance, I can do this:

Code: Select all

dist = Vector2(victim->Origin - m_Spot->Origin).Length();
That casts a 3D vector to a 2D vector by discarding the Z component and then calculates the length. The compiler is smart enough to not even bother subtracting the Z component, since it just gets thrown away:

Code: Select all

fld         dword ptr [esi+18h]
fsub        dword ptr [eax+18h]
fld         dword ptr [esi+1Ch]
fsub        dword ptr [eax+1Ch]
fld         st(0)
fmul        st,st(1)
fld         st(2)
fmul        st,st(3)
faddp       st(1),st
fsqrt
fstp        st(2)
fstp        st(0)
Interestingly, GCC seems to have a more aggressive x87 optimizer that inserts fxch everywhere to improve parallelization opportunities:

Code: Select all

fld         dword ptr [eax+18h]
fld         dword ptr [eax+1Ch]
fxch        st(1)
fsubr       dword ptr [edx+18h]
fxch        st(1)
fsubr       dword ptr [edx+1Ch]
fxch        st(1)
fmul        st,st(0)
fxch        st(1)
fmul        st,st(0)
faddp       st(1),st
fsqrt
So compared to GCC, Visual C++ isn't great, but it's not bad either. It does a decent job of keeping data on the register stack. And it can replace an atan2() function call with the fpatan instruction, which GCC doesn't do. (But atan2() is not used all that much, so it doesn't matter a whole lot.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

But how about this:

NormalLight.Color = PalEntry (255, 255, 255);

Code: Select all

	mov	al, 255					; 000000ffH
	xor	ebx, ebx
	mov	BYTE PTR $T19519[esp+8], al
	mov	BYTE PTR $T19519[esp+9], al
	mov	BYTE PTR $T19519[esp+10], al
	mov	BYTE PTR $T19519[esp+11], bl
	mov	ecx, DWORD PTR $T19519[esp+8]
	mov	DWORD PTR _NormalLight+4, ecx
Especially when using constructors to assign values it seems that it sometimes does have problems creating optimal code.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Are we going to get Hexen inventory items that can run scripts eventually?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

If I had to decide, yes. I have already done some investigation how to do this without overkilling DECORATE but right now I prefer to wait for the next version until I spend some more serious thought about it.

(Let's just say that with what I have in mind it would be possible to do all of Doom's powerups without any item specific coding as it is now... ;) )
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

Graf Zahl wrote:NormalLight.Color = PalEntry (255, 255, 255);
Okay, that doesn't look so great. But by adding another operator = overload that takes a PalEntry as input, I can get rid of the temporary:

Code: Select all

mov         ebx,0FFh
mov         byte ptr [_NormalLight+4],bl
mov         byte ptr [_NormalLight+5],bl
mov         byte ptr [_NormalLight+6],bl
mov         byte ptr [_NormalLight+7],0
It could be done better by merging those four byte writes into a single dword write, but I'm not using Watcom, so I don't really expect that to happen. (Watcom is the only compiler I've seen that will combine consecutive small writes into fewer larger writes.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Good to know. This actually helps me to cut down the code size in a project of mine significantly. :) This inefficiency is one of the things I least liked about VC for some time now.
User avatar
TOGoS
Posts: 131
Joined: Sat Nov 22, 2003 12:33 am
Location: Wisconsin

Post by TOGoS »

Sphagne wrote:How about automated level builder?
Only if it supports MappingStyle: TOGoSian

Speaking of which, there should be a new version of Crapi available by the end of summer... :roll:
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire

asdfasdfasdfasdf

Post by Galaxy_Stranger »

Does 97 have an intergrated coffee maker?
It should come with a blowjob, too!
User avatar
morbidtwatt
Posts: 136
Joined: Fri Aug 15, 2003 7:56 am
Location: frederick md

Post by morbidtwatt »

those pictures of what looks like 3d mode for a wad editor. randy are u planning on adding a visual to stacked sectors somthing that helps us see it without trial an error?? what are those pictures u posted at the bottom of ur post?
RabidZombie
Posts: 113
Joined: Mon Aug 30, 2004 1:52 pm
Location: Still hell... Somewhere

Post by RabidZombie »

... did you read any of this thread at all? It was polymost. If you read bck there is more info about it.
User avatar
morbidtwatt
Posts: 136
Joined: Fri Aug 15, 2003 7:56 am
Location: frederick md

Post by morbidtwatt »

heh ohh well i geuss i dont mind zdoom with more color gl rocks anyways, but are u sure those bottom pics are for polymost and not somthin to do with stacked sectors?
User avatar
Chris
Posts: 2998
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

randy has said its polymost, where did he say it was to do with stacked secotrs? not that they couldn't have benefits for stacked sectors but thats not their purpose
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm

Post by Chilvence »

Hey Graf, just out of curiousity, which company do you work for? Not that I'm trying to stalk you, I just wanted to see what games our favourite German Giestbuster has had a hand in ;)

Return to “ZDoom (and related) News”