summaryrefslogtreecommitdiff
path: root/chickadee.scm
Commit message (Collapse)AuthorAgeFilesLines
...
* Move SDL game loop implementation to its own module.David Thompson2018-08-231-146/+2
|
* Make the game loop modular!David Thompson2018-08-231-179/+182
| | | | | | | | | | | | | | | This is really cool! Now users can plug in whatever backend they'd like and are not forced to use SDL and OpenGL. Thanks to Chris Webber for showing me the Lux library for Racket that does exactly this. * chickadee.scm (run-game): Remove all SDL/OpenGL code, replace with generic render/update keyword arguments. (run-game/sdl): New procedure. * examples/lines.scm: Update for API breakage. * examples/nine-patch.scm: Ditto. * examples/sprite.scm: Ditto. * examples/text.scm: Ditto. * examples/tiled.scm: Ditto.
* Display proper backtraces when there is no game loop error handler.David Thompson2018-06-241-11/+10
| | | | | * chickadee.scm (call-with-error-handling): Do not catch errors when the error hook has nothing in it.
* error: Pass error key and args to error hook.David Thompson2018-05-031-2/+2
| | | | | * chickadee.scm (call-with-error-handling): Run hook with error key and args.
* Add game loop error hook.David Thompson2018-05-031-47/+75
| | | | | | | * chickadee.scm (error-hook): New variable. (display-game-loop-error, call-with-error-handling): New procedures. (run-hook*): New syntax. (run-game): Wrap all hooks with error handling.
* Invert Y coordinate in mouse motion event.David Thompson2018-04-211-1/+1
| | | | | | | Reported-By: Christopher Howard <christopher.howard@qlfiles.net> * chickadee.scm (run-game): Invert the Y coordinate received from SDL's mouse motion event.
* Revert "Add error handling to game loop."David Thompson2018-01-171-73/+65
| | | | This reverts commit 8cbb7eed56c4b5edd780c2d51aaa0a4c3eab7350.
* Add error handling to game loop.David Thompson2018-01-121-65/+73
| | | | | | * chickadee.scm (error-handler): New procedure. (with-error-handling): New syntax. (run-game): Handle errors caught when running hooks.
* Fix broken mouse Y coordinate inversion.David Thompson2018-01-091-1/+1
| | | | * chickadee.scm (run-game): window-height is not a procedure!
* Fix inverted Y coordinates in mouse events.David Thompson2018-01-051-3/+7
| | | | * chickadee.scm (run-game): Invert all Y coordinates received from SDL.
* Move color module into render namespace.David Thompson2017-08-081-1/+1
|
* Fix unbounded heap growth in game loop.David Thompson2017-04-251-2/+2
| | | | | * chickadee.scm (run-game): Make sure that the recursive calls to the update loop are in tail position.
* Ensure that the viewport is cleared at the beginning of each frame.David Thompson2017-01-251-0/+4
| | | | | * chickadee.scm (run-game): Switch to the null viewport at the beginning of each frame to ensure other viewports are cleared.
* Fix guile-sdl2 procedure name.David Thompson2017-01-251-1/+1
| | | | * chickadee.scm (run-game): s/keyboard-event-repeat/keyboard-event-repeat?/
* Add audio support.David Thompson2017-01-241-0/+1
| | | | | | | * chickadee/audio.scm: New file. * Makefile.am (SOURCES): Add it. * chickadee.scm (run-game): Initialize audio. * doc/api.texi ("Audio"): Document it.
* Set a default projection matrix for convenience.David Thompson2017-01-231-2/+6
|
* render: viewport: Use a non-black default clear color.David Thompson2017-01-191-5/+1
|
* render: Add viewports.David Thompson2017-01-191-6/+12
|
* Run GPU finalizers in game loop.David Thompson2017-01-181-1/+4
|
* First commit!David Thompson2017-01-041-0/+185