1. EuRaylib v 6

Hi all,

I have finished writing my wrapper of Raylib for thew new version of Raylib, version 6!

I'll probably add some more examples to the repo soon and organize it shortly.

[https://github.com/gAndy50/EuRaylib6]

[https://www.raylib.com/index.html]

include raylib.e 
 
atom width = 800 
atom height = 450 
 
public constant TRUE = 1, FALSE = 0 
 
InitWindow(width,height,"Bouncing Ball") 
 
sequence ballPos = {GetScreenWidth() / 2.0, GetScreenHeight() / 2.0} 
sequence ballSpeed = {5.0, 4.0} 
atom ballRadius = 20 
atom gravity = 0.2 
 
integer useGravity = TRUE 
integer paused = 0 
atom frameCounter = 0 
 
SetTargetFPS(60) 
 
while not WindowShouldClose() do 
 
	if IsKeyPressed(KEY_G) and useGravity = TRUE then 
		useGravity = FALSE 
		elsif IsKeyPressed(KEY_G) and useGravity = FALSE then 
			useGravity = TRUE 
	end if 
	 
	if IsKeyPressed(KEY_P) and paused = 0 then 
		paused = 1 
		elsif IsKeyPressed(KEY_P) and paused = 1 then 
			paused = 0 
	end if 
	 
	if (paused = 0) then 
	 
		ballPos[1] += ballSpeed[1] 
		ballPos[2] += ballSpeed[2] 
		 
		if useGravity = TRUE then 
			ballSpeed[2] += gravity 
		end if 
		 
		if ballPos[1] >= GetScreenWidth() - ballRadius or ballPos[1] <= ballRadius then 
			ballSpeed[1] *= -1.0 
		end if 
		 
		if ballPos[2] >= GetScreenHeight() - ballRadius or ballPos[2] <= ballRadius then 
			ballSpeed[2] *= -0.95 
		end if 
	end if 
	frameCounter += 1 
	 
	BeginDrawing() 
	 
		ClearBackground(RAYWHITE) 
		 
		DrawCircleV(ballPos,ballRadius,MAROON) 
		 
		DrawFPS(1,1) 
		DrawText("Press P to Pause",10,20,20,GREEN) 
		DrawText("Press G to turn gravity on/off",10,40,20,GREEN) 
 
	EndDrawing() 
end while 
 
CloseWindow() 
 
new topic     » topic index » view message » categorize

2. Re: EuRaylib v 6

Icy_Viking said...

Hi all,

I have finished writing my wrapper of Raylib for thew new version of Raylib, version 6!

I'll probably add some more examples to the repo soon and organize it shortly.

[https://github.com/gAndy50/EuRaylib6]

[https://www.raylib.com/index.html]

Wow, you're really fast - Raylib 6 was released just three days ago.

But why aren't you just update the old euraylib repo? Instead, there's a new repo. The old one is already listed in the Raylib bindings list.

Also, there are actually already some minor changes for 6.1, but that doesn't affect you for now if you're using the release DLL.

Great work!
Edit : My mistake i had an old dll in the euphoria bin directory

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

3. Re: EuRaylib v 6

andreasWagner said...
Icy_Viking said...

Hi all,

I have finished writing my wrapper of Raylib for thew new version of Raylib, version 6!

I'll probably add some more examples to the repo soon and organize it shortly.

[https://github.com/gAndy50/EuRaylib6]

[https://www.raylib.com/index.html]

Wow, you're really fast - Raylib 6 was released just three days ago.

But why aren't you just update the old euraylib repo? Instead, there's a new repo. The old one is already listed in the Raylib bindings list.

Also, there are actually already some minor changes for 6.1, but that doesn't affect you for now if you're using the release DLL.

Great work!
Edit : My mistake i had an old dll in the euphoria bin directory

I made a new repo because Raylib v 6 was a new big release. The DLL is the release DLL for Raylib 6. I find its better to use the stable release DLL then a bleeding edge build.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu