#Lit Engine - Legacy (raylib) & Reboot (glfw)
1 messages · Page 2 of 1
here
Thanks
I guess that most of the performance relevant stuff will be written in C++ and be part of the engine. So you would use Python only for the game logic, which should be fast enough
also mojo won't make your Python code magically faster. It's its own language where you can basically insert Python code into your mojo code, which looks completely different
when you're looking for a fast Python implementation then checkout PyPy, micropython or one of those Python compilers
Humm, drawing 24,5M vertices is draining performance.
no LOD enabled
not sure why game mode is faster, it is has raycasts enabled so it should be shower
in your opinion does the new icons in the inspector enhance the UI?
yeah it aint bad
is this only for 3d or does it also support 2d
Not directly, you can always set the camera to orthographic as use planes as sprites
Ah alright i will try it
Congrats!
2000fps locally
And some other libraries such as ffmpeg and dear imgui
Ah alright good luck
Guys, how do apps link DLLs? So I don't need to run a bat script to run the engine?
LoadLibraryW i think
How does it work?
sadly i got no clue
Damn
I think it should just need libraries in the same folder as the .exe, for dynamic you can use dlopen(provided that the C standard works)
Sorry if I'm like 1 month late lol
Yes, I am thinking of using r installer friendly to install lit engine directly onto your system. The issue was that Lit Engine executable was in a mess of files and it was hard to select the correct one
I believe this version is ready.
it looks really good! 👍😄
You can now create numbered folders, delete them or even rename them. You can also run python scripts in edit mode
Camera controls are better now
Especially Shift + A
You can see the GitHub commit history on the discord server server: server link
Physics sandbox
36 Million Polygons, PBR enabled and 200-300 fps
Just a question, why did you write it in raylib over something like sdl?
For so many reasons, the primary one being its simplicity and control
Hi. Can anyone review my website? https://litengine.org/
I would like to find any UX or UI issue
to fix them
pretty fast, but what do you mean by powerful combination of C and C++?
you use C++, not C
perhaps the old motto with the portability of C would look better
or the portability of Python
:(
Raylib and imgui use C. I also use C for some stuff
My highest score was 260
imgui use c++
Then raylib uses C
yeah
I just don't want to put python in the index.html because of the stigma of performance
Python has probably a better reputation than C++ lol
The first sentence on your website shouldn't be the tools you used to create the engine. Most of the users don't care about that
forza has a better reputation than nfs, but you dont see me playing forza, its because I have taste.
reputation doesn't matter if the end result isnt good
python's end results are alright. but I prefer c++
Just saying that it won't attract a lot of people when you have "The powerful combination of C and C++" as the first thing to tell your potential users
I prefer C over Python too, but the users won't care about if the engine was written in C, C++ or whatever
yeah
take a look at the websites of popular engines. Godot, Unreal and all the other engines. You go to their websites and the first thing you see is "Cool free engine to make it easy for you to make games"
but saying "Powerful C and C++" has the same evangelizing energy that the Rust folks do for their marketing. Take a look at any Rust app and the first thing you see is "Written in Rust. Rust is Blazingly fast and Rust is memory safe because Rust. " and you have no idea what product they are talking about
that's great. way better 🙂
"Imagine the games that you can make", "Time to realize your game idea", "Discover the adventures of gamedev"
so many possibilites
you can still mention the languages in your "Features of Lit Engine" box. Like "Create your games using Python, C or C++" or something like that
ok
You can only code in Python at the moment. It was more about a specification of the engine
How can I improve the UI?
There are some... interesting sizing choices in the editor
Like the gigantic save button
I will make the buttons smaller
And maybe transparent
How? Like open a random filr
have the user select their favorite text editor or something
Ok
There are 2 alternatives to do it. Either the client specifies in a new window what app to open in startup and at what directory. Or the client gives the command to execute at startup, this is dangerous because it may introduce security vulnerabilities if the command is insecure.
oof that's a bit unfortunate, something like lua or even JS would be nicer
why?
even unreal added python as an experiment
it also has a huge ecosystem and it's easy
in terms of performance, the removal of GIL in future versions make it look promising
and C++ support is coming
soon
I guess that may be interesting to see
tho as it stands, I dislike python
i get you
GitHub repo was made public: https://github.com/luis605/Lit-Engine/tree/main
🎉
awesome
Hi everyone. Due to school work the development will have to slow down
using a scene system?
Not yet
oh ok, keep it up
Hi there. The development had a freeze due to school work and it is going to be a little slow now
Everyone on linux, can you compile and run the engine successfully?
If not, please submit an issue
Can you not sell it on Steam? I would maybe try that. To give it away free after thousands of days work? Why?
I want to make the engine free to use, that's my mission
To earn money, I may add a store or something like that
you can put up a donation link on the github if you'd like
That'd be great but I am underage tho
oh lol
Yeah haha
Github seems like a cold, sterile place to me... Itch.io is another option to consider?
Maybe, I have to see if revolut accepts donations but I think it doesn't
I made a game template for the engine using the newer features. https://youtu.be/v_GThMB-l_Q?si=8H6h6IcDRmgkUisB
We're excited to showcase our brand-new demo for Lit Engine! We've also opened the source code to the public at https://github.com/luis605/Lit-Engine/. Feel free to explore, contribute, and let us know your thoughts!
Don't forget to smash the subscribe button to stay updated on all our latest releases and announcements!
We look forward to hear...
Very nice! I keeps improving a lot! 👍 😄
Hi. I did a little update on the website: https://litengine.org/
what do you think?
I just made a planet gravity simulation in Lit Engine! The player enters in orbit.
fonts here are different
I changed the fonts page to Inter
I only use Inter, maybe they still have the old font in cache
@wintry spear cool engine, currently wanting to try it out, but got issues installing from webiste.
when i installed directly from the website for linux i got a missing python3 .so file dependency error
./run.sh
./lit_engine.out: error while loading shared libraries: libpython3.11.so.1.0: cannot open shared object file: No such file or directory
Also, cloning the repo is reaaally slow, since you include the .so files in the repo itself. I think that's not recommended, atleast according to https://vegeta2102.medium.com/why-you-should-not-push-binary-files-to-git-and-what-to-do-if-you-do-29f34692cef0
It will also store every single version of every single binary file within the repository. So , if you clone that repository, you’ll need download all of them, all of version of that binary file. So that will make cloning repository become as slow as tortoise.
Ok, thank you. I will review it
dude if you actually implement c++ support I am actually onboard fr fr
also why dont you use jolt for physics?
that would be awesome
how hard is jolt?
I wouldn't be surprised if its easier than its competitors although all physics engines come with their difficulties
@wintry spear What physics engine do you currently use?
he uses bullet
yeah
1k commits!
hey everyone. I need help once again
i've made some updates and I need to make sure those don't only work on my machine but also in the client's
can you please clone the repo and compile the engine?
okay
If you couldn't compile the engine, could you submit an issue?
woah its massive
Is that the GitHub repo?
yeah
Yeah, about that
The git history is huge
And I may have pushed some binaries
A While ago
And it should work on Linux
I haven't tested it in Windows since December
oh shit i only have a 32 bit compiler
I only have a 64 bit computer. I never tested it on 32 bit one
You have so many commits because you commit after doing a small change even though you can group a bunch of changes into just one commit since they're all related lol
Yeah, lmfao
looks nice, still havent tried it since my linux machine died but one day I will
Is it common for installer to add ppa? I personally at least don't like that. Also this repo his huge, 2.5 GiB. There is one (I assume) example game that is over 500 MiB alone. That sort of large examples should be in their own repo in my opinion. For comparison Godot repo is 226 MiB. For both of these I used "git clone --depth=1". Didn't try to compile it since I'm on arch so cannot add ppa's.
How do I clean up the git history?
I don't have experience with that.
no problem
The code alone is just some mb but the .git is huge
and on the game, the textures are most of it
that are still there and not only in the history
Yes, I removed those from the current git commit for that reason
Oh really?
I'm on holidays so I will check that out when I get home
/build/project/game/textures/
Humm, I forgot to add it to the . gitignore
Thanks
Hey everyone,
I want to release a new version of the engine (v0.0.4.5) where I ship a bunch of bug fixes and an improved editor experience
I am just waiting for the new update of rFriendlyInstaller and for more possible bugs
If you are working on Linux, can you try the new github version and test the engine
While I wait for rFriendlyInstaller, I would like to fix some bugs or UX enhancements
thank you
The evolution of Lit Engine is a great way to explore our past and the progress made over the span of an year.
We explore the engine from the very first prototypes to the last currently available version.
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Socials:
Discord: https://discord.gg/M7jZaMhqbm
X/Twitter: https://twitter.com/TheLitEngine
Website: https:/...
Hi everyone
I want to improve the UI design of Lit Engine and make it more appealing
I've received some feedback saying the UX is pretty good, but the UI could be improved
What can I improve in the UI design?
Any techniques that could be useful?
I thought of changing the font but it seems font awesome stops working for some reason
so I'm using imgui's default font
I really like the jetbrains mono font, I think that would work pretty well for a game engine as well and from what I have seen it is open source
Does it support font awesome?
Tbh, I'm not sure about that
I will test and see, thanks
it doesn't support icons
but the font looks nice
I generaly use it with nerd fonts for icons, pretty sure theres a jetbrains mono nerd font isnt there?
Humm, I will check
Maybe
yes there is
i have used it as a main font
Issue fixed then
I've tried it. It still needs lots of work on UI/UX.
Will there be 2D ?
Currently only 3D but with time I am considering adding 2D support, but not yet
What can I improve in terms of UI/UX?
Nothing coming to my mind right now but I'll share some when it try it second time.
Are you compiling from source or using the website version?
Used website version.
I had some reviews on that version and I fixed most segfaults, memory leaks, UX problems and simplified the UI a little by adding indentation, and other fixes
I'll try to compile it from source next time.
I've merged the jetbrains font with the fontawesome icons and now it works perfectly https://github.com/luis605/Lit-Engine/commit/8efe80c9b632664ef1c65077346a98c318d15468
Hi everyone. The icon of the Ambient Light and the Bloom are the same (sun icon). do you have any idea of a fontawesome icon that could fit the bloom one?
I don't wanna repeat the icons
Maybe you could use a torch icon
ok
let me see
it didn't look nice. I put a star for now
i don't like it but idk
I know this is off topic and super subjective but have you considered changing the ui theme a bit? it currently screams imgui
Really?
What can I change?
as i said very subjective but heres what i was thinking:
- more or less rounding on buttons
- choose an accent color other than gray
- change the aspect ratio of the buttons or add spacers on the side
In ImGui, how do I make the children of the collapsing header the same width as the header
In this image, the collapsing header is wider than the brightness slider. I am using ImGui::SetNextItemWidth(-1);
@wintry spear have you looked at this? https://docs.flaxengine.com/manual/scripting/cpp/index.html
It seems a good repo to take a look at
It's my first time hearing about it hahaha
Thanks
Windows users, can you try to compile the engine on Windows?
sure
gimme a min
@wintry spear what does this do? will this make it faster? or?
Did you run make build_dependencies in the parent dir?
Did the dependencies get downloaded when you cloned the repo?
How did you clone it?
cloning doesnt work because it always errors out even with --depth=1
so i just downloaded the zip
Did it work?
What's the error?
Strange, I will review it asap
Can you submit an issue please?
i have no clue how to do that
You just go to https://github.com/luis605/Lit-Engine/issues and click on New Issue
Do you still need a windows user to install it because I don’t mind trying I love this project and happy to help in anyway
oh hey there's my replacement (:
Sorry don’t know how to fully use Cmake yet so I might take a while
Sorry I’m way out my depth and don’t have a clue on how to build the program
Hi there, to build the engine you need to run
make build_dependencies
cd build
cmake -G "MinGW Makefiles" .. --fresh
make
If any of these steps returns an error, please paste it here
Thank you a lot. It really means a lot to me
Glad you like this project
It gets beginners into game dev and have python as an adaptable skill although I did think it was odd at first you didn’t use lua but yeah python is a lot better
I also thought of using lua but it has more constraints and is harder to work with
I’m trying to find the source with cmake but can’t find it
What source?
Source code
Of Lit Engine?
Oh yes, so do you have git installed? The command line command?
If you mean GitHub yes if you mean something else no
Ok, so GitHub is where Lit Engine's source code is. To download the project you need to clone the repository into your local machine. Usually you would go to the website and download it from there, unfortunately I have some submodules that need to be initialized (like raylib, imgui, bullet3, etc.) for that you have to have git cli installed. Like GitHub's cli command
You can download the cli command online
Let me see if I find the link
Ok thanks sorry I’m relatively new to this stuff
no problem, I was also like that when I first started
I'm arriving home, let me just fire up my laptop
ok, I'm back
@pulsar python you can get git from here: https://gitforwindows.org/
We bring the awesome Git VCS to Windows
Ok thank you
this may seem stupid but i dont know what to do about this "make: *** No rule to make target 'build_dependencies'. Stop."
it says that there isn't a makefile or that the makefile does not contain a function called build_dependencies
have you cloned the repository?
git clone --recurse-submodules -j8 https://github.com/luis605/Lit-Engine
oh i downloaded the zip file
its at 41 percent now ill ask if i have any problems
what kind of problems?
it seems to be downloading fine
ffmpeg is quite large tho, it may take some minutes to download the project
still says make: *** No rule to make target 'build'. Stop.
in what directory are you in?
i dont know what is a directory
it's a synonym for a folder
can you send me a screenshot of your terminal?
I will check that out
if you run cd Lit-Engine and then make build_dependencies?
i now feel stupid but it said it didnt find python
what's the error?
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
make: *** No rule to make target 'build_dependancies'. Stop.
you mispelled dependencies
make build_dependencies
should work
python not being found is not a problem, don't worry
ok new error
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Building Dear ImGUI
clang++ -std=c++17 -O3 -DIMGUI_IMPL_OPENGL_LOADER_GLAD -c include/imgui/imgui.cpp -o include/imgui/imgui.o
make: clang++: No such file or directory
make: *** [makefile:49: include/imgui/imgui.o] Error 127
do you have clang++ installed?
ill download it now
you can get it from the LLVM project
what am i exactly looking for inside LLVM
llvm is the project that provides clang++. I can send you the executable that I compiled but I don't know if it work in your computer nor if it is safe to send them like that
I found them
ive downleaded it but cant find clang and i searched file explorer as well came out with nothing
you download the llvm compiled project: https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.4
Download the clang+llvm-18.1.4-x86_64-pc-windows-msvc.tar.xz compressed file from the project owners
then the executable is in bin/clang++.exe
clang++ instantly crashes
what's the error on the terminal?
the .exe file
oh, you're opening it?
you just add the clang++ folder to the PATH and the makefile will run the command directly
i put the .exe file in the folder still wont build
what's the error
same one
you put the clang++ inside Lit-Engine?
yes
mhm
it probably works i just am clueless
@pulsar python does adding the clang++.exe folder to path solves the issue?
it wasnt a folder
you just added the executable to PATH?
yes
i don't think it works, does it? I'm not a windows expert
but iirc, you just add the parent directory
idk
unless you want me to put the bin in you mean
ok still got the same error
clang++ not being found is odd
what if you remove the .exe extension
i'm completely clueless
wait i have the zip file it might be looking through that one
ohk
they are both identical and i also renamed the bin folder to clang++ to see if anything would change but nothing same error
this Pc > local disk > users > joshu > Lit Engine then there is bin
chatgpt says to add that folder to path, click OK, and then relaunch the terminal
same error in terminal
$ make build dependencies
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
\033[32m Building Demo\033[0m
clang++: error: no such file or directory: 'include/ImGuiColorTextEdit/TextEditor.o'
clang++: error: no such file or directory: 'include/rlImGui.o'
clang++: error: no such file or directory: 'include/ImNodes/ImNodes.o'
clang++: error: no such file or directory: 'include/ImNodes/ImNodesEz.o'
clang++: error: unable to make temporary file: no such file or directory
make: *** [makefile:58: build] Error 1
new error at least
run make build_dependencies instead
i got a massive list it said 2 errors though
yeah this
yeah
did you run git submodule init?
oh
he did
pushed to main?
to master
or should I just update submodules?
Node graph implementation for Dear ImGui. Used in https://github.com/rokups/rbfx - luis605/ImNodes
yeah, idk if it will update since it is already installed
but yes
git submodule update --recursive --remote
cmath.h
?
39 | return std::abs(a.x - b.x) < std::numeric_limits<float>::epsilon() &&
| ^~~~~~~~
| abs
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h:470:38: note: 'abs' declared here
470 | Check_return int __cdecl abs(In int _X);
| ^
include/ImNodes/ImNodes.cpp:40:12: error: no member named 'abs' in namespace 'std'; did you mean simply 'abs'?
40 | std::abs(a.y - b.y) < std::numeric_limits<float>::epsilon();
| ^~~~~~~~
| abs
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h:470:38: note: 'abs' declared here
470 | Check_return int __cdecl abs(In int _X);
im pretty sure these are errors and there lines
how come?
of you run git submodule update --recursive --remote, does it fix the issue?
you use tables instead of casting object, less features and a smaller ecosystem. also a smaller community
wdym by casting object?
and I wasted 2 days with tables while only some hours casting everything into python
new thing
what
passing this class or structure to a python class or object
you know you can bind native structs right?
seems fine, no errors, just warning
to lua? how?
I had to use tables
if you're using c++ this is the go-to wrapper
its the fastest and the best
now, the last step is to:
cd build
cmake -G "MinGW Makefiles" .. --fresh
I didn't know
to declare a global variable in the current lua_State you would do
sol::state lua;
lua["g"] = 10;
std::cout << lua["g"];
cool
CMake Error: Could not create named generator MinGW Makefiles
Generators
- Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Ninja Multi-Config = Generates build-<Config>.ninja files.
CodeBlocks - Ninja = Generates CodeBlocks project files
(deprecated).
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files
(deprecated).
CodeLite - Ninja = Generates CodeLite project files
(deprecated).
CodeLite - Unix Makefiles = Generates CodeLite project files
(deprecated).
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files
(deprecated).
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files
(deprecated).
Kate - Ninja = Generates Kate project files (deprecated).
Kate - Ninja Multi-Config = Generates Kate project files (deprecated).
Kate - Unix Makefiles = Generates Kate project files (deprecated).
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files
(deprecated).
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files
(deprecated)
ok, you can either download mingw, which is the best option, because there shouldn't be any errors, or try Unix Makefiles, which I don't know if it will work
i have cmake already from using raylib
and mingw?
does it matter if they have 32 or 64 after them
the installer?
if your computer is 64 bits, then you would prefer the 64 version, otherwise you can use 32 bits, which is slower
but if the 64 bits crashes at startup, then you computer doesn't support it
it runs the only problem is that it aint seeing lit engine
cmake -G "MinGW Makefiles" .. --fresh
-bash: cmake: command not found
in the terminal you ran this command
isnt devkitpro for the wii n stuff
any error?
CMake Error: Could not create named generator MinGW Makefiles
Generators
- Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Ninja Multi-Config = Generates build-<Config>.ninja files.
CodeBlocks - Ninja = Generates CodeBlocks project files
(deprecated).
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files
(deprecated).
CodeLite - Ninja = Generates CodeLite project files
(deprecated).
CodeLite - Unix Makefiles = Generates CodeLite project files
(deprecated).
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files
(deprecated).
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files
(deprecated).
Kate - Ninja = Generates Kate project files (deprecated).
Kate - Ninja Multi-Config = Generates Kate project files (deprecated).
Kate - Unix Makefiles = Generates Kate project files (deprecated).
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files
(deprecated).
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files
(deprecated).
is mingw installed?
yes it even says it on the git now
I never tried it with a sln file, visual studio just returns a bunch of errors
yeah i got errors
this should fix your issue
If chatgpt's solution fixes the problem, let me know
still downloading ill make dinner and ill be back
sure
chatgpt didnt work ive been trying a lot for the past half hour
either mingw doesn't seem to be properly installed or cmake isn't finding it properly
i need to fix my pc in general some things just dont like to work like unreal engine for the past 3 years
What I dislike in Windows is precisely that, things get super complex. In linux we just do apt install ffmpeg/gcc/g++/clang++/whatever and it just works out of the box. in windows we have to do lots of trouble shooting, install a bunch of dependencies manually and build them
ive used debian in chromebook i honestly prefer it to windows at this point
yes
If you open the build folder in that cli, and run the cmake command, what error do you get?
sorry its almost 11 pm i cant make sence of what you just said
no worries
I'll try to fix all of this issues
and thank you. you've been very helpful
hapy to help even if it was miniscule
amasing game engine from what i seen good luck
thank you
tommorow ill convert to linux jesus i really seen windows cracks today
the github should be updated. the "linux" section is actually only for debian based distros and nothing else 😿
i was hoping to give this a try but it wont run on my system
Yes, the install.sh file uses apt but you can also change the installer to your current OS. I will try to make a distro based installer detection, my problem was that if I set a custom installer to Debian or Ubuntu, then other Debian based operating systems would not work, such as mint, because it is not Debian, but Mint. I may try looking for the installed package manager and if it is apt, then do the Debian installer, if it is something else, use that something else installer, that may work
even after installing dependencies, i still get this issue
also worth noting... the repo is /massive/. GBs. it was hard to get over a slow connection because if the connection drops for even a moment it has to start over. took me a few hours 😿
make build -B
I know, I'm trying to fix it
sometimes it happens and you have to force build the engine
@wintry spear what Gui framework are you using?
Imgui, gtk or qt?
I'm using Dear ImGui
Cool, thanks
what are you developing?
A 2d game engine, 2d only. using sdl and now imgui
It's still in early stages of development
that's so cool
I never worked with 2d. is it hard?
Less hard than 3D I'd imagine
I actually don't know. the techniques are different, I imagine
The programing is the same in my own opinion. But 3d is slightly harder, main reason is because in 2d you only have to worry about x and y coordinates, but in 3d it's 3 coordinates xyz
and making asset's for 2d is easier, 3d on the on other is wild (3d modelling is a great factor)
I think 3d assets are easier, personally. There's a lot more tools for it
I'll try your suggestion and see if I can get it working later today
yes, and I just suck at drawing in general, so modelling gets a bit easier, but the techniques used in 2d can also get pretty complex, right? that's why I asked. Sprite rendering, idk. I never worked with 2d
raylib is 3d
See 🫣, i am crazy. Sorry i had no ideal
np
Lit Engine build system just got updated. Can anyone try to compile the engine on Windows, following the new guide and build instructions?
This guide is present in the README.md in the Windows section
If you want someone to test on Linux (non debian) I can do that 😂
haha 😂
the support for non Debian based operating systems is coming soon
Incase anyone is wondering, i use arch btw
is arch harder to work with?
From a technical standpoint, of course. It does less "for you" than distros like debian/mint/etc
I hate canonical/ubuntu with a fiery passion, but I find the more simple Linux distros "harder" because I can't do what I want. From a non technical standpoint
yes, more abstraction = less control
that's why I choose c++ over python for my engine
well not that python was gonna work for an engine anyways, hows mac support btw?
I don't have access to a Mac and adding support to many platforms on this early stages of this solo project will slow down the development by a lot. that's why I haven't been working on Mac support yet
Mac sucks to support btw 😂 x86/arm exists. Plus older ones use opengl (fake opengl) but newer ones don't. It's not fun imo
Stop the python hate, it’s perfectly fine for an engine >:(
exactly
The website was bothering me a bit, so I cleaned it up. It looks much better, what do you think? https://litengine.org
Lit is a new open-source 3D engine to make your imagination take a breath. Learn more in here!
it looks good to me! 👍😄
ty
A wider Linux package installation script has been pushed into the main branch. To make it easier to build the engine I automatically install some packages from apt such as ffmpeg, tbb, python3.11-dev, etc. However this installation system only works on Debian based distros, so I updated the script to include an automatic detection of the package manager installed on the user's device. This will allow you to install those packages not just in Debian but also in Fedora, RedHat, ArchLinux, and all the other distros that either use apt, yum, dnf or* pacman*. Could you try the script so I can see if I need to tweak anything else, such as a missing package or a non-existing one?
can you change sudo pacman -Syu to sudo pacman -Sy
that will make it similar to apt update whereas -Syu is similar to apt update && apt upgrade which is really unnecessary and bad
Why use imgui when raylib gui exist
raygui isn't powerful and it lacks much of the basics. The editor wouldn't have this look if I used raygui and try to implement the basics, I would use a large amount of time that I don't have
probably kinda basic but you couldn't unchild a light 😅
Next stop, unchild entities
some lighting updates
i got it to work on linux with the new install script, but there is 1 bug (so far)
i can make it non-fullscreen but it takes up ~80% of my monitor but i cant move or resize it 🤣
looks like there's no "undo" either
also when using the arrows to move objects in the scene some of the handles should be reversed, i think. example... if you grab -X and move "left" it will move in direction A. if you grab +X and move "left" it will move in direction A as well. but they should be reversed from each other
so the arrow that's pointing down will only allow the object to go down?
no
opposite side arrows should move in opposite directions when doing the same movement
ohk
maybe a video will help explain? haha
maybe, haha
ohhh i think both are reversed from what im expecting
all the other arrows behave correctly. only the ones shown in the video are backwards
the ~Z and X axis handles are backwards when moving left/right
I'll fix it rn
does macos work atm?
not yet
A small physics update in Lit Engine with the improved pbr lighting shader
idk why the mouse randomly unlocks when in game mode. is it just me or do you also get this issue?
Any bugs that you found?
@wintry spear how do you decode videos and display them in raylib?
is that supported in lit engine?
I use ffmpeg to decode the videos but due to some memory issues, ffmpeg is not being able to get the video stream to play them. The code for my implementation is in here: https://github.com/luis605/Lit-Engine/blob/main/Engine%2FGUI%2FVideo%2Fvideo.cpp
To decode and pass a video frame to a raylib texture:Read and decode the frame using av_read_frame and avcodec_receive_frame.Convert the decoded frame to RGBA format using sws_scale.Update the raylib texture with the converted frame data using UpdateTexture.
yeah you can even use videos as normal maps
I'm pali :>
hello, pali
hi pali
I see, thanks
copy and paste now supports children nodes:
each A has B that has C
A -> parent entity
B -> child entity
C -> B's light child
I'm gonna try it again tomorrow 😎
What's your imgui backend
there are a few weird quirks:
- i cant seem to add any primitives or lighting
- when i go to file->open i can not select anything, it just opens some hardcoded thing
- when doing file->open, the hardcoded scene has a light but it does not affect the plane that is present
- when doing file->open, the hardcoded scene has a light but it is affecting the handles/gizmos things
- "save as" does nothing. no prompt (looking at the code, this is intentional)
- ctrl+s is supposed to save but the "S" gets carried into the viewport, making the camera move
- im not sure how to reproduce it, but sometimes things are un-selectable in the scene editor. moving it ~6.5 units from the center seems to do it consistently
suggestion: make the arrows/handles coloured for the matching axis. red should be used for X, green for Y, blue for Z, etc
feedback:
- the handles/arrows/things are really far from the selection most of the time. it makes it hard to zoom in and see placement accurately
- the scale/position of the Entity Properties section dont have sliders, making it hard to do accurate fine tuning
- the scale/position of the Entity Properties section update instantly, making it hard to do accurate fine tuning
- the light rotation uses -1 to 1 range. very awkward and not easy to work with
- the handles/arrows/things are drawn in 3d space, so they may be inaccessible sometimes when they are occluded by other geometry (or even the model itself, like the sand.obj included). making it very difficult to move things around
possible bug: increasing the scale adjusts the selection sphere things size, which is great. but if you go negative it does not. so if you want something flipped with a -1 scale but then want it larger (-2, -3, etc) the selection sphere does not change
bug: i am unable to delete this (use file->open to load it) with the delete key or the right click->delete
after clicking around a bit with it deleted:
corrupted size vs. prev_size
make: *** [makefile:50: run] Aborted (core dumped)
feedback:
#ifdef __linux__
system("xdg-open https://www.litengine.org");
#elif _WIN32
system("start https://www.litengine.org");
#elif __APPLE__
system("open https://www.litengine.org");
#endif
you have this in a few places, but raylib has an OpenURL function that is cross platform already
feedback: some of the scale-cube-handle things work backwards from how i expect
feedback: in the Assets Explorer it would be good to have like an "open folder here" thing so i can browse local files easier
possible bug: the "debug" window shows the scene polycount, but it's exactly 3x higher than it should be. with just the sand.obj it shows 200337, but opening in blender shows 66,779. if you multiply 66779*3 you get 200337
in the code you have vertexCount += entity.model.meshes[meshIndex].vertexCount; which is outputting 200337
rlImGui
hi, to add primitives and lights you can do Shift + A in the scene editor. The open feature just opens a hard coded path and "save as" or crtl + S aren't yet implemented, but I aim to add them in the next version since this is just a bug fixing version. the material system is under review and that's why the lights don't affect some models correctly. does the unselection issue also happens when the arrows are green or just when they are red? because, when the camera is far away from the model, the arrow's selection has a small offset.
yes, that's a bug, I'll fix it as soon as possible
yes, I'm currently fixing that bug. it happened after a material system update so I believe it's due to some dangling pointer or something like that that's causing some undefined behaviour
I didn't know, thank you
how should it be designed? The files that are shipped when exported are those inside project/ and having that functionality may induce the developer to think that all files are changed.
humm, strange. I will review it
Even very close to the object they are unselectable
Right click in the assets explorer -> "open folder" and it opens the OS folder browser to that location
oh okay, that should be easy to implement
okay, I think I have an idea of what may be happening
wrong thumbnails when adding new files in
i copied "icon.png" and renamed .obj to see what would happen. it took the thumbnail from the cactus for some reason
it also does not gracefully handle the error and the entire thing crashes when trying to use the fake obj lol
lol, yep that's a bug
true, I'll see if I find a cool fontawesome icon to replace the X with
TINYOBJ: Error reading file 'desert.mtl': No such file or directory (2)
TINYOBJ: Failed to parse material file 'desert.mtl': -3
sand.obj has a reference to mtllib desert.mtl which doesnt exist in the project
that's a 3d model specific file not found. it's not related to Lit, even though it's shipped in the test version
yes, but since the 3d model is shipped with lit it should be fixed, no? just remove that mtllib line in the file
it would be nice to click the "project"|"game"|"models"
so i can go up 2 levels in 1 click, etc
okay, it should be easy to implement
the 3d arrows being blocked by geometry is the only real pain point for me right now
yes, I'll see how to fix it asap
yes, you can't select the arrows that are occluded by the model, right?
you can select them, if you guess their position 🤣
so right
if they were drawn on top of all geometry then it would be functional
humm, but since they use the same shader, wouldn't it have no effect?
i dont think it should even use the same shader. having the arrows interact with the lighting is very strange
i dont like having shadows on gizmos making them dark
so, the title says "scene editor" which implies multiple scenes are allowed. but the way it works right now is locked to a single scene, right?
yes
this is a correct behavior, from what JeffM explained.
#help-general message
I believe I fixed all the issues/bugs mentioned, hope it's more stable now
he explained more and it sounds like raylib is keeping a vertex count. not a tri count. but it's being displayed as a tri count in your debug window
so i think a good solution is to rename the debug window to say vertex count instead
but its up to you =]
will try out the other fixes tonight
the project looks solid! I'll give it a try
maybe add a fancy image to github
without it its always so abstract and you have to imagine what it is or what it can do
makes sense, I'll add an image soon
it's doing good and it has been very pleasant to work in it
Any plans to allow multiple scenes?
Do you have any games created in it as a showcase?
I don't have plans for this version yes
I'm making a procedural maze game to test my engine. there are 2 templates and I'm rewriting the maze one
No mac support my friend
which is why I was asking
currently there is no Mac support because I have no Mac to develop on
but if anybody is willing to develop and test the Mac version, it would be great
hey man, why dont you use a virtual machine for testing thats what i did for my game
I believe I fixed all known bugs. If you have more bugs to report, now is the time. I will test the engine on Windows and, if no more problems arise, I will publish the new version.
I will try to implement the mac version in the next version
yes definitely can help with testing at least
yes, but the Mac version would still need to be developed and that's a lot of complexity for the project right now
the complexity and time consume is what I'm afraid of at the moment
I think it would substantially slow down the project
what non crossplatform libs are you using anyways?
If its not too much I might just try to get it running
I don't think there is any non cross-platform libs tbh
then I dont see how there should be major problems besides the buildsystem at most
it would be nice to have one build system instead of 3 separate ones for each platform
I will take a look into the build system and see if I can improve it
I mean I just wouldhave put platform specific stuff in the cmake unless there needs to be platform specific code but since you said you only have crossplatform libs i dont see how that would be needed
so then thered be only one
yeah, I'm trying to make a cross platform cmake that builds for windows and for linux
what ide are you using? anything fancy or will it worl with anything?
since I'm using cmake, it should work with any
How does that Cmakefile even work? It complains to me when simply generating the makefile that for example main.cpp isnt in the expected location, hows your project setup?
@wintry spear any plans to make a video for the 2024 showcase in #madewithraylib ?
definitely, there should be there
I mean, there isn't much to put there since this version was mostly bug fixes but I can make a small video to go with the release
it doesnt need to be only the most recent changes, but you can show off the editor and such. i think it would be good and get more eyes on it =]
I will try to finish the building system before the 12 of august and make a video before the 15th
I sort of got it building on macos, though since you’re making a buildsystem ill wait for you to finish that until making a PR
just finishing the windows linking process
It is taking longer than I expected 😅
for some reason bullet3 does not want to be linked
although every path and name seem correct
Yes if i remember correctly there will be support for python and cpp
hi sorry, I overslept 😅 Yes, like @rocky nova said, c++ and python support are one of the desired features of Lit Engine 0.0.5
Let lixt cook
this is so strange. I'm using full paths now and I have triple checked them:
set(BULLET_LIBRARIES_DIR "${CMAKE_SOURCE_DIR}/install/bin/vcpkg/installed/x64-windows-release/lib")
set(BULLET_DYNAMICS_LIBRARY "${BULLET_LIBRARIES_DIR}/BulletDynamics.lib")
set(BULLET_COLLISION_LIBRARY "${BULLET_LIBRARIES_DIR}/BulletCollision.lib")
set(BULLET_MATH_LIBRARY "${BULLET_LIBRARIES_DIR}/LinearMath.lib")
set(LIB_FLAGS
${BULLET_COLLISION_LIBRARY}
${BULLET_DYNAMICS_LIBRARY}
${BULLET_MATH_LIBRARY}
)
target_link_libraries(LitEngine PRIVATE ${LIB_FLAGS} -O3)
And this is the output:
ld.lld: error: undefined symbol: btCollisionObject::setActivationState(int) const
>>> referenced by objects.a(main.cpp.obj):(Entity::applyForce(LitVector3 const&))
>>> referenced by objects.a(main.cpp.obj):(Entity::applyImpulse(LitVector3 const&))
ld.lld: error: undefined symbol: btRigidBody::setMassProps(float, btVector3 const&)
>>> referenced by objects.a(main.cpp.obj):(Entity::updateMass())
>>> referenced by objects.a(main.cpp.obj):(Entity::updateMass())
ld.lld: error: undefined symbol: btRigidBody::setDamping(float, float)
>>> referenced by objects.a(main.cpp.obj):(Entity::applyDamping(float const&))
ld.lld: error: undefined symbol: btAlignedAllocInternal(unsigned long long, int)
>>> referenced by objects.a(main.cpp.obj):(PhysicsManager::Update(float))
>>> referenced by objects.a(main.cpp.obj):(PhysicsManager::Init())
>>> referenced by objects.a(main.cpp.obj):(PhysicsManager::Init())
>>> referenced 2 more times
etc...
does anyone have any clues about what may be causing this?
/usr/local/Cellar/llvm/15.0.6/bin/clang --target=riscv64 -march=rv64i -fno-builtin -nostdlib -ffreestanding -Wall -Wextra -Wwrite-strings -Wstrict-prototypes -pedantic -c -o build/main.o bios/main.c
riscv64-unknown-elf-as -march=rv64i -o build/start.o src/start.S
/usr/local/Cellar/llvm/15.0.6/bin/ld.lld -T link.ld -O2 -nostdlib --oformat=binary -o output.bin build/main.o build/start.o
Dont ask i copied from somewhere and it might help
ahh, okay?
Did u link ld.lld?
can you send me the full link to the question?
Mayb this helps
Copy paste in ur source
Code
not helpful, the problem is with a windows library not being found
I'm using cmake, pasting command terminals there is not helpful
if you need more information in the issue #help-cmake message
You can probably find the file here
linker is already installed, otherwise cmake would file to generate the config files. The problem is that the linker is not linking the files to the project or the lib that vcpkg has are invalid, meaning a problem in vcpkg
Next time elaborate more
Subbed
I believe the Windows build system is now fixed. There was a bug in vcpkg that didn't allow ffmpeg to build correctly
Gonna try building it tmr
Hello, could anyone test the new building system on your pcs?
no problem, thx tho
looks like git just dies before cloning it, I'll get the zip
strange
if you get the zip you'll have to initialize the submodules manually
I just saw I forgot to update the readme
wait, I was in the wrong branch
I got the build system branch
ughh zip file doesn't have the .git thing
can't do the git submodule update --init --recursive
I see. Then the only option is to use git clone
I'll try a shallow clone
I love C++ having multiple different building systems 😍
haha, they're a pain in the ass sometimes
ffmpeg and bullet are a bit big 😅
I will push a new commit in a minute with the updated instructions
thats why I hate git
weren't the submodules already downloaded during cloning?
they failed as well
that's so weird
@rocky nova can you send me the error that appeared when you did the git clone?
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 6267 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
C:\Users\admin\Desktop\GitHub\lit-engine\include>git clone https://github.com/bulletphysics/bullet3 --depth=1
Cloning into 'bullet3'...
remote: Enumerating objects: 7704, done.
remote: Counting objects: 100% (7704/7704), done.
remote: Compressing objects: 100% (6033/6033), done.
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 5403 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
I sent a new commit with the updated instructions
git pull and reset --hard to the last commit
?
yes, I sent that commit 2-3 minutes ago and I believe you have cloned the repo before I made that commit
I added a line to the cmakelists and uncommented 5 lines in ./install.bat
oh no
do shallow clones also download the other branches?
it seems not. try git fetch --all
I had to call --depth=1 on this
so it didn't downloaded the other branch
seems like it
chatgpt says:
git fetch --all
git branch
git checkout build-system
thank you git very cool
what was the result of git branch?
build-system wasn't fetch
okay, what happens if you list all remote branches?
git branch -r
so the branch exists but it isn't created locally which is very strange. as a last attempt, we can maybe try to create a new local branch that tracks the remote branch?
git checkout -b build-system origin/build-system
your network is unstable and it will probably fail
nvm, It's too much of a hassle
thanks tho
I'm gonna get thru this atp
deleted the folder, recloned and manually called the submodules command and it worked on first try
cool, and the branch?
build-system
yes
running install.bat
okay, cool
okay
if I ever release something commercially I never want any of this
I'll just write everything from scratch 😭
haha, I can relate to that
new version of lit engine available for download. https://litengine.org/download
./LitEngine: error while loading shared libraries: libBulletDynamics.so.3.05: cannot open shared object file: No such file or directory
ups, I forgot to set a command
it should now be fixed. the website is building with the linux's fix
it should be up in a few minutes
alright
Nice
interesting shader bug
hey i tried downloading your engine but for some reason when i try to launch it i get errors and it does not open
Seems like deploying on multiple platforms is the worst
basically, I didn't built the engine statically while releasing and that's why you're having those issues. I fixed the Linux ones but not the windows linking issues yet
ah alright
what did you use for the ui?
hi, I'm using Dear ImGui for the UI using rlImGui backend
Hi there, what do you think of the ui? I'm making some small changes to make it easier in the eyes and more intuitive and I'd like to see the improvements I can still make before I push it.
70 Likes in the forum. Thank you so much!
another image
I mean the folders looks too large
And files too
You should color differents parts on the right for example lights is gentle yellow color and physics is blue
Just an example
that would go against the gray shade part of the theme. I will decrease the assets explorer cards a bit
it does look better
ty
I think it looks good, I will push the changes
the code editor save and reload (i think) buttons look kinda big imo
and the scene editor ones kinda
do 2/3 of the current size feel alright?
Plugins are coming!
Using python, I created a simple plugin that creates an imgui window
nice
do you support non-builtin editors?
btw have you considered .gitignoring the Makfile?
not yet but it can be customizable with plugins I hope
I decided to delete it. It does not longer exist in the plugins branch
I see, Im tryna build your engine on my mac again
I have a few questions
youre including the source of bullet as a submodule but are also requiring it to be installed as a lib?
same with a few other libs
yes. the source files are needed for the compiler to build the executable but building bullet source files is time consuming and sometimes throws errors. So in order to build the engine faster I download the pre compiled libs and use the source files for the compiler to find the definitions
I see
Im pretty sure all your libs work on macos, just ffmpeg is a little weird on apple silicon
really? how so?
I think its because of how the package manager installs it, also is there a full list of dependencies?
all the dependencies are inside include/ but some of them are only headers and they don't need to be installed
bullet, ffmpeg, libglm, python3.11 and tbb are the ones I installed using a PKG manager.
Lit Engine has events support. You can, from python, create event listeners and set a callback that runs when something is triggered. Implemented onEvent (entity creation)
plugin example of triggers and listeners. Python can't access the array of entities so it have to wait for the triggered to be called.
Python code for reference:
import random
import os
entityAddedFlag = False
entityRemovedFlag = False
def entityCreated():
global entityAddedFlag
print("Entity created!")
entityAddedFlag = True
def entityRemoved():
global entityRemovedFlag
print("Entity removed!")
entityRemovedFlag = True
def initPlugin():
print("Hello, Plugins!")
onEntityCreation("pythonListener", entityCreated)
onEntityDestruction("pythonListener", entityRemoved)
def updatePlugin():
initWindow("Plugin " + str(entityAddedFlag), 200, 200, True)
if entityAddedFlag:
drawText("An entity was added!", -1, -1, Vector3(0, 255, 0))
if entityRemovedFlag:
drawText("An entity was removed!", -1, -1, Vector3(255, 0, 0))
# Skybox changer code
Auto Exposure is now available. Darker colors will slowly transition to brighter colors to match how our eyes behave when transition from a dark place to a whiter place.
Wtf thats so cool
thanks man
yeah that's pretty cool
PBR is going well but the performance is not the strongest yet
side by side comparison of Lit engine renderer vs polyhaven renderer of the same model
Truly a barrel moment
so true
PBR scene
with Ambient Occlusion it would be perfect
do you know any simple and easy to implement Ambient Occlusion technique?
so cool
thanks
ermm gonna do an unnecesarry ping but @lapis torrent did do some ambient occlusion on their minecraft clone
I believe he did from the screenshots he posted but they are probably voxel based
oh
but I'm curious to hear his answer
Yep, my Ambient Occlusion is entirely voxel based
But I think you can maybe use a shader for AO? (for any 3D project not for a voxel game)
Becouse mine uses the voxel grid for colculation
Looks great so far! And AO will make it look evan better!
Also (I don't know if it is already enabled or not but) you could apply Anti Aliasing to make it look less noisy
yes, I took an area screenshot, so it got pixelated
I can use ssao but I couldn't implement it (I kinda suck as shaders)
awesome!
performance is only slow when there are multiple high resolution textures to be mapped in the GPU. does anyone know how it could be optimized?
should I instead pass a 2d array and use the UV coordinates to map through it?
Best speed ever
Lit is a new open-source 3D engine to make your imagination take a breath. Learn more in here!
there's another game engine?
but the website links chatgpt gave me were right
ok
I created a new account to use gpt 4o free samples and used this prompt:
Hi. what can you tell me about Lit Engine? Can you provide me with the game engine's website URL and some information?
chatgpt is a not know your engine ask it about engine
if you use gpt 4o with web access it identifies the engine
Ok
any planned updates coming soon?
yes, I'm making version 0.0.5 with upgraded lighting and shader effects, improved UI, scripting, audio plugins, unreal like material editor, etc..
and you need to update your theme in your editor ?
that's just the default one but you can create your own
but what is bad in the current theme?
the is bad is a default also
pov : me when lit engine is dead
ok
I'm preparing a breaking change to Lit Engine. Branch and latest commit.
A game engine with the speed and portability of cpp made with raylib. - GitHub - luis605/Lit-Engine at materials
This new material system will allow you to create a "master" material and "children materials". Similar to Unreal Engine
This means you will have more control over the material itself. You will be allowed to multiply a texture, let's say the normal texture making the normal effect more protruding.
The material children will be displayed in the material inspector section: Entity Inspector -> Material; and the master material inside the node editor.
Since this feature adds complexity, Lit Engine will provide its users with material templates so that the users don't have to create their materials from scratch if they don't want to.
This feature is expected to take a while to implement. Since I have school and this year is exam year I won't be able to develop as much as I want to, so I don't expect to have this feature implemented before the end of next year's summer.
The purpose of this version is to make Lit Engine "usable" with acceptable graphics, performance, features, scripting capabilities and intuitiveness and this is a common feature implemented in many graphics software such an blender and unreal that allow the end user to have more control over the renderer. This feature also goes under the costumizable render pipeline that was asked to be implemented and under the current wish-list.
I would also hear what you have to think about this feature. Do you have any concerns or ideas?
If you'd like you can contribute to the code. I'm currently implementing the node system. I'm using TheDMD's imgui-node-editor that gives me more control over the node's editor but requires me to implement the node system myself.
What can you do?
-Review and enhance the node rendering.
-Help me implement the links between pins.
-"Pass information" between connected pins through links.
I'm finishing a basic node rendering with title pins and the node content's render. After that I aim to start working on the pins connection and information transmission between nodes
Here is the imgui-node-editor system github repo I'm using.
do you know about node sorting algorithms ?
yes, like topology and breadth-first search algorithms?
basically performing a DFS
why?
i just thought maybe i could gather ur help someday for a project that requires me to use my brain to sort nodes
i made a lua parser that turns lua bytecode into a graph
but the thing is that i'm so trash i can't figure out a way to properly represent a control flow graph with 2d nodes
I never implemented such algorithms. I just know them from the top tho
Nodes rendering and a basic linking system up and running
the link start and end position still need some review
Not memory safe yet! Links now pass data between (void* type which is not memory safe). The image shows 2 nodes, a slider of type int and 1-x node. The slider is passing -27 to 1-x. Doing the math, 1-(-27)=28 which is the output that is shown on the node text.
I also fixed the links position shifting.
the changes will be pushed soon.
use std::any if you're on C++
totally forgot about its existence. thank you ❤️
The website is looking good. I hope to publish it on the Christmas holidays
New UI live: https://litengine.org/
Lit is a new open-source 3D engine to make your imagination take a breath. Learn more in here!
I'm gonna slow down the development to focus on myself and to rest
Does the Lit Engine have a physics engine?
yep, bullet3
Update
Just commited this commit to Lit Engine.
Idea
The material system now introduces a hierarchical structure for materials:
Master Materials - Serve as blueprints for shaders, storing the node graph that defines the material logic and cannot be directly assigned to an entity as they represent the core shader logic.
Child Materials (or Master Material Instances) - Provide specific values for the shader parameters defined in their Master Material; Can be assigned to multiple entities, with each instance having its unique parameter values; Can be reused and are flexible as they share the same shader while enabling customization.
/------------\
| Texture |
\------------/
/------------\
| Multiply | multiplies the values in the texture
\------------/
Material Node -> Pin: Normal Map
This simple material setup will modify a normal map’s intensity:
-> A Multiply value > 1 makes the map more intense.
-> A Multiply value < 1 softens it.
What's New?
-> Graph Representation: Implemented!
The nodes are now represented as a dependency graph for a clean dependency structure.
Next Steps
-> Compile the shader based on the graph.
-> Dynamically link the shader with GPU buffers to enable real-time parameter edits.
wow your engine has come so far
a long way to go too
I'm exploring with tree-like structure for acyclic and easier graphs. Example of it working flawlessly:
Console output:
Node 11
├─ (Pin: 13) -> Node 1 (Pin: 2)
├─ (Pin: 14) -> Node 3 (Pin: 4)
└─ (Pin: 19) -> Node 7 (Pin: 9)
└─ (Pin: 8) -> Node 5 (Pin: 6)
Sometimes nodes are not rendered. Still investigating. Next job after cleaning up the code and tweaking it is passing this to a shader.
I'm thinking of having some predefined functions such as:
const char* multiplyColorTextureShaderNode = R"(
vec4 multiplyColorTextureShaderNode(vec4 texColor, float multiplier) {
return vec4(texColor.rgb * multiplier, texColor.a);
}
)";
const char* multiplyFloatShaderNode = R"(
float multiplyFloatShaderNode(float value, float multiplier) {
return value * multiplier;
}
)";
const char* OneMinusXShaderNode = R"(
float oneMinuxX(float value) {
return 1 - value;
}
)";
That get injected/appended into a string containing the shader code if needed. then I procedurally generate the code. Example:
vec4 diffuseTexture(texCoords) {
vec4 loadedDiffusePixelValue = sample texture... // Immutable
loadedDiffusePixelValue = multiplyColorTextureShaderNode(loadedDiffusePixelValue, OneMinusXShaderNode(loadedDiffusePixelValue.x, 0.3)); // C++ side generated
return loadedDiffusePixelValue;
}
Then I just load the shader from memory and voila.
what do you think?
The c++ side generated code will be a bit messy and not directly changable by the user
Only Lit Engine will handle it.
Seems to be working.
We have a shader function for the clear coat parameter 🎉
C++ generated function
float magicNumber() { return multiplyFloat(5.966000, 1.0 - 13.310000); }
I updated the shader generator to support pin-based code calculation. Now, the shader code is generated based on the pins in each node, allowing for more accurate handling of nodes with multiple input pins, like the root node.
vec4 diffuseMap() {
return vec4(1.000000, 1.000000, 1.000000, 1.000000);
}
float magicNumber() {
return multiplyFloat(1.0 - 18.018000, 1.0 - multiplyFloat(49.091999, 1.0 - 18.018000));
}
Fyi, Arch winesapos: #raylib-promotion message
BTW, for 1.1% of python code, makes for a heavy dependency. Probably making python an optional "feature" would be better to avoid friction of installs.
how do you suggest the scripting to be implemented?
c++ will be added probably in this version so make python an add-on?
I don't know how you added the scripting, but luau or lua could be fine and could go directly in the lit engine binary.
And yes, making things add on is probably better. But you know best your codebase and you've done the python integration so you probably know more about how it can be integrated. I know luau is a good candidate as I've used it and it's pretty easy and debuggable.
For C++ are you going to use dynamic libs that tag on ?
I chose python for its ecosystem, ease of use and the future it promises in terms of performance. And that were some of the reasons why I didn't choose Lua.
I'm gonna use static libraries so there is no dll dependency issue
Luau is already used for game code and performance(basically Roblox scripting)
yes but a while ago the ecosystem of libraries and functionalities were not promising. idk how it is now
Normal lua isn't indeed performance focused.
yeah
What libraries does python give you that are valuable ?
the pip has lots of valuable libraries for algorithms such as path finding, file manipulation, and other specific libraries but it is up to the user to choose what libraries they want
panda is also a valuable library
Objection C# ecosystem is better than python and libs are good
+best pckage manager you ever get
Euhm.... I would expect an engine to expose path finding, not the scripting language libraries... Using something like Recast/Detour.
Guys, IMHO you don't want your scripting language to expose libs that should be the responsibility of the engine or engine add-ons/plugins.
In the end, I don't have any sway or skin in this game, but having different deps or libs available based on what scripting language you use could urk users, maybe.
Its up to lixt /shrug
Yup
yes I agree with you
but one of the flaws with Roblox is that the users needed to write their own libraries
and that was something I dislike
but I will do some research and see how the ecosystem is doing
this