You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Ray 7787102573 Remove hardcoded path #2200 3 years ago
..
audio Improve assets license information 3 years ago
core Update core_input_gamepad.c 3 years ago
models Add missing file extensions for drag-and-drop support (#2090) 3 years ago
others REVIEWED: example: Compute shader Game-of-life 3 years ago
physics Fix VC warnings for examples (#2085) 3 years ago
shaders REVIEWED: example: Compute shader Game-of-life 3 years ago
shapes Fix VC warnings for examples (#2085) 3 years ago
text Update LICENSE.md (#2179) 3 years ago
textures Fix VC warnings for examples (#2085) 3 years ago
CMakeLists.txt REMOVED: EXAMPLE: models_material_pbr 3 years ago
Makefile Added new examples to Makefile 3 years ago
Makefile.Android Reviewed templates Makefiles 3 years ago
Makefile.Web Remove hardcoded path #2200 3 years ago
README.md REMOVED: Network examples 3 years ago
build.zig Add macos support to zig build system (#2175) 3 years ago
examples_template.c Update examples_template.c 3 years ago
raylib_compile_execute.bat Update raylib_compile_execute.bat 3 years ago
raylib_makefile_example.bat Updated some scripts paths 3 years ago

README.md

Building the Examples

The examples assume you have already built the raylib library in ../src.

With GNU make

  • make builds all examples
  • make [module] builds all examples for a particular module (e.g make core)

With Zig

The Zig toolchain can compile C and C++ in addition to Zig. You may find it easier to use than other toolchains, especially when it comes to cross-compiling.

  • zig build to compile all examples
  • zig build [module] to compile all examples for a module (e.g. zig build core)
  • zig build [example] to compile and run a particular example (e.g. zig build core_basic_window)

EXAMPLES LIST

category: core

Examples using raylib core platform functionality like window creation, inputs, drawing modes and system functionality.

## example image developer new
01 core_basic_window core_basic_window ray
02 core_input_keys core_input_keys ray
03 core_input_mouse core_input_mouse ray
04 core_input_mouse_wheel core_input_mouse_wheel ray
05 core_input_gamepad core_input_gamepad ray
06 core_input_multitouch core_input_multitouch Berni
07 core_input_gestures core_input_gestures ray
08 core_2d_camera core_2d_camera ray
09 core_2d_camera_platformer core_2d_camera_platformer avyy
10 core_3d_camera_mode core_3d_camera_mode ray
11 core_3d_camera_free core_3d_camera_free ray
12 core_3d_camera_first_person core_3d_camera_first_person ray
13 core_3d_picking core_3d_picking ray
14 core_world_screen core_world_screen ray
15 core_custom_logging core_custom_logging Pablo Marcos
16 core_window_letterbox core_window_letterbox Anata
17 core_drop_files core_drop_files ray
18 core_random_values core_random_values ray
19 core_scissor_test core_scissor_test Chris Dill
20 core_storage_values core_storage_values ray
21 core_vr_simulator core_vr_simulator ray
22 core_loading_thread core_loading_thread ray
23 core/core_quat_conversion core_quat_conversion Chris Camacho
24 core/core_window_flags core_window_flags ray

category: shapes

Examples using raylib shapes drawing functionality, provided by raylib shapes module.

## example image developer new
25 shapes_basic_shapes shapes_basic_shapes ray
26 shapes_bouncing_ball shapes_bouncing_ball ray
27 shapes_colors_palette shapes_colors_palette ray
28 shapes_logo_raylib shapes_logo_raylib ray
29 shapes_logo_raylib_anim shapes_logo_raylib_anim ray
30 shapes_rectangle_scaling shapes_rectangle_scaling Vlad Adrian
31 shapes_lines_bezier shapes_lines_bezier ray
32 shapes_collision_area shapes_collision_area ray
33 shapes_following_eyes shapes_following_eyes ray
34 shapes_easings_ball_anim shapes_easings_ball_anim ray
35 shapes_easings_box_anim shapes_easings_box_anim ray
36 shapes_easings_rectangle_array shapes_easings_rectangle_array ray
37 shapes_draw_ring shapes_draw_ring Vlad Adrian
38 shapes_draw_circle_sector shapes_draw_circle_sector Vlad Adrian
39 shapes_draw_rectangle_rounded shapes_draw_rectangle_rounded Vlad Adrian

category: textures

Examples using raylib textures functionality, including image/textures loading/generation and drawing, provided by raylib textures module.

## example image developer new
40 textures_logo_raylib textures_logo_raylib ray
41 textures_rectangle textures_rectangle ray
42 textures_srcrec_dstrec textures_srcrec_dstrec ray
43 textures_image_drawing textures_image_drawing ray
44 textures_image_generation textures_image_generation ray
45 textures_image_loading textures_image_loading ray
46 textures_image_processing textures_image_processing ray
47 textures_image_text textures_image_text ray
48 textures_to_image textures_to_image ray
49 textures_raw_data textures_raw_data ray
50 textures_particles_blending textures_particles_blending ray
51 textures_npatch_drawing textures_npatch_drawing Jorge A. Gomes
52 textures_background_scrolling textures_background_scrolling ray
53 textures_sprite_button textures_sprite_button ray
54 textures_sprite_explosion textures_sprite_explosion ray
55 textures_bunnymark textures_bunnymark ray
56 textures_mouse_painting textures_mouse_painting Chris Dill
57 textures_blend_modes textures_blend_modes Karlo Licudine
58 textures_draw_tiled textures_draw_tiled Vlad Adrian
-- textures_poly textures_poly Chris Camacho

category: text

Examples using raylib text functionality, including sprite fonts loading/generation and text drawing, provided by raylib text module.

## example image developer new
59 text_raylib_fonts text_raylib_fonts ray
60 text_font_spritefont text_font_spritefont ray
61 text_font_filters text_font_filters ray
62 text_font_loading text_font_loading ray
63 text_font_sdf text_font_sdf ray
64 text_format_text text_format_text ray
65 text_input_box text_input_box ray
66 text_writing_anim text_writing_anim ray
67 text_rectangle_bounds text_rectangle_bounds Vlad Adrian
68 text_unicode text_unicode Vlad Adrian
-- text_draw_3d text_draw_3d Vlad Adrian

category: models

Examples using raylib models functionality, including models loading/generation and drawing, provided by raylib models module.

## example image developer new
69 models_animation models_animation culacant
70 models_billboard models_billboard ray
71 models_box_collisions models_box_collisions ray
72 models_cubicmap models_cubicmap ray
73 models_first_person_maze models_first_person_maze ray
74 models_geometric_shapes models_geometric_shapes ray
75 ... ray
76 models_mesh_generation models_mesh_generation ray
77 models_mesh_picking models_mesh_picking Joel Davis
78 models_loading models_loading ray
79 models_orthographic_projection models_orthographic_projection Max Danielsson
80 models_rlgl_solar_system models_rlgl_solar_system ray
81 models_skybox models_skybox ray
82 models_yaw_pitch_roll models_yaw_pitch_roll Berni
83 models_heightmap models_heightmap ray
84 models_waving_cubes models_waving_cubes codecat
-- models_gltf_model models_gltf_model object71

category: shaders

Examples using raylib shaders functionality, including shaders loading, parameters configuration and drawing using them (model shaders and postprocessing shaders). This functionality is directly provided by raylib rlgl module.

## example image developer new
85 shaders_basic_lighting shaders_basic_lighting Chris Camacho
86 shaders_model_shader shaders_model_shader ray
87 shaders_shapes_textures shaders_shapes_textures ray
88 shaders_custom_uniform shaders_custom_uniform ray
89 shaders_postprocessing shaders_postprocessing ray
90 shaders_palette_switch shaders_palette_switch Marco Lizza
91 shaders_raymarching shaders_raymarching Shader by Iñigo Quilez
92 shaders_texture_drawing shaders_texture_drawing Michał Ciesielski
93 shaders_texture_waves shaders_texture_waves Anata
94 shaders_julia_set shaders_julia_set eggmund
95 shaders_eratosthenes shaders_eratosthenes ProfJski
96 shaders_fog shaders_fog Chris Camacho
97 shaders_simple_mask shaders_simple_mask Chris Camacho
98 shaders_spotlight shaders_spotlight Chris Camacho
99 shaders_hot_reloading shaders_hot_reloading ray
100 shaders_mesh_instancing shaders_mesh_instancing seanpringle, moliad
101 shaders_multi_sample2d shaders_multi_sample2d ray

category: audio

Examples using raylib audio functionality, including sound/music loading and playing. This functionality is provided by raylib raudio module. Note this module can be used standalone independently of raylib, check raudio_standalone example.

## example image developer new
102 audio_module_playing audio_module_playing ray
103 audio_music_stream audio_music_stream ray
104 audio_raw_stream audio_raw_stream ray
105 audio_sound_loading audio_sound_loading ray
106 audio_multichannel_sound audio_multichannel_sound Chris Camacho

category: physics

Examples showing physics functionality with raylib. This functionality is provided by physac library, included with raylib sources. Note this library is not linked with raylib by default, it should be manually included in user code.

## example image developer new
107 physics_demo physics_demo Victor Fisac
108 physics_friction physics_friction Victor Fisac
109 physics_movement physics_movement Victor Fisac
110 physics_restitution physics_restitution Victor Fisac
111 physics_shatter physics_shatter Victor Fisac

category: others

Examples showing raylib misc functionality that does not fit in other categories, like standalone modules usage or examples integrating external libraries.

## example image developer new
119 raudio_standalone ray
120 rlgl_standalone ray
121 easings_testbed Juan Miguel López
122 embedded_files_loading Kristian Holmgren

As always contributions are welcome, feel free to send new examples! Here it is an examples template to start with!