Update download link for snake example
|1 year ago|
|fonts||2 years ago|
|.gitignore||2 years ago|
|Engine.cpp||1 year ago|
|Engine.h||2 years ago|
|GUI.cpp||2 years ago|
|GUI.h||2 years ago|
|GUIHandler.cpp||2 years ago|
|GUIHandler.h||2 years ago|
|GameObject.cpp||2 years ago|
|GameObject.h||2 years ago|
|GameObjectPool.cpp||2 years ago|
|GameObjectPool.h||2 years ago|
|GameRunner.cpp||2 years ago|
|GameRunner.h||2 years ago|
|IGameObject.h||2 years ago|
|ITexture.h||2 years ago|
|LICENSE||1 year ago|
|README.md||1 year ago|
|Texture.cpp||2 years ago|
|Texture.h||2 years ago|
|TextureManager.cpp||2 years ago|
|TextureManager.h||2 years ago|
|TilePool.cpp||2 years ago|
|TilePool.h||2 years ago|
|Timer.cpp||2 years ago|
|Timer.h||2 years 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