[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/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 » Mon Aug 13, 2012 11:24 am

hmm could maybe adapt mh's timing function for doom3 ? the pthread in there kinda gave away that it was for posix systems :P
though pthreads also exist on win32 most prefer to use the native thread functions.

Thats also a point pvs-studio keeps nagging me about to change to use beginthreadex / endthreadex instead of the old versions doom3 uses.
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 » Mon Aug 13, 2012 5:07 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby motorsep » Mon Aug 13, 2012 5:14 pm

Is it only for Windows or would Linux needs all that too?

Btw, tried high resolution GUI patch from d3w forums http://i.imgur.com/sOJAt.jpg - wicked :/
motorsep
 
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA

Re: Doom 3 engine release and game code

Postby mh » Mon Aug 13, 2012 5:55 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby WickedShell » Mon Aug 13, 2012 6:59 pm

WickedShell
 
Posts: 24
Joined: Mon Feb 14, 2011 5:16 am

Re: Doom 3 engine release and game code

Postby motorsep » Mon Aug 13, 2012 7:08 pm

That's stuff is missing completely in dhewm3, Sys_Sleep(1) can't be found anywhere.
motorsep
 
Posts: 231
Joined: Wed Aug 02, 2006 11:46 pm
Location: Texas, USA

Re: Doom 3 engine release and game code

Postby mh » Mon Aug 13, 2012 7:36 pm

Sleep (0) seems to be even worse: http://blogs.msdn.com/b/oldnewthing/arc ... 76847.aspx

In principle the idea does make sense though.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby WickedShell » Mon Aug 13, 2012 9:06 pm

Excellent, time to throwing out some more stuff picked up from college CS classes :P (Where sleep(0) was advocated for that usage)

For arguments sake though, assuming a normal priority task is this a terrible thing? Yes it still preempts background/very low priority things but at the same time this is meant to be an interactive application, where losing to much time is already an issue, and its expected to eat the system load? Within the Linux world again (sorry) if you are using the CFS (Completely Fair Scheduler), those background tasks will still eventually grab processor time.

I guess I'd hold the position that assuming you are trying to run after a certain time delta (say a minimum of 1 ms) that sleep(0) represents a fair compromise between a busy loop that checks time until its incremented (I've seen this before, its sorta scary), and calling sleep(n) where you have an implicit large error in timing and can fall behind your goal. In the busy loop case, even assuming the application is a high priority then sleep(0) is no worse then spinning (probably still better as any other high priority process can grab time). Although in terms of something like Doom3 with that 60FPS cap, that's still low enough I've been trying to trust the scheduler with regards to sleeping appropriately, any thoughts here in terms of sleeping to long/or finer granularity?

Although its definitely something to consider, I hadn't really heard that charge leveled against sleep(0) before, I'll have to play with that here and see what it does to a low priority process. I'd be interested to see how starved it could become.
WickedShell
 
Posts: 24
Joined: Mon Feb 14, 2011 5:16 am

Re: Doom 3 engine release and game code

Postby revelator » Mon Aug 13, 2012 9:24 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 Aug 14, 2012 12:41 am

Hmm seems to work allright :)
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 Aug 14, 2012 10:46 am

Ok tested extensively and only one remark.

It seems to make some parts stutter (gui intro etc).
Else it seems to work ok.

My guess is that timeBeginPeriod / timeEndPeriod was adjusting timing for the old function.
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 Aug 14, 2012 4:18 pm

I've been playing quite a bit with it recently and it seems OK for me, but then I haven't really been paying attention to the parts you've called out.

I've also been using toggle run on, and have recently just finished the Alpha Labs. It completely changes the dynamic of the game - rather than being a fairly slow-but-steady pace it's now a series of quite fast spurts; you run around (with bunnyhopping!) for a bit until your stamina drains, then stop and rest, then run some more. It's quite good fun and definitely makes for a good replay. If I wanted to do a more purist run through it I wouldn't use this, but for adding some difference and variety it's quite cool.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby revelator » Tue Aug 14, 2012 9:47 pm

Aye makes for a fun ride :) even though the change is small it certainly adds to the experience.

The timing seems to affect roq rendering the worst making the mars flyby when you start the engine move in a chunky way.
It might be something else entirely but i noticed this after the code change.
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 Aug 14, 2012 11:08 pm

That Mars scene is actually the engine just drawing a model, the id logo movie is an RoQ though.

Can't say that I'm noticing the same however.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Doom 3 engine release and game code

Postby revelator » Tue Aug 14, 2012 11:42 pm

Ah thought that was also a roq :) ok its models having trouble then hmm.

I use a special menu with widescreen support that has a massive polycount md5mesh for the gui models might be that which its getting hickups from though it seems to vary.

i did some work at getting the engine to support it natively so that it doesnt stretch at 16:9 resolutions with some help from some code of justin marshall.
I will release some game dll's + doom3.exe with this support in. Added some additions of my own that justin might have overlooked so its no longer nessesary to hardcode
the 16:9 and 16:10 resolutions. Biggest change was removing all the hardcoded 640x480 virtual resolutions and instead set them dynamically (all follow the resolution currently set instead of fixed 640x480).
It seems to work fine but ill test it some more before i release it.
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 1 guest