Raylib Overview
When you draw or otherwise locate objects in raylib, coordinates are measured in pixels. Your raylib coord axes start at the top left of your window (that is, the top left corner of the window is the origin [0 px, 0 px]).
Raylib uses double-buffering, and your program runs in a loop that (after initializing things) goes like:
check if looping should continue (if not, exits loop)
update the game/world (compute the state of things for the next frame)
begin-drawing (starts you off with a new buffer)
clear screen (clears the back buffer)
draw the game/world (on the back buffer)
end-drawing (swaps buffers)
To keep organized, separate out your functions into
init_game, update_game, and
draw_game.
So that your game/sim/computation loop doesn’t speed out of control,
call pr.set_target_fps(60) in your init_game
(see next page).