Giter VIP home page Giter VIP logo

swr06 / glgame Goto Github PK

View Code? Open in Web Editor NEW
76.0 7.0 8.0 17.88 MB

A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor.

License: MIT License

HTML 3.54% CSS 0.27% C 32.20% Objective-C 0.23% CMake 0.22% JavaScript 0.05% C++ 63.24% Python 0.02% GLSL 0.21% Batchfile 0.01% Scilab 0.01%
c cpp opengl lightweight game-engine 2d-game-engine 2d-graphics imgui imgui-editor imgui-glfw

glgame's Introduction

GLGame (A Tiny OpenGL based C++ Game Engine)

GLGame Logo

Created by Samuel Rasquinha using C++17 and OpenGL 3.3 ๐ŸŽฒ

Note

This game has long since been ABANDONED. I do not recommend using it as I was new to graphics/gamedev/game engine dev when I wrote it.

What is GLGame ?

GLGame is a Tiny OpenGL Game Engine that is simple, lightweight and easy to use.

Objective

GLGame was created to be as simple and straightforward as possible. Each part of the engine requires little to no understanding of OpenGL and other computer graphic concepts.

It uses simple type names and has simple arguments such as Object, Entity or Sprite.

Features

A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor and the below features :

  • Abstract OpenGL (To write custom code) โœ“
  • Camera Culling โœ“
  • Sprite Batching โœ“
  • Lighting โœ“
    • Custom Light colors โœ“
    • Light Batching โœ“
  • Animations โœ“
    • Custom animation speed โœ“
  • Scene Editor โœ“
    • Parser โœ“
    • Slight encryption โœ“
    • Grid โœ“
  • Transformations โœ“
  • Logger โœ“
  • Audio
  • Lighting โœ“
  • Particles โœ“
    • Particle Batcher โœ“
  • Physics
  • Helper functions (such as windowing functions etc..) โœ“
  • Texture atlas / Sprite Sheet api โœ“
    • Custom Sampling โœ“

This engine is still in development.

Features to come

I would like to implement the following features in the coming years :

  • Multithreading
  • Networking
  • Save game
  • Post Processing
  • More helper functions
  • Custom GUI Library

Compiling

To compile this project, you will need Microsoft Visual Studio 2019 and the VSC++ compiler (which supports C++17). Open the .sln file using Visual Studio and select the x86 (or Win32) configuration. You can compile it in both modes (Debug or Release) with the x86 (Win32) configuration.

About the Scene Editor

The scene editor has to be run during runtime. Just set the fifth argument of the Init() function to true and it will launch the Scene Editor with all the objects you have or will create.

Dependencies

GLGame has very humble dependencies.

  • C++17 (for std::filesystem)
  • stb_image (for reading texture files)
  • ImGui (Bloat free immediate mode GUI interface by Omar Cornut)
  • GLEW (OpenGL wrangler library)
  • GLFW (Windowing environment)

Development Specs

  • Processor : AMD Ryzen 3 2200g
  • Graphics : Integrated Vega 8 graphics
  • Ram : 8.0 GB
  • MB : AsRock A320M MB

This engine managed to get 500+ FPS in the game with the scene editor running. (With the above specs) and about 300 FPS on an intel HD 4000 GPU.

It got around 1000+ FPS in game without the scene editor running and 400+ FPS on an Intel HD 4000.

Using it

A wiki has been written for GLGame. Please refer to the demos and the Wiki tab in the repo page.

License

This project is licensed under the highly permissive MIT License. Read the LICENSE file for more info.

Supporting this project

If you like this project and would like to support it, please do star it on GitHub.

Screenshots and Demos

GLGame Demo-1

A Basic lighting demo created with the built-in 2D Light classes and batchers

GLGame Demo-2

A Basic lighting demo emulated over a 2D sprite

GLGame Demo-3

The GLGame Scene Editor created and rendered at runtime

GLGame Demo-4

The particle emitter demo that has a particle batcher and can render upto 10,000 particles in one draw call

GLGame Demo-5

The batch renderer that comes with GLGame can render upto 10,000 sprites in one draw call

GLGame Platformer Demo

A platformer demo that comes included with GLGame

Thankyou for visiting the GLGame github page.

glgame's People

Contributors

swr06 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

glgame's Issues

Texture atlas bug

The texture atlas samples it in the wrong way. This will be fixed in a few days

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.