This project shows you how to use the TMX Lite library with the game engine.
- SFML Library (2.4 +)
- GCC Compiler (7.3 +)
1. Prerequisites
- Android Studio (4.0.1 +)
- Android SDK and NDK (r20b)
- Firebase C++ SDK 4.5.0 (If you need it)
2. Installation
- Download Android Studio 3.x (recommended version 4.0.1).
- Download the Android SDK and install it in C:/Android/SDK.
- Download Android NDK android-ndk-r20b-windows-x86_64 and create a folder on your disk as follows C:/Android/NDK then extract the contents of the zip in this folder.
- Set the environment variable ANDROID_NDK with the path C:/Android/NDK.
- Download this version of SFML already compiled for Android NDK and extract it in C:/Android/NDK/sources/sfml.
- Move the is-Engine-TMXLite project to your C:/ (C:/is-Engine-TMXLite).
- Open the is-Engine-TMXLite folder with Android Studio and start the compilation.
3. Adding Source Files
- So that Android Studio can detect your source files (.cpp) and compile them you must include them in the CMakeLists.txt file which is in is-Engine-TMXLite/app.
4. Application location
- The application can be found in is-Engine-TMXLite/app/build/outputs/apk.
1. Prerequisites
- CMake (3.1 +)
2. Installation
- Compile SFML with CMake to have static libraries and put on C:/ (C:/SFML).
- Move the is-Engine-TMXLite project to your C:/ (C:/is-Engine-TMXLite).
- Execute this command:
cmake -S "C:/is-Engine-TMXLite" -B "C:/build"
cd build
make
- Install SFML 2.5.1 on your machine.
- Move the is-Engine-TMXLite project to /home/user/ (/home/user/is-Engine-TMXLite).
- Execute this command:
sudo cmake -S "is-Engine-TMXLite" -B "build"
cd build
sudo make
3. After installation
- You will have a bin folder in which the engine demo is located.
5. Adding Source Files
- In order for CMake to detect your source files (.cpp) you must include them in the app_src.cmake or isengine.cmake file which is located in the is-Engine-TMXLite/app/src/main/cmake location.
This project uses the template of andrew-r-king. For more information on this template click here.
1. Prerequisites
- Get SFML 2.5.1 from your distro if it has it, or compile from source.
2. Installation
- Download & Extract SFML 2.5.1 to C:/SFML/ where the bin/lib/include folders are contained within.
- Download & Extract MinGW to C:/mingw32/ where the bin/lib/include folders are contained within.
- Ensure the GCC Toolchain is installed (sudo apt install build-essential).
- Run sudo apt install libsfml-dev. The SFML version you got will vary depending on the distro. 2.5.1 is included in Ubuntu 19.04 Disco Dingo for example.
3. Opening the project with the IDE:
- Run the file open_vscode.bat in the main directory.
- Execute this command in the main directory:
code -n "./app/src/main"
- Or open the is-Engine-TMXLite/app/src/main folder with Solution Explorer.
4. Executable location
- The compiler files can be found in is-Engine-TMXLite/app/src/main/bin-vscode.
1. Prerequisites
- Code::Blocks 20.03
2. Installation
- Compile SFML and put on C:/ (C:/SFML_MinGW). The folder must have an include subfolder and a lib subfolder which contains the static (.a) and Dynamic Link Library (.dll) files.
- Ensure the GCC Toolchain is installed (sudo apt install build-essential).
- Run sudo apt install libsfml-dev. The SFML version you got will vary depending on the distro. 2.5.1 is included in Ubuntu 19.04 Disco Dingo for example.
3. Opening the project with the IDE:
- Run the file open_codeblocks.bat in the main directory.
- Or open the file is-Engine-windows.cbp in the location is-Engine-TMXLite/app/src/main
- Execute this command in the main directory:
codeblocks "./app/src/main/is-Engine-linux.cbp"
- Or open the file is-Engine-linux.cbp in the location is-Engine-TMXLite/app/src/main.
3. Executable location
- The compiler files can be found in is-Engine-TMXLite/app/src/main/bin-codeblocks.
- To change the icon of the application you must go to the location is-Engine-TMXLite/app/src/main/res replace all the images (PNG) which are in the drawable subfolders.
- To change the icon of the application you must go to the location is-Engine-TMXLite/app/src/main/env/windows replace all the images (Attention CMake uses the same resources).
- To change the icon of the application you must go to the location is-Engine-TMXLite/app/src/main/env/linux.
- The source files of the project can be found in the is-Engine-TMXLite/app/src/main/cpp location.
1. main.cpp file
Contains the entry point of the program, inside there are two instructions :
game.play()
: Launches the engine rendering loop which allows to manage the introduction screen, main menu, level and game over.game.basicSFMLmain()
(disabled by default): Launches the display of a classic SFML window. The implementation is in the basicSFMLmain.cpp file. Very useful if you already have a project under development and you want to associate it with the engine. You can also use it to implement your own components to the engine.
2. app_src folder
Contains the source code of the game. Description of these sub-directories:
- activity : Contains the Activity class which allows the interaction of the different scenes of the game.
- config : Contains the GameConfig.h file which allows to define the general parameters of the game.
- gamesystem_ext : Contains GameSystemExtended a class derived from GameSystem which allows to manipulate game data (save, load, ...).
- language : Contains the GameLanguage.h file which allows to manage everything related to game languages.
- levels : Contains game levels and the Level.h file which allows to integrate them into the game.
- objects : Contains the objects that will be used in the different scenes.
- scenes : Contains the different scenes of the game (Introduction, Main menu, ...).
3. assets folder
Contains game resource files (music, sound sfx, image, ...)
4. isEngine folder
Contains the source code of the game engine
Here are some examples of how to contribute:
- Have you developed a module and want it to be part of the engine? You are welcome!
- Have you thought of a feature and you want it to be integrated into the engine? Do not hesitate to submit it to us with your name of course!
- You want to participate in the development of the engine? Well! welcome to the team!
- You have developed a game or application with the engine? We gladly accept it to publish it!
- You noticed a bug? Well done! Let us know Mr. Hacker!
- For any help please contact me on my email address
- You can follow me on Twitter for more informations on my activities @Is Daouda Games