All Projects β†’ tgfrerer β†’ Island

tgfrerer / Island

Licence: mit
πŸŒ‹πŸŽ Project Island is an experimental, hot-reloading Vulkan renderer/proto-engine for Linux, written in C/C++.

Programming Languages

c
50402 projects - #5 most used programming language
cpp
1120 projects

Projects that are alternatives of or similar to Island

Vulkan Renderer
A new 3D game engine using modern C++ and Vulkan API
Stars: ✭ 205 (-53.51%)
Mutual labels:  engine, vulkan, 3d-engine
SFE-Engine
A real time renderer based on Vulkan(LWJGL).
Stars: ✭ 20 (-95.46%)
Mutual labels:  engine, vulkan
RendererEngine
2D - 3D Renderer Engine builds with OpenGL, SDL2, C++
Stars: ✭ 17 (-96.15%)
Mutual labels:  engine, 3d-engine
Tinyengine
Tiny OpenGL Wrapper / 3D Engine in C++
Stars: ✭ 251 (-43.08%)
Mutual labels:  engine, 3d-engine
osre
An open source render engine
Stars: ✭ 95 (-78.46%)
Mutual labels:  engine, vulkan
even-laster-engine
Excess demo engine
Stars: ✭ 96 (-78.23%)
Mutual labels:  vulkan, 3d-engine
CLUSEK-RT
Vulkan based C++ ray-tracing game engine.
Stars: ✭ 24 (-94.56%)
Mutual labels:  engine, vulkan
storm-engine
Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.
Stars: ✭ 636 (+44.22%)
Mutual labels:  engine, 3d-engine
Isetta Engine
Novice-built game engine from the ground up (with blogs!)
Stars: ✭ 285 (-35.37%)
Mutual labels:  engine, 3d-engine
Gameplay
Open-source, cross-platform, C++ game engine for creating 2D/3D games.
Stars: ✭ 3,429 (+677.55%)
Mutual labels:  engine, vulkan
Vulkandemos
Some simple vulkan examples.
Stars: ✭ 413 (-6.35%)
Mutual labels:  engine, vulkan
pygfx
Like ThreeJS but for Python and based on wgpu
Stars: ✭ 72 (-83.67%)
Mutual labels:  vulkan, 3d-engine
Wasabi
Wasabi Vulkan Game Engine
Stars: ✭ 34 (-92.29%)
Mutual labels:  engine, vulkan
Yggdrasil-Legacy
Experimental Vulkan Renderer / Game Engine written in C++20.
Stars: ✭ 20 (-95.46%)
Mutual labels:  engine, vulkan
rbfx
Game engine with (optional) C# support and WYSIWYG editor.
Stars: ✭ 511 (+15.87%)
Mutual labels:  hot-reload, 3d-engine
3D-Engine-OpenGL-4
3D Graphics Engine For Games | C++ OpenGL 4.1
Stars: ✭ 19 (-95.69%)
Mutual labels:  engine, 3d-engine
Rbfx
Game engine with extensive C# support and WYSIWYG editor.
Stars: ✭ 356 (-19.27%)
Mutual labels:  3d-engine, hot-reload
vkOpenArena
Old games never die, they just fade away...
Stars: ✭ 58 (-86.85%)
Mutual labels:  engine, vulkan
goma-engine
A simple C++ 3D game engine with Vulkan support.
Stars: ✭ 34 (-92.29%)
Mutual labels:  engine, vulkan
Bansheeengine
Modern C++14 game engine with Vulkan support, fully featured editor and C# scripting
Stars: ✭ 2,906 (+558.96%)
Mutual labels:  engine, vulkan

Project Island πŸŒ‹πŸŽ

Project Island is an experimental Vulkan renderer/proto-engine for Linux, written in C/C++.

Island is written for rapid protoyping and tweaking. That's why it allows hot-reloading wherever possible: for c/c++ application code, GLSL shader code, even the renderer's own core modules. Each module aims to be strictly isolated, which makes the codebase fast to compile, especially in parallel.

Now with experimental support for Windows 10.

Build Status Build status

Main Features:

  • Vulkan backend: Island has a Vulkan rendering backend, which, on Linux, allows access to new and experimental GPU features soon after they are released. The renderer takes care of most of the bureaucracy which comes with modern APIs: Vulkan resources are automatically synchronised, and only allocated on demand. Most resource properties are inferred automatically based on the context of how the resource is being used. Pipelines are compiled and recompiled when needed. When compiled in Debug mode, Vulkan validation layers are loaded by default.

  • Hot-reloading: An Island project is made from isolated c/cpp modules, each of which can be tweaked, re-compiled at runtime, and automatically hot-reloaded. The same applies to GLSL shader source files.

  • Fast compile times: Because of Island's modular architecture, recompilation & reload often takes less than 1 second, while the project keeps running. Typically, compilation from scratch for the whole codebase takes less than 6 seconds, and (re)compilation of an app module takes less than a second.

  • Static release binaries: While Island is highly modular and dynamic when run in debug, it can compile into a single, optimised static binary for release.

  • Rendergraph: Rendering is structured using renderpasses. Renderpasses are executed on-demand and synchronised automatically by evaluating a rendergraph. If a renderpass is detected to have no effect on the final image, it is automatically pruned. For Debug targets, the rendergraph generates .dot files, which can be drawn using graphviz.

    graphviz-screenshot

  • GPU ray tracing Island supports RTX via the Khronos Vulkan raytracing extensions. Creating acceleration structures and shader binding tables is automated and simplified as much as possible. Ray tracing shaders can be hot-reloaded.

  • GPU mesh shaders gives you - optional - access to Nvidia-specific extensions for mesh and task shaders. These can be used in regular graphics pipelines.

  • Shader code debugging: Shader GLSL code may be hot-reloaded too. Any change in shader files triggers a recompile, and (Vulkan) pipelines are automatically rebuilt if needed. Shaders may include other shaders via #include directives. Error messages will point at file and line number, and include a brief listing with problematic lines highlighted in context.

  • Code tweaks: Near-instant in-code parameter tweaks for Debug builds (no need to recompile) by using a special TWEAK() macro.

  • Multi-Window Island allows you to hoop up multiple swapchains to a single application. This is particularly useful for multi-window scenarios. See example

  • Straight to video: Island can render straight to screen using the direct rendering swapchain, or use any number of available options for a window-based vulkan swapchain. It's also easy to render straight to an mp4 file, or an image sequence without showing a window, by selecting the appropriate le_swapchain specialisation.

  • Helpers: minimal effort to enable multisampling, import images, fonts

  • 2d drawing context: Draw thick lines and curves using le_paths, which specialises in 2d meshes. This module implements a useful subset of the SVG command palette, and includes some extras like for example a command to smoothen open or closed BΓ©zier curves by applying the Hobby algorithm. Thick BΓ©zier curves are drawn using an algorithm outlined by T. F. Hain.

  • glTF Island wraps cgltf for gltf file import, and the le_stage module can display and render most features found in gltf 2.0 files: pbrt materials, vertex animations, morph target animations, and skinning animations.

  • Job-system: Cooperatively parallel workloads can be implemented using the le_jobs module, which implements a job system using coroutine-like fibers. Both backend and render modules are designed to minimise resource contention.

Tools

Examples (more examples)

Island comes with a number of examples. No collection of examples would be complete without a hello triangle example, and a hello world example.

Hello triangle example Hello world example

A full list of examples can be found here. More examples to come.

Modules

Island projects can be built by combining any number of island modules. Each module aims to do one thing well, and to play nice with others. Modules are automatically hot-reloaded, if a change is detected and hot-reloading is active. Some modules provide their functionality by wrapping well-known external libraries, some are written entirely from scratch. Some of the most useful modules are listed here:

Module Wraps Description
le_camera - interactive, mouse controlled camera
le_path - draw svg-style paths, parse simplified SVG-style path command lists
le_tessellator earcut, libtess tessellation; dynamic choice of tessellation backend
le_imgui imgui graphical user interface
le_pixels stb image load image files
le_font stb truetype truetype glyph sdf, geometry and texture atlas based typesetting
le_pipeline_builder - build graphics, and compute pipelines
le_rtx_pipeline_builder - build Khronos RTX raytracing pipelines
le_2d - simplified 2d drawing context
le_gltf cgltf load and parse glTF 2.0 files
le_stage - render 3d scenes, display animations
le_timebase - timekeeping, canonical clock for animations
le_jobs - fiber-based job system
le_ecs - entity-component-system
le_shader_compiler shaderc compile glsl shaders to SPIR-V
le_window glfw window i/o system
le_swapchain - windowed, direct, or straight-to-video output
le_renderer - record command buffers, evaluate rendergraphs
le_backend - interact with GPU via Vulkan, manage GPU resources

To add a module, specify it in the application's CMakeLists.txt file. Modules may depend on other modules, and the build system will automatically include these dependencies. You can write your own modules - and there is a module template generator which provides you with a scaffold to start from.

Installation instructions

Island should run out of the box on a modern Linux system with the current Vulkan SDK installed.

Depencencies

Island depends on a few common development tools: CMake, gcc, git, ninja. These are commonly found on a development machine. Island also depends on the Vulkan SDK.

Install Vulkan SDK

Vulkan SDK >= 1.1.92.0

I recommend to install the latest Vulkan SDK via a package manager. Follow the installation instructions via: https://vulkan.lunarg.com/sdk/home#linux.

Arch Linux (Manjaro)

On Arch Linux, I recommend installing the following packages via pacman: shaderc vulkan-devel ninja cmake.

Building an Island project

🚨 If you freshly cloned the Island repository, remember to update submodules before proceeding.🚨

git submodule init
git submodule update --depth=1

Then move to the directory of the Island project which you want to compile:

cd apps/examples/hello_triangle/

Build using CMake:

mkdir build
cd build
cmake -G Ninja ..
ninja

Run your new Island Application:

./Island-HelloTriangle

Note: The CMAKE parameter PLUGINS_DYNAMIC lets you choose whether to compile Island as a static binary, or as a thin module with dynamic plugins. Unless you change this parameter, Debug builds will be built thin/dynamic with hot-reloading enabled, and Release builds will produce a single static binary with hot-reloading disabled.

IDE support

I recommend using the freely available QT Creator IDE, it allows you to directly open CMake project files, and integrates pretty seamlessly with the Island workflow: running, hot-reloading, then setting a breakpoint, and then stepping whilst inspecting state in the debugger just works. Alternative IDEs are of course available, and as long as they support CMake project files, should work. When running an Island app with the debugger in Qt Creator, it's important to check that Run in terminal is disabled - this can be specified in the Run Settings dialog.

Auto-recompilation on save using entr

If you prefer to work without an IDE, but wish a setup where apps get recompiled as soon as a source file changes, the following Linux-based setup is pretty nice:

    cd apps/examples/hello_triangle
    mkdir build
    cd build
    cmake -G Ninja ..
    # and then 
    git ls-files ../.. | entr ninja &

entr(1) is a great utility, which runs a command on file change. The last line of the above script causes ninja to run as soon as any of the files checked into the github repo at hello_triangle change.

Experimental Windows 10 support

Island can compile and run natively on Microsoft Windows - with some caveats. Progress of the Windows port and Windows-specific build instructions etc. are tracked in a separate readme.

Caveats

Note The API is under active development, expect lots of change. As such, there are no promises that it might be ready or fit for any purpose, and the code here is released in the hope that you might find it interesting.

The initial motivation for writing Island was to experiment with a modern rendering API (Vulkan), to learn by trying out ideas around modern realtime-rendering, and to have a framework to create visual experiments with.

Acknowledgements

I would like to thank the folks at our machinery for their wonderful blog posts on engine architecture and hot reloading, these were a big initial inspiration for this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].