FAQ  •  Register  •  Login

Doom 3 engine release and game code

Moderator: Inside3D Admins

<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Sun Aug 05, 2012 6:49 am

Re: Doom 3 engine release and game code

Doom3 ROE shot from my engine

Image

Doom3 is dark ... naaaahh :P

It works really well now but damn it takes its tool on FPS with highres textures and everything set to highest detail.
2x 560 gtx ti in sli and with everything on max i can hardly hold it at 10 fps :S
Productivity is a state of mind.
<<

Spiney

Posts: 9

Joined: Mon Feb 13, 2012 1:35 pm

Post Sun Aug 05, 2012 1:46 pm

Re: Doom 3 engine release and game code

Something which I think would look cool on D3 would be self shadowing bumpmaps :)
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Mon Aug 06, 2012 12:00 pm

Re: Doom 3 engine release and game code

Interresting :)

I seem to recall that doom3 was allready able to do selfshadowing but that it looked crap so many mods turn it of hmm ?.
Atm im pondering a way to make parralax occlusion mapping a material resource so that it can be enabled on flat textures only to avoid the
texture gliding bug which looks kinda bad.

The offset limited version looks mostly ok but even that one sometimes breaks.
Tesselation might work better but im not yet sure how to go about that one.
Productivity is a state of mind.
<<

mh

User avatar

Posts: 2172

Joined: Sat Jan 12, 2008 1:38 am

Post Mon Aug 06, 2012 5:13 pm

Re: Doom 3 engine release and game code

Two simple enhancements.

Change the definition of the "saveGame" command to this:
  Code:
cmdSystem->AddCommand ("saveGame", SaveGame_f, CMD_FL_SYSTEM | CMD_FL_CHEAT, "saves a game", idCmdSystem::ArgCompletion_SaveGame);

And now you've got TAB autocompletion on it.

In idConsoleLocal::KeyDownEvent, change the K_ENTER/K_KP_ENTER condition block to this:
  Code:
   if (key == K_ENTER || key == K_KP_ENTER)
   {
      int buflen = strlen (consoleField.GetBuffer ());

      common->Printf ("]%s\n", consoleField.GetBuffer ());

      cmdSystem->BufferCommandText (CMD_EXEC_APPEND, consoleField.GetBuffer ());   // valid command
      cmdSystem->BufferCommandText (CMD_EXEC_APPEND, "\n");

      // don't add empty lines to history
      if (buflen > 0)
      {
         // copy line to history buffer
         historyEditLines[nextHistoryLine % COMMAND_HISTORY] = consoleField;
         nextHistoryLine++;
         historyLine = nextHistoryLine;
      }

      consoleField.Clear ();
      consoleField.SetWidthInChars (LINE_WIDTH);

      session->UpdateScreen ();// force an update, because the command
                        // may take some time
      return;
   }

Prevents blank lines from being added to the history.

Both were just minor annoyances, but it's nice to clean these things up too.
Like the fifth day of playing 24-hour Scrabble when you don't want to use any letters because each one means a world to you because you're so deranged.
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Tue Aug 07, 2012 6:10 am

Re: Doom 3 engine release and game code

Nice addition mh thanks :)
Productivity is a state of mind.
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Tue Aug 07, 2012 6:21 am

Re: Doom 3 engine release and game code

Small addition from me.

theres a ton of if (strlen(somename) == 0) according to pvs-studio its better to just do if (somename[0] == '\0')
i tried it to see if it would break anything but it seems to work just fine there might however be edge cases so doublecheck.
Productivity is a state of mind.
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Wed Aug 08, 2012 12:46 pm

Re: Doom 3 engine release and game code

Hmm found a rather weird call

if (sel >= 0)
{
m_drawMaterial->setMedia(lightInfo.strTexture);
}
else
{
m_drawMaterial->setMedia(lightInfo.strTexture);
}

there essentially the same so removing the check should be correct ?
Productivity is a state of mind.
<<

mh

User avatar

Posts: 2172

Joined: Sat Jan 12, 2008 1:38 am

Post Wed Aug 08, 2012 8:45 pm

Re: Doom 3 engine release and game code

An interesting change is to enable in_toggleRun for single player; in idUsercmdGenLocal::MakeCurrent:
  Code:
toggled_run.SetKeyState (ButtonState (UB_SPEED), in_toggleRun.GetBool ());

It completely alters the feel of the game; there's no more sluggish movement and a pretty cool resource management game with your stamina bar is added.
Like the fifth day of playing 24-hour Scrabble when you don't want to use any letters because each one means a world to you because you're so deranged.
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Thu Aug 09, 2012 9:03 am

Re: Doom 3 engine release and game code

Heh nice :) that is indeed usefull.

Would the toggle also work for crouch etc ?. as i found it does not seem to work in vanilla.
Productivity is a state of mind.
<<

motorsep

Posts: 146

Joined: Wed Aug 02, 2006 11:46 pm

Location: Texas, USA

Post Thu Aug 09, 2012 4:18 pm

Re: Doom 3 engine release and game code

So mh's code allows to press Shift once and player will keep running until Shift is pressed again ? What about stamina bar is it another code that brings it to the HUD?
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Thu Aug 09, 2012 6:23 pm

Re: Doom 3 engine release and game code

If using an unmodified gui the stamina bar is just there you will run untill your stamina bar reaches zero then you will have to walk a bit untill it reaches full again.
Stamina bar does not show up if using 6th venoms HD menu gui.

So yeah press shift to toggle ;) works a bit like in crysis.
Productivity is a state of mind.
<<

motorsep

Posts: 146

Joined: Wed Aug 02, 2006 11:46 pm

Location: Texas, USA

Post Thu Aug 09, 2012 6:38 pm

Re: Doom 3 engine release and game code

Well, if you have run toggled, then what's the point of having stamina ?
<<

mh

User avatar

Posts: 2172

Joined: Sat Jan 12, 2008 1:38 am

Post Thu Aug 09, 2012 7:39 pm

Re: Doom 3 engine release and game code

Stamina still goes down if you're running; the bar is just always visible but otherwise behaviour is exactly the same.

There's an in_toggleCrouch as well, which needs to be set to 1 (and which doesn't get saved to your config) in order to enable crouch toggling. A lot of the PC-weenies hate toggled crouch, seeing it as a symptom of consolization, but I'm thinking that in general terms if you crouch then 9 times out of 10 you're going to want to stay crouched (e.g. going through a pipe, ducking behind a crate, whatever).
Like the fifth day of playing 24-hour Scrabble when you don't want to use any letters because each one means a world to you because you're so deranged.
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Sat Aug 11, 2012 1:38 am

Re: Doom 3 engine release and game code

Heh i just found Doom3's breaking point for model texture sizes its 1024x1024 for a card with 1 gig texture mem. Going above that will crash both doom3 and the driver ouch.
Can probably go beyond that with compressed textures but will loose some detail.
Biggest problem in that regard is that textures this size will have to be loaded directly or split in several pk4 archives cause else the archives will go above the boundaries of what the pak loader can read (atm 2.2 gig above that and you will get a pak that wont load).
I wonder if the same trick that was used in nehahra for expanding pak sizes can be used for doom3 ? referring to the MAX_FILES_IN_PAK define.
Productivity is a state of mind.
<<

motorsep

Posts: 146

Joined: Wed Aug 02, 2006 11:46 pm

Location: Texas, USA

Post Sat Aug 11, 2012 2:03 am

Re: Doom 3 engine release and game code

Why don't just raise the limits? Especially for pk4 size.
PreviousNext

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft