←back to thread

241 points fschuett | 1 comments | | HN request time: 0s | source
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 #
smlacy ◴[] No.45663602[source]
but ... why?
replies(7): >>45663616 #>>45663685 #>>45664169 #>>45665350 #>>45665446 #>>45667159 #>>45669821 #
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 #
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 #
1. 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".