-
Notifications
You must be signed in to change notification settings - Fork 33
Port HeXen: Edge Of Chaos to dhewm3 #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…le types into float in d3xp
…ai, gamesys and physics
… code in game directory (final part)
…de precompile.h thingy
|
Could someone give me a hand? I'm trying to compile completely the source code and run as should in dhewm3. It isn't the first time I'm working in a C++ project here, I tried to generate a Visual Studio solution in Windows, but I get errors:
I tried to compile in Linux, but I get these errors and I don't know what's wrong: /home/user/heoc_dhewm3/game/Player.h:311:14: error: ‘idProjectile’ was not declared in this scope; did you mean ‘idObjective’?
311 | idEntityPtr<idProjectile> soulCubeProjectile;
| ^~~~~~~~~~~~
| idObjective
/home/user/heoc_dhewm3/game/Player.h:311:26: error: template argument 1 is invalid
311 | idEntityPtr<idProjectile> soulCubeProjectile;
| ^
/home/user/heoc_dhewm3/game/Player.h:502:34: error: ‘idProjectile’ has not been declared
502 | void SetSoulCubeProjectile( idProjectile *projectile );
| ^~~~~~~~~~~~ |
Where does it say that it's in the public domain? The README says
Which means that it's under the Doom3 SDK License - to be compatible with dhewm3's license, it must be under GPL, so the original authors must relicense their patch under GPL (or simply agree that it's used with the GPLv3 source of open source Doom3). Regarding your compile problems: The Windows errors looks like you told CMake to build with Visual Studio, but it couldn't find it, or its compiler (cl.exe) - do you have it installed?. The compile error on Linux looks like there's an |
I sent an email in https://hexenmod.com/ to ask about that. No response from them. Also I tried to search the authors in idtech 4 Discord server. No one of them are there. The source code is still public and there are no license from the authors (but only Doom3 SDK license), looks like they didn't care about that.
Looks like this CMake only supports Visual Studio 2019, 2017 or older, so I managed to install and configure the tools correctly as I could. So, it needed the 'build environment C++ tools' part installed.
It's already included: https://github.com/dhewm/dhewm3-sdk/pull/32/files#diff-db89ff4435f28b0d2ebaacc8aab8e31c3f553256a76756271a608d41ad04c761L38 I don't know what's going on with this error, keeps outputing. |
|
https://www.moddb.com/mods/hexen-edge-of-chaos/news/team-updates-project-updates mentions Maybe there are other compiler errors before that one? |
I already told:
I tried to fix, no idea what's going on, d3xp outputs no errors compared to the other. |
…nding headers if you want to use them
|
Ok, I fixed all the code to be compiled successfully in Windows and Linux. https://github.com/LegendaryGuard/dhewm3-sdk/blob/hexeneoc/idlib/containers/StrPool.h#L157 Same when I try to load the map with https://github.com/LegendaryGuard/dhewm3-sdk/blob/hexeneoc/idlib/Heap.h#L821 I wonder why changed the values for the assertions when this isn't supposed to happen. |
…ons using #ifdef _DEBUG && 0
…g is wrong with calling a script object in a function
|
I finished to port everything of HEOC to dhewm3 in a stable state. https://www.moddb.com/games/doom-iii/downloads/hexen-edge-of-chaos-dhewm3-edition Btw, no response from the authors. They didn't give a damn about sharing the source code, they haven't licensed nothing, apart from the Doom3 SDK. |
…ike ammo or health, that crashes on dhewm3, it works better with inv_carry only
|
Finally, thanks to the replies from the main coder from HEOC team, the source code has been licensed as says in this part from Btw, the README.md here needs some modifications, tell me what I should do and I'll prepare to complete this PR to be ready. |
d2d618b to
cf7dd5f
Compare
|
Regarding the license, you can just add a note in the README like "The code changes of HeXen EOC have been released under GPLv2 or later (by $NAME). As the Doom 3 source code (that the dhewm3 SDK is based on) was released under GPLv3 or later, that's the effective license of this code." |
… releasing the mod under GPL
idlib/containers/HashIndex.h
Outdated
| ================ | ||
| */ | ||
| ID_INLINE void idHashIndex::SetGranularity( const int newGranularity ) { | ||
| #if defined(_DEBUG) && 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it a bit frightening how many assertions have been commented out - they usually were there for a reason..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 83b0423. But the assertions still happen, needs to be debugged and corrected for some reasons
game/Trigger.cpp
Outdated
| savefile->WriteBool( on ); | ||
| savefile->WriteFloat( delay ); | ||
| savefile->WriteInt( nextTime ); | ||
| savefile->WriteInt( (int &) nextTime ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextTime now is an idList<idDict> - that definitely shouldn't be saved as an int (same issue in Restore())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e8e0e94, forgot to copy these pieces of code.
game/Trigger.cpp
Outdated
| const char *damage; | ||
|
|
||
| if ( on && other && gameLocal.time >= nextTime ) { | ||
| if ( on && other && gameLocal.time >= (int &) nextTime ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(int &) nextTime doesn't make any sense, it's a list of dicts now - though maybe it should just be an int? but this code here is broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e8e0e94, forgot to copy these pieces of code.
from the initial port at #32
|
I started a fresh branch applying the original changes they made to the mod SDK and then It still doesn't work well though, after playing a bit I got it seems like some of the values have NaNs, for example |
from the initial port at #32
|
I managed to fix the aforementioned assertion, the NaNs were caused by uninitialized variables that the compiler thankfully warned about. Also fixed a few other compiler warnings. It seems to work now 🎉 |
from the initial port at #32
|
So please test https://github.com/dhewm/dhewm3-sdk/tree/eoc, Here's a build for Windows: hexen-eoc-dhewm3-win32.zip |
from the initial port at #32
|
just pushed two more fixes so the second level (the swamp) can load updated windows build: hexen-eoc-dhewm3-win32-upd.zip |
|
I changed my mind and created a (pseudo-) pull request for my branch after all. |
from the initial port at #32






I would like to contribute adding an old mod into a new branch in the repository. Currently, the mod works in a vanilla Doom3 game with 1.3.1 patch.
https://github.com/LegendaryGuard/HeXen_Edge_Of_Chaos
HEOC source code has been publicly released on moddb: https://www.moddb.com/mods/hexen-edge-of-chaos/downloads/hexen-edge-of-chaos-demo-source-patch
I'm working to make it work in dhewm3, I haven't finished to write the README yet.
Any help and review is welcomed.