GithubHelp home page GithubHelp logo

scrappycocco / scrapengine Goto Github PK

View Code? Open in Web Editor NEW
115.0 3.0 10.0 40.05 MB

A very simple real-time Vulkan 3D game engine

License: MIT License

C++ 98.24% GLSL 1.06% C 0.70%
vulkan vulkan-game-engine vulkan-engine game-development game-engine cpp11 cpp cpp-game-engine

scrapengine's Introduction

Engine Logo

An engine made of scrap code /s

Build command Status
cppcheck cppcheck

Description

I have always been passionate about game development and rendering, and I wanted to go deeper into it. With the arrival of Vulkan, I thought it was a good time to start learning how a game engine works. The development of his game engine started on July 2018, and at the beginning of August 2018 it was able to render the basic triangle. Since then I had to slow down for a few months because of University and its projects, but on August 2019 this repository has been made public with the release of the first working small game tagged as demo 1.

I followed mostly Alexander Vulkan tutorial and SaschaWillems Vulkan examples to understand the basics and to develop it.

It is a very simple game engine, made mostly to understand the basics of rendering and how to connect multiple parts between them (input-render-audio-physics).

It is not perfect and is not intended to be used in production, is a personal project made to study Vulkan, feel free to modify it if you want. If you have any question feel free to open an Issue.

How to build the engine

To see how to build the engine from the source code, please read the wiki page.

Known problems

Since it's a engine made from zero, the GameObject-Component structure is not perfect and may lead to bugs or errors involving transformations or rotation. Specially when moving the GameObject with multiple components or a GameObject and its children. This is known when the user try to rotate a RigidbodyComponent.

There may be other parts of the engine that do not work perfectly or as expected.

I will try to make it better and to fix all the issues about it.

What's next

I currently do not plan to keep working/updating this repository. I will not archive it and will leave it open to receive questions, pull requests or similar if anyone is interested in it.

Previous TODO list:

  • Directional light and Shadow-Mapping;
  • (Should improve Forward Rendering structure or move to Deferred Rendering before adding more lights);
  • Omnidirectional light and Shadow-Mapping;
  • [...?]

Special thanks

  • SaschaWillems for all his Vulkan examples and for his suggestions on Discord;
  • Charles for all his support during the whole development, helping me understanding where and what the problem was, and for all his help and suggestions;
  • My friends frncscdf and davidepi for their suggestions and support;
  • All the people in the Vulkan Discord server.

Vulkan FAQ

  • How do you render multiple objects? How do you render the UI?
  • Resources to understand the basics of lights/shadows

Download / Example gameplay gif

You can download this example game here.

Version #1 of the game: GIF.

Version #2 of the game: Example game Gif gameplay

scrapengine's People

Contributors

scrappycocco avatar zann1x 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  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

scrapengine's Issues

Forward declarations

The engine is starting to have way too many includes, everything (possible) should be moved to forward declaration also for a fast compilation

Assimp with vs2017

f:\projects\github\scrapengine\external\assimp\include\assimp\defs.h(53): fatal error C1083: Cannot open include file: 'assimp/config.h': No such file or directory

Doesn't compile out of the box for debug or release
Can't bulid the sample for obvious reasons - no engine

The engine may crash because the vector cleanup is not synced

There's a part of code that's not done right:
cleanup_meshes() is called in two different parts of the code: one in a thread and one into another thread, this probably can lead to errors and crashes.
The cleanup of the meshes vector must be checked and fixed to be safe with other parts of code that use this vector.

How to render multiple objects to one image

I'm a newbie to vulkan, i read your code, but there is so many jump between the functions. The most one i cannot understand is that how to render multiple objects to one image, such as skybox,ball and the light.

Compile failed with VS2017

I followed your wiki, fisrt compile the external modules, it's all ok.But when compile the engine itself, there is too many errors:
image
It seems cannot find the standark lib of cpp, but i'm not famililar with VS.
There is also some errors like syntax error:
image

Rotations are broken

The parent-child relative rotation is broken, and must be fixed as soon as possible

About light module

Hello, i'm comeback again : )

Nowadays, i'm studying the light model.
Your engine are using the plane lights with a single light source, is right?
But what the principle to compute the shadow, any document will be helpful, thank you very much!

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.