1. EuRayLib4 Released!

Hello all,

I have just released EuRayLib4. This is a wrapper for Raylib version 4. I have written this from scratch. I started a new wrapper for this version as the old code base was pretty messy. However, I did fix the typos in the old code base. Initially I was going to wait on this, hoping that Eu 4.2.0 might come out, but when my internet was cutting in and out the other day, I needed something to do. So I wrapped Raylib version 4. It has been made to be as Euphoria friendly to use as possible.

NOTE: I tried to compile raygui as a DLL. However I couldn't get it to compile. If anyone is able to, I wouldn't mind wrapping raygui.

Some examples are included.

Get here: https://github.com/gAndy50/EuRayLib4

Example:

without warning 
 
include EuRay4.ew 
include flags.e 
 
atom Width = 800 
atom Height = 600 
 
InitWindow(Width,Height,"Simple Window") 
 
SetTargetFPS(60) 
 
atom ball_x = Width / 2 
atom ball_y = Height / 2 
atom ball_size = 30 
 
while not WindowShouldClose() do 
	BeginDrawing() 
	 
	 if IsKeyDown(KEY_RIGHT) then 
	 	ball_x += 2.0 
	 	elsif IsKeyDown(KEY_LEFT) then 
	 		ball_x -= 2.0 
	 		elsif IsKeyDown(KEY_UP) then 
	 			ball_y -= 2.0 
	 			elsif IsKeyDown(KEY_DOWN) then 
	 				ball_y += 2.0 
	 end if 
	  
	if ball_x <= 0 then 
		ball_x = 0 
		elsif ball_x >= Width then 
			ball_x = 780 
	end if 
	 
	if ball_y <= 0 then 
		ball_y = 0 
		elsif ball_y >= Height then 
			ball_y = 550 
	end if 
	 
    ClearBackground(BLACK) 
     
	DrawText("Use arrow keys to move ball.",10,10,15,YELLOW) 
     
	DrawCircleV(ball_x,ball_y,ball_size,GREEN) 
	 
    EndDrawing() 
end while 
 
CloseWindow() 
 
new topic     » topic index » view message » categorize

2. Re: EuRayLib4 Released!

Hey Andy, nice.

But if you have a spare afternoon, why don't you just write your own gui api?

-)

cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuRayLib4 Released!

ChrisB said...

Hey Andy, nice.

But if you have a spare afternoon, why don't you just write your own gui api?

-)

cheers

Chris

I wouldn't mind writing my own gui api, but it would be a lot more work than wrapping something that is already available.

new topic     » goto parent     » topic index » view message » categorize

4. Re: EuRayLib4 Released!

Hehe, my point is that your output is so prolific, you could probably knock one together, that would look better than the one you are talking about, in what, 30 mins, on hour tops!

I barely have time to download one of your libs and look before another one's out.

Is tic short for tongue in cheek?

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

5. Re: EuRayLib4 Released!

Icy_Viking said...

I wouldn't mind writing my own gui api, but it would be a lot more work than wrapping something that is already available.

I get that, I really do, but... long story short:
IupTable wraps IupMatrix on desktop/Phix - total pita and still bugridden
IupTable wraps <table> in HTML/JavaScript/CSS - almost as bad and even more bugridden
... some time later ...
IupGraph ignores IupPlot (which it replaces) and does it all on a plain canvas.
IupGraph is auto-transpiled to HTML/JavaScript (no CSS needed) and works just fine.
The latter draws axis lines with text labels, a grid, a text title, as well as the actual lines.
You can run this little demo online here (nb MINSIZE ain't working yet).
Methinks restarting IupTable from scratch doing it all by hand ain't such a bad idea....

Of course you gotta have some basics to work with, in my case a plain canvas.

new topic     » goto parent     » topic index » view message » categorize

6. Re: EuRayLib4 Released!

petelomax said...
Icy_Viking said...

I wouldn't mind writing my own gui api, but it would be a lot more work than wrapping something that is already available.

I get that, I really do, but... long story short:
IupTable wraps IupMatrix on desktop/Phix - total pita and still bugridden
IupTable wraps <table> in HTML/JavaScript/CSS - almost as bad and even more bugridden
... some time later ...
IupGraph ignores IupPlot (which it replaces) and does it all on a plain canvas.
IupGraph is auto-transpiled to HTML/JavaScript (no CSS needed) and works just fine.
The latter draws axis lines with text labels, a grid, a text title, as well as the actual lines.
You can run this little demo online here (nb MINSIZE ain't working yet).
Methinks restarting IupTable from scratch doing it all by hand ain't such a bad idea....

Of course you gotta have some basics to work with, in my case a plain canvas.

I did wrap an older version of IUP. Its an ok GUI library. I mean if QT had a C port, I might wrap that. I tried wrapping FLTK's C port, but it was a mess. Also, the thing is I'm not sure where to really start with making my own GUI.

new topic     » goto parent     » topic index » view message » categorize

7. Re: EuRayLib4 Released!

I wonder if it is worth trying to embed Julia in Eu/Phix: https://docs.julialang.org/en/v1/manual/embedding/

new topic     » goto parent     » topic index » view message » categorize

8. Re: EuRayLib4 Released!

Icy_Viking, That's really cool! I have heard of RayLib 4.0 recently and thought about trying it. Hopefully I'll have some time to try it soon in Euphoria with your library. smile

new topic     » goto parent     » topic index » view message » categorize

9. Re: EuRayLib4 Released!

ryanj said...

Icy_Viking, That's really cool! I have heard of RayLib 4.0 recently and thought about trying it. Hopefully I'll have some time to try it soon in Euphoria with your library. smile

Thanks ryanj. I continue to update my other wrappers as well as their libraries get updates. As for the GUI thing, I might compiling/building raygui again, but I kept getting errors. I did recently look into Enlightment/EFL, while it is a C library, it is more for Linux, though windows builds do exist, I did try and start a wrapper for it, but I kept running into compatbilility errors and DLLs, so I figured it would be more trouble than it would be worth.

Also, adding to its complexity is that it is a series of layers of libraries built upon each other. So if you use one, you might need to use another. Regardless, I think it would be a cool library or wrapper to have for Euphoria.

https://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries

http://win-builds.org/doku.php/1.5.0_packages#efl_1112-3_-_enlightenment_core_library

I found premade Windows binaries, but again it is a huge library and it would be a lot of work to get working properly.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu