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]

Moderator: GZDoom Developers

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

rpeter wrote:Optimizing for speed is not just the compiler's territory. Ken used precalculated tables for almost everything: power, sqrt, sin, cosin, angles. Some were static tables in the code, the bigger ones were loaded from the grp file. Sure, you won't find many floats in Build, probably none in the Duke's game code, but with a fixed precision float lookup tables can also be created.
That was 10 years ago when computers were significantly slower than today. When you are using floats it is most likely fastest to use the CPU's sin, cos, sqrt commands and others. Tables only make sense if it is faster to calculate the index into the table than the needed value itself.
I still cannot imagine that those bird-brain piggies could be fitted with an AI that can slow down ZDoom noticably...
That depends on the amount you have in a level. Even though the AI doesn't cost much in overall percentage of execution time large amounts of monsters can still have an impact.
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Post by David Ferstat »

Anyone remember Cyb's "Helm's Deep"? :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

But that was due to drawing all the sprites, not the AI.
User avatar
MartinHowe
Posts: 2062
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

rpeter wrote:Optimizing for speed is not just the compiler's territory. Ken used precalculated tables for almost everything: power, sqrt, sin, cosin, angles.
Spooky! I was up late last night trying to get wad2map to work with JonoF's stuff in MinGW (you can't "as is", due to an FP operand size bug in GAS). If you want LSD tripping without being arrested for posession, just have a look at Ken's ksqrtasm() or indeed any of his stuff. Like abusing LEA as a 3-operand multiply instruction, for example! (Of course, AT&T assembler syntax looks vile to my eyes, but that's another story :) )
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

MartinHowe wrote: Like abusing LEA as a 3-operand multiply instruction, for example!

Any decent C++ compiler is doing that as well!
User avatar
Cutmanmike
Posts: 11352
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

I can't understand heads or tailes of the programming bit but.......


purdy colours........... <3
User avatar
Enjay
 
 
Posts: 26976
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Graf Zahl wrote:But that was due to drawing all the sprites, not the AI.
Not all of it. Slower machines had a noticable performance hit when all the thing_hates kicked in, even when none of the bad guys were visible on the screen.

58
User avatar
Cutmanmike
Posts: 11352
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Enjay wrote:58
[offtopic]We're getting there my son[/offtopic]
rpeter
Posts: 150
Joined: Mon Jul 21, 2003 10:52 pm

Post by rpeter »

Fortunately all of Build ( and Duke ) can be built as C-only, although JonoF's C replacements might not be uptodate. A lovely example for optimizing by hand:

int krecipasm(int i)
{ // Ken did this
float f = (float)i;
i = *(int *)&f;
return((reciptable[(i>>12)&2047]>>(((i-0x3f800000)>>23)&31))^(i>>31));
}

Not in a lifetime can I decypher what it does. And I bet the original wasm version wasn't prettier either.
User avatar
HobbsTiger1
Posts: 1235
Joined: Fri Jan 07, 2005 7:29 pm
Location: #DMClub
Contact:

Post by HobbsTiger1 »

Hobbs is happy *glues himself to monitor*
User avatar
Csonicgo
Posts: 1193
Joined: Thu Apr 15, 2004 3:28 pm
Location: Leeds

Post by Csonicgo »

I cannot wait. this wil blow vavoom out of the fuckin' WATER!
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Oh yes great lets get tribal again whee happy I'm eating my own fingers
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Post by wildweasel »

I'm psyched. (No, there is no other content to this post.)
User avatar
Siggi
Posts: 3288
Joined: Sun Oct 03, 2004 8:57 am
Preferred Pronouns: They/Them
Location: South Africa

Post by Siggi »

Does 97 have an intergrated coffee maker?
User avatar
Sphagne
Posts: 513
Joined: Wed Jul 16, 2003 3:36 am

Post by Sphagne »

How about automated level builder?

MapInfo:

LevelTheme: Hell.
LevelSize: 2560,4000
LevelDifficulty: Hard
MonsterUse: 50,70,120
Detail: 80
Decoration: 300
EndBoss: SpiderMasterMind
MiniBoss: 2: (Baron:5 ; Mancubuc:2,ArchVile)
...

Let's Play! :wink:
Post Reply

Return to “ZDoom (and related) News”