Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Raylib for dolphin

93 views
Skip to first unread message

Zenchess

unread,
Nov 23, 2021, 2:59:47 PM11/23/21
to
Hi all, I have created raylib bindings to dolphin. Raylib is a graphics/game library that does opengl for 2d and 3d graphics, also handles input and pretty much anything you'd need for a game. It's a very simple c library that is easy to use. It's become pretty popular and has received funding I believe. It works great with dolphin and handles its own window creation. The only bug I've noticed is if you minimize the window, it crashes. There is a workaround I can post later where you have to modify the source of raylib yourself and compile your own dll.

First off I want to say if you downloaded my previous opengl package, the quality of this package is much higher, I release that one with some bugs in at least my examples. I haven't finished writing the methods for raylib, and in particular the 3d models structure I have had trouble duplicating as an externalStructure so 3d doesn't work properly yet. If someone wants to help that would be great.

These packages were made for dolphin 7.1.20 so if you need a package for an older version of dolphin for some reason I can work on that.
I will release this as MIT license just because that seems to be the one people use, but I'm not even sure a wrapper for another library should even be licensed, anyway.


To use you need the packages supplied in this zip, plus a raylib dll. I would get raylib 4.0 from its github 'releases' page under the visual studio build here: raylib-4.0.0_win32_msvc16.zip and put the dll in the same folder as your dolphin image, but rename it raylib.dll.

You can check out the examples package, in the class method there is a 'startGame' method with code you can use to start the demo "self new run"

The demos are a bunnymark example, a 3d raymarched shapes example (that uses a lot of gpu), a 3d camera example (with no models), an example of using a shader "paintingwithmaths" - use the arrow key to move the line.

link to the packages: http://zenchess.com/dolphin/RaylibDolphin.zip

Zenchess

unread,
Nov 23, 2021, 3:08:47 PM11/23/21
to
Oh and I just want to say that quite a lot of the library is not yet wrapped, but if there's a raylib function you want to use it's pretty easy to go here: https://www.raylib.com/cheatsheet/cheatsheet.html
and wrap the methods in the RaylibLibrary class. Check the help files for external interfacing for which data types to use when interfacing (int>sdword ) etc.

Zenchess

unread,
Nov 25, 2021, 5:16:27 PM11/25/21
to

I packaged this code with the git version of 7.1.2 branch , I just realized if you have the release installer for 7.1.2 installed you won't be able to load this package...

I've ran into lots of problems lately due to this issue. It seems that you can't even file out classes to be loaded in an earlier version of dolphin (like say 7.057.2)

Zenchess

unread,
Dec 12, 2021, 5:31:57 AM12/12/21
to
I have redone the package for the release version of 7.1.2, here it is: http://www.zenchess.com/dolphin/raylibDolphinRelease.zip

Joe Betz

unread,
May 28, 2023, 1:34:02 AM5/28/23
to
On Sunday, December 12, 2021 at 11:31:57 AM UTC+1, Zenchess wrote:
> I have redone the package for the release version of 7.1.2, here it is: http://www.zenchess.com/dolphin/raylibDolphinRelease.zip

Hi Zenchess, do you still have your Raylib package for Dolphin? I'm interested in using it, but the URL 404s.

Joe Betz

unread,
May 29, 2023, 7:42:43 PM5/29/23
to
I played around with Raylib in Dolphin for a few hours yesterday, just adding FFI functions as I needed them since the API is very simple. Really fun, easy to understand, and something I wish I had when I was first learning programming. But not good enough for professional use.

It's simply too patronizing for anyone with serious UI experience. For example, I need explicit frame controls rather than have it render at the target FPS for me, and while the functionality is there, but it's put so far out of reach that you have to recompile the library in order to use it.

I also ran into the issue of it crashing when you minimize a Window, and other critical issues too. Like the WindowShouldClose function immediately returning true without having hit the escape key or pressing the close button on the window. And then not being able to hook into the close button event any other way.

I'm sure it can also be worked around by modifying library code, but then that's two changes already and there's almost certainly more to come. All of which I'd need to document with anything I distribute with it due to the license. The documentation is a minor annoyance but having to debug C code is a real pain.

Raylib is definitely a performance improvement from GDI+, but the artificial ceilings and constraints make it feel about equal overall for making desktop apps. I still need some sort of hardware acceleration, however, so my plan now is to use SDL instead.
0 new messages