Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
/ core Public archive

game engine focused on performance and flexibility

License

Notifications You must be signed in to change notification settings

kualta/core

Repository files navigation

Core Engine

FINALLY, A NEAT GAME ENGINE

MIT License Codacy Badge

Development

See Core Engine Roadmap to get a grasp on current development status and future updates

Check out dev branch for latest development updates

Usage

Building

For full guide, read Building the engine

  1. Clone the main repository:
git clone --recursive https://github.com/lectroMathew/Core.git

1.1 On Unix* systems, make sure you have sdl2 library installed:

sudo pacman -S sdl2             # on ArchLinux
sudo apt install libsdl2-dev    # on Ubuntu / Debian
brew install sdl2               # on macOS (via Homebrew)
  1. Add Core Engine to your CMakeLists.txt as subdirectory and link against core target:
add_subdirectory(Core)
target_link_libraries(MyApplication PUBLIC core)
  1. Generate & Build your application

Note: master branch is guaranteed to build

cmake -G <Your generator> ./
cmake --build ./build --target MyApplication

Note: on Unix* systems use gcc or g++ to compile, on Windows MinGW is recommended, MSVC compilation is possible, but not guaranteed

Note: Make sure you're using 64bit version of your compiler of choice

If you experience any problems with building the engine feel free to open an issue. This would help us make building process as smooth as possible

Using the engine

For full guide, read Quick Start guide for newcomers

  1. In your application, #include all module files you wish to use, together with CoreConfig.h header:
#include <core/Modules/ApplicationModule.h>
#include <core/Modules/EngineModule.h>
#include <core/Modules/SceneModule.h>
#include <core/CoreConfig.h>
  1. Use CoreConfig to configure your Core and then build it:
using namespace core;
int main() {
    
  CoreConfig config;

  config
      .Add(NewModule<InputModule>)
      .Add(NewModule<EngineModule, InputModule>)
      .Add(NewModule<SceneModule>)
      .Add(NewModule<ApplicationModule>);
  CoreContainer coreContainer = config.Build();
  1. Create a window and enter the main engine loop like so:
                                                       // window title     x, y, w,    h
  Core::GetModule<ApplicationModule>()->CreateApplication("Core Engine", { 0, 0, 1280, 720 });

  Core::GetModule<EngineModule>()->Main(); // Enter engine main loop

  return 0;
}
  1. You're amazing!

Congratulations, you've successfully built your Core and put it to work!
Find out how to make more exciting stuff with Core Engine by reading architecture guides on our wiki:

Engine Architecture introduction


Check out Core Engine Wiki for more information and guides

Contributing

Get involved into Core Engine development, read Contributing guidelines

License

Core Engine is destributed under MIT License, check LICENSE for details