Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

C++ Three Kingdoms - Complete source code

Joined
Jan 4, 2008
Messages
441
Reaction score
247
The latest complete source code of the Three Kingdoms, Sun God Three Kingdoms Kill, is a non-official open source software based on the C++ QT GUI framework. It also has its own unique functions and elements based on the rules of the game killing game: original skill card dubbing The original expansion package is dependent on the sky, joy; original expansion mode double will, plot, Shaoguan and so on. With intelligent AI, you can achieve online and stand-alone game modes, and you can freely modify and add more elements through the DIY interface.
Developer: Moligaloo (Sun God), open source, free, no plugins, this is the latest version.

webmaster_imds - C++ Three Kingdoms - Complete source code - RaGEZONE Forums


webmaster_imds - C++ Three Kingdoms - Complete source code - RaGEZONE Forums


webmaster_imds - C++ Three Kingdoms - Complete source code - RaGEZONE Forums


Link: Password: 9yme

Alternate download link: Password: knxm

:thumbup1:



SVN Download:
mirror:


Introduction

Sanguosha is both a popular board game and online game, this project try to clone the Sanguosha online version. The whole project is written in C++, using Qt's graphics view framework as the game engine. I've tried many other open source game engines, such as SDL, HGE, Clanlib and others, but many of them lack some important features. Although Qt is an application framework instead of a game engine, its graphics view framework is suitable for my game developing. By Moligaloo
Features


  1. Framework
    • Open source with Qt graphics view framework
    • Use FMOD as sound engine
    • Use Freetype in Font Rendering
    • Use Lua as AI and extension script
  2. Operation experience
    • Full package (include all yoka extension package)
    • Keyboard shortcut
    • Double-click to use cards
    • Cards sorting (by card type and card suit)
    • Multilayer display when cards are more than an upperlimit
  3. Extensible
    • Some MODs are available based on this game
    • Lua Packages are supported in this game
HOW TO BUILD

Tips: "~" stands for the folder where the repo is in.
VS2013(Windows)


  1. Download the following packages: (1) QT libraries for Windows (Visual Studio 2013, 5.3.2)
  2. Open Qsanguosha.sln right under ~/builds/vs2013, change the Configuration to Release Qt5|Win32.
  3. Right click project "QSanguosha" in your Solution Explorer, select "Properties", go to "Debugging" tab, set "Working Directory" to "$(ProjectDir)...." (do not enter the quote marks). Then select "OK".
4.1. [optional] Right click "sanguosha.ts" in the folder "Translaton Files" in project "QSanguosha", select "lrelease".

  1. You are now able to build the solution. When compilation succeeded, the QSanguosha.exe is in ~/Bin folder. You should move this file to ~ folder.
  2. Copy 6 files from Qt libraries to ~, they are listed below: Qt5Core.dll Qt5Gui.dll Qt5Network.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll
    Copy 2 files from VS redist to ~, they are listed below: msvcp120.dll msvcr120.dll
  3. Double-click the QSanguosha.exe and have fun!
Mac OS X


  1. Install XCode from App Store and enable the command tool
  2. Download and install the libraries and Qt Creator from
  3. Download the source code and install swig from and make sure the version of swig is 3.0.1 or later. Tips: unzip the source code tarball and open a terminal, type: ./configure --without-pcre make sudo make install
  4. Open a terminal here, type: cd swig swig -c++ -lua sanguosha.i
  5. Open QSanguosha.pro with Qt Creator, configure the project and make sure the project is compiled with clang. Change the configuration to Release.
  6. You are now able to build the solution. When compilation succeeded, the QSanguosha.app folder is in ~/../Build-QSanguosha-**/ folder. I highly recommend you move this folder to ~.
  7. This step is the most important and difficult one. Please pay a lot of attention to read this step. Open a terminal here, type: otool -L QSanguosha.app/Contents/MacOS/QSanguosha
You'll see something like this: QSanguosha.app/Contents/MacOS/QSanguosha: ./libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0) libfreetype.1.dylib (compatibility version 1.0.0, current version 1.0.0) (QtDir)/5.3/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.3.2, current version 5.3.2) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
Pay attention to the 2 lines contains libfmodex.dylib or libfreetype.1.dylib. using install_name_tool to change the path of the 2 library files to their absolute paths, like this: install_name_tool -change ./libfmodex.dylib ~/lib/mac/lib/libfmodex.dylib QSanguosha.app/Contents/MacOS/QSanguosha install_name_tool -change libfreetype.1.dylib ~/lib/mac/lib/libfreetype.dylib QSanguosha.app/Contents/MacOS/QSanguosha
Type: otool -L QSanguosha.app/Contents/MacOS/QSanguosha
if you see all the directories is absolute path, it should succeed. (~ stands for the project dir) QSanguosha.app/Contents/MacOS/QSanguosha: ~/lib/mac/lib/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0) ~/lib/mac/lib/libfreetype.dylib (compatibility version 1.0.0, current version 1.0.0) (QtDir)/5.3/clang_64/lib/QtDeclarative.framework/Versions/5/QtDeclarative (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtXmlPatterns.framework/Versions/5/QtXmlPatterns (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtScript.framework/Versions/5/QtScript (compatibility version 5.3.2, current version 5.3.2) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
Type: macdeployqt QSanguosha.app/
Some times the macdeployqt is not in the system directories, in this case you should go to the Qt Install Dir and find this file.
Type: otool -L QSanguosha.app/Contents/MacOS/QSanguosha
if you see all the non-system libraries is in @executable_path, it should succeed. QSanguosha.app/Contents/MacOS/QSanguosha: @executable_path/../Frameworks/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libfreetype.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.3.2, current version 5.3.2) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
8.copy the following folders and files to QSanguosha.app/Contents/MacOS/, they are listed below: ai-selector/ audio/ developers/ diy/ font/ image/ lang/ lua/ rule/ skins/ ui-script/ qt_zh_CN.qm sanguosha.qss
8.1 [optional] select Tools/External/QtLinguist/lrelease, copy ~/Builds/vs2013/sanguosha.qm to QSanguosha.app/Contents/MacOS.

  1. Double-click QSanguosha.app folder and have fun!
Linux or MinGW(Windows)


  1. Download and install the libraries and Qt Creator from Qt offical website or software sources, make sure the version of Qt libraries is 5.3.x. (I strongly recommand you download the libraries and Qt Creator from software sources in Linux, because the compliation causes a lot of time) (If you are using MinGW, make sure the version of MinGW is compatible with Qt Libraries)
  2. Install SWIG (Linux)Download and install the swig from or software sources, make sure the version of swig is 3.0.1 or later.
(MinGW)Download the swigwin (swig for Windows, 3.0.2) Create a ~/tools/swig folder under your source directory. Unzip swigwin and copy all unzipped files to ~/tools/swig.

  1. Open a terminal here, type: (Linux) cd swig swig -c++ -lua sanguosha.i cd ../lib/linux (x86)cd x86 (or) (x64)cd x64 sudo cp libfmodex*.so /usr/lib (root password required) sudo ldconfig
(MinGW) cd swig ..\tools\swig\swig.exe -c++ -lua sanguosha.i

  1. Open QSanguosha.pro, configure the project and make sure the project is compiled with g++. Change the configuration to Release.
4.1 [optional] select Tools/External/QtLinguist/lrelease, copy ~/Builds/vs2013/sanguosha.qm to ~.

  1. You are now able to build the solution. When compilation succeeded, the (MinGW)QSanguosha.exe or (Linux)QSanguosha is in ~/../Build-QSanguosha-**/ folder. You should move this file to ~ folder.
  2. (MinGW only)Copy 8 files from Qt libraries to ~, they are listed below: Qt5Core.dll Qt5Gui.dll Qt5Network.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll
    (MinGW only)Copy 3 files from MinGW bin folder to ~, they are listed below: libgcc_s_dw2-1.dll libstdc++-6.dll libwinpthread-1.dll
 
Last edited:
Back
Top