Git Product home page Git Product logo

yage's Introduction

yage-logo

master-build

Introduction

YAGE stands for Yet Another Game Engine. It is a 2D game engine that is being developed for the game Arider. However, it will also be general game engine library for any other 2D games.

YAGE uses OpenGL for rendering of 2D graphics. OpenGL was chosen because it is the most crossplatform Graphics API, and not as low level as Vulkan.

Yage uses GLFW for the creation and viewport as it is lightweight and easy to manage. However, these features are completely wrapped behind the YAGE API.

The inspiration for this game engine is to learn about OpenGL and create an optimised 2D game engine with a simple API that can be used to easily create simple 2D games. To do this, a Component Entity System will be used to manage the different systems in the game engine and make it as modular as possible. Systems can easily be added to the game engine, and new entities with custom Components can also be created by the user.

The game engine also supports asynchronous logging by using an Active class that creates a new thread, and queues any functions that are sent to it. This can help debugging programs, as one can increase the minimum log level of the game engine to any required resolution. This output can also be piped to a file without slowing down the program.

The full documentation of the API can be seen here.

Purpose

The purpose of this game engine is not to be very general, but easy to use and quick to initially set up.

Installation and usage

To use YAGE for your own game, you should link it as a static library and include the yage.h header in your project. To link the project using cmake, the library has to be added as a subdirectory and then linked with the name yage.

Build and Testing

To compile YAGE, create a build directory from the base directory. Then call cmake and point it to the directory containing. CMakeLists.txt. For example, one can use the following commands to build the library and run tests on it.

mkdir -p build
cd build
cmake ..

The test suite can then be run using

cd build/tests && ctest

Using the game engine

The game engine can be initialised as follows.

yage::init();

It can be then cleaned up by running.

yage::quit();

Future Improvements

The first step is to have full support of 3D meshes with their corresponding textures, and making a useful API to interact with the 3D YAGE library.

Secondly, improvements to the Entity Component System

License

Copyright (c) 2017 Yann Herklotz Grave [email protected] -- MIT License, see file LICENSE for more details.

yage's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

icodein

yage's Issues

Adding support for JSON config files

Add support for config files that will be in JSON. This is because JSON has a quick parser implementation in C++ and it is a convenient and adaptable format.

Fix Vector

Want to be able to access them with

Vector4f vec4;
vec4.x = 4;
do_something(vec4.y, vec4.z);

Add support for sprite sheets

Sprite Sheets

Sprite sheets are images with a lot of different sprites at different locations in the image. We want to support these, because they dramatically increase the performance of drawing multiple different sprites onto the screen at once. This is because loading a sprite onto the GPU is a very slow operation, and by having all the sprites on a sprite sheet, we only have to load one image onto the GPU and then select smaller parts of it, instead of having to load the whole sprite again.

If Window is created twice, GLFW will fail.

There has to be a check to see if GLFW has been initialized already, so that we don't try and initialize it again. There is currently no such function in GLFW itself, however a workaround could be that we create a static variable in the window class that gets set to true when GLFW has been initialized.

Component view of the world

Add a component based view of the all the options, so that everything inherits from component, such as a System and a Graphics component.

Adding mesh support

Mesh

A mesh is produced by dividing a sprite up into triangles, that can then be drawn more easily by the game engine, as it will not have to draw transparent pixels. This can also be combined with #4 for very efficient draw calls.

Not building

Have to include glew again instead of having glfw load the opengl library.

GLFW

Switch to GLFW instead of using SDL2, as I prefer it and do not plan to upload any games to steam.

More packing support

Add support to pack textures that are rotated as well, the current implementation does not allow that. This would be possible by giving a different UV rectangle to the draw call that would reflect the rotation that was performed.

For now, all the texture atlases will not have rotated images in them to make it easier.

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.