Most active commenters
  • pjmlp(4)
  • flohofwoe(3)

←back to thread

241 points fschuett | 31 comments | | HN request time: 1.202s | source | bottom
Show context
ciroduran ◴[] No.45662771[source]
Raylib's author was very happy to announce that you can compile an entire raylib program with no dependencies other than, say, being a win32 app https://x.com/raysan5/status/1980322289527976202
replies(4): >>45663602 #>>45665595 #>>45666276 #>>45667634 #
1. smlacy ◴[] No.45663602[source]
but ... why?
replies(7): >>45663616 #>>45663685 #>>45664169 #>>45665350 #>>45665446 #>>45667159 #>>45669821 #
2. foota ◴[] No.45663616[source]
As someone who was once a child trying to figure out how to compile and link things to use SDL, I think there's some educational value in letting people make games without having to dive deep into how to use C++ toolchains.
replies(2): >>45663859 #>>45666773 #
3. zamadatix ◴[] No.45663685[source]
The mantra for the library is "raylib is a simple and easy-to-use library to enjoy videogames programming." It's for hobbyist, learners, tinkerers, or just those that want to enjoy minimalistic graphics programming without having to deal with interfacing with modern machines yourself.

The default Windows installer bundles the compiler and a text editor to make poking at C to get graphics on the screen (accelerated or not) a 1 step process. Raylib is also extremely cross platform, has bindings in about every language, and has extra (also header only, 0 dependency) optional libraries for many adjacent things like audio or text rendering.

When I first started to learn C/C++ in the 2000s I spent more time fighting the IDE/Windows/GCC or getting SDL/SFML to compile than I did actually playing with code - and then it all fell apart when I tried to get it working on both Linux and Windows so I said fuck it and ignored that kind of programming for many years. Raylib is about going the opposite direction - start poking at C code (or whatever binding) and having it break and worry about the environment later when you're ready for something else.

replies(1): >>45665563 #
4. SJC_Hacker ◴[] No.45663859[source]
If you want to do that, skip C++ entirely and just use Javascript or Python. You can get shiny things really quickly.
replies(1): >>45664198 #
5. abnercoimbre ◴[] No.45664169[source]
I mean this with all the appropriate venom we can muster: this attitude is why software quality is nonexistent.
6. irilesscent ◴[] No.45664198{3}[source]
I think there's still value in learning the C++ language and making a game or a demo is quite rewarding although raylib does have bindings for basically every conceivable language.
replies(1): >>45665571 #
7. rererereferred ◴[] No.45665350[source]
Why not? The original Doom didn't use a GPU renderer. It should be possible to do simple 3d stuff in today's computers without it.
replies(2): >>45665811 #>>45666106 #
8. stodor89 ◴[] No.45665446[source]
Because GPU APIs are a nightmare clustertruck.
replies(1): >>45665731 #
9. pjmlp ◴[] No.45665563[source]
I never ever bothered to compile SDL/SFML from source, what is so hard dumping the binaries into a folder, set the include paths for the compiler and linker?

Although I may imagine newbies may face some challenges dealing with compiler flags.

replies(3): >>45665758 #>>45666120 #>>45669139 #
10. pjmlp ◴[] No.45665571{4}[source]
Agreed, especially since it is the main language in the games industry, however that doesn't mean it should be the very first experience.
11. mungaihaha ◴[] No.45665731[source]
1000x less performance is a bigger clusterfuck
replies(2): >>45665905 #>>45670594 #
12. flohofwoe ◴[] No.45665758{3}[source]
> what is so hard dumping the binaries into a folder, set the include paths for the compiler and linker?

The problems already start with getting the precompiled libraries from a trusted source. As far as I'm aware the SDL project doesn't host binaries for instance.

replies(1): >>45665883 #
13. 1313ed01 ◴[] No.45665811[source]
Even Quake launched with software rendering. Not sure if the first release even had support for any hardware acceleration?
replies(1): >>45666277 #
14. pjmlp ◴[] No.45665883{4}[source]
Like these? https://github.com/libsdl-org/SDL/releases/tag/release-3.2.2...
replies(1): >>45666240 #
15. rootnod3 ◴[] No.45665905{3}[source]
It's not meant for "let's make the next AAA game". It's for "Hey, I wanna try a fun idea".
16. sfn42 ◴[] No.45666106[source]
The original doom wasn't even proper 3d. It was a sort of 2,5d.

And sure you can do 3d rendering on modern CPUs. It's just better on GPUs. Like thousands of times better.

replies(2): >>45666749 #>>45671291 #
17. fsloth ◴[] No.45666120{3}[source]
Raylib is a pedagogical tool among other things and as such I think a kind of first principles approach has it’s merits.

But I also just use the precompiled libs :)

18. flohofwoe ◴[] No.45666240{5}[source]
Yeah like these, somehow my google fu didn't bring that link up, only outdated forum posts from people looking for SDL binary releases.
replies(1): >>45666608 #
19. flohofwoe ◴[] No.45666277{3}[source]
IIRC GLQuake was more like an experiment, only Quake II had proper GL support from the start.
20. pjmlp ◴[] No.45666608{6}[source]
No need for Google fu.

1 - Open https://www.libsdl.org/

2 - Download section on bottom left => SDL Releases

It has been there at least since SDL 2.0 early days, not feeling like tracking changes on Wayback Machine.

21. Flamingoat ◴[] No.45666749{3}[source]
The main limitation of the engine is you couldn't have room over room. There is definitely three dimensions when playing the game.
22. HelloNurse ◴[] No.45666773[source]
I'd make the opposite argument about educational value. If you learn to compile libraries and programs you have, so to speak, passed an exam: you are ready to "make games" with confidence because you know what you are doing well enough to have no fear of tool complications.

What should be minimized is the accidental complication of compiling libraries and programs, for example convoluted build systems and C++ modules.

replies(1): >>45667266 #
23. kragen ◴[] No.45667159[source]
This site is for hackers, which basically means people who like to do things like this. If you can't understand why someone would be interested in this, probably you should remain silent and try to understand hackers rather than commenting.
24. krapp ◴[] No.45667266{3}[source]
If you learn to compile libraries and programs, you just learn how to compile libraries and programs. That doesn't teach you anything about how to "make games." It doesn't even make game development significantly easier.

I think the real answer to educating people about making games without the complications of low level programming would be using a framework like Godot or languages like Python or Lua.

replies(1): >>45668360 #
25. HelloNurse ◴[] No.45668360{4}[source]
Of course technical concerns aren't directly relevant to making games, but they are still necessary. Productive development means overcoming technical hurdles, not only domain specific challenges.

What if you cannot adopt some library that would do something very useful because you lack the skill integrate or replace CMake or Bazel or Autoconf? Unnecessary technical constraints impact game quality.

What if due to insufficient automation the time between tests after making a very small change is 10 minutes rather than 10 seconds? Reduced productivity impacts game quality.

replies(1): >>45668489 #
26. sarchertech ◴[] No.45668489{5}[source]
Very useful skills to have. But they don’t need to be learned during the very first lesson on the very first day unless you are trying to filter people out for some reason.
27. zamadatix ◴[] No.45669139{3}[source]
Not much to a developer. To a novice (potentially very young) user there's confusion why there are 3 versions for e.g. Windows, which to pick from and why, how to set the compiler/linker flags for the build tuple, and then confusion about how to make it work on the alternative targets for their friends (e.g. the web target or the Linux ARM Pi target for class) and why that has to be different steps. None of that is particularly complicated once you go through it all, but it is a bit of a barrier to the "see something on the screen" magic happening to drive interest. Instead, raylib is just a header file include, like a text based "hello world", regardless of platform - even if you don't want to use the pre-made bundle.

Or, more simply, it makes the process "easy as a scripting language" rather than "pretty easy".

28. aj_hackman ◴[] No.45669821[source]
As someone working on a game engine with a multithreaded SSE/NEON implementation of ~GL 1.3 under the hood, this is rad for many reasons other than portability or compatibility. You get full access to every pixel and vertex on the screen at any point in the rendering pipeline. This allows for any number of cool (also likely multithreaded) postprocessing effects that you don't have to shoehorn through a brittle, possibly single-platform shading language and API.
29. stodor89 ◴[] No.45670594{3}[source]
It's slower indeed, but it's easier to write and debug, more portable, and gives you total control over the render pipeline. It's good for experimentation and learning, and would still be trivial to compile and run 20 or 50 years from now. And with how obscenely fast modern CPUs are, it might even be fast-enough for a simple 3D game.
30. alxmdev ◴[] No.45671291{3}[source]
Someone always points out how Doom wasn't "real 3D" like it's some sort of gotcha. Games are smoke and mirrors, it's all a 2D grid of pixels at the end.
replies(1): >>45672728 #
31. sfn42 ◴[] No.45672728{4}[source]
Well yeah, a 2d grid of pixels also describes the result of rendering a 2d game. It matters how you arrive at that 2d grid of pixels, that's why you can't render Crysis on just a CPU. At least not in real time.