GithubHelp home page GithubHelp logo

sdslabs / rootex Goto Github PK

View Code? Open in Web Editor NEW
210.0 8.0 33.0 677.06 MB

An advanced C++ 3D game engine powering an in-production game yet to be announced

Home Page: https://rootex.readthedocs.io/

License: Other

CMake 0.86% Batchfile 0.24% C++ 91.95% C 1.27% Lua 0.19% HLSL 5.49%
game engine cpp17 gamedev c-plus-plus directx directx-11 bullet-physics openal lua

rootex's Introduction

Rootex

MIT License C/C++ CI Documentation Status Discord

Contents

Rootex is an advanced C++ 3D game engine powering an in-production game yet to be announced. The game will finally ship on Windows and use DirectX 11.

Find the upcoming features and the game's public Trello board here!

Features

  • Based on the popular Entity-Component-System architecture
    • Allows performance benefits due to better CPU cache usage. However over-optimizations are not the goal
    • Uses an impure ECS where components can have functions
  • Full editor GUI implemented in ImGui
    • Similar interface as other popular game engine editors for added familiarity and ease of use
    • Readable asset files (100% JSON)
  • 3D DirectX 11 renderer
    • Dynamic and static Phong-model lighting
    • High resolution textures for Diffuse, Normal, Specular and Light mapping
    • Post processing effects like gaussian blur, bloom, Adaptive SSAO, FXAA, including ad-hoc sepia, black-and-white, tonemapping
    • Mildly configurable CPU based particle effects
    • Effekseer Particle effects integration available for high quality VFX
    • Environment effects like Sky sphere, sky reflections, refractions and depth fog
    • Supports basic transform and skeletal animations
    • Automatic LOD (level-of-detail) generation for 3D models and animations
    • Custom materials using custom HLSL shaders
    • And few more things...
  • RmlUi integration which allows writing/debugging UI overlays in an HTML/CSS-like language and Lua
  • Physics engine powered by Bullet Physics 3, allows an easy-to-work-with interface for making physics simulations
  • OpenAL-Soft based audio engine supporting 3D attenuation and stereo sound
  • Lua scripting engine with functionality exposed for easy game curation
    • Uses an object-oriented approach with Lua scripting for making intuitive scope declarations and reducing garbage generation
    • Lua debugger integration
    • Equipped with a tweening API provided by flux
  • Applies the event-based programming paradigm for better maitainability of game code
  • Being developed for an actual game
  • Documentation

Rootex is the direct successor of Rubeus, our 2D Game Engine. Rubeus Engine is not being maintained and is being preserved. Newer features will only be planned for Rootex. The game being developed will be announced soon as well.

Rootex runs only on Windows and there are no plans to port it to other platforms.

  1. Install Visual Studio 2022 or Visual Studio 2019, CMake build system.
  2. Install Visual Studio Desktop C++ development pack (or anything similar, since C++ is no longer a default language since at least Visual Studio 19)
  3. Run generate_cache.bat /22 for VS 2022 or generate_cache.bat /19 for VS 2019.
  4. Use build.bat to build Rootex.

Assets Workflow :

  1. Assets are stored in separate repositories and added as git submodules. The testing assets are stored at https://gitlab.com/sdslabs/rootex-assets while the assets for the game are stored at https://gitlab.com/sdslabs/rootex-game.
  2. The assets.bat script has two subcommands to make switching of the submodules between the testing and game repository easier. Use assets.bat assets-test to switch to the test repository and assets.bat assets-game to switch to the game repository. The submodule will have two remote urls set. The origin points to the HTTPS url while upstream points to the SSH url.
  3. You can also add your own repository as an assets submodule. Use assets.bat assets-custom <url> for that. If setting a custom url, use an HTTPS url here and then set an SSH remote afterwards.

WARNING : Running assets.bat will delete the game/assets/ folder. Be sure to backup any unsaved progress before running it.

Now you can start reading the documentation and build games on Rootex!

NOTE: If you get the error dxgidebug.dll not loaded while opening the Rootex Editor, install Graphics Tools by following this guide.

Read here to know our contribution guidelines. Join our Discord server or optionally ping us at chat.sdslabs.co to get guidance. You can start with setting up Rootex on your Windows machine and try solving a few bugs listed here: https://github.com/sdslabs/Rootex/issues

This project is under the MIT license. See THIRDPARTY.md for thirdparty license notices.

rootex's People

Contributors

allmight2099 avatar allrounder27 avatar angad-k avatar aviii06 avatar bashar-ahmed avatar bisht13 avatar burnerlee avatar capriciousrebel avatar h4shk4t avatar ishan-002 avatar jainl28patel avatar leshnabalara avatar mayankmittal1 avatar meetcshah19 avatar murex971 avatar nehagujar1 avatar p3rcy-8685 avatar r41k0u avatar ridhwandll avatar shreyaa-s-zz avatar sickaada avatar sin3point14 avatar techiepriyansh avatar twaritwaikar avatar wryonik 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  avatar  avatar  avatar  avatar  avatar

rootex's Issues

OBJ file loading issue

image
This renders as this-
image
again stolen from @IronicallySerious
Please leave the obj and level files here

Undestructed objects left during shutdown

Several DXGI objects are left in an non-destructed state at shutdown. We should pin these down and clean things up. ComPtr would be a valid consideration for this. Initially, ComPtr was discouraged from use to keep out dependency stack as flat as possible.

Shutdown logs from Debug output:

The thread 0x3bd0 has exited with code 0 (0x0).
The thread 0x3a48 has exited with code 0 (0x0).
The thread 0x3e1c has exited with code 0 (0x0).
The thread 0xa7c has exited with code 0 (0x0).
The thread 0x37c0 has exited with code 0 (0x0).
The thread 0x1574 has exited with code 0 (0x0).
D3D11 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Producer at 0x000001F62C0EA190, Refcount: 3. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C0EC0E0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312A0FD0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C0A2E00, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C0E3790, Refcount: 201. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C109720, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C109990, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C1100E0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C0D15F0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C11DDF0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C11EB40, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C0CC5F0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C1104A0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C0CD1E0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F62C0D6310, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312D7E20, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312FA970, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312B8E30, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312D4F30, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312CF590, Refcount: 201. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F63130E820, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312D5780, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F6312E5B50, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F63130B770, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x000001F63130BFC0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live                         Object :     24 [ STATE_CREATION WARNING #0: UNKNOWN]
DXGI WARNING: Live Producer at 0x000001F62C0C48A8, Refcount: 4. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x000001F62C0D8E60, Refcount: 2. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: Live                         Object :      1 [ STATE_CREATION WARNING #0: ]
The program '[300] Game.exe' has exited with code 0 (0x0).

Undefined CMake variables on CMake build

1> Working directory: D:\CPP Projects\Rootex\out\build\x64-Debug
1> [CMake] -- Configuring done
1> [CMake] CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
1> [CMake] Missing variable is:
1> [CMake] CMAKE_C_COMPILE_OBJECT
1> [CMake] CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
1> [CMake] Missing variable is:
1> [CMake] CMAKE_C_ARCHIVE_CREATE
1> [CMake] CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
1> [CMake] Missing variable is:
1> [CMake] CMAKE_C_ARCHIVE_FINISH
1> [CMake] -- Generating done
1> [CMake] CMake Generate step failed.  Build files cannot be regenerated correctly.
1> [CMake] 
1> cmd.exe /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\CPP Projects\Rootex\out\install\x64-Debug" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/HostX64/x64/cl.exe"  -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\CPP Projects\Rootex" 2>&1" returned with exit code: 1

Add serialization

Component data saving and loading is an essential feature for both the editor and the game's saving and loading feature. Use JSON or some other serialization format or a C++ serialization library to save runtime data.

Add Localisation engine

We are using text string in the editor and soon we will need them in our game. We should create a localization engine that takes care of the organization of different readable strings in different languages.

Integrate imgui for early debug menus

We will eventually need imgui editor menus and very fast this should be tied into the renderer and our visual component graph to implement transform editing gizmos

Add color modifier to DVC

DVC inherits from VC. This means that DVC also has a field named m_Color and we can use it to modify the final image that appears on the face of the DVC. Could also be used as a game mechanic

Rename functions in RenderingDevice to conform to conventional naming strats

Some functions in RenderingDevice are just obscure. They do something else entirely.
E.g.

ID3D11Buffer* initVertexBuffer(D3D11_BUFFER_DESC* vbd, D3D11_SUBRESOURCE_DATA* vsd, const UINT* stride, const UINT* offset);

You cannot init a vertex buffer because we have multiple instances of vertex buffers. Rename to create*
Same with index buffers, pixel shader, and vertex shaders.

Go fullscreen

Add fullscreen settings in window.lua to allow rendering in fullscreen. Consequently, we will also need resolution settings to be made available too

UI appears below world entities

image
Steps to repro:

  1. Add a cube
  2. Add another cube, but remove VisualComponent and add a TextVisual2DComponent
  3. Set the origin so that the text overlaps with the cube

Profiling

The engine is now slowly starting to become bulky and before our performance falls down to a slog, we need to have at least 1 profiling and performance fixing needed to be done before we start implementing the game.

The thread below will only contain profiling reports collected over time

Add CPU based 3D particle system

Particle systems are one of the easiest and the nicest effect possible to make and CPU based particles make for a simpler implementation.

This project will involve making a 3D particle handler and a particle generator or similar constructs. They should have support for semi-randomized motion, ability to configure them to display user-defined visuals of the particle systems, and optionally implement collision enabled particle systems.

Add position based attenuation in sound sources

OpenAL provides 3D attenuation based on a 3D position. Use it.

This may require AudioComponent and AudioSystem already made because this will use TransformComponent to get the 3D position

Add Anti-aliasing in editor viewport

Anti-aliasing has been added to master, but only for when the game is being run. The anti-aliasing feature should also be tested with the editor for an easier workflow

Fix spelling error....

In os/thread.cpp

	__int32 m_Permisions;
	Vector<__int32> m_Permissions;

what is this...

Double deletion of StreamingAudioBuffer type in AudioSystem

Runtime logs:

D:\CPP Projects\Rootex\rootex\core\audio\audio_system.cpp:deregisterInstance: AudioSystem: Tried to double deregisterInstance a StreamingAudioBuffer. Delete aborted.
D:\CPP Projects\Rootex\rootex\core\audio\audio_system.cpp:deregisterInstance: AudioSystem: Tried to double deregisterInstance a StreamingAudioBuffer. Delete aborted.

Lighting shenanigans

image
Lighting seems to be affecting non facing vertices
stolen from @IronicallySerious
Please leave level files here

Add normal map textures

Add DirectX support for normal mapping, which lets us mimic shadow on minute details with relatively less processing power.

Add shadow rendering

Shadows are an essential part of 3D graphics realism. We should develop support for some basic shadow mapping

Add the ability to change the name of an entity

Changing names is very much required because all the entities that the user can make in the game come from entity-classes, which are predefined entities that we have provided. The entity-classes have default names and almost every time they are needed to be changed.
image
This is clearly a teapot and not a cube

Documentation March 2020

Rootex needs documentation. We are moving quite fast in terms of the amount of code being committed to master every week. With each day we are also forgetting what that code does piece by piece and we cannot notice that happening.

A readthedocs.io page should be set up and reStructured text docs should be written ASAP.

A documentation website has been set up here: https://rootex.readthedocs.io/ \(@^0^@)/

Read the documentation instructions here: https://github.com/sdslabs/Rootex/blob/master/docs/README.md

  1. You don't really need to build the documentation yourself to check stuff every time you add doc comments. Just send a PR that adds /// Documentation comments to our source files strictly adhering to the Documentation README linked above.
  2. This goes on till the end of the linked Github milestone.

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.