About
An open-source 3D colony management game for PC, Mac and Linux

www.dwarfcorp.com

#game #visual-studio #xna #csharp #game-engine #graphics #dwarf-fortress #xna-fna #3d #monogame #2d #gamedev

Blecki 7c2c9c446f Revamped world gen almost done před 5 roky
Build_Metadata 39448170a6 Dispose of voxel primitives when done with them. před 6 roky
DwarfCorp 7c2c9c446f Revamped world gen almost done před 5 roky
DwarfCorpContent 623904d246 Different voxel types in monuments před 5 roky
DwarfSpriteFixer cd21ccbcc7 Fix up dwarf sprites před 5 roky
FNA c6ea8d8c27 . před 6 roky
FNA_libs 8a74561de5 Restructure project před 6 roky
FontBuilder 6b81f6979e Factions land ownership by cell not chunk, draw political boundaries on overworld před 6 roky
LibNoise 8a74561de5 Restructure project před 6 roky
MXA ed734dd8c3 Preserve MXA files just in case před 8 roky
ManaLampMod 580bfb6776 Dwarf instancing před 5 roky
MaybeNullSpeedTest aaaafb8d03 Massive MaybeNull rollout před 6 roky
New Assets 6b34d76bae convert animals to newer animation format před 5 roky
PSD 91c9ff7e7b Move dwarf layers to PSD, rewrite generation system před 6 roky
SteamSDK d59b1a7199 Cleanup project structure to make managing FNA builds easier před 6 roky
SteamWorks 98501c6131 Switch from Facepunch to raw steamworks.net před 7 roky
Todo 98a6bafeb2 Fix blackboard not saved bug, add carved stone type před 6 roky
TodoViewer ec48660b2f Fix resource graphics issues, gui rebuild issue před 5 roky
YarnSpinner 6b81f6979e Factions land ownership by cell not chunk, draw political boundaries on overworld před 6 roky
.gitattributes 1189b02ee4 fix LD_LIBRARY path on mac and linux před 8 roky
.gitignore 322296be92 Pick resources před 6 roky
.gitmodules 52f99f5737 point FNA submodule to origin před 7 roky
ArialFonts.rar b93810625e Arial font mod před 7 roky
CONTRIBUTING.md adfccc891e Create CONTRIBUTING.md před 7 roky
DwarfCorp.sln cd21ccbcc7 Fix up dwarf sprites před 5 roky
LICENSE.txt 05a15b2546 Create LICENSE.txt před 10 roky
Newtonsoft.Json.dll 5d2c406377 Todo list stuff really před 6 roky
README.md 26045f7883 Fix links před 6 roky
Todo.exe f2b48ba9cf Flesh biome před 5 roky
TodoViewer.exe f2b48ba9cf Flesh biome před 5 roky
deploy_itch.bat 9ddbc03306 Split up grass types před 6 roky
prepare-builds.bat 9e51661495 Split up resource-items.json před 6 roky
todo.txt 7c2c9c446f Revamped world gen almost done před 5 roky

README.md

DwarfCorp

DwarfCorp from Completely Fair Games is a single player tycoon/strategy game for PC. In the game, the player manages a corporate colony of dwarves. The dwarves must mine resources, build structures, and contend with the natives to survive.

BEFORE READING

If you're a developer/programmer and have the technical chops to compile C# code on Windows, continue reading. Otherwise, if you just want to play the game, buy the game on Steam or itch.io. ~You can also try a build on our releases page (above), but these builds will not be updated after the weekend of September 23rd, 2017~.

If you're a developer on Linux and Mac, it may be possible to build the game without too much fuss using Mono, provided you have a content package that was first built on Windows. One of our contributors has a solution for this.

The project is financed directly through sales on Steam and itch.io. Since September 2017, all proceeds from sales go directly to our contracted developers.

External Dependencies

To develop DwarfCorp, you need the following libraries.

  • The XNA 4.0 library (not included)
  • Note: If you are running Windows 8 or higher, you will need to use MXA instead. This is included in our repository as a convenience. XNA has gotten very old and support was dropped for it long ago, and we must jump through hoops to get it working.
  • XNA-FNA for cross-platform development (forked)
  • LibNoise.NET (source code included)
  • JSON.NET (source code not included. You should get this through nuget.)

Cross Platform Development

We dont' officially support developing the game on anything other than a Windows machine at the moment. The game is developed using XNA/FNA using the XNA content project, which only supports a windows development environment. That said, the game can be cross compiled for windows/mac using FNA, but only in windows in a Visual Studio environment. Why XNA? Because it was cool when the project started (late 2011/early 2012).

If you're a developer on Linux and Mac, it may be possible to build the game without too much fuss using Mono, provided you have a content package that was first built on Windows. One of our contributors has a solution for this.

Building

To build and run in the game on a windows PC, you must do the following:

Building for XNA on Windows

  1. Download and install Visual Studio. Any version after 2012 will probably work. Our dev team currently uses Visual Studio 2017 Community.
  2. Download and install the XNA Game Studio 4.0 library (or install MXA from our repository if you are running Windows 8 or higher)

INSTALLING MXA

We started developing DwarfCorp in 2012. Back then, XNA was still a supported library in Visual Studio 2010. Ever since then, support has been dropped. So if you want to compile the game in say, Visual Studio 2017 Community, you will need to install the hacked up "MXA". This is a version of XNA that is hacked together to work on newer versions of Windows. We have included this in a folder called "MXA" under the root of our repository. Open that zip file, and install the dependencies one by one (there are 5 in the zip folder).

Note that in 2017, the MXA project seems to have disappeared itself. Newer versions of Visual Studio (2017 and higher) don't seem to work with it. Luckily, there is another hack that you can apply to MXA to get it working with Visual Studio 2017 here:

Note that we have included those hacks in our wiki here: https://github.com/CompletelyFairGames/dwarfcorp/wiki/Installing-MXA-Hacks

Original source is here.

Important note about the MXA Hacks!!

These hacks will install Microsoft.Build.Framework.dll into the global assembly cache (GAC). Since the GAC is no longer used to install Visual Studio dependencies, any upgrade you make to visual studio will break all of your projects after applying this hack. To resolve this issue, you must completely uninstall and reinstall visual studio instead of upgrading it, and then reapply the MXA hacks to get DwarfCorp compiling.

Compiling Build in VS

Once you have Visual Studio and XNA (or MXA) installed, you're ready to compile DwarfCorp.

  1. Open DwarfCorp.sln in Visual Studio
  2. Right-click on DwarfCorpXNA and set it as a StartUp project
  3. Add references to XNA binaries to the DwarfCorpXNA project.
  4. Build LibNoise project
  5. Set the DwarfCorpXNA build mode to Release or Debug
  6. Build DwarfCorpXNA
  7. You're done! Launch the build!

Problems and Solutions with building for XNA on Windows

  • I opened the solution but I don't see anything View->Solution Explorer
  • I can't install xna on windows 10
    • Install xna refresh https://mxa.codeplex.com/releases/view/618279
    • (you may find that google marks this download as malware. We do not endorse this binary but we have a programmer using it and virustotal seems to find no malware scanning the file)
  • I can't download from the mxa website
    • If this happens, we've included a complete copy of MXA in our repository for you to use.
  • 'Unable to find manifest signing certificate in the certificate store'
    • Project->DwarfCorpXNA properties-> Signing-> Create Test Certificate
    • You can use whatever password you want

Building for FNA on Windows

  1. Open 'DwarfCorpFNA.sln' in Visual Studio
  2. Build for XNA first. This will create the content files needed by FNA. Do this from within DwarfCorpFNA.sln
  3. Set 'DwarfCorpFNA' as the 'StartUp' project.
  4. Build DwarfCorpFNA.

Project Structure

There are several projects under the main folder:

  • DwarfCorpXNA contains source code for XNA builds of the game.
  • DwarfCorpFNA Contains source code for the FNA build. Most of the files in here are just cross-included from DwarfCorpXNA, but using different linked libraries and compile flags.
  • DwarfCorpContent Contains images, sounds, music, and content configuration files for DwarfCorp. Most assets in this content project may not be redistributed without the consent of Completely Fair Games Ltd.
  • LibNoise Is a fork of LibNosie.NET noise generation library.
  • FNA is a fork of XNA-FNA.

Licensing

The game is released under a modified MIT licensing agreement. That means all source code is free to use, modify and distribute. However, we have explicitly disallowed modification and redistribution of the following game content (which remains proprietary):

  • Images/Textures
  • 3D Models
  • Sound Effects
  • Music

No forks, binary redistributions, or other redistributions of this repository may include the proprietary game content. It is up to the redistributor to provide their own game content. "Source code" may also include raw text files, JSON library files, and XML configuration files (which are not considered proprietary "game content").

It's complicated. If you have a question about the licensing, raise an issue on the repository.