You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The examples use premake. Each example is a project on it's own. Premake will setup the build systems for each project for you, and download any needed libraries (raylib and box2d)
For Visual Studio
Run premake-VisualStudio.bat. When it is done each example folder will have a .sln file in it that you can open and run.
For MinGW
Run premake-mingw.bat. When it is done each example folder will have a makefile that you can build, just cd into the example folder and type make.
For GCC On Linux
Run "premake5 gmake2". When it is done each example folder will have a makefile that you can build, just cd into the example folder and type make.
For GCC On MacOs
Run "premake5.osx gmake2". When it is done each example folder will have a makefile that you can build, just cd into the example folder and type make.
Circle In View 2D
Code showing how to check if a circle is inside a view cone. Shows examples of using dot products to find what side of a vector a point is on, and how to compute the nearest point on a vector to another point.
Texture Repeat
An example of how to do a repeating background inside a camera 2d
Full 3d Billboards
An example of how to make a billboard that follows the camera in any orientation
Unsorted Billboards
An example of using shaders to discard pixels with 0 alpha to allow billboards to be drawn in any order.
Ray2d And Rect Intersection
Code to show how to quickly detect if a 2d ray intersects a rectangle
Rect Circle Collisions
Example of how to get the intersection point between a rectangle and a cirlce and use that to do collision detection.
This is one way to do collisions on a player in 2/2.5d against world objects.
Camera Clamp
A simple example of how to keep a camera view on a map but still follow the player when possible.
Camera World Rect
A simple example of how to get the screen rectangle in world space, with pan and zoom taken into account
Mouse Zoom
An example of how to zoom a Camera2d around the mouse cursor.
Platform Motion
Example of simple platfomer motion and collision
rlgl_example
Example of using raw rlgl to draw geometry
lua_embed
Example of embeding lua into a game and exposting functions and data to lua scripts, using raylib
camera worldspace
Example of how to use a camera to create a nominal worldspace with any window size