Giter Site home page Giter Site logo

jonathspirit / fastengine Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 10.09 MB

Project FastEngine

License: Apache License 2.0

CMake 1.02% C++ 98.86% Shell 0.04% GLSL 0.08%
framework game game-development glsl multiplayer network sdl2 sdl2-image sdl2-mixer vulkan vulkan-game-engine vulkan-library

fastengine's Introduction

FastEngine

Copyright (C) 2024 Guillaume Guillet

Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Description

logo FastEngine is a 2D, multiplayer oriented framework on top of the Vulkan API. It brings a lot of tools and classes that can help mostly game development.

Tools support

FastEngine must be built using a C++20 compatible compiler :

  • For GNU/Linux : GCC-11 minimum
  • For Windows : MINGW-W64, GCC-11 minimum
    • (32bits or UCRT 64bits)
  • For MAC : AppleClang 13 minimum

Unsupported compiler/tools :

  • Microsoft compiler, (it should work but is not tested on)
  • Ninja build system

Working/supported architecture :

  • 32bits
  • 64bits
  • ARM

FastEngine is built under C++20 but game/software that link to this library can be C++17 minimum

Documentation

You can find the latest Doxygen docs here : https://jonathspirit.github.io/FastEngine/

Vulkan specification here : https://registry.khronos.org/vulkan/specs/1.3-extensions/html/index.html

Note that this is a young project that need a ton of works for examples, documentations, tutorials ...

How to build / Build details

You can check platform specific build instructions below this chapter.

First you should (if not already) clone the git repository :

git clone https://github.com/JonathSpirit/FastEngine.git --recurse-submodules

You must first compile the dependencies by going into the deps/ folder and then use CMake :

cd deps
mkdir build && cd build
cmake ..
cmake --build .

Then you can go to the root directory and configure the project like this : (don't forget the FGE_DEPS_PATH option)

mkdir build && cd build
cmake .. -DFGE_DEPS_PATH=deps/build/libs -DFGE_BUILD_DOC=ON -DFGE_BUILD_EXAMPLES=ON -DFGE_BUILD_TESTS=ON

Then use CMake to build the project (when building you can use the -j# argument to use multiple core) :

cmake --build .

CMake arguments

In order to tell CMake where to find the dependencies you have to specify the relative path to the .../libs folder generated by the deps/CMakelists.txt script :

-DFGE_DEPS_PATH=deps/.../libs

You can specify the build type of the project by using :

-DCMAKE_BUILD_TYPE=Release or Debug

By default, the project is in release mode. You can build the Doxygen documentation by setting :

-DFGE_BUILD_DOC=ON or OFF

By default, the documentation is built if the build type is Release. (You will need Doxygen in order to build the doc.)

You can build all examples by setting :

-DFGE_BUILD_EXAMPLES=ON or OFF

By default, the all examples are built inside the all target.

The library type flag (BUILD_SHARED_LIBS) must not be manually set and static build is not supported.

You can enable/disable tests by setting :

-DFGE_BUILD_TESTS=ON or OFF

By default, the tests is always built and in order to run the tests, you should use :

ctest

CMake targets

  • all
    • This is the default target, it will build everything configured.
  • FastEngine
    • This will build the client (audio, graphics, window, ...) shared library.
  • FastEngineServer
    • This will build the server (no audio, graphics or window dependencies) shared library.
  • doc_doxygen
    • This will build the Doxygen documentation.
  • install
    • Install the project, you can configure the project with CMAKE_INSTALL_PREFIX in order to change the location, but by default, it will install it inside the install/ directory in root.

You can also build every example targets.

Windows

Please install a MINGW-W64 environment like MSYS2 (recommended) and make sure that either 32bits and/or 64bits GCC is correctly installed with proper CMake package.

Then you should just do the following in a build/ folder :

cmake .. -G"MinGW Makefiles"

and then build :

cmake --build .

I recommend to add a little bit of power in the build with multicore argument :

cmake --build . -j8

Linux

Please install GCC-11 or higher in order to correctly compile :

sudo apt update && sudo apt install gcc-11 g++-11

And then use CMake :

cmake .. -G"Unix Makefiles" -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
cmake --build . -j8

Mac OS

For Mac OS you should just be able to do (after installing a correct AppleClang version) :

cmake .. -G"Unix Makefiles"
cmake --build . -j8

Installing

The install target support CMake config export, and all the dependencies will be exported too in order to avoid any overhead when linking to the library.

Once built, you can use :

cmake --install .

By default, if no CMAKE_INSTALL_PREFIX is specified, it will install the library in install/ in the project root with a folder name like FastEngine_Windows_64_Debug_0.9.1-441-g4a99f01.

Once executed correctly, it will create a directory structure like this example :

  • FastEngine_Windows_64_Debug_0.9.1-441-g4a99f01
    • bin
    • include
    • lib
    • share
      • cmake
      • external
      • fge_changelog.txt
      • IMAGE_AUDIO_LOGO_LICENSE
      • LICENSE
      • logo.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.