All Projects → Is-Daouda → Is Engine

Is-Daouda / Is Engine

Licence: zlib
SFML C++ game engine that allows to create games on Web (HTML 5 - CSS 3), Android and PC

Programming Languages

c
50402 projects - #5 most used programming language
cpp
1120 projects
cplusplus
227 projects
cpp17
186 projects

Projects that are alternatives of or similar to Is Engine

O2
2D Game Engine with visual WYSIWYG editor
Stars: ✭ 121 (+28.72%)
Mutual labels:  game-development, game-engine, game-dev
Gdevelop
🎮 GDevelop is an open-source, cross-platform game engine designed to be used by everyone.
Stars: ✭ 3,221 (+3326.6%)
Mutual labels:  game-development, game-engine, html5
Kaetram Open
An open-source 2D HTML5 adventure based off BrowserQuest (BQ).
Stars: ✭ 138 (+46.81%)
Mutual labels:  game-development, game-engine, html5
Goluwa
a game framework written in luajit
Stars: ✭ 173 (+84.04%)
Mutual labels:  game-development, game-engine, game-dev
Obengine
2D Game Engine with Lua Scripting made on top of SFML !
Stars: ✭ 335 (+256.38%)
Mutual labels:  game-development, game-engine, sfml
Gamedev Resources
🎮 🎲 A wonderful list of Game Development resources.
Stars: ✭ 2,054 (+2085.11%)
Mutual labels:  game-development, game-engine, game-dev
Uecs
Ubpa Entity-Component-System (U ECS) in Unity3D-style
Stars: ✭ 174 (+85.11%)
Mutual labels:  game-development, game-engine, game-dev
Lumberyard
Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Stars: ✭ 1,785 (+1798.94%)
Mutual labels:  game-development, game-engine, game-dev
Melonjs
a fresh & lightweight javascript game engine
Stars: ✭ 3,721 (+3858.51%)
Mutual labels:  game-development, game-engine, html5
Pygame
pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.
Stars: ✭ 4,164 (+4329.79%)
Mutual labels:  game-development, game-dev, sdl
Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (+195.74%)
Mutual labels:  game-development, game-engine, game-dev
Entt
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more
Stars: ✭ 6,017 (+6301.06%)
Mutual labels:  game-development, game-engine, game-dev
Luxe Alpha
luxe alpha - deprecated, unrelated to the new engine! see the readme or website for details - https://luxeengine.com/
Stars: ✭ 559 (+494.68%)
Mutual labels:  game-development, game-engine, game-dev
Donerserializer
A C++14 JSON Serialization Library
Stars: ✭ 31 (-67.02%)
Mutual labels:  game-development, game-engine, game-dev
Olog
📔 Online Note-Taking Experience | 即时灵感笔记记录平台
Stars: ✭ 79 (-15.96%)
Mutual labels:  html5, css3
Neo
Create blazing fast multithreaded Web Apps
Stars: ✭ 1,219 (+1196.81%)
Mutual labels:  html5, css3
Scrapengine
A very simple real-time Vulkan 3D game engine
Stars: ✭ 80 (-14.89%)
Mutual labels:  game-development, game-engine
Evennia
Python MUD/MUX/MUSH/MU* development system
Stars: ✭ 1,309 (+1292.55%)
Mutual labels:  game-development, game-engine
30diasdecss
Desafio criar 30 mini projetos utilizando HTML e CSS em 30 dias
Stars: ✭ 1,203 (+1179.79%)
Mutual labels:  html5, css3
Duality
a 2D Game Development Framework
Stars: ✭ 1,231 (+1209.57%)
Mutual labels:  game-development, game-engine

header

is::Engine (Infinity Solutions::Engine) 3.3

Open source C++ framework which uses the mechanisms of SFML 2 and which also allows to develop with several libraries at the same time (SDL 2, SMK-Emscripten) in order to easily export your games / applications on the Web (HTML 5), Android and PC (Windows, Linux).

Contents

SFML logo SDL Web Box2D Logo Tiled Logo SMK Admob Logo Tiny File Dialog

Features

What's new in this version

3.3

  1. The is::LibConnect function: Allows you to develop with several game libraries at the same time (SFML, SDL 2, SMK (Emscripten)) in one and the same project!
  2. Possibility to develop C++ SFML games with SDL 2 (Your SFML games will run on the SDL 2 library! Yes, yes it is possible!). Book for Code::Block users for the moment!
  3. Support for Android x64 architectures: Now you can export your C++ games to several Android architectures (armeabi-v7a, arm64-v8a, x86, x64, ...). Which means that you can now publish your C++ games on Google Play! (Yeaaah !!!)
  1. The OpenURL function now allows you to open web links on many system: PC (Windows / Linux), Web (HTML 5), Android.
  2. A new function to manipulate dates
  • Very practical data sending system for sending C++ data to Javascript.

Example code to display C++ data in Javascript:

std::vector<std::string> vectorArray;
vectorArray.push_back("is::Engine is really great!");
vectorArray.push_back("With this tool everything is possible!");
vectorArray.push_back("I'm sure you'll love it!");

// The javascripts part
EM_ASM_ARGS({
    var vectorArray = new Module.VectorString($0);
    console.log(vectorArray.get(0));
    console.log(vectorArray.get(1));
    console.log(vectorArray.get(2));
    }, &vectorArray);

Output in the browser console:

is::Engine is really great!
With this tool everything is possible!
I'm sure you'll love it!

Extras

  • Here is a Web Game : Arkanoid created with the game engine. It's a Web Game so it's playable on PC and mobile.

Image

  • The engine comes with a Demo (2D Platform Game) that uses only the functions of the engine, in order to show you its power and how to use it. Now imagine what you can do when you use Box 2D and the other tools!

Image

  • Example Pack that show how to use the various features of the game engine.

Game Engine User Guide and Youtube Tutorial

Example of a project created with the engine

Hello Scene Example

Here is an example code of a Scene (the place where the game objects come to life). In less than 50 lines of code, the engine allows to:

  • Change the language of the game (English / French)
  • Display an RPG type message with interaction
  • Animate an object with the possibility of interacting with it (by clicking / touching it)
  • Load resources (Textures, Music)
  • Play music
  • Display a background that scrolls vertically and horizontally with a speed
  • Manages the display depth of each object
  • Automatically manages the game window (closing confirmation, events, ...)
  • Change the background color of the window (scene color)
class HelloScene : public is::GameDisplay {
public:
    HelloScene(is::GameSystemExtended &gameSysExt):
        GameDisplay(gameSysExt, sf::Color::White /* => scene color*/) {}

    void loadResources() {
        m_gameSysExt.m_gameLanguage = is::lang::ENGLISH; // set default game language

        // uncomment to change English language in French
        // m_gameSysExt.m_gameLanguage = is::lang::FRANCAIS;

        // load font and texture
        GameDisplay::loadParentResources(); // allows to load system resource (very important never forgot to call him)
        GRMaddTexture("hello_world", is::GameConfig::SPRITES_DIR + "hello_world.png");
        auto &texBg = GRMaddTexture("background", is::GameConfig::TILES_DIR + "background.png");
        auto &texDialog = GRMaddTexture("dialog_box", is::GameConfig::GUI_DIR + "dialog_box.png");

        // add a background to the position x = 0, y = 0 which will fill the scene and which will be scrolled (scrolling speed = 0.5)
        SDMaddSceneObject(std::make_shared<is::Background>(texBg, 0.f, 0.f, this, 0.5f, -0.5f, false, false));

        // add an object at position x = 0, y = 0 which will be updated and displayed in the scene
        SDMaddSceneObject(std::make_shared<HelloWorld>(0.f, 0.f, this));

        // add RPG style game dialog
        auto gameDialog = std::make_shared<is::GameDialog>(texDialog, GRMgetFont("font_msg"), this);
        gameDialog->setDepth(-2); // the display depth (make it appear on all objects. The object with the smallest value appears on the others)
        gameDialog->setDialog(is::GameDialog::DialogIndex::DIALOG_HELLO); // set the corresponding dialog (See GameDialog.h and GameLanguage.h for more details on creating a message for dialogue)
        SDMaddSceneObject(gameDialog);

        GSMaddSound("game_music", is::GameConfig::MUSIC_DIR + "game_music.wav"); // add music
        GSMplaySound("game_music"); // play music
    }
};

Prerequisites


How to use is::Engine with the different development tools:

android Android Studio

This project uses the template of Georgik. For more information on this template click here

1. Prerequisites

  • Android Studio (4.0.1 +)
  • Android SDK and NDK (r20b)

danger Very important

  • On Android SFML games run with SDL library. If you want to use SDL functions in your source code, use the IS_ENGINE_SDL_2 macro.
  • The audio format supported at the moment is .WAV
  • When you use the image rotation function, it may happen that some images are distorted, this is caused by the screen resizing. Note that you can work around this bug by using your own rotating image (a sprite sheet for example).
  • Some SFML functions like: Vertex Array, Render Texture are not yet supported. These additions will be made soon!
  • std::wstring text is not yet well supported (special characters are not displayed well)
  • Your help to improve the engine will be welcome!
  • Please read this.

2. Installation

Windows
  1. Download Android Studio 3.x (recommended version 4.0.1).
  2. Download the Android SDK and install it in C:/Android/SDK.
  3. 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.
  4. Set the environment variable ANDROID_NDK with the path C:/Android/NDK.
  5. Move the is-Engine project to your C:/ (C:/is-Engine).
  6. Open the is-Engine folder with Android Studio and start the compilation.

If all goes well you will have a Hello World Screen on your Android emulator.

Image

Enjoy!

2. How to replace the package name (com.author.isengine) of the application

  • Follow these steps carefully. A single error and the application will crash wonderfully when launching on emulator / mobile!
  1. Replace this line in the gradle.app file.
  2. Replace this line in the AndroidManifest.xml file.
  3. Replace this line in the SDLActivity.java file.
  4. Replace the abresence com/author/isengine in which is the file SDLActivity.java that you have just modified at the top by yours (example com/yourname/yourgamename).
  5. Replace this part ..._ com_author_isengine _... of line 20 and 23 in the file SDL_android_main.c by yours (example com_yourname_yourgamename).
  6. Replace this part ..._ com_author_isengine _... on the 23 lines of the file SDL_android.c by yours (example com_yourname_yourgamename).
  • I strongly advise you to use the replace function of your text editor (on Notepad++ we use Ctrl + F + Replace option).
  1. Replace this line in the GameConfig.h file.
  • Note that this part is only required if you want to use the game engine data save / load functions.

3. Adding Source Files

4. Application location

  • The application can be found in is-Engine/app/build/outputs/apk.

web Web (HTML 5 - CSS 3)

  • If you want to make your SFML project compatible with the Web (Be able to run it in a web browser), please watch this video tutorial.

1. Prerequisites

  • Emscripen (1.39.7 +)
  • Python (3.8.1 +)
  • CMake (3.1 +)
  • Java
  • SMK SDK (It is downloaded with the internet connection when executing commands)

2. Installation

Windows
  1. Download Emscripten and install it in C:/emsdk, define its path in the environment variable Path
  2. Download Python after installation, define its path in the environment variable Path
  3. Download CMake after installation, define its path in the environment variable Path
  4. Download Java after installation, define its path in the environment variable Path
  5. Move the is-Engine project to your C:/ (C:/is-Engine).
  6. Execute this command :
cd c:/is-Engine/app/src/main
mkdir bin-web
cd bin-web
emsdk activate latest
emcmake cmake ..
make -j3
python -m http.server
  1. Visit this url localhost:8000 in your Web Browser.

If all goes well you will have a Hello World Screen on your Web Browser.

Image

Enjoy!

3. Adding Source Files

danger Very important

  • is::Engine works on the Web thanks to SMK a C++ library which uses Emscripten.
  • SMK is a library which is a little different from SFML, but the Graphic, Audio, System part looks a bit like that of SFML.
  • It does not currently support some SFML features such as: Events, loadFromFile / openFromFile (they are replaced by functions of the engine which performs the same role), etc. The way objects initialize is a little different too. Even the names spaces and functions are different.
  • is::Engine allows to interconnect the SMK and SFML library, so that they can use the same namespace (sf), Classes and functions names in order to facilitate development (avoid preprocessors, compatibility with several platforms).
  • When using SMK with with is::Engine, the Music class works the same as sf::Sound.
  • These libraries: SWOOSH, TMXLite, TMXLoader, TinyFileDialog are not supported in the web version of is::Engine.
  • But don't worry, AS LONG AS YOU USE THE FEATURES OF is::Engine you won't notice the difference between these two (2) libraries when you create your games.
  • Believe me, there is everything you need to create a great game!
  • To see the differences I advise you to see the basicSFMLmain.cpp file (this file allows you to create your games without using the main rendering loop of the engine, i.e. avoids using the main features of the engine).
  • If you want more information on the SMK library I advise you to see the documentation.

Web Push Notification Web Push Notification

  • If you want to make your SFML project compatible with the Web (Be able to run it in a web browser), please watch this video tutorial.

  • danger
    By default the web push notification has been disabled. Because to make it work you must have an internet connection. In case there is no internet access and it is not well launched, it can prevent the execution of the web program.
    To enable it, please modify these lines in index.html : 9, 25, 68

Installation

  • This shows how to test the push notification. Note that normally to use it, you have to associate it with a database (backend). But here we will use it with the Push Companion site (It will serve as a backend for us!).
  • For more information on Push Notification please see this page.
  1. Web browser (preferably Google Chrome)
  2. Web server for Chrome or your own web server.
  3. Define the Application Server Keys in the main.js file. You can get this keys (We will use the public key) here.
  4. Launch the web or bin-web folder (generate using emscripten) via the web server.
  5. Click on the "Enable Push Messaging" button to activate the sending of Push Notifications. Once done you will have a code (which can be used to send you push notifications).
  6. Go to this site and enter the code in the "Subscription to Send To" text field followed by your message in "Text to Send" text field. Click on the "Send Push Message" button.
  7. If all goes well you will have a push notification followed by the message you sent in the console (development tool) of your browser.

image

Configure the Push Notification

  1. To change the information (title, details, ...) of the Push Notification you must refer to the sw.js file.
  2. To change the Push Notification image files, refer to the images folder.
  3. To change the page that is launched when you click on the notification, refer to the sw.js file.

cmake CMake

1. Prerequisites

  • CMake (3.1 +)

2. Installation

Windows

  1. Compile SFML with CMake to have static libraries and put on C:/ (C:/SFML).
  2. Move the is-Engine project to your C:/ (C:/is-Engine).
  3. Execute this command :
cmake -S "C:/is-Engine" -B "C:/build"
cd build
make

Linux

  1. Install SFML 2.5.1 on your machine.
  2. Move the is-Engine project to /home/user/ (/home/user/is-Engine).
  3. Execute this command :
sudo cmake -S "is-Engine" -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


qt Qt

1. Installation

Windows

  1. Download Qt 5.12.9 MinGW here and install it.
  2. Download this version of SFML already compiled for Qt 5.12.9 and extract it in C:/ (C:/SFML_Qt_MinGW).

2. Opening the project with the IDE:

Windows

  1. Run the file open_qt_creator.bat in the main directory (Make sure you have included the path to the Qt executable in your PATH environment variable).
  2. Or open the file is-Engine.pro in the location is-Engine/app/src/main/qt

3. Executable location

  • The compiler files can be found in is-Engine/app/src/main/bin-Qt.

vs Visual Studio Code

This project uses the template of andrew-r-king. For more information on this template click here.

1. Prerequisites

Windows

Linux

  • Get SFML 2.5.1 from your distro if it has it, or compile from source.

2. Installation

Windows

  1. Download & Extract SFML 2.5.1 to C:/SFML/ where the bin/lib/include folders are contained within.
  2. Download & Extract MinGW to C:/mingw32/ where the bin/lib/include folders are contained within.

Linux

  1. Ensure the GCC Toolchain is installed (sudo apt install build-essential).
  2. 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:

Windows

  1. Run the file open_vscode.bat in the main directory.

Linux

  1. Execute this command in the main directory:
code -n "./app/src/main"

All

  1. Or open the is-Engine/app/src/main folder with Solution Explorer.

4. Executable location

  • The compiler files can be found in is-Engine/app/src/main/bin-vscode.

cb Code::Blocks

1. Installation

Windows

  1. Download Code::Blocks 20.03 MinGW here and install it.
  2. Download this version of SFML already compiled for Code::Blocks 20.03 and extract it in C:/ (C:/SFML_CB_MinGW).

Linux

  1. Download Code::Blocks 20.03 and install it.
  2. Ensure the GCC Toolchain is installed (sudo apt install build-essential).
  3. 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.

2. Opening the project with the IDE:

Windows

  1. Run the file open_codeblocks.bat in the main directory (Make sure you have included the path to the Code::Blocks executable in your PATH environment variable).
  2. Or open the file is-Engine-windows.cbp in the location is-Engine/app/src/main

Linux

  1. Execute this command in the main directory:
codeblocks "./app/src/main/is-Engine-linux.cbp"
  1. Or open the file is-Engine-linux.cbp in the location is-Engine/app/src/main.

3. Executable location

  • The compiler files can be found in is-Engine/app/src/main/bin-codeblocks.

cb Develop SFML games with SDL 2

1. Installation

Windows

  1. Download Code::Blocks 20.03 MinGW here and install it.
  2. Download this version of SDL 2 and extract it in C:/ (C:/SDL2).
  3. Put the .dll files which is in the bin folder of SDL2 in the main folder.

2. Opening the project with the IDE:

  1. Run the file open_codeblocks_sdl.bat in the main directory (Make sure you have included the path to the Code::Blocks executable in your PATH environment variable).
  2. Or open the file is-Engine-windows-SDL2.cbp in the location is-Engine/app/src/main

3. Executable location

  • The compiler files can be found in is-Engine/app/src/main/bin-codeblocks.

danger Very important

  • If you want to use SDL functions in your source code, use the IS_ENGINE_SDL_2 macro.
  • Note that some SFML functions like: Vertex Array, Render Texture are not yet supported. These additions will be made soon!
  • std::wstring text is not yet well supported (special characters are not displayed well).

icon Change application icon:

Android

  • To change the icon of the application you must go to the location is-Engine/app/src/main/res replace all the images (PNG) which are in the drawable subfolders.

Web (HTML 5 - CSS 3)

Windows

Linux


Description of the project structure:

header

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. It also contains the file ExtraConfig.h which allows to activate / deactivate certain engine functionality (Engine optimization, SDM, Admob, Main Render Loop, ...).
  • 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


Special things to know about the engine

is::LibConnect

With the is::LibConnect you can write code for a specific library. Here is how to do it:

sf::Text text;
text.setString(
// on PC (Windows / Linux)
#if define(IS_ENGINE_SFML)    
    "We use SFML 2 library"

// on Android or when you use SDL to create SFML games on PC (only for Code::Block at the moment)    
#elif define(IS_ENGINE_SDL_2)
    "Run SFML 2 with SDL 2"

// When we develop for the web (HTML 5) with Emscripten    
#elif define(IS_ENGINE_HTML_5)
    "SFML 2 on Web"
#endif
              );

If you have discovered another way to use the game engine, don't hesitate to share it! We will put it in this Special section so that other people can benefit from it!


How to update an is::Engine project

  1. First of all the part of is::Engine that changes most often during updates is the isEngine folder. But it also happens that these files can be modified:
  1. To update your old project with a new version of is::Engine: the files (.h and .cpp) you need to move are in objects and scenes. Note that these folders never change whatever the version!

How to activate the use of Admob?

Coming soon!


Contribute

  • If you want to participate in the development of the project to help me improve the engine, please note that you are welcome! Together we go further!
  • One of the objectives of this project is to create a large community that can work on the engine to allow many people around the world to easily realize their dream games / applications!

Contacts

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].