Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 255c7ba Apr 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GameOver.png First commit Apr 18, 2018
GameOver.xcf First commit Apr 18, 2018
Makefile First commit Apr 18, 2018
README.md try svg in readme Apr 27, 2018
SDL2.bmp First commit Apr 18, 2018
example Added descriptive link in readme Apr 19, 2018
example.c now setting correct title after Game Over Apr 18, 2018
helper.c First commit Apr 18, 2018
helper.h First commit Apr 18, 2018
idle.png First commit Apr 18, 2018
idle.xcf First commit Apr 18, 2018
intro.png First commit Apr 18, 2018
intro.xcf First commit Apr 18, 2018
make_states First commit Apr 18, 2018
pause.xcf First commit Apr 18, 2018
paused.png First commit Apr 18, 2018
playing.png First commit Apr 18, 2018
playing.xcf First commit Apr 18, 2018
sketchy.ttf First commit Apr 18, 2018
states.png spelling error fixed and dpi of screenshot changed Apr 27, 2018
states.svg spelling error fixed and dpi of screenshot changed Apr 27, 2018

README.md

Simple High-Level State patterns in C.

chart

The Bash Script make_states creates a compiling statepattern.

./make_states > foo.c

$ make foo

compiles it.

An example with Makefile is enclosed.

Press left MouseButton to goto next State. The Window Title reflects the State. In Playing State right MouseButton triggers Game Over!

See: This Post

Get in touch on SDL-Discourse.

For more Informations on Gamestates see Videos:

A warning about OOP:

Object-Oriented Programming is Bad

But if you insist:

Implementing a Main-Game-Loop in C++.

Game States and Game Loops in Python.

You can’t perform that action at this time.