#A Hobby Engine I'm Working on.

82 messages · Page 1 of 1 (latest)

round cosmos
uneven crystal
#

the code looks hard to maintain and is messy

round cosmos
jovial falcon
#

What is the work of this code? (I don't know much about c and c++)

round cosmos
# jovial falcon What is the work of this code? (I don't know much about c and c++)

Nothing interesting yet. I'm gradually developing this.
My idea is that this whole engine would be somewhat like blender except being very modular. Developers would create client code that would be compiled into individual libraries and be ran on this engine (I may make my own scripting language as well if I reach that point in my CS career).
A sample client code would be: https://github.com/Weather-OS/TraceRayer/blob/master/Source/Core/Splash/SplashWindow.cpp

#

Each part of the engine would be split into their own libraries (like comasync and comui) so that I can make an SDK out of this.

jovial falcon
round cosmos
jovial falcon
round cosmos
#

I mean I may use it to make my own game at some point

jovial falcon
#

@round cosmos are you from india?

round cosmos
jovial falcon
#

so?

#

from where you are?

round cosmos
#

I don't understand how that would relate to anything though.

jovial falcon
#

no i want to get some tipps how to join a university in canada

#

so can we message in personal chat

#

?

round cosmos
# jovial falcon no i want to get some tipps how to join a university in canada

I have no clue how immigrants can apply to universities here but I assume if you get a student visa and take something like an IELTS exam to determine your english proficiency, you could apply to a university here. From what I've heard, most Indians apply to community colleges here instead because they are readily available and cheap, but your situation could be different.

jovial falcon
round cosmos
#

At least from what I've heard. I don't study at these colleges.

jovial falcon
#

so where do you study?

round cosmos
jovial falcon
#

ok that's no issue

jovial falcon
round cosmos
jovial falcon
#

ok can you suggest some comunnity college which needs less money or no money

#

or which can enroll me

#

and in india there is schooling upto 12th class only

round cosmos
jovial falcon
#

ok 🙂

#

btw in which year you are? 2nd yr?

round cosmos
#

third year technically.

jovial falcon
#

ohh so soon u are going to graduate

round cosmos
#

I'm going to pursue masters as well.

jovial falcon
#

can we become friend on discord?

round cosmos
#

sorry. I don't usually accept friend requests unless I know you irl

jovial falcon
#

wdym by irl?

round cosmos
#

in real life

jovial falcon
#

ohk that is wise decision

#

but i am a 11th class student

#

and i am not a** hacker**

round cosmos
# jovial falcon but i am a 11th class student

Yeah I don't think any college or university from anywhere around the world would enroll anyone without a hs diploma. The ones that do usually have 0 accreditation, or are sham colleges.

jovial falcon
#

ik ik i am just asking for making pathway to my future college

jovial falcon
round cosmos
jovial falcon
#

I meant ... are you a male or female?

round cosmos
#

yeah that's quite a personal question you're asking...

jovial falcon
#

ik but i should know to whom i am talking becuz some things may hurt you if you are a female that's why i am asking

#

sorry for this question if it hurts you

#

r u there @round cosmos ?

#

sorry

#

sorry @round cosmos sorry for the question

jovial falcon
#

plz pardon me for my words 🙏🥺

lethal ore
round cosmos
#

I do have a goal of where I want to go with this though

lethal ore
#

Good

safe star
#

Why did you pick GTK over something like GLFW?

round cosmos
#

More specifically, I wanted this to be GTK because I want to experiment around with it.

#

I may also implement Qt at some point.

safe star
#

Do you draw GNOME widgets in Vulkan or separate from Vulkan? Bit confused as to where a GUI library fits into a game engine

round cosmos
safe star
#

Is this engine for a specific use case? Cause I would imagine most people making a game would want to make their own interfaces with their own styles

round cosmos
#

No not really. It’s more for a hobby and me just learning stuff.
I would definitely not recommend you to use my engine, but if you want, go ahead. I licensed it under MIT and LGPL.

safe star
#

Hmm ok fair enough

sharp dew
#

CMake Suggestions:

instead of include_directories, use target_include_directories.

Set compiler flags in a toolchain file instead of CMakeLists.txt, then pass the toolchain to cmake using -DCMAKE_TOOLCHAIN_FILE=bla-toolchain.cmake at configure time. Don't use target_compile_options and especially don't use target_compile_options with flags like -O2 or -O3. By default CMake should set sensible optimization options when -DCMAKE_BUILD_TYPE=Release is set, and your code breaks -DCMAKE_BUILD_TYPE=Debug.

If you want to enable default warnings, at the very least put them in an if guard that validates you are using gcc or clang first, as not all compilers use that syntax for warnings.

Pick up GTK4 and other related packages using find_package instead of pkg_check_modules. pkg_check_modules should only be used for modules without CMake support that have pkgconfig support. I know at least GTK4 should work with CMake find_package

Don't set SHARED on your library, instead leave it off unless you have a good reason, then set -DBUILD_SHARED_LIBS=ON at configure time so that this way someone can statically link your library if they want to.

Do not set -fvisibility=hidden, it adds a lot of work to get shared libraries working which isn't really necessary.

This is broken:

target_compile_definitions(TraceRayer PRIVATE      RESOURCE_DIR="${CMAKE_INSTALL_PREFIX}/share/TraceRayer/Resources" )

Your install prefix should be settable using --prefix but this will break it since you're using an absolute path.

round cosmos
# sharp dew CMake Suggestions: instead of `include_directories`, use `target_include_direct...

I will update the cmake and use toolchain files in the future and sort out the debug and release builds but I have some notes regarding what you said.

libadwaita and uuid don't have FindAdwaita or FindUUID directives under cmake, so I'm forced to use pkg_check_modules for them, I have updated GTK4 to use find_package though.

I have a pretty good reason as to why I'm going to use SHARED on my libraries and it is because I'm also planning on developing an SDK besides this engine, which aims to use these libraries.

-fvisibility=hidden is set because I want explicit control as to what functions I want to export for each library. It's what the TR_API macro is used for. Without it, my libraries would just export everything that's not static, and in my case, this is not ideal.

The target_compile_definiton is definitely not broken, because of how I fetch resources within the code itself.

sharp dew
#

for example cmake --install your-project-build --prefix=/opt will not work correctly

round cosmos
#

This parameter I set is completely for a “last resort” option.

calm parrot
calm parrot
#

go to the dm this is not the place