This template provides a base structure to start developing a small raylib game in plain C

Overview

DISCLAIMER:

Welcome to raylib game template!

This template provides a base structure to start developing a small raylib game in plain C. The repo is also pre-configured with a default LICENSE (zlib/libpng) and a README.md (this one) to be properly filled by users. Feel free to change the LICENSE as required.

All the sections defined by $(Data to Fill) are expected to be edited and filled properly. It's recommended to delete this disclaimer message after editing this README.md file.

This template has been created to be used with raylib (www.raylib.com) and it's licensed under an unmodified zlib/libpng license.

Copyright (c) 2014-2021 Ramon Santamaria (@raysan5)


$(Game Title)

$(Game Title)

Description

$(Your Game Description)

Features

  • $(Game Feature 01)
  • $(Game Feature 02)
  • $(Game Feature 03)

Controls

Keyboard:

  • $(Game Control 01)
  • $(Game Control 02)
  • $(Game Control 03)

Screenshots

TODO: Show your game to the world, animated GIFs recommended!.

Developers

  • $(Developer 01) - $(Role/Tasks Developed)
  • $(Developer 02) - $(Role/Tasks Developed)
  • $(Developer 03) - $(Role/Tasks Developed)

Links

  • YouTube Gameplay: $(YouTube Link)
  • itch.io Release: $(itch.io Game Page)
  • Steam Release: $(Steam Game Page)

License

This game sources are licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.

$(Additional Licenses)

Copyright (c) $(Year) $(User Name) ($(User Twitter/GitHub Name))

Issues
  • Suggestion: Move makefile and resources outside of the src folder

    Suggestion: Move makefile and resources outside of the src folder

    This is more of making this a bit easier to work with and that is having the makefile at the top level of the project folder. Also would like to see the resource folder at the top level to not clutter up the src folder.

    opened by jalexcole 3
  • Convention for line-width?

    Convention for line-width?

    I notice that there is no constraint on line width and even in markdown, lines can be very wide, although GitHub Markdown treats simple line breaks as just white space.

    I like to have my code and other text formats confined to a line width that I can print and also view easily in any editor. I even set VS Code to break on a right margin and I clean them up usually. The only exception I can think of is URLs and Markdown links. I am known to put a ruler line at the top of a text file just for this purpose.

    Put differently, if I continued to do that (my width magic number is 72) would it still be compatible with the raylib convention? I.e., in a pull request?

    opened by orcmid 2
  • CONVENTIONS omits typedef conventions

    CONVENTIONS omits typedef conventions

    The typedef cases seem to be for title case. It is not shown, although an already-defined type is used in an example.

    I am unclear about the situation with all caps types that also happens in raylib.

    The trick around using struct declarator names as defined types is also worthy of note. A mindmeld of the C Language type form :).

    E.g.,

    typedef struct Texture { ... } Texture
    
    static CoreData CORE = { 0 )
    
    opened by orcmid 1
  • make fails when converting to C++

    make fails when converting to C++

    All I did was change the compiler from gcc to g++ and change the flag -std=c99 to -std=c++17

    [email protected]:~/Dropbox/dev/silver-palm-tree/src$ make make raylib_game make[1]: Entering directory '/home/alex/Dropbox/dev/silver-palm-tree/src' g++ -c raylib_game.c -o raylib_game.o -Wall -std=c++17 -D_DEFAULT_SOURCE -Wno-missing-braces -s -O1 -D_DEFAULT_SOURCE -I/usr/local/include -I. -I/home/alex/Dropbox/dev/silver-palm-tree/src -I/home/alex/Dropbox/dev/silver-palm-tree/src/external -DPLATFORM_DESKTOP raylib_game.c:25:28: error: invalid conversion from ‘int’ to ‘GameScreen’ [-fpermissive] 25 | GameScreen currentScreen = 0; | ^ | | | int raylib_game.c: In function ‘void ChangeToScreen(int)’: raylib_game.c:142:21: error: invalid conversion from ‘int’ to ‘GameScreen’ [-fpermissive] 142 | currentScreen = screen; | ^~~~~~ | | | int raylib_game.c: In function ‘void UpdateTransition()’: raylib_game.c:189:29: error: invalid conversion from ‘int’ to ‘GameScreen’ [-fpermissive] 189 | currentScreen = transToScreen; | ^~~~~~~~~~~~~ | | | int raylib_game.c: At global scope: raylib_game.c:120:13: warning: ‘void ChangeToScreen(int)’ defined but not used [-Wunused-function] 120 | static void ChangeToScreen(int screen) | ^~~~~~~~~~~~~~ make[1]: *** [Makefile:407: raylib_game.o] Error 1 make[1]: Leaving directory '/home/alex/Dropbox/dev/silver-palm-tree/src' make: *** [Makefile:398: all] Error 2

    opened by jalexcole 1
  • `PLATFORM=PLATFORM_WEB make` don't work on MacOS

    `PLATFORM=PLATFORM_WEB make` don't work on MacOS

    After brew install emscripten, brew install raylib, cloning this repo and running PLATFORM=PLATFORM_WEB make from the src/ dir gives this output:

    % PLATFORM=PLATFORM_WEB make
    /Applications/Xcode.app/Contents/Developer/usr/bin/make raylib_game
    emcc -c raylib_game.c -o raylib_game.o -std=c99 -Wall -Wno-missing-braces -Wunused-result -D_DEFAULT_SOURCE -Os -I. -I../../raylib/src -I../../raylib/src/external -I../../raylib/src/extras -DPLATFORM_WEB
    make[1]: emcc: No such file or directory
    make[1]: *** [raylib_game.o] Error 1
    make: *** [all] Error 2
    

    which emcc finds it at /usr/local/bin, which is on the $PATH

    opened by bart9h 1
Owner
Ray
I make videogames and tools to make videogames. I teach videogames dev. Always available for talks, conferences and master classes.
Ray
Game Of Life Implementation in C using Raylib

Game of life Rules The game evolution is determined by simple rules applied on each cells. Any live cell with fewer than 2 live Neighbors dies. Underp

Jonas STIRNEMANN 2 Oct 28, 2021
Asteroids Game Made with C++ and Raylib

AstroX [WIP] Work in progress Asteroids game made with C++ and Raylib. Screenshots Start Screen In Game Debug Game Over Controls Movement: W | Up Arro

Derin Önder Eren 6 Dec 21, 2021
A simple example of a tic-tac-toe game written in C using raylib.

raylib-C-TicTacToe A simple example of a tic-tac-toe game written in C using raylib. ?? Table of Contents About Built Using Authors ?? About Raylib-c-

ZimonIsHim 2 Feb 10, 2022
A modification of the playstation UI to help with launching and developing homebrew.

Orbis-Toolbox A modification of the playstation UI to help with launching and developing homebrew

Greg 84 Jun 21, 2022
A Framework for developing Unity games with Lua

UnityLua A Framework for developing Unity games with Lua Warning: This is not finished, I don't suggest using this until it is complete or you may run

Down 6 Feb 15, 2022
Yet another approach to developing a personal 3D graphics engine. Windows + Direct3D 12.

RegEngine Yet another approach to developing a personal 3D graphics engine. Windows + Direct3D 12. Work in progress... Nothing to see here. I just ren

Adam Sawicki 8 Jun 22, 2022
crwusiz branch is comma.ai devel-staging base xx979xx HKG_community source add

crwusiz openpilot crwusiz branch is comma.ai devel-staging base xx979xx HKG_community source add v0.8.9 [ allow white panda and gray panda, OP3T suppo

Lee Jong Mun 28 Jun 20, 2022
GlslViewer is a flexible console-base OpenGL Sandbox to display 2D/3D GLSL shaders without the need of an UI

GlslViewer is a flexible console-base OpenGL Sandbox to display 2D/3D GLSL shaders without the need of an UI

Patricio Gonzalez Vivo 3.2k Jul 3, 2022
Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World.

OpenXRay OpenXRay is an improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. S

null 2k Jun 29, 2022
Stealthy way to hijack the existing game process handle within the game launcher (currently supports Steam and Battle.net). Achieve external game process read/write with minimum footprint.

Launcher Abuser Stealthy way to hijack the existing game process handle within the game launcher (currently supports Steam and Battle.net). Achieve ex

Ricardo Nacif 75 Jun 29, 2022
Game Boy, Game Boy Color, and Game Boy Advanced Emulator

SkyEmu SkyEmu is low level cycle accurate GameBoy, GameBoy Color and Game Boy Advance emulator that I have been developing in my spare time. Its prima

Sky 60 Jun 19, 2022
A programming game, in which your goal is to help a group of dwarves establish a small outpost in the middle of a dangerous forest.

"Since they were to come in the days of the power of Melkor, Aulë made the dwarves strong to endure. Therefore they are stone-hard, stubborn, fast in

Alexey Nikolaev 4 Jan 8, 2022
Small cheat I made for Back 4 Blood during the open beta of the game (Aug 12th to 16th, 2021)

Small cheat I made for Back 4 Blood during the open beta of the game (Aug 12th to 16th, 2021). This is meant as a reference only. I do not condone cheating in any way, it is merely a side project for fun.

null 7 May 16, 2022
A small tool with Windows Minesweeper game

Donkey Minesweeper A small tool with Windows Minesweeper game Background As a high school student learning Olympics Informatic. Sometimes we have to u

null 3 Nov 13, 2021
A small 2d game coded using c (minilibx library )

SPOODY VS SOPU ! Goals This project’s objectives are similar to all this first year’s objectives: Rigor, use of C, use of basic algorithms, informatio

Wa Die 2 May 1, 2022
This a small cheat menu for Sword With Sauce (a UE4 game) that I made in a week or so.

This a small cheat menu for Sword With Sauce (a UE4 game) that I made in a week or so. The reason why I am sharing the project is that it is probably one of the best sources to learn UE game hacking from. The project has many comments.

1hAck 25 Jun 27, 2022
This project is a small 2D game with minilibx

Welcome to SO_LONG project ?? (School 21) Project finished (125%) This project is a small 2D game with minilibx (graphic library made by school21), wh

null 1 Feb 18, 2022
This project is a small 2D game with minilibx. You'll learn about textures, sprites and tiles.

(੭。╹▿╹。)੭ so_long This project is a small 2D game with minilibx. You'll learn about textures, sprites and tiles. Preview How play the game To play thi

ChloeKim 8 May 9, 2022
A cycle-accurate Game Boy and Game Boy Color Emulator, with rewind feature.

Azayaka is a free and open-source Game Boy and Game Boy Color emulator written in C++. Features Cycle-Accurate emulation. Console based Debugg

Zach Collins 14 Dec 16, 2021