Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
icecoldduke

Heretic 2 - Source code recreation part 2

Recommended Posts

wait heretic 2 doesnt have its source code public available?

kinda weird even considering how few copies it sold

did it get lost? or destroyed? or they just never released it?

Share this post


Link to post
2 minutes ago, omalefico32x said:

wait heretic 2 doesnt have its source code public available?

kinda weird even considering how few copies it sold

did it get lost? or destroyed? or they just never released it?

As far as we know its just never been released. However since its never got a proper steam release, its suspected the original source code was lost. 

Share this post


Link to post

Good luck man, that's a bold task. I do not think there's ever been a bigger difference in intent from the final game and the engine it used than Heretic II and Quake II - at the least not from the time period.

Share this post


Link to post
1 minute ago, Murdoch said:

Good luck man, that's a bold task. I do not think there's ever been a bigger difference in intent from the final game and the engine it used than Heretic II and Quake II.

Luckily a good portion of the changes the core tech team at Raven did for Heretic 2, were actually in the released DLL's, which we have source code for. I've already completely reverse engineered the ref_gl.dll and the code in my depot already supports m8 and flex model formats, and render correctly. 

 

The part I was concerned about initially was Raven completely re-wrote the physics system in Heretic 2, but luckily all of those bits are in the released game dll and player.dll, with some minor exceptions like SV_TraceBoundingForm, which is just a modified SV_Trace, that essentially does the same thing but fills in some bits like stepheight and such. 

 

So I think the last reminaing big tasks are pmove and the camera stuff. Then obviously getting the client effects replication working so particle effects work, and then its just filling in the rest of the functions and some code deltas, then this is done aside from multiplayer.

 

The other big change Raven did for Heretic 2 was the client side prediction, which was all inside the Quake2.dll. I don't plan on taking those changes over, they are very complex, multiplayer isn't even on my radar, but its possible those changes aren't needed in 2021, since the original game was designed to run on a 56k modem. 

Share this post


Link to post
14 minutes ago, icecoldduke said:

 

The other big change Raven did for Heretic 2 was the client side prediction, which was all inside the Quake2.dll. I don't plan on taking those changes over, they are very complex, multiplayer isn't even on my radar, but its possible those changes aren't needed in 2021, since the original game was designed to run on a 56k modem. 

 

Somehow i doubt anyone is desperate to see the multiplayer resurrected so i think you can be forgiven for not doing anything there. 

Share this post


Link to post

image.png

Fixed lightmap support and widescreen support. Next step reverse engineering Heretic 2's pmove code so the player can move. 

Share this post


Link to post

Yee, another icecoldduke project 🦊. You don't seem to be running out of ideas for sure.

 

But don't misunderstand, I'm praising it, a Heretic 2 port would be very nice since this game enjoys total obscurity now thanks to no commercial release.

Share this post


Link to post

seens like the game is also abandonware from my quick search i did

maybe if this gets flashed out it can even serve as a bases to a possible rerelease like strife but lets not jump the gun here

keep up the good work dude

Share this post


Link to post

This is pretty interesting. I can't imagine how much work it would take to do this and I really would love to know if Raven really lost the code or they're just sitting on it. They completely abandoned their roots with making fantasy based games and are in some kind of Call of Duty funk.

 

Several + years ago I made some bladematch levels when my friends and I were playing Heretic 2. We basically played everything you could find, no matter what game mode it was made for. We were using Talon's T-Mod and he had a lot of cool stuff in there. At one point I was going to make a SP episode where you play as a guy from a Insect Extermination Guild. lol.

Share this post


Link to post
12 minutes ago, Doom_Dude said:

This is pretty interesting. I can't imagine how much work it would take to do this and I really would love to know if Raven really lost the code or they're just sitting on it. They completely abandoned their roots with making fantasy based games and are in some kind of Call of Duty funk.

 

Several + years ago I made some bladematch levels when my friends and I were playing Heretic 2. We basically played everything you could find, no matter what game mode it was made for. We were using Talon's T-Mod and he had a lot of cool stuff in there. At one point I was going to make a SP episode where you play as a guy from a Insect Extermination Guild. lol.

i think the fact that they just make cod these days is activision faulty

funny thing is it seens like they are the most hated cod developer on the fanbase

shame they are a shadow of their former glory

Share this post


Link to post

I ported over the Quake 3 pmove code and thanks to Paril on the Quake Mapping Discord, he supplied some fixes for the collision code in Quake 2. So the player can move around. I also started the replication for the client entities, the portal VFX now renders.

 

image.png

image.png

 

On 3/9/2021 at 6:05 PM, ETTiNGRiNDER said:

Good luck, I hope the project goes better this time.

What's nice this time around is I have full source to everything, its just a pain filling in the missing bits, especially when you can't trust the quality of the collision detection code(again thanks Paril for helping out with that). 

Share this post


Link to post

Some bigger updates(most technical). I got more VFX replication working(evident by the lens flares working). I have combined everything into a single executable(before Heretic 2 was spread across multiple DLL's); i needed to do this so I can eventually remove Raven's memory manager in the code.

 

image.png

 

Also got 64bit on its feet, while it loads in, the flex models aren't rendering correctly in 64bit for some reason. 

 

Share this post


Link to post

x64 now runs, as evident in this screenshot and I'm at the point were I can remove the 32bit platform, and also got the hud completely working.

 

image.png

 

 

Edited by icecoldduke

Share this post


Link to post

Can't wait for that HUD scaling option. Imagining that in 4k is not gonna be fun. Even games later than that can have that problem.

 

Look at Unreal II, for example...

 

ingame_4k.jpg

 

Good luck reading your status!

Share this post


Link to post

First update video: I fixed a lot of things since the last post: one of the more evident bits in there is swimming now works, game plays significantly better, gameplay mechanics are now working a lot better, check out the video and let me know your thoughts.

 

 

Share this post


Link to post
17 hours ago, icecoldduke said:

let me know your thoughts.

 

My thoughts are going something like "JESUS THIS GUY IS A CODING NINJA".

Share this post


Link to post

Great news! Hopefully "it will also read/write/load savegames so it works this time around

 

I am just a mapper not a  programmer and envy you guys. But I was wondering why no ever tried doing this with a modified Quake2 such as "KMQuake2". It already has all these features below incorporated into it and provides the source code for it as well.

 

5/06/20 KMQuake2 0.20

Besides lots of bug fixes, this update will also include the following changes from the development branch:

    Added support for triple-monitor surround modes via custom resolutions.
    Added Windows DPI scaling detection from Yamagi Quake2.
    Added 3840x1600 and 4096x2160 video modes.
    Added support for 160Hz and 240Hz refresh rates.
    Added cel shading.
    Shadow volumes will now be drawn even if the model isn't in view.
    Added font upscaling (with optional blending by Skuller from Q2Pro) for old 128x128 fonts.
    Added adjustable horizontal offset to third-person mode.
    Added support for quake2:// URLs.
    Added UDP fallback from HTTP downloads and support for Q2Pro-style HTTP URLs.
    Now reads/writes savegames, config files, demos, etc. to the user profile Saved Games folder, and auto-downloaded files are now written to to the user profile Downloads folder.  This eliminates the need to run the game in Administrator mode when file permissions issues are present.
    Now compresses .sav and .sv2 savegame files into .savz files.
    Added basegame3 cvar to load data from up to 3 other other mods.  Works in conjunction with basegame and basegame2, which must be set first.
    Screenshots now go up to 9999.

Instead of contacting me to get access to private pre-release builds, I've set up a Bitbucket repo with nightly test builds of this latest update.  The full source code is also viewable.  Please email me with any bugs you may find.

 

https://bitbucket.org/Knightmare66/kmquake2_stable/downloads/

------------------------------
Key Features
------------------------------
- Eliminates the limit of 256 each on models, sounds, and images- no more index: overflow errors!
- No more SZ_Getspace: overflow errors
- Supports up to 8000 entities per map, up to 2000 in view at once
- Supports maps with large coordinate ranges, maximum of +/-16384
- Supports maps compiled with large chop values, up to 1024
- Supports server-side player speed control for class-based mods, etc.
- Supports server-side control of entity transparency
- Supports server-side control of looped sound attenuation
- Includes default Lazarus DLL with ACE bots, CTF and 3Team CTF support
- Uses modified Quake2maX particle effects
- Improved menus and console (uses some code from Quake2maX)
- Streamlined, more memory-efficent adaptation of decal system from Quake2maX
- TGA, PNG, and JPG texture, skin, and pic autoloading
- Autoscaling of hi-res replacement textures
- Support for MD3 models
- *.pak and pk3 support
- Ogg Vorbis soundtrack support
- RoQ support
- Alpha test surface support for easy rendering of textures with holes/cut-outs
- Trans33 and Trans66 flag combining for textures with alpha-channel controlled transparency
- Supports rendering transparent surfaces with lightmaps
- Supports moving and animated transparent surfaces
- Integrated support for Lazarus footstep sounds

Share this post


Link to post
22 hours ago, bladerunner said:

Maybe icecoldduke can incorporate what he needs from KMQuake2. Like Multiplayer, savegames, etc...It might be worth it to look at the code he has for it.

 

KMQuake2 website:

 

http://www.markshan.com/knightmare/

Thanks for that, I'll definitely take a look. I probably won't take anything graphics related though; I plan on ditching OpenGL and switching over to Vulkan or D3D12 at some point and see if I can add real time lighting via raytracing as well as a opt in feature. 

Share this post


Link to post

Hey icecoldduke is there anyway you can fix the Heretic2 toolkit HereticEd so we can build maps with Windows 10? The batch only works on WindowsXP/Vista. Probably why no one has been making many maps for Heretic II.

Share this post


Link to post

Seeing the progress on this has really rekindled some hope in this game getting properly playable on modern systems again, I cannot wait until this is complete!

Before I forget though, there's one graphical error in the original Heretic 2 that I feel as though it'd be nice to make you aware of if you do not know about it yourself, and it is an issue involving Corvus in the cutscenes of the game and his "injured body textures". To describe the error, in the 1.06 patch (Raven's official patch for Heretic 2) a graphical bug will show up later in the game when Corvus has been infected with the plague and has his skin textures change to the pale-white color to reflect his affliction. So how does the graphical bug manifest?, well most of the time when you enter cutscenes while injured in any way Corvus will have parts of his body textures revert to his "healthy pre-infected" skin textures in the first episode of the game.

I have no idea if there's any easy fix for this or if you know how to fix it yourself, but it is a problem not many seem to bring up and as such I figured it was best to bring it up to you when you're working on recreating the game's sourcecode and such.

I'm sorry if my description of this old graphical bug is confusing, I'm pretty bad at formulating myself on these sorts of things. And as such I also figured I'd post a picture of the problem so you see exactly how it looks like.

 

https://imgur.com/xvpozYr

 

Share this post


Link to post

No, currently he's active in different repositories of his, namely Doom3 and Quake4BSE, as you can gather from the contributions timeline in his overview page (screenshot). Clicking on a green item in the timeline reveals its related activity.

 

 

screenshot.png

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×