GithubHelp home page GithubHelp logo

maksasj / bebone Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 0.0 46.94 MB

☠️ game development framework/engine aimed for flexible and highly customizable game development

License: MIT License

C++ 96.82% C 1.28% CMake 1.90%
gamedev opengl vulkan bebone game-development game-engine rendering-engine

bebone's Introduction

Bebone

Bebone - Is a framework/engine aimed for flexible and comfortable game development, written in C++. In other words Bebone is a set of useful game development libraries, written and integrated in Bebone framework ecosystem.

Bebone is not a new javascript framework btw. It is a game development one!

Cool looking widgets stars build build

Features

  • Core module
    • Arena allocator & container
    • Logger
    • Types library
    • Event submodule
      • Listener system (Java style)
      • Action delegate (C# style)
    • Input system
    • Meta programming module
  • Graphics module
    • OpenGL abstraction layer
    • Vulkan abstraction layer (in development)
    • Shaders
    • Window
    • Begui (Dear ImGui abstraction layer)

Build

For now there is two methods how you can use bebone is your project(build locally).

  1. Build manually
    First of all requirements:

    • Cmake (At least version 3.21)
    • Ninja (At least version 1.11.1)
    • C++ compiler (Have test with Clang 15.0.5 and GCC 12.2.0)
    • Vulkan SDK (if you want to build gfx module)

    Firstly lets clone bebone locally(note that you also need to clone all bebone git submodules).

    Secondly lets configure our Cmake configuration with

    cmake -B build -G Ninja

    Finally you can simply build project with cmake

    cmake --build build
  2. Using docker
    Currently the docker image is not available, but we are planning to release it towards bebone 0.2v.

Note that bebone is only a set of useful libraries/modules, some modules can be used separately.

Testing

The testing process is similar to the Building. After a successful build, all you have to do is run CTest from build\tests\unit directory.

Dependencies

For convenience, we try to reduce the use of third-party libraries, as it complicates code management and readability. At the moment, bebone is only dependent on these libraries:

  • Glad (opengl function header)
  • Vulkan-Headers (vulkan function header)
  • GLFW (window management library)
  • Glslang (SPIR-V shader compiler library)
  • imgui (Debug gui library)
  • omni_types (Type library)
  • stb (Image management library and others)

Examples

Bebone hello world example:

#include "bebone/bebone.h"

using namespace bebone::gfx;
using namespace bebone::gfx::opengl;

int main() {
    GLFWContext::init();
    
    auto window = WindowFactory::create_window("Example", 800, 600, GfxAPI::OPENGL);

    GLContext::load_opengl();
    GLContext::set_viewport(0, 0, SCR_WIDTH, SCR_HEIGHT);

    while (!window->closing()) {
        GLContext::clear_color(0.2f, 0.2f, 0.2f, 1.0f);
        GLContext::clear(GL_COLOR_BUFFER_BIT);

        // Your game code

        GLFWContext::swap_buffers(*window);
        GLFWContext::poll_events();
        window->execute_input_actions();
    }

    GLFWContext::terminate();
    return 0;
}

You can find other examples in examples directory.

Documentation

License

Bebone is free, open source game development framework. All code in this repository FOR NOW is licensed under

bebone's People

Contributors

ddf0 avatar maksasj avatar soskar1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bebone's Issues

Create basic sound system

  • SoundEngine class
  • Sound class
  • Music class
  • Abstract sound fx interface
SoundEngine engine;
            
class AAAA
class Sound : AAAA;
class Muisc : AAAA;
            
auto sound0 = engine.load_sound("hit0.mp3");
auto sound1 = engine.load_sound("hit1.mp3");
auto music = engine.load_music("music.mp3");
auto sound2 = engine.get("hit0.mp3");
            
sound0->play();
music1->play();
            
struct SoundComponent {
       shared_ptr<Sound> sound;
            
       SoundComponent(name) {
               sound = engine->load(name);
       }
            
       void invoke() {
               sound0->play();
       }
}

Renderer

Todo

  • Sprite interface
  • Renderer interface
    • Complete OpenGL renderer implementation
    • Complete Vulkan renderer implementation
  • And other interfaces...
    • Model, Mesh, Material, etc.

Fix 2_vulkan_3d_cube example warning

[90/141] Building CXX object examples/gfx/vulkan/2_vulkan_3d_cube/CMakeFiles/Bebone_Example_Gfx_2_Vulkan_3D_Cube.dir/main.cpp.obj
D:/Projects/C++/bebone/examples/gfx/vulkan/2_vulkan_3d_cube/main.cpp:103:72: warning: unsequenced modification and access to 't' [-Wunsequenced]
103 | transform.rotation = trait_bryan_angle_yxz(Vec3f(t * 0.001f, (t++) * 0.001f, 0.0f));
|

Can be easily fixed

Rename Docs markdown files

rename

Gfx.md to GFX.md
Core.md to CORE.md

Since, README.md LICENSE.md and TODO.md, are all upper case, lets be consistant with outher markdown files as well.

Sound system

Todo

  • SoundEngine class
  • Abstract sound fx interface
  • Sound class
  • Music class

Vulkan headers

I noticed that, we are using GLFW with GLFW_INCLUDE_VULKAN, do wee really need Vulkan-Headers submodule ?
image

GFX

Todo

  • Vulkan part
    • Vulkan pipeline manager
    • Vulkan textures
  • Refactor window api
    • Default values

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.