Lattay's Starter Kit
This is my small starter kit to quickly create Raylib games.
It contains a main game loop, a finite state machine to manage different screens, a default start menu, credit screen and end screen, an empty default level and some helpers.
This is MIT licensed, feel free to use it, change it or anything. If you ever make something with this I would be happy to ear about it.
Usage
- (if you use git for you project) clone this repository using
git clone https://github.com/lattay/raylib-lsk project_folder_name -b master --depth 1
. - Restart the history by doing
rm -rf .git && git init
- Run
make run
to check that everything works. - In the Makefile replace
EXE=starter_kit
withEXE=name_of_your_game
. - Change the content of credit.txt.
- In the menu add the buttons you need.
- Implement new states in separate files (always associate a C file with a header of the same name) using state.h.sample as a blueprint for the header.
- In
main.h
StateName
enum add states beforeSTATE_NUM
- In
main.c
include headers for your new states and add newGameState
pointers instates
array. - In
inputs.h
ActionType enum add actions betweenNOT_AN_ACTION
andACTION_NUM
. - In
inputs.c
implement the action checkers and add them to thecheckers
array. - Modify the code as you need. Files with an
lsk_
prefix should not need to be modified. Others will.
TODO
- Wrap libpartikel ?