Can recommend Odin[0] if you want to play with Raylib. Great for prototyping, although I'm not sure if it will last further on in development. Still have to figure that one out.
This is awesome. I don't do any graphics programming and don't really have any Raylib experience (or keep up with the projects developments) but it inspired me to begin learning C this past few months. I started building my own zero dependency software renderer (all it can do is color the background and render a spinning 2d rectangle). I'm really excited to dig into the rlsw source code later today.
About a year ago I was curious about building an ECS-based game engine with world simulations like in dwarf fortress, but obviously at much smaller scale while playing Starfield. Something cool started to materialise after tinkering so I thought why not turn it into a space-sim roguelike with a simulated living world.
I use swift because it gives me fantastic devex with all its great type inference and macros + raylib gives me cross platform input handling / rendering and window management.
C-interop setup is basically instant - you point compiler to c headers and the API becomes immediately visible on swift side
As for swift ergonomics, I particularly love that I can now write very readable code, like:
a lot of cool-looking stuff in my ECS is supported by Swift parameter packs; however, once you start using them a lot you find limits pretty soon.
One example: the following wouldn't compile in swift:
func query<each T, each K>(
_ body: ((repeat each T), (repeat each K)) -> Void
) { ... }
so you kinda work around it with extra type wrappers but this looks ugly - I've been using macros to hide some of the ugliness away xD
edit: the example is oversimplified just to show the point - in this example compiler can't really tell where T ends and K starts, so its logical; but I had more complex cases where a human would've been able to infer types correctly
Man, am I so excited. raylib is how I managed to actually.. start getting proper fun out of programming, and finally get some projects that could be considered complete, as small as they were.
do we still need unreal engine and unity? if yes what are the things that raylib is missing that these engines have? beginner gamedev so please take it easy here
Those engines serve a different purpose than a library like Raylib. They give you a bunch of stuff out of the box like lighting, raytracing (esp Unreal), pathfinding, and a ton of helper functions used in making a game like vector calculations.
Raylib helps you draw stuff, play sound, and do the basics. But you're gonna be writing your own lighting/raytrace/pathfind/etc functions and it's ultimately going to take longer. The upside is if you need to do something very unique, all of the power to mske it reality is in your hands because Raylib isn't opinionated on how your game logic works and how it's packaged up. It's just the delivery guy to give the result to the user.
I don't know that any open source project will ever compete with Unreal and its high end tech targeting the AAA space. But beyond that, Raylib doesn't give a ton of things an engine does because that is not the point of a library like it. This is to let someone build their own engine how they want, Unreal/Unity/Godot/etc let you give up some control and decision options to skip a ton of work building out a lot of basic features.
Raylib is for hobbyists that want control over everything, but don't want to go through the hassle of dealing with DirectX/OpenGL. It isn't competing with Unreal/Unity at all.
Raylib is more of a low level runtime library than an engine. Godot, Unity, Unreal etc. come with very extensive interactive tooling for game creation. Modern engines are really about interactive content editing and collaboration in the development process. This is essentially table stakes for game development in larger teams, and comes with a lot of added internal complexity.
The scope/feature set of both is just quite a lot wider, from IDEs to an ecosystem of 1st and 3rd party libraries and extensions. The rendering engines and their capabilities are also quite different (with Unreal and Unity both being quite a lot more advanced).
[0] https://odin-lang.org/
About a year ago I was curious about building an ECS-based game engine with world simulations like in dwarf fortress, but obviously at much smaller scale while playing Starfield. Something cool started to materialise after tinkering so I thought why not turn it into a space-sim roguelike with a simulated living world.
I use swift because it gives me fantastic devex with all its great type inference and macros + raylib gives me cross platform input handling / rendering and window management.
C-interop setup is basically instant - you point compiler to c headers and the API becomes immediately visible on swift side
As for swift ergonomics, I particularly love that I can now write very readable code, like:
> world.addRelation(attacker, Attacks.self, target) > world.addRelation(player, Owns.self, sword)
or
> for (entity, position) in world.query(Position.self).with(Health.self, Velocity.self).without(Enemy.self) {}
One example: the following wouldn't compile in swift:
so you kinda work around it with extra type wrappers but this looks ugly - I've been using macros to hide some of the ugliness away xDedit: the example is oversimplified just to show the point - in this example compiler can't really tell where T ends and K starts, so its logical; but I had more complex cases where a human would've been able to infer types correctly
Raylib helps you draw stuff, play sound, and do the basics. But you're gonna be writing your own lighting/raytrace/pathfind/etc functions and it's ultimately going to take longer. The upside is if you need to do something very unique, all of the power to mske it reality is in your hands because Raylib isn't opinionated on how your game logic works and how it's packaged up. It's just the delivery guy to give the result to the user.