Doom 3

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Doom 3

Post by brybry »

UPDATE (8/20/12)

New Features:
Command console
Load image files from .zip type archives
HDR (High Dynamic Range)
Fly-Through Path

Fixed/Changed:
Map processor works much better, but still not 100%
Corrected texture coordinate generation
Corrected tangent space generation for normal mapping
Text Renderer code is much better, now uses VBO


I've decided to release the source for my own Doom 3 style 3D engine.

It is a BSP/portal engine with fully dynamic lighting and shadowing. Unlike Doom 3, mine uses shadow mapping.

The code is horrible, in every sense of the word. It has evolved over 8+ years, first from a Half-Life map viewer, to a Quake III map viewer, and then to include a map BSP/portal processor and now is a custom 3D engine. It does still follow Doom 3 conventions to a certain degree.

There is no physics, not even collision detection. There is little to do with actual game code, so it's just a custom map processor/viewer.

Do whatever you want with the code. There may be some useful parts to it. The run-time library is far from complete, but it could be useful to someone.

I can't say much for system requirements, other than a fairly new OpenGL compatible graphics card. GLSL is a requirement to run it as-is, but with some work, older ASM style shaders could be re-implemented. I haven't kept up on that, but most cards support GLSL. Other notable requirements for OpenGL are floating-point render targets, and framebuffer objects. I'm guessing GeForce FX 5600 or better, or Radeon 9500 or better to even run it. Obviously more powerful cards are better too.

If you can't get the program to run, let me know. If it runs but something doesn't work, I don't wanna hear about it! There was a lot of experimental features that never got fully developed (at one point I was doing non-textured ray-tracing on the GPU) or worked at one point but doesn't anymore. This is not meant to be a complete project release.

I may release updates if I do anything substantial, otherwise please don't ask for updates.

Before running or building, please look at the readme.txt file.

Binary/Code/Resources (75 MB)

If you have Doom 3 or the Doom 3 demo you don't need to download this extra file. You can use the resources you already have. Otherwise this file is also required to run my program. Download and place as-is into the ./base/ folder.
Additional Textures from Doom 3 (70MB)

Contains a project file for Crimson Editor. Don't have any project files for FBIde or FBEdit, sorry. More detailed instructions are included in the downloads.
Last edited by brybry on Jan 06, 2016 19:03, edited 5 times in total.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Post by Lachie Dazdarian »

Hrm...crashes after/during loading map on my work PC. Windows 7, GeForce GT 430. Will try back home.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

Wow, pretty cool seeing something like it in FB. Looks like a lot of work, with tons of interesting components. Earlier in this life I used to map for the Half-Life engine, though Doom 3 didn't really catch my interest when it was released.

Here's a makefile for fellow MinGW/MSYS-lovers (you may need to replace spaces by tab, the forum doesn't preserve tabs when copy/pasting):

Code: Select all

SOURCES += Main.bas
SOURCES += Renderer/RenderSystem.bas
SOURCES += Renderer/RenderWorld.bas
SOURCES += Renderer/renderBackEnd/renderBackEnd.bas
SOURCES += Renderer/RenderTarget.bas
SOURCES += Renderer/Model.bas
SOURCES += Renderer/Fog.bas
SOURCES += Screen.bas
SOURCES += rtLib/rtLib.bas
SOURCES += rtLib/Geometry/Geometry.bas
SOURCES += rtLib/Geometry/Winding.bas
SOURCES += rtLib/Geometry/PatchSurface.bas
SOURCES += rtLib/Runtime.bas
SOURCES += rtLib/MemManager.bas
SOURCES += rtLib/Log.bas
SOURCES += rtLib/String.bas
SOURCES += rtLib/Parser.bas
SOURCES += rtLib/FlyPath.bas
SOURCES += rtLib/EnvVariables.bas
SOURCES += rtLib/CRC16.bas
SOURCES += rtLib/ProfilerManager.bas
SOURCES += rtLib/Math/Math.bas
SOURCES += rtLib/Math/Vectors.bas
SOURCES += rtLib/Math/Planes.bas
SOURCES += rtLib/Math/Angles.bas
SOURCES += rtLib/Math/Matrix.bas
SOURCES += rtLib/Math/Rotation.bas
SOURCES += rtLib/Math/Quaternion.bas
SOURCES += rtLib/Math/SIMD_SSE.bas
SOURCES += rtLib/Math/SIMD_MMX.bas
SOURCES += rtLib/Math/Arcball.bas
SOURCES += rtLib/Frustum/BoundingVolumes.bas
SOURCES += rtLib/Frustum/Frustum.bas
SOURCES += rtLib/Expression/Operations.bas
SOURCES += rtLib/Expression/Expression.bas
SOURCES += rtLib/Expression/Conditions.bas
SOURCES += rtLib/MAPEntity.bas
SOURCES += rtLib/MapFile.bas
SOURCES += Loaders/MapFile.bas
SOURCES += rtLib/Loaders/Image.bas
SOURCES += Scene.bas
SOURCES += Sort.bas
SOURCES += PlayerAI.bas
SOURCES += Managers/TextureManager.bas
SOURCES += Managers/ProgramManager.bas
SOURCES += Materials/MaterialManager.bas
SOURCES += Materials/MaterialParser.bas
SOURCES += Renderer/RenderLight.bas
SOURCES += Font.bas
SOURCES += Renderer/ShadowMaps.bas
SOURCES += Selection.bas
SOURCES += Game/Game.bas
SOURCES += Game/Entity.bas
SOURCES += Game/Light.bas
SOURCES += Game/Player.bas
SOURCES += Game/Misc.bas
SOURCES += Game/WorldSpawn.bas
SOURCES += UMap/UMapMain.bas
SOURCES += UMap/Area.bas
SOURCES += UMap/BSP.bas
SOURCES += UMap/CSG.bas
SOURCES += UMap/ESR.bas
SOURCES += UMap/FileInput.bas
SOURCES += UMap/FileOutput.bas
SOURCES += UMap/GeoStatic.bas
SOURCES += UMap/Geometry.bas
SOURCES += UMap/Map.bas
SOURCES += UMap/Portals.bas
SOURCES += UMap/gldraw.bas

Unknown.exe: $(SOURCES)
	fbc -i rtLib -i uMap $^ -x $@

.PHONY: clean
clean: 
	rm -f Unknown.exe
Seems like I'm missing WGLext.bi at the moment though. Well, I don't have an .up file either. Although I still do have some map development files made with the old Goldsrc Hammer Editor.
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Post by brybry »

Update:
Should run from any path now...
WGLExt.bi has been included.
Compiled maps contain "detail" brushes now.


Create a folder: c:\games\unknown\ and copy all the files to that folder. I'm pretty sure that is the problem. I really need to make work from any path.

There was some pre-compiled maps in the full download. They are in .\base\maps\

Not sure it it will work with old Quake/Half-Life .map files...

Shoot! Forgot about WGLExt.bi. I'm pretty sure that is my own file, not part of the FB package. I'll re-upload later with a version that can run from any folder. ... I warned you all that it was bad...
Last edited by brybry on Oct 07, 2011 21:17, edited 1 time in total.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Post by Lachie Dazdarian »

Not sure why people have problems making their program to run from any path. You actually have to invest effort to do the opposite.

Anyway, I got the stuff run, but keyboard controls are not registered. I can only look around with mouse.
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Post by brybry »

Are you using A,S,W,D to move around? They only work when the free look is enabled.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Post by Lachie Dazdarian »

Yeah, works now. Man I suck at this. Runs quite smooth. It's rather dark, though, for me too "feel" the engine. No wall collision?
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Post by brybry »

I think part of what might be "throwing you off" is that the mouse cursor stays at 400, 300 not at the center of the screen. I'm not sure why this causes a coordination problem, but it does for me at least.

Yeah, it should run good on a 430 GT. There is much more that could be done to stress a good video card. I'll see if I can write up some instructions on how to enable displacement mapping. It can be done from the material files, without rebuilding the code.

Well, I was never good with math or physical simulation, so I didn't put a lot of focus into it. Like I said, I had it implemented via Netwon Dynamics, but all that code is lost.

As for brightness, I generally have my gamma level adjusted to at least 1.5. There is some code in there somewhere, I think, for adjusting gamma levels via the Windows API, but I haven't used it for years...

Glad it is working now.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

Oh right, I downloaded the code-only version, not the full thing, hah. Getting a crash now inside VirtualBox, but I should also test it on a Windows system with proper graphics setup.
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Re: Doom 3

Post by brybry »

Check the first post for updates.
elf16
Posts: 7
Joined: Dec 07, 2014 9:25

Re: Doom 3

Post by elf16 »

project closed?
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Re: Doom 3

Post by brybry »

Umm... I suppose it could be considered abandoned. I never closed it, but I don't know if I'll ever continue working on it.

Do you have any questions about it?
Booga
Posts: 1
Joined: Dec 14, 2015 4:54

Re: Doom 3

Post by Booga »

Sorry to bother you and everyone on this forum , but is the source code to this project still available ?

I was searching online for a some source code for a portal map viewer and this forum thread popped up.

I tried to download the source code from the link above , but sadly it seems to have been taken down :(

If possible could you re-post it ? Pllllleasssse :D

I would really like to learn from it :D

Also I would clarify under what license is it released under ? Sorry but its a important detail for me. :(

You mentioned that we could " do whatever you want with the code " ... sooo would it be alright if I assumed that the project is under a MIT license then ? :D

I am sorry about the license questions , its just that it can get pretty heated sometimes when there is a disagreement :(

Thank-you for your generosity in releasing your project for others to look through and learn from and grow with :D
brybry
Project Member
Posts: 69
Joined: Aug 27, 2005 14:43

Re: Doom 3

Post by brybry »

I updated the first post with new download links. Links are to my Google Drive account and the .zip files will stay there indefinitely.

I'm glad this project is of interest to someone. I hope you can get some useful code from it. It's old and messy though. Not an example of good coding techniques.

As far as the license... I don't know the details of the MIT license, but really, you can do whatever you want with it. It's likely there are some parts of code translated from other people's C/C++ source codes to FreeBASIC, which could cause legal issues, but any code that I wrote is public domain.

If you have any questions, let me know. I'll try to pay more attention to this thread so you don't have to wait so long for a response.
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: Doom 3

Post by petan »

What OSs are supported, win+lin both works ?
Post Reply