#Lit Engine - Legacy (raylib) & Reboot (glfw)

2581 messages · Page 3 of 3 (latest)

wintry spear
#

this would ease the learning curve

#

I think

brisk moat
#

They use it in Unreal and in their last released game.

wintry spear
#

seems interesting

#

I read the readme in the diagonal but does it allow to make changes to the code with minimal compilation?

brisk moat
#

Yes, I hot reloaded the code without recompiling the engine. It's basically interpreted c++. You can then compile parts of it if you want so as to not have a heap of interpreted code.

wintry spear
#

this is awesome

brisk moat
#

Their interpreter is not geared towards high performance but performs well in general.

wintry spear
#

and when the file is no longer being edited can it be fully compiled or does it still get "interpreted"?

brisk moat
# wintry spear this is awesome

It's not perfect BTW, but is good for scripting. It's not a one to one to c++ but Arturo is really active and fixes things quite often.

brisk moat
wintry spear
#

I will definitely take a look into it. thank you!

brisk moat
#

If you have any questions on either luau or cflat you can ask me for pointer's. There's also q3vm for C scripting but sadly that's C89, working on fixing that personally.

wintry spear
#

ok. school also restarted this week and it's exam year so I don't know if I can work on Lit that much before the summer break

brisk moat
#

Yeah, np. I do things when I have time too. That's the way life goes I guess 😛Have a good semester.

wintry spear
#

thank you

rocky nova
#

lua is faster than python

#

have you tried angelscript?

#

it's really similar to C++

#

but if you want compiled C++, oh boy

wintry spear
#

yes but mojo can come in handy

rocky nova
#

why couldn't you just ship something like g++ on windows

#

w64devkit is relatively small

wintry spear
#

i will provide both c++ and python/Lua support, but I haven't started working on c++ scripting yet because I like to work on it closer to the release after all the features are implemented. I will research what is the best approach for c++ and I haven't ruled anything out just yet. My main concerns are Lit Engine compatibility, compilation time/performance (I don't want to wait 10 seconds to reload a script after I change a variable) and out of the box cross-platform support.

zenith current
#

@wintry spear if you make a simple enough interface for the engine for scripting, I'm pretty sure I'd be able to port BQN. it'd be very cool.
Since not a lot of people use BQN, I'll likely just make a fork of your project with BQN, and update it to your master branch from time to time.

rocky nova
#

You are supposed to eat it

wintry spear
#

Is this BQN?

#

how do I type these characters on my keyboard?

zenith current
# wintry spear Is this BQN?

yes, though seems some of the symbols aren't in your font since there are some rectangle characters there. I think your font is missing and

zenith current
zenith current
wintry spear
#

this language's syntax looks so weird. is it like Haskell?

zenith current
rocky nova
#

not the functional programming

zenith current
#

why not? :o

rocky nova
#

i dont like it

zenith current
#

(I'm assuming you not liking it means you've tried it, though i could be assuming wrong)

zenith current
#

ah, BQN's isn't pure, and pure functional programming is way more restrictive.

rocky nova
#

i dont even know what that means

#

lmao

zenith current
#

pure means you can't mutate variables, and BQN allows you to mutate variables.

rocky nova
#

overrated fp

zenith current
#

why?

rocky nova
#

because i said so

#

😛

zenith current
#

do you mean overrated pure fp? like, are you thinking of fp being the same as pure fp?

rocky nova
#

yes

zenith current
#

ok, cool

rocky nova
#

i cant even think about what to do with this knowledge

zenith current
#

assuming you mean knowledge of using functional languages, well, you use the knowledge when you use a functional language

#

¯_(ツ)_/¯

rocky nova
#

bruh

#

using bqn is better than haskell?

zenith current
#

I guess BQN got me hooked better than haskell. I did try haskell before learning BQN but I didn't keep using haskell but i did keep using BQN.

rocky nova
#

ohk

zenith current
#

it did feel very out-of-line compared to other langs, but i've gotten used to it. When you get used to something, it gets a lot less weird, so i don't think it's weird anymore.

wintry spear
#

Off topic: I'm making an experimental Operating System in C.

#

this has a "fake" filesystem because it only stores the files in memory and not in the disk

rocky nova
#

at first it seems wierd to use python for a game engine

#

but actually all games made by net ease games using their NeoX engine are made with python

#

such as creative destruction

#

identity v

wintry spear
#

many other game engines do to such as panda3d

hollow narwhal
wintry spear
#

osdev is a real pain in the ass

#

disk io and networking are impossible

wintry spear
glass stratus
wintry spear
#

thanks for the review, I'll check up on that. I'll submit an update by the weekend.

edgy dirge
wintry spear
#

I will review it with some people in marketing and web design to see what they'll think before making a decision. but if a decision to change the text is made it will only be implemented on the weekend

glass stratus
#

Cool

glass stratus
# wintry spear I will review it with some people in marketing and web design to see what they'l...

Scrolling down the site, I notice multiple potential language issues:

Why did we made Lit Engine?

Should be make. It should be noted that it is uncommon to speak from a we side in the type of professional enterprise-esque marketing you are doing.

To make your imagination breath.

This might hold some meaning in another language, but it is not idiomatic in English.

Write code from the editor and never worry about performance, as our Auto LOD system lifts you. Create stunning cross-platform visuals quickly.

I have never heard a tool lift somebody in a poetical sense.

Download the latest version and follow our Manual to start your journey with Lit Engine.

Manual should not be capitalised as it is not a proper noun.

edgy dirge
#

Breathe would probably fit. It still sounds weird but better

#

Auto LOD could do the "heavy lifting for you" 🤷‍♂️

fiery crystal
lapis pawn
#

your website has some "performance" issues on Samsung S23. not a big deal but still I wanted to inform you tho

edgy dirge
#

Lol I just tried it. It hurts

wintry spear
wintry spear
wintry spear
wintry spear
# lapis pawn

the website is more optimized too so it should be quicker. I will test it on my phone when it is deployed.

wintry spear
# lapis pawn

the website doesn't seem to lag on my end, but some js animations take around 400ms to play

rocky nova
#

ive got a keypad phone with armv5

#

i wanted to emulate the cpu to run the firmware

#

but hell no it would take years

#

🤣

wintry spear
#

I had an hour and a half to work on the material editor and the results look promising

#

normal map intensity: 0.57 vs 0.9

long hornet
#

this happens when I try running the engine or the exported game on windows, could you include the dlls in the download or statically link the libraries?

wintry spear
wintry spear
#

I've optimized the rendering system with several improvements. Benchmarks were run locally, so results may vary across systems.

Each test was conducted with all apps closed except VS Code. The CPU frequency was capped at 2GHz, and benchmarks ran for ~20 seconds with a PBR example, recording the average FPS.

Performance Gains:
-- Baseline: 550 FPS

1 Auto-Exposure fully GPU-driven (no CPU usage): +400 FPS
2 Reduced GLSL temp variables & computations: +30 FPS
3 Texture compression: +80 FPS

-- Total Improvement: 550 → 1060 FPS

System Specs:
-- CPU: 11th Gen Intel i7-11370H (8) @ 4.8GHz
-- GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q

Bottlenecks Fixed:
-- High VRAM consumption (textures)
-- Shader branching
-- Unnecessary synchronization between the GPU and the CPU, stalling the render pipeline

Next Steps:
-- Further memory optimizations
-- Reduce shader branching

The github commit will be submitted shortly.

#

After finishing the optimizations I will work on the build system as many users have been having difficulties with it.

edgy dirge
#

Ah I see it in the commit. Dxt1

wintry spear
#

yeah

wintry spear
#

1070FPS after some small memory optimizations.

wintry spear
#

1090 FPS after some more intense texture compression

wintry spear
#

I will now start working on the build system. Many users had trouble downloading the repository, especially on unstable networks. I'm now decreasing .git size from 4GB to hopefully less than 2GB and checking submodules settings

jaunty flower
#

Just a tip, try to measure performance in ms/frame instead of FPS as FPS is a surprisingly bad performance metric

#

A jump from 500 to 1000 FPS is much less than 2 FPS to 4 FPS

wintry spear
#

Linux build system fix coming soon

wintry spear
#

Linux build system for Debian based distributions is now updated and fixed. For other non-Debian/Ubuntu distributions install/install.sh may need to tweaks. This file is responsible for installing some dependencies (such as g++, python3.12, some libraries, etc.) I ask those who use one of the following package managers yum, dnf or pacman to try and build Lit Engine. If any issues arise, the most likely issue to blame is missing libraries that weren't downloaded and installed from the script.

#

if any issues are found feel free to ping me

#

I will start working on the Windows build system probably in the summer

wintry spear
#

I also removed some unnecessary directories which contain many files, that's why I have -27k lines removed.

wintry spear
#

CI is now implemented

lean eagle
#

Whatever you have been doing... Everyone needs to understand what amount of work and dedication is involved. I do little games (still @ the try stage), and even that feels like it is something to me. To do an entire Gengine is immense. Kudos. Great work.

wintry spear
#

Thanks! Even small projects take effort, so keep at it.

wintry spear
wintry spear
#

Are these AAA graphics?

edgy dirge
#

That looks like stable diffusion to me

wintry spear
#

idkw but gnome's screen cast is laggy. Here's a small update. Now the police (aka. small cube) follows you when you're near.

wintry spear
rocky nova
#

real

wintry spear
#

Hey everyone!
I'm working on the Material Shader Generator for Lit Engine - the goal is to make it really intuitive and powerful, with node-based Master Materials and customizable Child Materials. I'm at the point where I need to figure out how to best structure materials in the engine, and I’d love your input.

Here are a few things I’m trying to decide:
-> Where and how should Master Materials be stored?
Should they be saved as files (e.g., .mat templates), embedded in scenes, or how?

-> How should inheritance be handled?
What's the best way to link a Child Material to its Master Material, and override values without duplicating the whole node graph?

-> How would you imagine creating a Child Material?
Would it feel better to "instantiate" it from some kind of menu? Or maybe via a right-click option? Or maybe in a new window just for materials, similar to Objects List? What way feels more intuitive? (I'm accepting other ideas too)

-> What kind of UI would be most intuitive?
Should selecting a Master Material happen via a dropdown in the entity inspector? Or something more visual like a drag-and-drop system or preview list? What should the behavior be?

If you've used Unreal’s Material Instances, Unity's Shader Graph, or anything similar — I'd love to hear how you'd approach it or what you liked/didn’t like about those systems. Thanks a ton!

wintry spear
#

Should Master Materials be named Material Blueprint?

wintry spear
#

Material Blueprint Extension: .matblueprint
Child Material Extension: .mat
Materials are saved in project/Materials/

Inheritance:
A Child Material or just Material is a lightweight wrapper referencing a Material Blueprint + override table (no node graph copy).

Example of Child Material:

{
  "blueprint": "project/Materials/Metal.matblueprint",
  "overrides": {
    "var1": "#FF0000",
    "var2": 0.2
  }
}

How do Create a Child Material?
Right-click in Material Blueprint -> "Create Child Material" in the asset explorer.
Materials and Blueprints can only be created inside project/Materials which can't be deleted.

Example of the Desired Workflow:

  1. Open project/Materials/ in the assets explorer.
  2. Right-click -> "Create Blueprint Material"
  3. When the blueprint file is selected a new window appears to create the blueprint using nodes. There will be prefabs to choose from.
  4. Material is automatically saved.
  5. Right-click "Blueprint Material" -> "Create Child Material"
  6. Drag Child Material to the entity object in Scene Editor, Objects List, or Entity Inspector
  7. Edit the values and regenerate the shader in realtime.
#

Do you agree with this workflow? Are there any issues? Do you think this approach is intuitive?

wintry spear
#

Do you agree with this material blueprint json design?

{
  "name": "Metal",
  "graph": {
    "nodes": [
      {
        "id": "1",
        "type": "TextureSample",
        "position": [100, 200]
      },
      {
        "id": "2",
        "type": "Multiply",
        "position": [300, 200]
      },
      {
        "id": "3",
        "type": "BaseColorOutput",
        "position": [500, 200]
      }
    ],
    "connections": [
      { "from": "1", "fromSlot": "RGB", "to": "2", "toSlot": "A" },
      { "from": "2", "fromSlot": "Result", "to": "3", "toSlot": "Color" }
    ]
  }
}
lean eagle
#

C++ scripting is required for this engine?

wintry spear
#

python scripting is already implemented and it will be enhanced. C++ is also expected to be implemented in this version.

edgy dirge
#

How would it handle multiple input? Or outputs?

wintry spear
#

currently you can only use multiple outputs, such as a Slider being used in many nodes

#

since we convert the graph into a tree, each node behaves separately

#

however, there aren't multiple inputs now because the tree wouldn't work

wintry spear
#

Work in progress!

Key changes:
-> Implemented UUIDs (Universally Unique Identifiers) for all material nodes
-> Separated materials into Blueprints and Children
-> All materials and nodes are now stored using hash maps
-> Added save/load support for both Blueprints and Children
-> The Node Editor is now a dedicated window
-> The Inspector now exclusively inspects Child Materials

#

Note: Materials are not currently usable. This commit still requires much more work.

wintry spear
#

Testing Material Inspector with a new UI choice

#

what do you think of this table like structure?

#

The UI is just a prototype and it is not finished. What do you think I can improve in it?

wintry spear
#

Materials are now usable!
However, there are some limitations:
-> Changes made to a blueprint at runtime will not take effect until the engine is restarted.
-> Materials do not compile automatically on load; manual compilation is required.
-> When a material is compiled, it currently updates the global shader for all entities—meaning the material is applied globally rather than per-entity.

#

After fixing these limitations, the feature will be manually tested, optimized and reviewed.

wintry spear
#

I've been working a bit on the website over the last 2 hours. Here are some sneak peeks.

#

What do you think?

meager frost
#

Pretty cool! Do the articles open to their own pages?

wintry spear
#

each blog page is a separate html page

wintry spear
wintry spear
#

Materials are reviewed. You can try or review the changes yourself on GitHub.

wintry spear
#

irradiance + vignette effect

wild pivot
#

no examples yet?

wintry spear
#

I will make some templates after

wintry spear
#

Good news. Irradiance is almost working. Now the values (all faces of the irradiance cubemap) are consistence (aka. the faces have low frequency/are blurry) but they are not in the correct position.

wintry spear
#

I will review it later. As far as I know, bright skybox faces have the correct irradiance values however those that have medium luminosity appear darker than they should

#

Here are some extra screenshots

wintry spear
#

Good night. I rewrote most of the PBR shader to produce more realistic and optimized results, with a more readable structure. There's also a BRDF look-up table (LUT) which removes some expensive computations from the PBR shader.

#

Additionally, a fallback lighting model was implemented and is active for all shader fragments that are 100+ units away from the camera. layouts were also implemented for in/out vars, making the shader's assembly analyzable in renderdoc.

#

These changes made the whole project render a frame in less than a ms, making the PBR shader bottleneck negligible for simple scenes with few materials.

wintry spear
#

chromatic aberration

wintry spear
#

Testing SSAO before trying SSGI.

#

really noisy for now

wintry spear
#

No noise now. SSAO isn't appearing for nearby geometry and there are still many visual artifacts

wintry spear
#

Simple SSGI (I still have to reduce noise and reimplement AO) but color bleeding is working.

wintry spear
#

the noise is generated from monte carlo's approach.

#

I will research importance sampling and other algorithms to fix it.

tame ermine
#

You could also consider using denoising libraries

wintry spear
#

yes, but they don't actually fix the issue, they just hide it.

#

The fact that I'm sampling too many rays is a problem both in terms of performance and visual fidelity

wintry spear
#

I'm looking into other implementations like Lumen and getting ideas from them. I can do caching, importance sampling, Hi-Z, cones, etc.

#

Temporal denoisers which are the algorithms AAA studios use add visual artifacts which is not ideal

wintry spear
#

hey. I'm exploring a very fast, O(1) per-pixel GI technique that avoids loops in the pixel shader, temporal accumulation (so no ghosting artifacts), and probe volumes, while still supporting fully dynamic scenes. The goal is to get some decent indirect lighting effects like color bleeding and directional ambiance at very high frame rates, even on less powerful hardware.

The Core Idea: Tiled Spherical Harmonics GI

I will first divide the screen into a grid of tiles (say, 32x32 pixels each).
-> Per-Tile "Light Bake" (Compute Shader):
-> For each tile on the screen, we run a quick compute shader.
-> Inside this shader, for each tile, we shoot a very small, fixed number of "mini-rays" (such as, 8-16) from a few sample points within that tile.
-> These "mini-rays" do a simple screen-space check: they basically peek at the depth buffer once or twice to see if they hit anything nearby. If they hit something, they grab its color; otherwise, they might grab a skybox color or irradiance color.
-> All the light information gathered by these mini-rays for a tile is then compressed into a small set of numbers called Spherical Harmonics (SH) coefficients (just 9 floats for 2nd-order SH).
-> This whole process is very cheap because we're only doing a few dozen of these mini-traces per tile, not per pixel.

-> Per-Pixel Lighting (Fragment Shader):
-> Now, when we render each pixel on the screen:
-> It figures out which tile it belongs to.
-> It fetches the 9 SH coefficients for that tile (just 2-3 quick texture lookups).
-> It uses its own surface normal to "evaluate" the SH. This means it consults the SH "light probe" to see how much light it should receive from different directions based on its orientation. This is just a few math operations (9 dot products).
-> This indirect light is then tinted by the pixel's albedo and added to the direct lighting.

#

Why is this cool?
Fast Pixels: The per-pixel cost is constant and tiny – a couple of texture fetches and a few multiplies/adds. No loops, no complex ray marching in the pixel shader.
Low Memory: We only need to store the SH coefficients for each tile, which is a very small texture.
No Ghosting/Temporal Issues: Everything is calculated fresh each frame.
Dynamic Scenes: Works perfectly with moving objects and lights because the SH bake happens every frame using the current scene's G-Buffer.
Effects: Can provide low-frequency color bleeding and a nice directional ambient term.

Potential Challenges/Trade-offs:
Blockiness: Since all pixels in a tile use the same SH data, there can be visible seams at tile edges. This can be mitigated by interpolating SH data from neighboring tiles (adds a bit to pixel cost but still very fast).
Low-Frequency Detail: SH (especially 2nd order) can only capture smooth, general lighting. Don't expect super sharp indirect shadows from this alone. It's more about broad ambiance and color wash.
"Mini-Ray" Quality: The realism of the GI depends on how well those few "mini-rays" in the compute shader capture the surrounding light.

I'm planning to implement this and see how it turns out. It seems like a promising way to get some GI goodness without breaking the performance bank! Wish me luck! 😅

wintry spear
#

I'm moving into phase 1: Compute shader.

wintry spear
#

-> Compute shader: Receives all the correct normal values. Generates a pixelated (tiled) texture with the normal of each pixel - debug/test.

#

Now I will try to compute the final texture of this stage.

wintry spear
#

It's dark (I think it is supposed to be dark) but here is the result. A wall that's green and blue

wintry spear
#

There were several improvements. I'm currently using 11 textures (9 coeffs, color tex and normal tex), which are exceeding the max number of textures I can use, so I will be packing textures together. And for some reason, not all coeffs are being passed into the gpu frag shader. However, I believe that after fixing those issues the algorithm should produce some realistic results.

#

These are some of the coeffs that were generated for each frame.

wintry spear
#

I gave up

#

I couldn't get color bleeding or ao to work

worldly marlin
#

looked kinda promising

#

like screen space light propagation volumes

wintry spear
#

yes, but I couldn't get any GI effect besides artifacts

wintry spear
#

I did git reset --hard but there's a copy of some files somewhere. I can try and give it another try

remote raptor
#

wow impressive project since 2 years ago nice 👍🏻 👀

#

maybe some day raytraced audio....

wintry spear
wintry spear
#

What is your opinion on current game engines? What problems do they have that you don't like?

wintry spear
#

Hi. I have national exams in the near future so I'm temporarily uninstalling discord

wild pivot
#

also, I wonder if you could take inspiration from blender's Evee renderer, since it's pretty fast and maybe suitable for games?

wintry spear
#

Hi. Since it's Friday I decided to reopen discord. I also decided to take an hour to redesign the World Inspector. What do you think?

wintry spear
wintry spear
wintry spear
#

Finished UI. I will push it to the repo and get back to studying.

wintry spear
#

This is probably the comment that inspired the default UI theme of the engine. 😅

wintry spear
#

Alright, I ended my exams! Let's get to work.

#

Plan: Since I'm a bit tired of working on the graphical side of the app (UI and Rendering), I'll be focusing on the scripting.

#

I will start working on the entity logic.

#

Features to implement: Finding all entities with set name. Find entity by id, improve entity creation, add child and remove child

#

What other features do you think the entity logic script must have?

#

You can already modify the entity transforms, name, flags and physics

wintry spear
#

Here is an example code using the functions added to the engine:

MOVE_SPEED = 30.0
CHILD_ENTITY_NAME = "b"

def _manage_children(action_func):
    print(f"Finding entities named '{CHILD_ENTITY_NAME}' to {action_func.__name__}...")
    for child in filterEntitiesByName(CHILD_ENTITY_NAME):
        action_func(child)

def update():
    x_axis = IsKeyDown(Key.D) - IsKeyDown(Key.A)
    z_axis = IsKeyDown(Key.W) - IsKeyDown(Key.S)

    move_direction = Vector3(x_axis, 0, z_axis)
    entity.position = entity.position + move_direction * MOVE_SPEED * time.dt

    if IsKeyPressed(Key.SPACE):
        _manage_children(entity.addChild)

    if IsKeyPressed(Key.R):
        _manage_children(entity.removeChild)

    if IsKeyPressed(Key.N):
        print(f"Creating a new entity named '{CHILD_ENTITY_NAME}'...")
        Entity(name=CHILD_ENTITY_NAME)
#

Previously, entities list was directly exposed to the engine via a py::cast - which was immutable and could create segfaults under certain conditions. Instead a new function was added that would return a python list with all entities every time it is called.

#

Since all entities are stored in a c++ container, if it gets resized (via allocation or deallocation), the references of all Entities could change. Since the keyword "entity" - script's entity - was exposed as py::cast(this), if the container resized, entity would return a null pointer or an invalid address, causing a segfault. To solve this, a new class called EntityHandle was created. It stores the entity's id and contains a function called get that will retrieve, in average scenario O(1), the entity.

#

Besides those main changes, more functions were created and exposed via pybind's API.

bleak bough
#

I am trying to build the source code from main branch. when I do the build dependencies.sh I get an error. pls help

wintry spear
#

Don't worry about build_dependencies

#

I'm currently exploring a new build system and I moved all dependencies compilation to the cmake side

#

They will get compiled when you call cmake .. && make

bleak bough
#

ahh nice

wintry spear
#

Let me know if it compiles

#

Also, from what I'm seeing I'm not sure if the git submodules were cloned. Is Include/squish empty?

bleak bough
#

hmm I think so.

wintry spear
#

Alright, to clone all the submodules you can run this git command: git submodule update --init --recursive --depth 1

#

This should shallow clone all the submodules

bleak bough
#

hmm weird. maybe have to clone the main again ?

wintry spear
#

This means that those directories are not empty, it's possible that it's just a .git folder that is not listed in ls.

#

You can either remove the .git directory from those submodules and retry the command, or reclone the engine using the command git clone --recurse-submodules --shallow-submodules -j2 https://github.com/luis605/Lit-Engine

bleak bough
#

ls

wintry spear
#

were the submodules cloned?

bleak bough
#

ya ok I see the steps work

wintry spear
#

alright. if the engine fails to compile let me know

bleak bough
#

damn hmm

wintry spear
#

Alright, raylib failed to compile. I'm using an older version of raylib so the newest may be failing. Let me review it and I'll get back to you.

bleak bough
#

oh ok thanks

wintry spear
#

Alright, raylib compiled on my machine and the raylib error is a warning on my machine

bleak bough
#

I see, so this error will take a while to fix?

wintry spear
#

no, not at all. There must be some flag I can pass to force the compiler to ignore those issues.

bleak bough
#

oh I see, thats good

wintry spear
#

I'm just searching cmake's docs and g++'s help thing to try an find the correct command.

#

Alright, edit Cmake's line 146 to this:

            CUSTOM_CFLAGS+=-DSUPPORT_FILEFORMAT_BMP\ -DSUPPORT_FILEFORMAT_TGA\ -DSUPPORT_FILEFORMAT_JPG\ -DSUPPORT_FILEFORMAT_PSD\ -DSUPPORT_FILEFORMAT_HDR\ -DSUPPORT_FILEFORMAT_PIC\ -DSUPPORT_FILEFORMAT_KTX\ -DSUPPORT_FILEFORMAT_ASTC\ -DSUPPORT_FILEFORMAT_PKM\ -DSUPPORT_FILEFORMAT_PVR\ -DSUPPORT_FILEFORMAT_SVG\ -Wno-error
#

After editing the line, run cmake .. && make -j4

#

PS: I edited the line to force the compiler to ignore all possible errors. If you pasted the old line, please update to the new one

#

@bleak bough

bleak bough
#

oh which file to edit? I am a noob

wintry spear
#

CmakeLists.txt

#

it's one of the top level files (in the folder Lit-Engine)

bleak bough
#

ahh right. I could of just grep on lazyvim

#

hmm

wintry spear
#

mkdir build && cd build && cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. && make -j4

bleak bough
#

hmm .. not working. maybe because I am use zsh kitty

wintry spear
#

the build file is being created at Lit-Engine and not Lit-Engine/build

#

run ls ..

bleak bough
wintry spear
#

You ran cmake in the wrong dir. You need to remove CMakeCache.txt cmake_install.cmake and all the other cmake related files from LitEngine/ with the exception of CmakeLists.txt

#

and then run the cmake in the correct dir (build/)

bleak bough
#

ahh I see, I am dumb

wintry spear
bleak bough
#

hmm nahh, I might learn cmake in the future but I just read the read.md

wintry spear
#

is it compiling?

bleak bough
#

i think so

wintry spear
#

good

bleak bough
#

damn

wintry spear
#

if it is successful, I will update the readme and that line in the cmake in a new commit

bleak bough
wintry spear
#

there is an error in the previous lines

#

do you see error: anywhere?

bleak bough
#

ls

wintry spear
#

?

bleak bough
#

hmm you mean in a cmake log file, where would that be ?

wintry spear
#

no, in the terminal. after you run make and before the end of the execution.

bleak bough
#

hmm make[2]: *** No rule to make target 'Include/raylib/src/libraylib.a', needed by 'LitEngine'. Stop.
make[1]: *** [CMakeFiles/Makefile2:161: CMakeFiles/LitEngine.dir/all] Error 2
make: *** [Makefile:136: all] Error 2 . not sure error 2?

wintry spear
#

can you show me what your current directory is and the complete log (in the terminal) of make?

bleak bough
#

hmm ya I am cmaking in the lit-engine dir. maybe I have to reclone because I don't see anything in build dir

wintry spear
#

mkdir build

#

cd build

bleak bough
#

hmm

wintry spear
#

can you jump into Help VC?

bleak bough
#

ahh to share screen sure

wintry spear
#

yea

#

Let me just download discord desktop to enter

#

cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5

#

-Wno-error=incompatible-pointer-types

bleak bough
#

(LitEngine:143794): Gtk-WARNING **: 15:27:46.724: gtk_disable_setlocale() must be called before gtk_init()
/usr/include/c++/15.1.1/bits/stl_vector.h:1263: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator [with _Tp = RenderTexture; _Alloc = std::allocator<RenderTexture>; reference = RenderTexture&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.

wintry spear
#

cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Debug

#

make debug

#

rlSetUniformSampler(0, downsampledTextures[downsampledTextures.size() - 1].texture.id);

rocky nova
#

incredible! how much time did you spend on this?

wintry spear
#

I started developing the engine about two and a half years ago but I didn't develop it full time because of school, so if I had to remove the months I didn't work on it I would probably say 1 year and a half to around 2 years.

wintry spear
#

Alright, the gizmo is half complete. Scale and Translation Gizmos are fully working. I sill have to reimplement the rotation gizmo, re-add grid snapping and child parenting too.

karmic coral
wintry spear
#

styled

karmic coral
#

because im pretty sure i saw that raw imgui gui in gta 6 leaks and though "this is so cool looking i wonder what gui it is" and i kept searrching for it but no results

wintry spear
#

yeah, imgui raw style is a dark blue + black color (a bit ugly in my opinion)

karmic coral
wintry spear
#

Are you including rlimgui.h?

#

or any similar header?

karmic coral
#

yes

wintry spear
#

Alright, so rlImGuiSetup does not have any arguments, remove the true statement. Since my rlImGui header contains the boolean, I suppose that you are using an outdated version of rlImGui or a more recent version of that. SetCameraMode is an obsolete function from raylib that does no longer exist - use UpdateCamera(&camera, CAMERA_FREE)

#

So, I would check the rlimgui version, then look at the header file and see the API. What are the correct function names and arguments?

karmic coral
#

wait

wintry spear
#

It's possible that it was updated

karmic coral
#

a@DESKTOP-M6PSRVE MINGW64 /c/Users/a/Desktop/raylib-5.5_win64_mingw-w64
$ g++ main.c ui.c rlImGui.cpp imgui.cpp imgui_draw.cpp imgui_widgets.cpp imgui_tables.cpp imgui_demo.cpp -Iinclude -Llib -lraylib -lglfw3 -lopengl32 -lgdi32 -lwinmm -std=c++17 -O2 -o game8.exe
main.c: In function 'int main()':
main.c:20:17: error: too many arguments to function 'void rlImGuiSetup()'
20 | rlImGuiSetup(true);
| ^~
In file included from main.c:10:
rlImGui.h:12:6: note: declared here
12 | void rlImGuiSetup(void);
| ^
~~~
main.c:30:5: error: 'SetCameraMode' was not declared in this scope; did you mean 'CameraMode'?
30 | SetCameraMode(camera, CAMERA_FREE);
| ^~~~~~~~~~~~~
| CameraMode
main.c:42:21: error: too few arguments to function 'void UpdateCamera(Camera*, int)'
42 | UpdateCamera(&camera);
| ^
In file included from main.c:3:
include/raylib.h:1233:12: note: declared here
1233 | RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for select
ed mode
| ^
~~~~~~~
main.c:48:9: error: 'rlImGuiBegin' was not declared in this scope; did you mean 'rlImGuiSetup'?
48 | rlImGuiBegin();
| ^~~~~~~~~~~~
| rlImGuiSetup
main.c:52:9: error: 'rlImGuiEnd' was not declared in this scope; did you mean 'rlImGuiRender'?
52 | rlImGuiEnd();
| ^~~~~~~~~~
| rlImGuiRender

a@DESKTOP-M6PSRVE MINGW64 /c/Users/a/Desktop/raylib-5.5_win64_mingw-w64
$

#

this is the output

wintry spear
#

What is the header? Send it as a file so that it doesn't fill up the whole chat.

karmic coral
#

this is basically the source code

#

but there is more files

#

that are from imgui

#

i never used imgui and chatgpt helped me make this

wintry spear
#

your header file is outdated

karmic coral
#

i dont know chatgpt does but i must admit i am a vibe coder

#

sorry

wintry spear
#
GitHub

A Raylib integration with DearImGui. Contribute to raylib-extras/rlImGui development by creating an account on GitHub.

GitHub

A Raylib integration with DearImGui. Contribute to raylib-extras/rlImGui development by creating an account on GitHub.

GitHub

A Raylib integration with DearImGui. Contribute to raylib-extras/rlImGui development by creating an account on GitHub.

GitHub

A Raylib integration with DearImGui. Contribute to raylib-extras/rlImGui development by creating an account on GitHub.

karmic coral
wintry spear
#

I will finish the material system next.

wintry spear
#

I need your help designing a better experience for Lit Engine's material system. It uses Material Blueprints for reusable logic and Shader Materials as instances where you set the actual textures and values. Which of these management options do you prefer?

Option 1: A dedicated editor showing Shader Materials as live previews nested under their parent Blueprint.
Option 2: Integrate both into the main asset browser, using different icons to tell them apart.
Option 3: A database-style window where you can sort and filter all materials by their parent Blueprint.

Let me know which option you like best, or if you have a completely different idea!

#

Feel free to ping me if you have any questions.

wintry spear
wintry spear
#

Please cast your vote. 2 days left.

glass stratus
wintry spear
# wintry spear
poll_question_text

What option should I choose?

victor_answer_votes

7

total_votes

7

victor_answer_id

2

victor_answer_text

Option 2

wintry spear
wintry spear
wintry spear
#

This is the order of the feature development:
-> Node Editor (polish and finish)
-> Child Table (finish and polish)
-> Save Load (finish and polish)
-> JSON Files and asset explorer workflow (finish and polish)
-> Icons
-> Drag and Drop (finish and polish)
-> No compilation and compilation (finish and polish)

hearty veldt
#

where i can test that engine?

wintry spear
hearty veldt
wintry spear
#

the app uses static libraries, not dlls

hearty veldt
wintry spear
#

game exporter has not been review since the last release because it would have to be updated on every core engine change

#

it is not expected to work

wintry spear
#

What do you think of this design?

jaunty flower
#

too too big

distant herald
#

i would put the code editor in a separate tab

worldly marlin
#

i wouldnt bother with a code editor at all, just let people code in their own ide

#

an editor is a whole project of its own, youre better off spending time on the actual engine

distant herald
#

thats prolly a better idea

wintry spear
wintry spear
distant herald
#

make both code editor and performance accessible through like a menu bar at the top

wintry spear
#

Alright, I will do both designs and I will let you know

#

The 2 designs

#

I already had the design for the file explorer but I don't know if I should merge the Asset Explorer with the File Explorer

distant herald
#

whats the difference?

wintry spear
#

In the designs or the explorers?

distant herald
#

explorers

wintry spear
#

One should only have assets and be easier to preview, almost no information about the file so that the thumbnail can use the most amount of space. The other one should have more data but be harder to preview because you can't just see the images or models or materials in the thumbnail.

#

Now that I think about it, the explorers could be merged and there could be a button to toggle between them.

#

List vs Grid thing

distant herald
#

yeah

#

and i definitely think it looks better with the file explorer

wintry spear
#

Alright, I did the toggle thing. What do you think?

distant herald
#

i think it works perfect

sharp furnace
#

Those are some great improvements!

wintry spear
wintry spear
sharp furnace
wintry spear
#

thanks

#

everything but the current design is better ig haha

#

I just don't know if ImGui allows for some of the tricks I used. Or at least without running at 10fps

rocky nova
wintry spear
#

tailwind + html

#

svgs were downloaded online and the images from pixabay

rocky nova
wintry spear
#

all pixabay 1 2 and so on

wintry spear
#

I'm scratching the old material editor idea as it was too complex for the user. I'm moving to a layered based material editor, like Photoshop.

wintry spear
#

A material is made with a substrate and multiple layers (layers are like coatings). You start with a base layer, like the fundamental brick or wood of an object. On top of that, you can add more layers like paint then dust and then moss. The main feature of this material system is that these layers aren't just static images. They react to their environment, making a game feel alive. The dust layer might automatically accumulate more in shady corners, or the moss might grow thicker in more occluded areas. When there is rain the brick layer will instantly look wet

#

This is done with a set of rules. A painter option will allow the user to paint an area that will react to something. For example, you can paint some area with cracks on your model and when the object is close to water, moss will grow out of it.

#

I think this model, once done, will be easier for the user to understand and use and it isn't something that is used in other engines so it would be a strong feature of the engine

wintry spear
#

The UI and architecture is built (meaning that the UI is functional, responsive and context aware. I also added Save and Load). I will now build the material graph and implement a new generative shader code which will take some days. With this steps I should have a material and shader functional in a couple of days, maybe a week.

#

The main change is that this material isn't just a singular substrate material but many materials on layers: https://youtu.be/-SAk33SCVcE?si=YneNmrHVK_xbmgyD&t=126

During its keynote session at GDC 2023, Epic Games shared the first look at Unreal Engine 5.2. Among other new things, the update will bring a new Substrate material system and a bunch of amazing procedural tools. Check these amazing graphics that look like real life!

00:00 Unreal Engine 5.2 Tech Demo GDC 2023
06:23 Sizzle Reel Unreal Engine 5
...

▶ Play video
wild pivot
worn canopy
wintry spear
#

The new design UI is not yet implemented. Its just a concept.

worn canopy
#

yeah dont worry i saw that 🙂

#

just thinking it looks good

wintry spear
#

Thank you man

#

I appreciate it

worn canopy
#

need to give some force from time to time.. 🙂

wintry spear
#

Youre right. Im in a break for almost a month now

worn canopy
#

it's sad, but if you need it, take it.. would hate to see you burnout or something..

wintry spear
#

Small update. When there is rain, the dirt (cube) gets wetter.

#

You can choose between various presets for materials. You can add various materials as layers (like photoshop). You can compile the material into a shader, add rules to the material and change the environment variables that affect the rules.

#

Next, I will implement masks/decals, rule painter so that only the painted part of the model gets the effect of a specific layer, mix the generated shader with the PBR pipeline and probes.

worn canopy
#

neat 🥳

lapis pawn
#

Has the Lit Engine development started to die?

#

I might be misinterpreting the commits but honestly i really want this project to become more stable

edgy dirge
wintry spear
#

The lack of PR, issues and suggestions also doesn't help

#

So at the end of the day my question "Am I doing this for what?". If it is for learning, I have already accomplished it. If it is for a community, what community?

wintry spear
#

I integrated the material with the pbr shader. The material responds to the environment as expected. When humidity is greater than 0.5, the layer moss appears.

worn canopy
#

Hey Lixt ! You are using rlmgui for the editor of Lit Engine no ?

wintry spear
#

yes, imgui with the rlImGui backend

worn canopy
#

oki, in that case i wanted to ask how have you created this sweet custom titlebar for Lit engine ?
it looks georgeous and i have no idea how you made it 😅

wintry spear
#

you remove the borders of the raylib window and use imgui to draw a rectangle with all your elements

worn canopy
#

that's it ?

#

i'll look at the source of lit then..

#

thank u

wintry spear
#

you create an undecorated window like this:

SetConfigFlags(FLAG_WINDOW_UNDECORATED);
InitWindow(windowWidth, windowHeight, "My Window");
#

and then, you can use ImGui::BeginMainMenuBar() to create the area for the top bar where you draw your elements

#

but if you want to look at the source code, you can check the menu bar implementation in Engine/Editor/MenuBar/MenuBar.cpp line 209

worn canopy
#

also i tried building the engine from source today using msvc.. it does not work.. i meant it build succesfuly, but apparently it fails to load a font on launch.. and i cant quiet find where the path is located.. i'm slowly trying to find from the entry point..

wintry spear
#

the assets path are relative to the executable location

worn canopy
#

i need to copy the asset folder next to the build i guess

wintry spear
#

so if your assets are in assets/ and your executable is in build/, you would need to do: ../assets/fonta.tff

worn canopy
#

there is no post-build step yet, i guess

wintry spear
#

so that the executable is in build/ but it thinks it is in ../

brisk moat
# wintry spear So at the end of the day my question "Am I doing this for what?". If it is for l...

Building a community means marketing the product. I think the main issue you have is that you are "marketing" in a "channel" that most users are either, students or bootstrapers(make from scratch). To aim for the type of users you probably want, it's probably better to do reddit post's or find communities that don't want to start from scratch. Also, one of my main gripe's(personally) is the lack of projects(medium to big) showcasing the engine. How can we know that it can be used for that ? Have you battle tested it ? The question you need to answer is: "why would my potential user invest time to learn this engine in opposition to others, what's the selling point ?". Is it faster ? Is it simpler ? If the selling point is simply, "made with raylib" I think it's hard to view it as valuable. BTW, this project is really interesting, just spit balling the "marketing" or value proposition.

#

You say on your website that it's easy to use, how ? Have you made gamejam games with ease and fast ? What of the engine makes it more easy to use versus others. Usually, I think it's better to show not tell.

coarse notch
#

I like the initiative on this (I popped out of nowhere, I know). I think a selling point for a game engine is clear documentation and avoiding API breaking as much as possible when you update or add new features. People like myself are interested in this kind of stability.

wintry spear
coarse notch
#

Another thing, polished but less features are better than more buggy features that people will most likely drop to roll their own. That's something a lot of people hate on Unity - bloated with a lot of stuff like having 3 ways of doing the same thing and community made solutions are often better but you'll still have to pack your game with that bloat.

wintry spear
#

Having a minimal yet powerful engine.

brisk moat
#

I feel supporting multiple scripting runtimes is a rabbithole you shouldn't support(if you try to focus) but enable the eventual community handle it. Basically, making it easy for others to implement it.

wintry spear
#

I'm thinking of compiling python to get a similar performance to C++. This would make the python bottleneck smaller because it calls C++ engine functions and the python logic is also compiled

brisk moat
wintry spear
#

indie devs up to AA studios, but I think supporting both languages is good for all preferences

#

I just don't know if having 2 languages will create a problem for beginners

brisk moat
wintry spear
#

no, not at all

#

The current pain: Bloated interfaces, slow development, too many features too learn, horrible performance (aka. unreal), unintuitiveness, big learning curves

#

How lit solves them: Minimal interfaces, less features (if you need a feature that is not built in you can install a plugin), minimal codebase makes the engine faster and allows for faster development (no waiting 6 seconds for a unity script to compile, for example), focus on intuitivity

#

Current engine issues: Half complete features, not polished, missing critical features

coarse notch
# wintry spear The current pain: Bloated interfaces, slow development, too many features too le...

Yes and yes and oh my God you are so right.
People seem to like Defold but I don't find it powerful. Unity is a total mess of unfinished features. Truth to be told, I can't believe so many people enjoyed using it - leading me to the conclusion that it was the only accessible option for indies at the time and gained momentum. When it comes to Unreal I don't think there's any small developer team that can compete with their improvements but at the same time I heard Unreal Engine 5 is much harder to optimize than Unreal Engine 4 and not all games need RT and fancy graphics. Godot seems the only good choice lately for indies. But I think lately it started to lose focus. Lacks direction and Godot 4 is still reported to have a buggy editor. IMO, the editor should be an editor, it should never ever hide paths or data flow (for example, inbuilt signals are a bad big no no idea - when I use Godot I prefer to connect signals via code).

wintry spear
#

so true

brisk moat
worn canopy
brisk moat
#

While it's cool having an internal code editor, you can easily remove that burden also because it's a rabbit hole and most users like using their own editor

worn canopy
#

oh you changed..

wintry spear
#

having an code editor in the engine's editor is good because it reduces the need to change windows every time you want to change something. But it also does not change the fact that you can use an external editor if you want

#

It just makes the workflow easier for some people

brisk moat
worn canopy
#

it's a win-win, if people dont care about it, dont need to work on it

brisk moat
#

My main point is that it's a costly feature.

worn canopy
#

if they think it's important.. then that could be a priority feature

wintry spear
#

no, it's just an ImGui plugin with some modifications

worn canopy
#

i just see no point in removing his work

wintry spear
#

I don't touch it in months

#

It's just ~30 lines in the engine

brisk moat
wintry spear
#

The features that are a pain for me to work on are the material system, GI, and the plugin system

brisk moat
#

The plugin system is probably the most valuable since it should add easy extension of the engine.

#

Who is the material system for ? What do you want to achieve with it ?

wintry spear
#

and they are a pain because they have many smaller features that are difficult and time consuming. The material system will have to detect luminosity on each point in an optimized way, generate shaders (which is done), and do lots of different other things. The GI will just be diffuse lighting because specular is really expensive and requires raytracing but it's a lot of GPU shaders and CPU-GPU operations and the plugin system will have to connect to every component of the engine (including runtime) in a way that doesn't allow hackers to exploit it.

wintry spear
# brisk moat Who is the material system for ? What do you want to achieve with it ?

The material system is one of the selling points. Basically, when you want to create a detailed material in Unity or Unreal you have to create a material by using nodes and create your math operations. The idea for this material editor is to have a photoshop like system. You have a material library with many types of materials and you can add layers to your objects in an environment-responsive way. For example, when it is raining, clothes and rocks become darker, if you're driving a car in the middle of the desert then you car must become dusty, if the humidity is high and the light is dim you may want to add moss to a tree

#

This allows everyone to create AAA quality materials with ease and speed

coarse notch
# worn canopy i dont agree. i love godot in-engine code editor, and i love the way it is integ...

Yes. Godot's internal editor is a plus compared to Unity for which you have to open VSC. It's just ... not cool IMO to alt+tab always.
But Godot's editor should be that, only an editor, it shouldn't be responsible for game logic or linking stuff in the project. Personally, having config files for nodes or the overall project would've been cool. I mean, they probably exist somewhere but it'd been cool if those were exposed.

worn canopy
wintry spear
#

Material system:
-> Editor
-> Generator
-> Rules
-> Library
-> LOD

Priorities by each sub-system:
Editor:
- 10/10 Functional UI (done)
- 1/10 Looks
Generator:
- 10/10 Code snippet generation (done)
- 10/10 Code injection (done)
- 4/10 Multiple shaders for LOD
Rules:
- 10/10 Update material appearance via global environment variable (done)
- 9/10 Mask
Library:
- 10/10 Multiple sample material layers (done)
- 8/10 Support for custom shader logic
- 7/10 Support for custom layer types
LOD:
- 2/10 Choose the correct shader based on distance or importance

What to do, in order of importance:
Mask -> Support for custom shader logic -> Support for custom layer types -> Multiple shaders for LOD -> Choose the correct shader for LOD based on specific criterias -> Looks

#

A roadmap for the subsystem for material

worn canopy
#

yeay 🥳

wild pivot
# wintry spear I'm thinking of compiling python to get a similar performance to C++. This would...

I think using python for game dev is a good idea, even if some others disagree. And yes, compiling will probably reduce the bottleneck and improve performance in the long run. I've tried compiling python code before so I can tell you a few options:

  • PyPy: basically a different implementation/runtime for python, uses JIT, newer python versions are slowly adding performance improvement features from pypy to cpython (I think). Does not compile to machine code but still faster than python.
  • Numba: should improve the performance of numerical operations by compiling them. Supports numpy but probably won't speedup graphics lib calls.
  • Cython: Compiles python to C or C++ (configurable). Add static typing (with pythonic type hinting or c-like typing in python/pyx files) and cython will compile it into optimized C/C++ code. The generated code and shared library still uses Python.h but still much faster, approaching speed of C. Seamless interoperability with C and C++, should reduce the pain of moving between C++ and python.
#

bonus mention:
Codon (by exaloop) is a different programming language but it also markets itself as a high performance implementation of a subset of python (most features, not all, are available). It can apparently compile and optimize for both CPU and GPU bound tasks.

#

there's also mojo but meh, it's designed for ai

wintry spear
#

so Cython is the best option?

worn canopy
worn canopy
# wintry spear so Cython is the best option?

if using Cython, does it mean there will be support for C++ scripting "out of the box" since as i understand it, it compiles to native C++ code, that you will need to load as dll's or something, so you will some sort of scripting system for C++ for it to work?

(I don't really know i'm throwing that here) 😅

wintry spear
#

maybe, I still have to research but it is possible that it can mame C++ prototyping faster

edgy dirge
#

Why not lua? 😉

worn canopy
edgy dirge
#

there is already so much engines packing lua
That's not a reason to skip it 🤔

#

If anything that's a reason to consider it

wintry spear
#

If anyone wants to code in lua, they can add a plugin. Lua can have simple syntax but it lacks many features and it's a pain to implement in C++ because of the lack many data structures.

#

The only advantage I see in using Lua instead of Python might be performance, but it can quickly be discarded when you compile python to machine code

crystal elm
wintry spear
#

if Cython can translate python into c++, then I will use Cflat because it should be compatible out of the box

crystal elm
wintry spear
#

Im feeling unmotivated to work on Lit Engine. I will take a pause (probably some months) to focus on other projects and school and then I may restart development later.

#

ofc, if you want to contribute you can try, test, add features and improve the codebase and if you send a PR I will review it and probably merge it

wintry spear
wintry spear
#

I pushed the new incomplete material editor implementation in case you want to take a look

wintry spear
#

[PAUSED] Lit Engine - A High-Level Game Engine Prototype

crystal elm
#

are you stoped engine dev

wintry spear
#

Yes. I'm feeling frustrated for working on the project so the best thing right now is to pause for some months or years until I feel like working on it again. The engine is a lot of work and I'm feeling exhausted.

lost jolt
#

@wintry spear you have made great accomplishments and learned a lot in the process! don't feel frustrated! just take your time to relax and try other projects! 👍🙂

wintry spear
#

thank you ray ❤️

modern summit
#

wow

#

For some reason all of the videos in this thread look like that for me on mobile:

edgy dirge
modern summit
#

damn

crystal elm
wintry spear
#

Hi. I've been thinking for a while and I came to the conclusion that I will end this project. I have learned a lot with Lit during the past 3 years and I concluded that while this has been a great opportunity for me, the project is not scalable.

#

I did many design errors during the development such as mixing the engine and the editor and I'm pretty sure that with my current knowledge I could build a better engine in less than 3 months.

#

I want to thank everyone and each of you for the support you've given me during the last few years as it really gave me motivation, allowing me to continue working on the engine/editor and self-improving for so long.

#

[NO FUTURE DEVELOPMENT] Lit Engine - A High-Level Game Engine Prototype

#

If, in the future, I build a new engine, I will probably call it Lit because I already bought a domain and a website.

#

But I'm not sure if I will advertise it here because I want to dive a bit into vulkan and low-level programming, which raylib is not entirely built for.

wintry spear
#

Thank you @lost jolt for developing such an amazing framework ❤️

lost jolt
worn canopy
wintry spear
#

Alright, I'll do of ray doesn't mind

lost jolt
wintry spear
#

I want to have great versatility and performance so I am using AAA-inspired techniques to automatically batch or instance meshes together, and to skip meshes via frustum culling and occlusion culling. I also plan to support automatic LOD in this renderer. This is all done on the GPU for maximum performance. This makes it very easy for developers to use the engine because they don't need to handle any of this. Everything is done automatically with minimal overhead.

#

Going a bit more in depth, the renderer, instead of using deep object trees, it stores all scene data (like positions, meshes, and materials) in flat arrays, so the CPU and GPU can process them quickly without having issues like branching, random memory accesses or cache misses. When loading models for the first time, they’re converted into a GPU-ready format for faster loading later, then on the following disk loads, I can just dump the data on the system memory without pre processing. Each frame, the CPU first updates all object positions matrixes (the slowest part of the algorithm), if needed, using a simple, ordered list. Then the GPU handles most of the heavy work. it figures out which solid objects are visible and draws them in large groups (batches or instances) for speed, and then it processes transparent ones like glass by sorting and drawing them in the right order. The plan is split into versions that gradually add features, starting from a single rendered object, then adding animation, lighting, shadows, post-processing effects, and eventually a complete render engine. The first design of the renderer is present in here: https://github.com/luis605/Lit-Engine/blob/main/src/Engine/Render/DESIGN.md

#

I'm currently implementing the V0.2 of the renderer.

wintry spear
#

I think transparency is working correctly. I'm rendering 50k objects with great performance

#

The main bottleneck would be transparency sorting and maybe transform updates for the moving objects.

#

50% of all objects are transparent which means the GPU would have to sort 25k objects each frame. 50% of all objects are also dynamic, which means I would also have to do matrix operations for 25k moving objects.

wild pivot
#

awesome stuff!

#

perhaps a renaming of this thread is in order?

wintry spear
#

Lit Engine - Legacy (raylib) & Reboot (glfw)

wintry spear
#

Here is a small video and a picture of the rendering engine. I did many optimizations including triple buffering and moving the transform computation to the gpu. I'm currently drawing 50k objects using around 6-11ms when not recording and 9-15ms when recording. At 500k objects, I spend around 40ms (39,9ms from the opaque draw - painting) per frame which is a bit too much but the performance does not change when updating the transform of all objects which indicates the matrix computation from updating the transforms does not impact the renderer and it can possibly scale to millions of moving entities. I'm confident that after implementing occlusion culling, z-pre pass and other techniques to minimize overdraw, I can get stable 200 FPS with a dynamic scene with over a million meshes.

#

Also, CPU usage, as expected, is near 0.

#

Idk why but I'm using intel's integrated graphics card instead of nvidia's for rendering. is there a way to force wayland to use nvidia's for my app on ubuntu?

worn canopy
#

WOW, is this using differed or forward rendering ?

wintry spear
#

forward

worn canopy
# wintry spear forward

man.. there is a world in which i steal your engine rendering code for a personal project XD, it looks awesome

wintry spear
#

something wrong is not right

worn canopy
#

XD

#

Nah it's an artistic shader effect 👍

wintry spear
#

ahaha sure is

wide thunder
wide thunder
#

Wait your engine supports plugins, and people can make a custom programming language for your engine as a plugin?

wintry spear
#

im moving the renderer of the new engine to diligent and it supports Vulkan, OpenGL4, DX11 and DX12.

wide thunder
#

However your engine looks great

#

Has potential

wintry spear
wide thunder
#

Can you still make games in it

wintry spear
#

for the old engine I used raylib and it suited me well to learn the basics quick. You can make simple games in the old engine but they won't scale, they will be buggy, and the engine was hard to maintain due to poor (beginner) design choices.

#

so I started building one from scratch

#

and for now it's just a high performance renderer

wide thunder
wintry spear
#

basically, draw objects to the screen

wide thunder
#

like most game engines

wintry spear
#

millions of them

wide thunder
wintry spear
wide thunder
#

Oh okay

zinc barn
#

whats your plan with lit engine in the big 2026?

wintry spear
#

nothing, development stopped

zinc barn
wintry spear
#

no

zinc barn
#

can i add you

wintry spear
#

no

#

dude, you harassed, stalked and threatened me, so I would prefer you didn't contact me. You are already blocked, please go away.

zinc barn
#

ok i am sorry if you feel like that but you weren't an angel yourself too

#

bye

fresh plank
#

Hey man, how is it going?

#

Last time I checked was 2 years ago?

#

And im so happy for seeing it still active

wintry spear
#

its not. i stopped it permanently in november

fresh plank
#

Oh, what happened?

#

Oh man, that sucks. But if this is the best choice for you, I’m still really happy to see how far it’s come!

wintry spear
fresh plank
#

Yeah true, if you dont have a specific goal then it's going to eat your time