Mech Commander 2 Linux port
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ARM arm stub implementation (required by aseconv tool) Sep 28, 2017
GameOS misc: Oct 21, 2018
Viewer build script changes (added path to access utils/) Apr 27, 2018
blog initial commit of shader based model drawing Jan 12, 2018
code do not scroll map if mouse out of window & game is paused Oct 21, 2018
data_tools recursive includes support Sep 15, 2018
gui build script changes (added path to access utils/) Apr 27, 2018
mclib
misc added valgrind filter files Sep 19, 2018
res
shaders Fog support in hw lighted shaders Oct 21, 2018
test_scripts
test_sound test scripts, test sound code addition () Feb 26, 2017
text_tool text_tool: compilation fix, output file name change Mar 1, 2018
.gitignore .gitignore update Sep 19, 2018
CMakeLists.txt
EULA.txt add original license Feb 17, 2017
MechCmd2.vcproj added MechCmd2.vcproj Nov 3, 2016
README.md updated readme Sep 19, 2018
TODO
devdoc.txt modified devdoc.txt Nov 22, 2017
docs code folder compiles, mc2 runs onl linux, a lot of changes here and t… Nov 6, 2016
export_clang_paths.sh Big windows commit merge to make work on linux as well Feb 26, 2017
license.txt added GPL3 license Dec 16, 2016
mc2res.cpp initial commit Sep 19, 2016
mc2res.vcproj added some extra missing files Sep 19, 2016
resource.h
strings.res.h string resources rework Oct 1, 2016
system.cfg

README.md

mc2

Mech Commander 2 Linux port. Work in progress. Currently game can be run on both Linux and Windows. Can be compiled in 64-bit.

Fixed a lot of bugs (including ones present in original game). Sound system is not fully implemented (panning, doppler, etc. not supported yet)

TODO:

  • fix remaining memory leaks (finish implementation of memory heaps)
  • make nice data packs, so not only me can play the game :-) (in progress, see data repo
  • actually finish all missions in the game
  • make sure no files are created outside of user directory
  • reduce draw calls number
  • reimplement/optimize priority queue
  • finish moving lighting to shaders (move whole lighting there, not only shader-based drawing of CPU-prelit vertices like I do now)
  • Update graphics to 2018
  • I am sure there is more

Original game was released under Shared Source Limited Permission License (please refer to EULA.txt) My code is licenced under GPL v.3 (see license.txt)

Building on Windows

To build on windows use CMake

Ensure, that you have all necessary dependencies: SDL2, SDL_mixer, zlib, glew I recommend to get zlib sources and build them by hand (do not forget to copy zconf.h)

Just for a reference here is how my 3rdparty tree looks like

|   
+---bin
+---include
|   |   zconf.h
|   |   zlib.h
|   |   
|   +---GL
|   |       eglew.h
|   |       glew.h
|   |       glxew.h
|   |       wglew.h
|   |       
|   \---SDL2
|           all sdl headers (SDL_mixer shiuld be there as well)
|           
\---lib
    +---x64
    |       glew32.lib
    |       glew32s.lib
    |       libFLAC-8.dll
    |       libmodplug-1.dll
    |       libmpg123-0.dll
    |       libogg-0.dll
    |       libvorbis-0.dll
    |       libvorbisfile-3.dll
    |       SDL2.dll
    |       SDL2.lib
    |       SDL2main.lib
    |       SDL2test.lib
    |       SDL2_mixer.dll
    |       SDL2_mixer.lib
    |       zlib.dll
    |       zlib.lib
    |       zlibstatic.lib
    |       
    \---x86
            glew32.lib
            glew32s.lib
            libFLAC-8.dll
            libmodplug-1.dll
            libmpg123-0.dll
            libogg-0.dll
            libvorbis-0.dll
            libvorbisfile-3.dll
            LICENSE.FLAC.txt
            LICENSE.modplug.txt
            LICENSE.mpg123.txt
            LICENSE.ogg-vorbis.txt
            SDL2.dll
            SDL2.lib
            SDL2main.lib
            SDL2test.lib
            SDL2_mixer.dll
            SDL2_mixer.lib
            zlib.dll
            zlib.lib
            zlibstatic.lib

You may already have your dependencies installed in other place(s), so just make sure CMake knows where to find them.

Now:

git clone https://github.com/alariq/mc2.git
cd mc2
md build64
cd build64
cmake.exe -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=c:/path_to_your_dependencies/ -DCMAKE_LIBRARY_ARCHITECTURE=x64 ..

(to generate project for VS1027 for 64bit build)

or for 32bit build:

cmake.exe -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=c:/path_to_your_dependencies/ -DCMAKE_LIBRARY_ARCHITECTURE=x86 ..

Now run generated solution and try to build it!

Now build string resources

First use script in test_scripts/res_conv/res_conv.pl to generate strings.res.cpp and strings.res.h`` files or just take them from that folder Then copy them to ./res``` folder Then:

cd res
md build64
cd build 64
cmake.exe -G "Visual Studio 15 2017 Win64" -DCMAKE_LIBRARY_ARCHITECTURE=x64 ..

put resulting dll along with executable file

Building data

Data files are located in a separate repository Building data is just a matter of executing make command. You can find instruction on how to do it there. But first one needs to build all necessary tools. There are 2 projects which have to be built:

  • data_tools
  • text_tool

All steps are same as for the main application. As a result you'll have next binaries: aseconv, makefst, makersp, mpak, text_tool. Copy those to the build_scripts folder in mc2srcdata repository.

Once everything in place, you can launch build scripts as described in corresponding README.txt file.

Building on Linux

You, probably already know hot to do it. If not, please, see windows building section, the process is quite similar.