← Home ← Back to /g/

Thread 106407661

47 posts 20 images /g/
Anonymous No.106407661 >>106407700 >>106407865 >>106408184 >>106408721 >>106413060
"Errrm should I use raylib?” Edition

/gedg/ Wiki: https://igwiki.lyci.de/wiki//gedg/_-_Game_and_Engine_Dev_General
IRC: irc.rizon.net #/g/gedg
Progress Day: https://rentry.org/gedg-jams
/gedg/ Compendium: https://rentry.org/gedg
/agdg/: >>>/vg/agdg
Graphics Debugger: https://renderdoc.org/

Requesting Help
-Problem Description: Clearly explain your issue, providing context and relevant background information.
-Relevant Code or Content: If applicable, include relevant code, configuration, or content related to your question. Use code tags.

Previous: >106332806
Anonymous No.106407700 >>106407774 >>106407808 >>106408518 >>106413589
>>106407661 (OP)
>"Errrm should I use raylib?” Edition

Definitely not.

It's a simple library, it speeds up development significantly, but it has several fundamental problems. One of them is that it's completely dependent on OpenGL. Adding Vulkan support is impossible without refactoring the entire library. They're even considering starting a new raylib from scratch with Vulkan support; you'll likely run into the same problem if another Vulkan alternative is released in the future.

There's no software rendering precisely because of this mandatory OpenGL dependency.

The whole thing is so messy that they can't even implement hacks like TinyGL or any OpenGL in software.

Use SDL
Anonymous No.106407774 >>106407918
>>106407700
SDL is much lower level than raylib, it doesn't handle any of the gl stuff, it just gives you a buffer you can render into with something else. All desktop OSes can run one version of OGL or another, so it really isn't that a big a deal to be limited to it.
Anonymous No.106407808 >>106407918
>>106407700
>One of them is that it's completely dependent on OpenGL
Why should I care?
>There's no software rendering precisely because of this mandatory OpenGL dependency.
I don't care.

But I will probably use SDL.
Anonymous No.106407865
>>106407661 (OP)
>"Errrm should I use raylib?” Edition

How does it compare to Monogame? Mind you I've only dicked around surface level with either.
Anonymous No.106407872 >>106414802
>>106402904
>why learn it
Because it's guaranteed to run anywhere, unlike Vulkan?
Anonymous No.106407918 >>106407929 >>106408290 >>106408495 >>106413937
>>106407808
>I don't care.
>But I will probably use SDL.
>Why should I care?
Why should you care about this?

>>106407774
This isn't a problem currently, but it could become one when OpenGL stops working. The future trend is for Vulkan to completely replace OpenGL.

The problem is that the library will become unusable in the future.
Anonymous No.106407929 >>106408185 >>106408213 >>106408281 >>106414404
>>106407918
>when
never ever ever. Macos doesn't support vulkan period, but it still supports opengl.
t. pogeet !!b2oSUmilA2N No.106408184
>>106407661 (OP)
leaving this to fix on next threads
sub : /gedg/ - Game and Engine Development General #299
Anonymous No.106408185
>>106407929
You are relying on a current circumstance to minimize a potential future issue, which weakens the reasoning.

The fact that macOS supports OpenGL but not Vulkan at present does not provide any assurance regarding future support. In fact, this merely reinforces my earlier point that β€œThis isn't a problem currently,” without excluding the possibility that it may become one.

That said, each developer is free to adopt the tools they deem appropriate. I would only emphasize that when I advise against the use of Raylib, I am referring specifically to larger or long-term projects that require robustness and maintainability. For experimental, educational, or short-lived applications, Raylib serves its purpose adequately; There are no significant precedents of major projects built on Raylib, as developers typically choose more established solutions to safeguard the value of their time and effort.
Anonymous No.106408213 >>106408282 >>106408518
>>106407929
dude wtf are you even talking about, opengl is deprecated in mac
If the support is removed tomorrow there is nothing to complain about, it was warned many years ago.
remove opengl = raylib stops working on mac
Anonymous No.106408281
>>106407929
>support vulkan period
and never will lol
Anonymous No.106408282 >>106408518
>>106408213
>If the support is removed tomorrow there is nothing to complain about, it was warned many years ago.
there is absolutely something to complain about, regardless of how long ago the warning was, and apple knows that.
Anonymous No.106408290
>>106407918
if that day ever comes you can bet your ass raylib will support it or something similar
Anonymous No.106408495
>>106407918
I don't think you understand that ubiquitous APIs don't just get support dropped because there's so many applications that depend on them (There's more OpenGL applications than Vulkan ones)
Anonymous No.106408518 >>106408528
raylib is a toy lib for making like game jam stuff, it's not for serious projects

>>106407700
SDL doesn't give you graphics unless you use the SDL_Renderer or SDL_GPU api. The latter is a good choice though you get dx12 / metal / vk with a thin wrapper. But you need to know how these APIs work under the hood if / when the wrapper fucks up. And a lot of the concepts are direct abstractions over modern platform specific rendering apis. E.g "transfer buffers in sdl3" are just staging buffers in vulkan.

>>106408213
>>106408282
Apple isn't going to just remove their OpenGL implementation overnight because it would break too much software. But it's not a good idea to start new software using OpenGL unless you're fine with never supporting Apple shit.

And even if apple did do this, we would end up with something like openglonmetal/MGL (OpenGL implementation using Metal), so existing OpenGL applications would continue to work.
Anonymous No.106408528 >>106408548
>>106408518
There's no reason you couldn't make a serious project with Raylib so long as your serious project was a 2D game
Anonymous No.106408548
>>106408528
Sure, it's not impossible. Balatro was made with LOVE2D and that's a similar tier abstraction.
Anonymous No.106408721
>>106407661 (OP)
sokol is a alternative you can also just use godot
t. pogeet !!b2oSUmilA2N No.106408872
Anonymous No.106408992 >>106409073 >>106409255 >>106409809
How do i make an object moving around a circle, maybe only using simple math, to rotate its sprite based on its x y position. i know there's angle but i'd like to not use that either, just, the very very short math, for convenient
Anonymous No.106409073 >>106409099
>>106408992
glm translate then rotate*deltatime
Anonymous No.106409099 >>106409118
>>106409073
...i use tululoo only. or game maker i guess. sorry it's not rotate but, Scroll. from 1 to 12, simulating a 3d form i suppose.
Anonymous No.106409118 >>106409151 >>106410113
>>106409099
learn English
Anonymous No.106409151
>>106409118
Well you got it the first time. also i got 7.0 ielts. Also this is for kids, supposedly.
Anonymous No.106409255
>>106408992
bump pl0x
t. pogeet !!b2oSUmilA2N No.106409809 >>106410043 >>106410064
>>106408992
>maybe only using simple math
I can't make the math any simpler than this
https://www.desmos.com/calculator/pc7krkou6t
Anonymous No.106410043 >>106410245
>>106409809
...there's the angles.
As for mine, they work, it's a circle, i dont' fukin know how,i dont care,maybeicare,maybenot,alsoitdontspiralout,itestedit, whatever, whatever. and it dont help me learn anything else that is needed to complete it, voila, voickan hell! thats all i got
Anonymous No.106410064
>>106409809
..Fuck i guess i did actually ask about, other things that that. Whoopsie, i do not, have knack needed i guess.


WELL THATS YOUR JOB, TROUBLESHOOTIN, aint it?! Whatsay you of divine challenges, other than century old pe- ch1ld catc- i mean um, iwasnt trying to say anything.
Anonymous No.106410113
>>106409118
t. pogeet !!b2oSUmilA2N No.106410245
>>106410043
>...there's the angles.
Anonymous No.106412072
Transformation matrices are probably my favorite thing about gamedev. They just work.
Anonymous No.106413060 >>106413490 >>106413540 >>106413651 >>106414277
>>106407661 (OP)
Questions:

1. Is it true that your first game should be something very simple, like Pong? Or is it better to work on your dream project from the start?
2. Is it possible to make a game open source and still earn some money from it?
3. What can a solo developer reasonably expect to accomplish, in terms of quality? Assuming that his artistic skills are decent.
4. How hard is it to implement multiplayer functionality? I've heard that it's very difficult.
5. Do you need to know math, or is logical reasoning enough? I've heard that 2D isometric games require math.

Thanks
Anonymous No.106413085
raylib is good for starters but there will come a point where you'll just have to write shit yourself.

1. The batched rendering chokes hard real fast so even for basic stuff like a tilemap you'll end up having to do your own VBOs if you don't want garbage performance
2. It lacks some basic things out of the box like stencil functions, raysan considers that too "advanced" despite being dead simple to add and use.
3. Audio module is lackluster. If you don't want fine-grained control it's probably fine but I just ripped it out and did the miniaudio handling myself
4. stb_truetype is lightweight but looks like ass, you'll want to replace it with freetype

I don't have many examples because raylib doesn't actually do that much at least for 2D (I know that's glossing over everything else like input but I think in the end graphics matter most). I understand why people call it a toy lib after using it, but the convenience of getting right into it is a plus. If you're decent you'll want to drop it and I can't fathom using it for 3D but someone else can comment on that.
Anyone saying you can't use it for a serious project probably mean using it out of the box, and yeah they'd be right, but it's not like the entire thing is fucked or anything.
Anonymous No.106413490 >>106414053
>>106413060
You’re asking questions you already know the answer to or can easily find the answer to. Cut the nodev activities.
Anonymous No.106413540 >>106413847 >>106414053 >>106414332
>>106413060
Read up on the experiences of other devs before setting up for failure.
>>>/v/719229341
Anonymous No.106413589
>>106407700
your platformer does not require vulkan
t. pogeet !!b2oSUmilA2N No.106413651
>>106413060
>first game should be something very simple
not necessarily but video games are very complex so your first game being simple helps with giving a glimpse of how complex your dream project can be.
>Is it possible to make a game open source and still earn some money
Possible it is but practically profitable it is not.
You game will share the same fate of any open source project out there so peanuts is the what you'll be earning.
>What can a solo developer reasonably expect to accomplish
whatever they are capable of accomplishing, totally dependent on their skills.
>How hard is it to implement multiplayer functionality?
If you have experience with full stack development(or dev ops) and socket programming then its not hard at all. If not, you are in for a long, hard ride.
>Do you need to know math
Yes.
You can just learn whatever you come across on the go. Won't take very long.
Anonymous No.106413847
>>106413540
Seems obvious the game would flop to me. Game engine hand holding is responsible for this.
Anonymous No.106413937
>>106407918
>but it could become one when OpenGL stops working.
OpenGL will NEVER stop working, but if it ever comes anywhere close to that, there'll be OpenGL->Vulkan translation layers out there --- EXCEPT THOSE ALREADY EXISTS: zink. Newer Linux driver stacks are moving to just translating everything to Vulkan.
Anonymous No.106414053 >>106414325
>>106413490
>>106413540
I've watched some videos, but there are contradictory opinions out there, and most Youtube channels are just trying to make money, so I trust you guys a bit more.
Anonymous No.106414277 >>106414332
>>106413060
A small game that is somewhat related to your dream game is the best course of action imo. When you complete your small game you'll realize what areas will be hardest to implement and you'll be able to witness mistakes and misunderstandings before they happen on your main project. Many successful devs began by making smaller versions of their most ambitious games (Celeste, Hollow Knight, Cave Story, etc).
Anonymous No.106414325 >>106414332
>>106414053
>so I trust you guys a bit more.
Your first mistake
Anonymous No.106414332
>>106413540
>>106414277
Thank you.

>>106414325
My first mistake was being born.
Anonymous No.106414404
>>106407929
MoltenVK works fine and just got 1.4 support.
Anonymous No.106414802
>>106407872
Vulkan will run on anything all the way back to the GTX700 series.
Anonymous No.106415689
Constructing a BVH:

>10: get a normalize vector going from the min point of the AABBs of the set in consideration to the max point
>20: sort all objects by their distance from a plane in the direction of this normal centered about the origin
>30: for each centroid of the objects along the chosen axis beginning at min, ending at max:
>>40: calculate the surface area of the bounding containers on each side of the plane formed by the chosen normal axis which runs through the centroid under consideration
>50: Choose the lowest point (i.e, the least surface area). This is the origin of the splitting plane.
>60: split into two nodes. Left includes objects behind the plane, right includes objects in front
>for left, goto 10.
>for right, goto 10