Update download link for snake example
|3 months ago|
|fonts||7 months ago|
|.gitignore||5 months ago|
|Engine.cpp||3 months ago|
|Engine.h||5 months ago|
|GUI.cpp||5 months ago|
|GUI.h||5 months ago|
|GUIHandler.cpp||7 months ago|
|GUIHandler.h||7 months ago|
|GameObject.cpp||5 months ago|
|GameObject.h||5 months ago|
|GameObjectPool.cpp||5 months ago|
|GameObjectPool.h||5 months ago|
|GameRunner.cpp||5 months ago|
|GameRunner.h||5 months ago|
|IGameObject.h||5 months ago|
|ITexture.h||5 months ago|
|LICENSE||3 months ago|
|README.md||3 months ago|
|Texture.cpp||5 months ago|
|Texture.h||5 months ago|
|TextureManager.cpp||5 months ago|
|TextureManager.h||5 months ago|
|TilePool.cpp||5 months ago|
|TilePool.h||5 months ago|
|Timer.cpp||5 months ago|
|Timer.h||5 months ago|
[Description] I decided I wanted to make a 2D Engine, using SDL2 libraries, as a way of learning C++ and improving my programming skills altogether. The goal is to create an Engine where making 2D games can be as theoretically simple as inherting the correct parent objects and adding independant code and resources for each individual game which can be kept seperate from the engine itself. I do not plan for this engine to compete with any other engines and it is lacking many features that you can find elsewhere.
[Setting up] This engine was developed in Visual Studio 2017 so this guide will be primarily focused around the VS IDE, however the steps are not complex and should translate to other IDEs.
On your local computer, create a repository where you want the root of your project to be, for Visual Studio this is where the IDE creates all files by default (directory contains the .vcxproj files by default).
Pull this repository as a submodule to your created repository, name it ruin_engine. This is required for the Engine to load files it requires on runtime; Visual studio requires file paths to start from root directory.
At this point you will need to setup the required .dlls in Visual studio, and add the required .dlls to the project’s base directory.
To start creating a game you will want to look over the GameRunner.h and GameRunner.cpp files. Create a new class which inherits the GameRunner class and define the required pure virutal functions. In main, calling run will handle the rest and give you a window on your screen showing that everything is working properly.
SDL2 (x86 development) https://www.libsdl.org/download-2.0.php
SDL2_image (x86 development) https://www.libsdl.org/projects/SDL_image/
SDL2_ttf (x86 development) https://www.libsdl.org/projects/SDL_ttf/
Visual Studio Requirements
I have not tested this engine with other IDEs besides Visual Studio, but Visual Studio 2017 requires certain .dlls to be in the root folder of your project (folder, by default, containing .vcxproj files). These dlls can be found in your SDL libraries’ ~/lib/x86 folder.
SDL2.dll, SDL2_image.dll, SDL2_ttf.dll, libfreetype-6.dll, libjpeg-9.dll, libpng16-16.dll, libtiff-5.dll, libwebp-7.dll, zlib1.dll.
There may be some memory leak issues.
Engine does not appear to be optimised very well and framerate drops happen when there are ~100 objects on camera at once (have not determined if this is a rendering or update issue).
[Downloads] Snake example: Download