frictionalgames / amnesiathedarkdescent Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hey,
I've been trying to get this engine properly built on Linux, but I'm having significant issues regarding dependencies. It also doesn't help the fact that there are no build instructions to build it in 32bit mode. I would love it if someone tells me the step by step instructions needed to completely build the engine as I, myself, am studying how the game engine works. I'm a little new to this and info would help.
Hello, first of all thank you for releasing this source code.
I have this issue
/usr/bin/ld:/builddir/HPL2/dependencies/lib/linux/lib/libvorbisfile.so: file format not recognized; treating as linker script
/usr/bin/ld:/builddir/HPL2/dependencies/lib/linux/lib/libvorbisfile.so:1: syntax error
collect2: ld returned 1 exit status
make[2]: *** [MapViewer.bin.x86] Error 1
make[1]: *** [core2/tools/CMakeFiles/MapViewer.dir/all] Error 2
make: *** [all] Error 2
I think a linker issue
Hey,
I'm trying to build the engine through CMake, but since the test folder lacks a CMakeLists.txt in the folder, I cant finish building.
The announcement indicates "Amnesia is now open source!" but I don't find any legal reference to Amnesia assets.
there is a classic misunderstanding between a "game" and a "game engine" when people move to (some) open source, so it would be great to be explicit and/or not misleading.
Is Amnesia now open source or is Amnesia engine open source?
In other words, if we bought (looks like the assets are not in the repo) the game so if we have Amnesia assets (all non "code" stuff: visual or audio parts) in some way, are they covered by the GPLv3 license?
(no criticism whatever is the answer, just for knowing the exact legal terms, as it seems that the announcement, hinting that the game is open source, and the content of the repo, hinting that the game engine is open source, are not same; what whatever the answer such announcement is great)
If It's possible for you to publish language assets, We would appreciate it, in the name of minority languages like basque.
Thank you
I got the game+engine building and running on Visual Studio 2010 (Express) and while it wasn't very difficult it did require some steps. I thought I would document the steps here, both to make it public knowledge but also so some things could be fixed in the main repo maybe.
First of all, in amnesia/src/game/Lux.sln
change the following lines:
- Microsoft Visual Studio Solution File, Format Version 12.00
- # Visual Studio 15
- VisualStudioVersion = 15.0.26730.10
- MinimumVisualStudioVersion = 10.0.40219.1
+ Microsoft Visual Studio Solution File, Format Version 11.00
+ # Visual C++ Express 2010
The critical part here is the format version. I did not test building this with Visual Studio 2015 as the actual content of the file suggests might work, but since pretty much everything else in this repo is based around the 2010 version or earlier and the readme explicitly says 2010 I think this makes more sense anyway.
Secondly, depending on your Visual Studio install and possibly other Windows stuff, you might also have to change one line in amnesia/src/game/Lux.rc
:
- #include "afxres.h"
+ #include <windows.h>
See this link for an explanation.
Finally, to actually debug and run it from within the IDE, just set the working directory to wherever your copy of the game is installed to. That should be it.
It's probably worth fixing these problems in this repo too. The first thing seems like a bug. The second one should at least be documented somewhere. I can make a pull request.
// Simon
it seems like both The Dark Descent and Machine For Pigs use the same HPL2.
And there is also a separate repo for HPL1 engine.
So it seems logical to separate HPL2 into its own repo (even if just to link it back via git submodules for codebases that rely on it being in a adjacent directory).
At the very least this way HPL2 won't diverge between TDD and MFP and .e.g. build fixes will apply to both.
Also a separated upstream makes it easier to package HPL2 separately for Linux if needed.
I see that the engine has the Theora video library, can it be used to play ogg video in the game, as a video cutscene for example?
While browsing the source I'm unable to find the damage values associated with the monsters. It seems like these are loaded from an XML file, but I can't find that XML file anywhere in the repo.
Can someone point me in the right direction?
I think the latest update(s) are missing in the source code. It is not up-to-date.
Can someone check this?
Thanks!
I've found a crash caused by changing the snap separation in the Model Editor. The editor which was published for modders years ago doesn't have that issue, so perhaps something is outdated?
PS. The same feature works fine in the Level Editor, for some reason.
Just so other people who want to build for Mac are aware, it won't work at this time with this given code. Granted, my computer is running Catalina (needless to say, I was hoping to make a 64-bit build), but none of the many errors I encountered were related to the architecture.
The easy part was fixing the Steam library reference mentioned in another issue here. More complex is a missing file called Launcher_Prefix.pch and a folder called "tests" when using CMake just to generate an XCode project, even if I ended up resorting to the same solution as for the Steam library.
The rest of the problems were the result of attempting to actually build, both in XCode and with makefiles. Whether it was permissions issues (which I could usually but not always overcome by running XCode as a superuser), not recognizing the standard C++ library, or, in the furthest I ever got to a successful build, lots of linker errors relating to the FBX SDK, I spent hours trying to build, with no real luck. So yeah, I'll need to wait until/unless the missing files are added and verify that Frictional was able to build using this exact code and nothing else before I'm ready to try again...
[ 20%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/physics/SurfaceData.cpp.o
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/physics/VerletParticle.cpp.o
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/resources/AnimationManager.cpp.o
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/resources/BinaryBuffer.cpp.o
/home/koba/AmnesiaTheDarkDescent/HPL2/core/sources/resources/BinaryBuffer.cpp: In member function 'bool hpl::cBinaryBuffer::CompressAndAdd(char*, size_t, int, bool)':
/home/koba/AmnesiaTheDarkDescent/HPL2/core/sources/resources/BinaryBuffer.cpp:327:46: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
327 | int pSizeDataPtr = (int)mpData[lStartPos];
| ^
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/resources/BitmapLoaderHandler.cpp.o
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/resources/ConfigFile.cpp.o
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/resources/EngineFileLoading.cpp.o
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/resources/EntFileManager.cpp.o
[ 21%] Building CXX object core2/CMakeFiles/HPL2.dir/sources/resources/EntityLoader_Object.cpp.o
/home/koba/AmnesiaTheDarkDescent/HPL2/core/sources/resources/EntityLoader_Object.cpp: In member function 'virtual hpl::iEntity3D* hpl::cEntityLoader_Object::Load(const tString&, int, bool, hpl::cXmlElement*, const cMatrixf&, const cVector3f&, hpl::cWorld*, const tString&, const tWString&, hpl::cResourceVarsObject*)':
/home/koba/AmnesiaTheDarkDescent/HPL2/core/sources/resources/EntityLoader_Object.cpp:739:74: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
739 | if(pEntity->GetEntityType() == "SubMesh" && mpMesh->GetSkeleton() == false && mpMesh->GetAnimationNum() > 0)
| ^~~~~
/home/koba/AmnesiaTheDarkDescent/HPL2/core/sources/resources/EntityLoader_Object.cpp: In member function 'void hpl::cEntityLoader_Object::LoadAndAttachChildren(hpl::cXmlElement*, hpl::iEntity3D*, hpl::cBoneState*, hpl::tEntity3DList&, hpl::tNodeStateMap&, bool, bool)':
/home/koba/AmnesiaTheDarkDescent/HPL2/core/sources/resources/EntityLoader_Object.cpp:936:75: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
936 | if(pEntity->GetEntityType() == "SubMesh" && mpMesh->GetSkeleton() == false && mpMesh->GetAnimationNum() > 0)
| ^~~~~
make[2]: *** [core2/CMakeFiles/HPL2.dir/build.make:1727: core2/CMakeFiles/HPL2.dir/sources/resources/EntityLoader_Object.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:290: core2/CMakeFiles/HPL2.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
When I try to launch the game from the Steam client on Linux it doesn't work. The screen gets black and then the game closes. I can't even start the settings launcher.
Running the game manually from the game directory however works, but the SteamAPI isn't loaded:
Setting breakpad minidump AppID = 57300
Steam_SetMinidumpSteamID: Caching Steam ID: 76561197976357018 [API loaded no]
A Machine for Pigs and Rebirth are both starting from Steam and with SteamAPI enabled (messages are appearing, I can make screenshots with Steam, etc).
I tried to compile from Ubuntu 18.04. I was able to install mock with sudo apt install mock -y
and run sudo bash mock-prep.sh 64 init
.
mock-sync.sh
had errors.
WARNING: specified 'pigz' as the root cache compress program but not available; using gzip
~/builds/AmnesiaTheDarkDescent/amnesia ~/builds/AmnesiaTheDarkDescent/amnesia/src/BuildScripts
rsync: link_stat "/home/user/builds/AmnesiaTheDarkDescent/amnesia/core" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
rsync: link_stat "/home/user/builds/AmnesiaTheDarkDescent/amnesia/tests" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
rsync: link_stat "/home/user/builds/AmnesiaTheDarkDescent/amnesia/tools" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
rsync: change_dir "/home/user/builds/AmnesiaTheDarkDescent/amnesia//dependencies" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
rsync: change_dir "/home/user/builds/AmnesiaTheDarkDescent/amnesia//dependencies" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
rsync: change_dir "/home/user/builds/AmnesiaTheDarkDescent/amnesia//dependencies/sources" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
rsync: change_dir "/home/user/builds/AmnesiaTheDarkDescent/amnesia//dependencies/lib" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
mock-shell.sh
worked.
In the README.md, line 42 says cd builddir/AmnesiaPig
but the folder name is builddir/Amnesia
and that folder does not contain CMakeLists.txt
. Are these the instructions for building Amnesia: A Machine for Pigs?
Did anyone solve the problem with the lack of fbx sdk? When I try to compile I get the following compile error:
C1083 Cannot open include file: 'fbxsdk.h': No such file or directory (compiling source file sources\impl\MeshLoaderFBX.cpp) _HPL2_2010 C:\coding\AmnesiaTheDarkDescent\HPL2\core\include\impl\MeshLoaderFBX.h 28
Hi! Thanks for the awesome release!
I'm trying to build this game from source, but I've noticed a few issues.
In HPL2:
dependencies.zip
isn't unzipped automatically by the build system, which means it errors out when doing add_subdirectory(../dependencies/OALWrapper OALWrapper)
. Just unzipping into a dependencies
folder fixes this.tests
folder doesn't exist, so add_subdirectory(../tests tests)
also failsIt would be nice to have a dependency list, too. I have used at least glu-devel
and MesaLib-devel
.
My main issue, however, is with the steam library:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
STEAM_LIBRARY
linked by target "AmnesiaSteam" in directory /builddir/AmnesiaTheDarkDescent-ea45a1e253aa1a50aa89654f56f352dbf13b0e0f/amnesia/src/game
How would I get one, if that's even possible? Would perhaps something like https://gitlab.com/Mr_Goldberg/goldberg_emulator be enough?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.