Lattay / raylib-lsk

Lattay's Starter Kit for Raylib, small boiler plate for Raylib projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. (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.
  2. Restart the history by doing rm -rf .git && git init
  3. Run make run to check that everything works.
  4. In the Makefile replace EXE=starter_kit with EXE=name_of_your_game.
  5. Change the content of credit.txt.
  6. In the menu add the buttons you need.
  7. 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.
  8. In main.h StateName enum add states before STATE_NUM
  9. In main.c include headers for your new states and add new GameState pointers in states array.
  10. In inputs.h ActionType enum add actions between NOT_AN_ACTION and ACTION_NUM.
  11. In inputs.c implement the action checkers and add them to the checkers array.
  12. Modify the code as you need. Files with an lsk_ prefix should not need to be modified. Others will.

TODO

  • Wrap libpartikel ?

About

Lattay's Starter Kit for Raylib, small boiler plate for Raylib projects

License:MIT License


Languages

Language:C 95.0%Language:Makefile 5.0%