[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Doom 3 engine release and game code

Doom 3 engine release and game code

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.

Moderator: InsideQC Admins

Re: Doom 3 engine release and game code

Postby revelator » Tue Nov 27, 2012 3:59 pm

Holy bitchorama :shock: :lol: well the only thing we would actually need would be bink.c and change its function naming scheme to fit Doom3's unfortunatly id stripped the source completely and only left in the protos in the headers so how it was setup from the beginning will be a bit of a guesswork.

I also found the spot where it crashes the old doom games strangely its in the sprite code they had a cast from a const char * const to an *(int*) that looked something like this
intname = *(int *)array[i]; but it returned a NULL pointer whenever you tried to start the doom1 or 2 game. The cast is pretty weird cause theres no way to do it with a C++ cast as far as i can tell,
i tried *reinterpret_cast<int *>(array[i]) *const_cast *static_cast and none of them is compilable msvc just keeps on bitching that theres no known way to convert that type :S but the C cast is ok and thats starnge cause the C casts just iterate through the C++ stayle casts untill it hits something that accepts it so either msvc is stupid or im missing something obvious :) which i may since im not used to C++.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby mh » Tue Nov 27, 2012 6:19 pm

What's especially interesting here is that a D3D version should now be viable. :)
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby r00k » Tue Nov 27, 2012 7:10 pm

*wink-wink *nudge_nudge
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Doom 3 engine release and game code

Postby revelator » Tue Nov 27, 2012 10:50 pm

Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Tue Nov 27, 2012 11:41 pm

Will be a huge undertaking the new renderer looks nothing like the old :) and i was right Doom3 uses glsl internally but can convert cg at runtime.
The old ARB assembly ones still seem to be there to though the backend was updated somewhat.

As for the video code the calls we need are these.

_BinkClose@4
_BinkDoFrameAsync@12
_BinkDoFrameAsyncWait@8
_BinkGetError@0
_BinkGetFrameBuffersInfo@8
_BinkGetKeyFrame@12
_BinkGoto@12
_BinkNextFrame@4
_BinkOpenWithOptions@12
_BinkOpenXAudio2@4
_BinkPause@8
_BinkRequestStopAsyncThread@4
_BinkSetMemory@8
_BinkSetSoundSystem@8
_BinkSetVolume@12
_BinkSetWillLoop@8
_BinkStartAsyncThread@8
_BinkWaitStopAsyncThread@4

taken from a depend scan of the original exe.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Tue Nov 27, 2012 11:57 pm

Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Thu Nov 29, 2012 2:36 am

Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Thu Nov 29, 2012 6:28 am

Btw this little hack is not possible in msvc 2012 without some workaround

#define private public
#define protected public

you need to put this in preprocessor

_XKEYCHECK_H
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Thu Nov 29, 2012 8:55 am

Hmm might be a bit harder than i first anticipated to backport the renderer since the new VBO function is somewhat different.
Might need to scrap the old Doom3 renderer completely.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Sun Dec 02, 2012 7:33 pm

Had some input from the ID dev who uploaded the bfg edition source about my using of '\0' instead of a NULL pointer, it should not be right but it magically works and after sifting through the info i could get on it it seems its actually perfectly legal and intended behaviour (taken from the mouth of one of the C++ standard devs) since '\0' is just an const integer 0 pointer, but if you where to do say '\1' then its another ballgame interely.

And something i was not aware of is to avoid try catch exception statements and instead use if else since the exception handling is very very slow.
Ofc theres situations where it might be handy (or even needed) but as a footnote its not a good idea to use them overly.

Ill be visiting my dad this christmas so i wont be back before newyear, so merry christmas all :)
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby qbism » Mon Dec 03, 2012 4:15 am

merry xmas, have a good trip.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Doom 3 engine release and game code

Postby revelator » Thu Dec 06, 2012 12:16 pm

Just dumping this before i leave :)

Took a shitload of work but drop this in Doom3's base folder and you get HD menu with 16/9 16/10 display.
Removed dentonmod specific stuff from the menu.
Removed the bloom setting in advanced as it was commented out because of a bug.
Updated shaders (defaults to arb hint nicest).
High poly models (no more jagged npc or monster models).

There are no race conditions :) so the only warnings you might get in doom3's console is what was allready there.

Fixed a long standing bug with the HD menu from 6th venom where the only difficulty availiable was marine, props go to a guy on doom3world who fixed it.

So this is an unofficial update to Doom3 standard if you also want nicer textures go to doom3world and get wulfens texture pack 2 and the high res pipe textures update for it.

Im also making a version for resurrection of evil but cant finish it before i get back.

TODO:

Fix overwriting of savegames not possible with the HD menu.
Add HDR light to the menu instead of bloom.
Make parallax occlusion mapping a material shader so we can avoid having parallax on decals or textures with bad normals (causes decals to flicker and textures with bad normals get sliding images "some rock types").

Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby revelator » Fri Jan 11, 2013 11:42 am

Seems the ATI slowdown bug is caused by me removing the non VBO fallbacks motorsep posted about the problem at doom3world and mentioned that the cards in question where from the 4xxx to 5xxx series so i started digging and it turns out these cards dont support OpenGL3 fully (especially the 4xxx series) causing massive slowdowns when mh's arbmapbufferrange version is used.

There also seem to be a problem with the indexbuffers and these versions from ATI but how big an impact it will make im not sure but for now if you got an ATI 4xxx or 5xxx card turn of the arbmapbufferrange stuff. theres a cvar which will do just that.

Now i need to find out how to detect an ATI card from these series so it can disable it automatically, checking for the extention is not enough as the ATI cards dont work well with it even though the driver
says its supported.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom 3 engine release and game code

Postby mh » Sat Jan 12, 2013 12:03 am

That's quite obviously a driver bug rather than a hardware issue as GL_ARB_map_buffer_range is designed to provide D3D's D3DLOCK_DISCARD/D3DLOCK_NO_OVERWRITE functionality, which has been used successfully (and with good performance) since the Pre-Cambrian Period. Pity that AMD no longer provide driver updates for these cards, as a simple update should be all that's needed to resolve it.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby revelator » Sat Jan 12, 2013 5:15 am

indeed :( man that sucks.
Guess ill just have to tell users of those cards to turn it off if they want to use my engine.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

PreviousNext

Return to General Programming

Who is online

Users browsing this forum: No registered users and 3 guests