Page 50 of 53

Re: Doom 3 engine release and game code

Posted: Fri Aug 16, 2013 12:02 pm
by revelator
Major success report :)

I made some thread Lock changes and implemented a port of gnu's atomic intrinsic code to handle various stuff like incrementing pointers.

Doom3 is now so fast it scares even me :shock:

And it runs totally fluid with sikkmods heavies enabled woa :mrgreen:

Atm im using the intrinsics for heap managment.

Code looks like this.

Code: Select all

/*
================================================================================================

	GNU Atomic Intrinsics

================================================================================================
*/

// missing in msvc
#if defined(_MSC_VER)
#pragma intrinsic (_InterlockedExchange)
#pragma intrinsic (_InterlockedExchangeAdd)
#pragma intrinsic (_InterlockedCompareExchange)

ID_FORCE_INLINE int __sync_lock_test_and_set(int *addr, int val)
{
return static_cast< int >(_InterlockedExchange(reinterpret_cast< long * >(addr), static_cast< long >(val)));
}

ID_FORCE_INLINE int __sync_fetch_and_add(int *addr, int val)
{
	return static_cast< int >(_InterlockedExchangeAdd(reinterpret_cast< long * >(addr), static_cast< long >(val)));
}

ID_FORCE_INLINE int __sync_val_compare_and_swap(volatile int *addr, int oldval, int newval)
{
	return static_cast< int >(_InterlockedCompareExchange(reinterpret_cast< volatile long * >(addr), newval, oldval));
}
#endif

Re: Doom 3 engine release and game code

Posted: Fri Aug 16, 2013 12:02 pm
by revelator
Major success report :)

I made some thread Lock changes and implemented a port of gnu's atomic intrinsic code to handle various stuff like incrementing pointers.

Doom3 is now so fast it scares even me :shock:

And it runs totally fluid with sikkmods heavies enabled woa :mrgreen:

Atm im using the atomic intrinsics for heap managment and it really helps.

edit: wtf double post :shock:

Re: Doom 3 engine release and game code

Posted: Sun Aug 18, 2013 3:31 am
by anonreclaimer
reckless wrote:Major success report :)

I made some thread Lock changes and implemented a port of gnu's atomic intrinsic code to handle various stuff like incrementing pointers.

Doom3 is now so fast it scares even me :shock:

And it runs totally fluid with sikkmods heavies enabled woa :mrgreen:

Atm im using the intrinsics for heap managment.

Code looks like this.

Code: Select all

/*
================================================================================================

	GNU Atomic Intrinsics

================================================================================================
*/

// missing in msvc
#if defined(_MSC_VER)
#pragma intrinsic (_InterlockedExchange)
#pragma intrinsic (_InterlockedExchangeAdd)
#pragma intrinsic (_InterlockedCompareExchange)

ID_FORCE_INLINE int __sync_lock_test_and_set(int *addr, int val)
{
return static_cast< int >(_InterlockedExchange(reinterpret_cast< long * >(addr), static_cast< long >(val)));
}

ID_FORCE_INLINE int __sync_fetch_and_add(int *addr, int val)
{
	return static_cast< int >(_InterlockedExchangeAdd(reinterpret_cast< long * >(addr), static_cast< long >(val)));
}

ID_FORCE_INLINE int __sync_val_compare_and_swap(volatile int *addr, int oldval, int newval)
{
	return static_cast< int >(_InterlockedCompareExchange(reinterpret_cast< volatile long * >(addr), newval, oldval));
}
#endif
I just tried to run doom 3 it crash on loading the menus.
WHY???

Re: Doom 3 engine release and game code

Posted: Sun Aug 18, 2013 8:45 am
by revelator
try removing Doomconfig.cfg i had the same at times due to changed cvars in the code.

Stray NULL pointer somewhere in the Vanilla cvar code seems to be the cause.

Re: Doom 3 engine release and game code

Posted: Sun Aug 18, 2013 8:57 am
by revelator

Re: Doom 3 engine release and game code

Posted: Sun Aug 18, 2013 7:13 pm
by qbism
ATI Mobility was crashing out on menus until checked "Disable Catalyst AI".
Some Sikkmod effects were weird until disabling downsize options in config. Although a big fps hit, soft shadows look awesome.
Image

Re: Doom 3 engine release and game code

Posted: Sun Aug 18, 2013 9:08 pm
by revelator
Anyone noticed something strange in ressurection of evil ?

Muzzleflashes on my rocketlauncher bfg and the hellorb are White Blocks on my rig :S strangely enough even the original exe does it, same with the original game dll.

Funny enough every other mod Works fine.

Re: Doom 3 engine release and game code

Posted: Thu Aug 22, 2013 10:23 pm
by revelator
Ok the decal weirdness was a corrupt save it seems :S .

Not much to report else, but i updated all the 3'rd party libraries like curl openal ogg vorbis and jpeg to the latest versions and added my ports of the TGA2 code to it.
Took a bit of the speed unfortunatly but Theres a Price to pay for the detail its now capable off :) not much though it dropped about 5-10 fps in the timedemo ingame its still at max 60.

i also removed the c sources from it (ogg vorbis curl) and defult to linking to there compiled libraries to avoid the extern C crap.

Jpeg is now version 9.
ogg is version 1.3.1.
vorbis is 1.3.3.
curl is version 7.32.
OpenAL is latest from openalsoft.

id's roq renderer Works fine so why they decided to ditch it in favor of a propriarity codec in BFG is beyond me :?: maybe better compression hmm, but then why not use xvid or theora ??? or even matroska which can provide a rather heavy compression using the opensource version of the x264 codec without quality loss.

Actually stumbled upon a bug also which manifested itself after fixing another bug :lol: the code for getting weapon decl's goes bonkers when you enter the hell level because the game removes all your weapons
it returns an empty string crashing the client. id had a check somewhere else in the code that compared two different enums for the same decl which returned an invalid value fixing that one brought it up so i removed the Error in the check and simply returned a 0 if the decl was empty. To be sure i checked the BFG code and they had done the exact same thing so i guess my fix was correct :)

But im off for some days im getting operated Again :S seems the stupid bastards WHO removed my gallbladder forgot some stones in there after all :evil: been in pain hell the last 3 days and my mood is not the greatest.

Re: Doom 3 engine release and game code

Posted: Thu Aug 22, 2013 10:46 pm
by frag.machine
Ouch man, sorry to hear about that. :(
Here hoping everything goes well this time and you recover fast :)

Re: Doom 3 engine release and game code

Posted: Thu Aug 22, 2013 11:12 pm
by revelator
Heavy morphine ingestations else i would not have been able to even sit here and post (damn im a goddamn narcotic now i get enough to knock out an elephant 120 mg contalgin :shock: ) but yeah i hope this takes care of it, atleast this time they should be able to crack the bastards with ultrasound and not open me up with four drillpoints in the stomach :evil:

Re: Doom 3 engine release and game code

Posted: Sat Aug 24, 2013 8:14 pm
by anonreclaimer
reckless wrote:Ok the decal weirdness was a corrupt save it seems :S .

Not much to report else, but i updated all the 3'rd party libraries like curl openal ogg vorbis and jpeg to the latest versions and added my ports of the TGA2 code to it.
Took a bit of the speed unfortunatly but Theres a Price to pay for the detail its now capable off :) not much though it dropped about 5-10 fps in the timedemo ingame its still at max 60.

i also removed the c sources from it (ogg vorbis curl) and defult to linking to there compiled libraries to avoid the extern C crap.

Jpeg is now version 9.
ogg is version 1.3.1.
vorbis is 1.3.3.
curl is version 7.32.
OpenAL is latest from openalsoft.

id's roq renderer Works fine so why they decided to ditch it in favor of a propriarity codec in BFG is beyond me :?: maybe better compression hmm, but then why not use xvid or theora ??? or even matroska which can provide a rather heavy compression using the opensource version of the x264 codec without quality loss.

Actually stumbled upon a bug also which manifested itself after fixing another bug :lol: the code for getting weapon decl's goes bonkers when you enter the hell level because the game removes all your weapons
it returns an empty string crashing the client. id had a check somewhere else in the code that compared two different enums for the same decl which returned an invalid value fixing that one brought it up so i removed the Error in the check and simply returned a 0 if the decl was empty. To be sure i checked the BFG code and they had done the exact same thing so i guess my fix was correct :)

But im off for some days im getting operated Again :S seems the stupid bastards WHO removed my gallbladder forgot some stones in there after all :evil: been in pain hell the last 3 days and my mood is not the greatest.
Hmm good I have also updated the librarys too but don't you think you should get rid of oggvorbis and replace it with libopus?
Also I would like to see your new jpeg loader for the life of me I couldn't update it and I found a bug in the last one that would crash the editor with one of my textures?
One more thing what is difference in doom 3 and bfg texture quality.
I hope you get better soon.

Re: Doom 3 engine release and game code

Posted: Sat Aug 24, 2013 10:48 pm
by revelator
Dont know libopus but ill have a look :).

The jpeg code was posted earlier in this thread together with the TGA2 loader.

Not much difference tbh the TGA code in BFG is the exact same as Vanilla and has the same bugs with some textures (some models go Black. not refering to the ASE model bug ;) ).
The TGA2 upgrade can handle pretty much any tga format and it does not need the hack for flipping the images the old code used :)

The jpeg code was from iodoom3 ported to C++ at the time it used jpeg 8.0b i have updated the jpeg library to 9.0 latest.

I hear a rumour that BFG does not use the TGA code at all though and that it uses a newer format but looking at the source i Wonder where cause for the death of me i cant see this code.

Re: Doom 3 engine release and game code

Posted: Sat Aug 24, 2013 11:56 pm
by anonreclaimer
reckless wrote:Dont know libopus but ill have a look :).

The jpeg code was posted earlier in this thread together with the TGA2 loader.

Not much difference tbh the TGA code in BFG is the exact same as Vanilla and has the same bugs with some textures (some models go Black. not refering to the ASE model bug ;) ).
The TGA2 upgrade can handle pretty much any tga format and it does not need the hack for flipping the images the old code used :)

The jpeg code was from iodoom3 ported to C++ at the time it used jpeg 8.0b i have updated the jpeg library to 9.0 latest.

I hear a rumour that BFG does not use the TGA code at all though and that it uses a newer format but looking at the source i Wonder where cause for the death of me i cant see this code.
I put in your changes awhlie back they did help but you also made changes to other parts of the render for the textures.

BFG is able to import port tga and jpeg then turns them in to binary image right?

if you don't mind me asking but why are you working with doom 3?

Re: Doom 3 engine release and game code

Posted: Sun Aug 25, 2013 12:01 am
by revelator
Only because Doom3's cinematic code needs jpeg for the huff encoding :)
and a few Things changed in the newer jpeg library so the old macros didnt Work the same as before. Example old one had GLOBAL void new one uses GLOBAL(void) etc.

Just like to improve on it no other reason besides sharpening my sklls in C++ :) before Doom3 i only coded in C.

Re: Doom 3 engine release and game code

Posted: Sun Aug 25, 2013 12:04 am
by revelator
Not sure about turning the images into binary resources allthough i noticed that a few Things where but so far i havent seen any code that suggest it might.
BFG does not use megatextures which are in binary.