Remix.run Logo
Raylib v6.0(github.com)
156 points by rydgel 6 hours ago | 22 comments
POiNTx 37 minutes ago | parent | next [-]

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.

[0] https://odin-lang.org/

forsalebypwner 4 hours ago | parent | prev | next [-]

The new software renderer looks very cool. Will have to give this a spin on an ESP32S3

jared0x90 a minute ago | parent [-]

what display are you talking to ? i haven't touched an ESP in a few years, this sounds like a fun reason to dust one off.

alex_x 3 hours ago | parent | prev | next [-]

I'm currently building my roguelike in swift using c-interop with raylib - this brings me so much joy

dioxide 3 hours ago | parent [-]

more info pls.

alex_x 2 hours ago | parent [-]

there is not much to brag about yet :'(

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) {}

sivakon 44 minutes ago | parent | next [-]

Do you use any bindings or directly use C functions (with a modulemap) in Swift?

alex_x 40 minutes ago | parent [-]

No bindings, I wrote a few wrappers myself to make often used functions a bit more swifty, but otherwise its pretty smooth sailing

kenshi an hour ago | parent | prev [-]

This sounds cool. You mentioned Swift's macros - would you mind talking a bit how you are using them?

alex_x an hour ago | parent [-]

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

sleepycatgirl 3 hours ago | parent | prev | next [-]

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.

sibit an hour ago | parent | prev | next [-]

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.

vivzkestrel 2 hours ago | parent | prev | next [-]

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

nkrisc 19 minutes ago | parent | next [-]

I think engines like Unreal, Unity, and Godot will remain popular with people who are more interested in creating a game than creating a game engine.

> if yes what are the things that raylib is missing that these engines have?

Asset management and import pipelines, rendering pipeline, loads of ready-to-go features like environments, baked lighting and global illumination, AO, reflections, particle systems, input mapping and event propagation, scripting, audio systems, GUI systems, and lots more.

Raylib is a library that you could use to build all that stuff, but otherwise it's a useful library, not a fully-featured game engine.

If you don't want a game engine and know exactly what you features you need and want to build only that, then Raylib is a great option.

If you don't want to write a global illumination system or asset management pipeline but would rather focus on creating gameplay, then a game engine is a good choice.

techjamie 2 hours ago | parent | prev | next [-]

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.

runevault 39 minutes ago | parent | prev | next [-]

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.

gmueckl 2 hours ago | parent | prev | next [-]

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.

Jtarii 33 minutes ago | parent | prev | next [-]

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.

c0balt 2 hours ago | parent | prev [-]

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).

phplovesong 27 minutes ago | parent | prev | next [-]

Looking forward to Tsoding's new 6.0 speedrun.

boarush 3 hours ago | parent | prev [-]

Waiting for Tsoding to do another Raylib speedrun

metaltyphoon 3 hours ago | parent [-]

That's his go to for "hello world" for different languages :D. I love it so much.