Chunky by FelipeFS
Chunky by FelipeFS
GPWiki.org
It is currently Tue Jul 22, 2014 11:21 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Nov 27, 2012 8:08 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 7090
Location: Wilts, Englandshire
id have released the Doom3 source code.
https://github.com/id-Software/DOOM-3-BFG
The release contains no game assets and has been cut down to remove some features, but there's still plenty to get stuck into.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Wed Nov 28, 2012 2:06 am 
BANNED

Joined: Sun Jun 24, 2012 12:49 am
Posts: 504
Didn't they release the source like 40 years ago? I've had it sitting in a HDD since 11/22/2011. Here's one of my interesting findings I discovered after I first cracked it open: neo\idlib\Heap.h & neo\idlib\Heap.cpp.

Quote:
Memory Management

This is a replacement for the compiler heap code (i.e. "C" malloc() and
free() calls). On average 2.5-3.0 times faster than MSVC malloc()/free().
Worst case performance is 1.65 times faster and best case > 70 times.


Top
 Profile  
 
PostPosted: Wed Nov 28, 2012 3:11 am 
Digerati

Joined: Thu Sep 09, 2004 1:17 pm
Posts: 1796
Location: burrowed
This is the BFG edition. They reworked some stuff. I'd believe their occulus rift implemention is in there aswell.

_________________
Long pork is people!

wzl's burrow


Top
 Profile  
 
PostPosted: Wed Nov 28, 2012 4:04 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 7090
Location: Wilts, Englandshire
weezl wrote:
This is the BFG edition. They reworked some stuff. I'd believe their occulus rift implemention is in there aswell.


I thought I'd heard about a source release before. I was digging around but couldn't find the story.

This one does contain Occulus Rift stuff which gives a nice start to the tools for that.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Wed Nov 28, 2012 11:32 pm 
BANNED

Joined: Sun Jun 24, 2012 12:49 am
Posts: 504
No thoughts on idlib\Heap? No chocolate milkshakes. We can atleast have a real discussion on the contents of Doom 3's source. :(


Top
 Profile  
 
PostPosted: Thu Nov 29, 2012 6:07 am 
Digerati

Joined: Thu Sep 09, 2004 1:17 pm
Posts: 1796
Location: burrowed
Sorry i havent read it and i have no time to atm :P

But we all know that carmack can work his black magic through keyboards.

_________________
Long pork is people!

wzl's burrow


Top
 Profile  
 
PostPosted: Thu Nov 29, 2012 3:42 pm 
BANNED

Joined: Sun Jun 24, 2012 12:49 am
Posts: 504
Quote:
Sorry i havent read it and i have no time to atm :P
Good time to buy a clock to have time. :rolleyes

Quote:
we all know that carmack can work his black magic through keyboards.
Especially because John Carmack is the sole programmer at id Software. The wizard does not choose his keyboard. The keyboard chooses its hot babes wizard. :P


Top
 Profile  
 
PostPosted: Thu Nov 29, 2012 5:55 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 7090
Location: Wilts, Englandshire
The speedup of malloc/free is impressive, but will it make a difference in the game loop? I always try to do all my allocation before dropping into the main loop.

Even if things are allocated and freed in the loop, surely there won't be enough calls to make any great difference in speed.

Reminds me of the team that spent a week re-coding a sloppy function to run 500% faster, but it had no effect on the system as they'd accidentally optimised the idle loop.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Fri Nov 30, 2012 1:39 am 
BANNED

Joined: Sun Jun 24, 2012 12:49 am
Posts: 504
Quote:
Even if things are allocated and freed in the loop, surely there won't be enough calls to make any great difference in speed.

That is really.... I just lost you there. So hows your Pac-Man clone coming along? It really depends on what kind of game you're making, derp. Yeah, I agree that it's probably unecessary until you're dealing with a certain magnitude of memory allocation, but who are you to expect all games to ... I mean, wow... Dooood. >:(

Why the hell did you even question its purpose anyway? It's memory allocation!!!!!!!!


Top
 Profile  
 
PostPosted: Fri Nov 30, 2012 8:22 am 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 7090
Location: Wilts, Englandshire
Like I said, memory allocation ops can be expensive, so I always try to push all initialization and allocation outside the main loop. Even when using std::hashmap for stencil shadow volumes calculations, I reserve a good chunk of space up front to avoid memory ops at the wrong time.

Obviously, I haven't worked on anything at Carmack scale, and I can see that in some situations you'll need to allocate mid-gameloop, but I would hope that those calls are minimal. Or perhaps I've misunderstood what's going on.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Fri Nov 30, 2012 4:40 pm 
BANNED

Joined: Sun Jun 24, 2012 12:49 am
Posts: 504
Well, good point otherwise. Push dynamic allocation into a boring corner. :)

Edit: In that case, may I ask you to review and give your technical thoughts on:
viewtopic.php?f=2&t=11851


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group