summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples: Replace calls to sdl-ticks with elapsed-time.David Thompson2020-11-182-8/+7
|
* render: Add vector path rendering module.David Thompson2020-11-181-0/+80
|
* examples: tiled: Add smooth scrolling with arrow keys.David Thompson2020-11-161-13/+52
|
* Remove scancode argument from key-press and key-release handlers.David Thompson2020-11-163-3/+3
|
* Rename 'render' subdirectory to 'graphics'.David Thompson2020-10-0311-33/+33
|
* Add OTF/TTF font support via freetype.David Thompson2020-10-031-1/+2
|
* Add audio example.David Thompson2020-04-076-0/+84
| | | | | * examples/audio.scm: New file. * Makefile.am (EXTRA_DIST): Add it.
* examples: model: Remove bad code left in accidentally.David Thompson2019-10-241-3/+0
|
* render: Restructure 3D modules and add basic support for OBJ models.David Thompson2019-10-242-0/+2653
|
* examples: Update particle example.David Thompson2019-07-241-11/+42
|
* render: tiled: Add point->tile.David Thompson2019-06-041-3/+14
| | | | | | * chickadee/render/tiled.scm (point->tile): New procedure. * doc/api.texi (Tiled): Document it. * examples/tiled.scm: Render tile coordinates in bottom-left corner.
* Update a couple of examples to use new sprite batch API.Alex McGrath2019-05-283-24/+31
| | | | | * examples/game-controller.scm: Use new sprite batch API. * examples/grid.scm: Ditto.
* render: sprite: Rewrite sprite batching API.David Thompson2019-05-121-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | This new version performs better and has a better API. It closely resembles Love2D's sprite batch API. * chickadee/render/sprite.scm (with-batched-sprites, sprite-batch-reset!, sprite-batch-begin!, draw-sprite-batched, *batch?*, %batch): Delete. (draw-sprite-unbatched): Rename to 'draw-sprite*'. (<sprite-batch>)[index-buffer, position-buffer, texture-buffer]: Delete fields. [vertex-buffer]: New field. (init-sprite-batch, double-sprite-batch-size!, sprite-batch-add!, sprite-batch-flush!): Rewrite. (make-sprite-batch): Add 'capacity' and 'blend-mode' arguments. (draw-sprite-batch): New procedure. (draw-nine-patch*): Stop using sprite batches for now. * chickadee/render/font.scm: (<font>)[sprite-batches]: New field. (load-tile-font, load-font): Create a sprite batch for each texture loaded. (draw-text*): Use sprite batches. * chickadee/render/tiled.scm: (<tile>)[batch]: New field. (<tileset>)[batch]: New field. (load-tile-map): Create a sprite batch for each tileset. (draw-tile-layer): Use new sprite batch API. (draw-tile-map*): Remove reference to deleted macro.
* examples: Add sprite batch example.David Thompson2019-01-082-0/+66
| | | | | | * examples/sprite-batch.scm: New file. * examples/images/shot.png: New file. * Makefile.am (EXTRA_DIST): Add them.
* examples: game-controller: Add left/right trigger rendering.David Thompson2019-01-061-30/+38
|
* examples: Add game controller test.David Thompson2019-01-062-0/+77
| | | | | | * examples/game-controller.scm: New file. * examples/images/controller-buttons.png: New file. * Makefile.am (EXTRA_DIST): Add them.
* Credit J-Robot for the pixel explosion image.David Thompson2018-12-141-0/+3
|
* Add particles example.David Thompson2018-12-142-0/+51
| | | | | | * examples/images/explosion.png: New file. * examples/particles.scm: New file. * Makefile.am (EXTRA_DIST): Add them.
* Re-add key-pressed? and key-released? procedures.David Thompson2018-12-131-2/+1
| | | | | * chickadee.scm (key-pressed?, key-released?): New procedures. * examples/grid.scm: Remove (sdl2 input keyboard) import.
* Re-hide SDL2 details.David Thompson2018-12-136-22/+17
| | | | | | | | | | | | | | | | | | | | | I know I'm backpedaling here, but I think it was a mistake to expose SDL2 as much as I have here. I think it's better for people just getting started to not have to wonder what SDL means. Making things as usable as possible for beginners is an important goal, and abstracting SDL2 + OpenGL things from the core game loop implementation shouldn't require sacrificing that goal. * chickadee.scm: Switch code with... * chickadee/game-loop.scm: ...this! Which is copied straight from... * chickadee/sdl.scm: ...this! Which is now deleted. * Makefile.am (SOURCES): Add game-loop.scm, remove sdl.scm. * examples/grid.scm: Update due to API breakage. * examples/lines.scm: Ditto. * examples/nine-patch.scm: Ditto. * examples/sprite.scm: Ditto. * examples/text.scm: Ditto. * examples/tiled.scm: Ditto. * doc/api.texi (Kernel): Update.
* examples: Simplify text example.David Thompson2018-12-131-8/+2
|
* render: font: Include a default font for convenience.David Thompson2018-12-136-269/+7
| | | | | | | | | | | | | | | | | | | * data/fonts/good-neighbors.fnt: New file. * data/fonts/good-neighbors.png: New file. * data/CREDITS: New file. * examples/fonts/AUTHORS: Delete. * examples/fonts/good_neighbors_starling.png: Delete. * examples/fonts/good_neighbors_starling.xml: Delete. * Makefile.am (dist_pkgdata_DATA, fontsdir, dist_fonts_DATA): New variables. (EXTRA_DIST): Remove examples/fonts files. * chickadee/render/font.scm (draw-text): Make font an optional keyword argument. * doc/api.texi (Fonts): Document it. * examples/grid.scm: Update to use new draw-text API. * examples/nine-patch.scm: Ditto. * examples/text.scm: Ditto. squash! render: font: Include a default font for convenience.
* math: Add grid module.David Thompson2018-09-021-0/+87
| | | | | | | * chickadee/math/grid.scm: New file. * examples/grid.scm: New file. * Makefile.am (SOURCES): Add grid module. (EXTRA_DIST): Add grid example.
* Move SDL game loop implementation to its own module.David Thompson2018-08-235-4/+9
|
* math: vector: Add read syntax.David Thompson2018-08-235-8/+8
| | | | | | | | | * chickadee/math/vector.scm (read-vec): New procedure. Extend reader. * examples/lines.scm: Use new vector read syntax. * examples/nine-patch.scm: Ditto. * examples/sprite.scm: Ditto. * examples/text.scm: Ditto. * examples/tiled.scm: Ditto.
* Make the game loop modular!David Thompson2018-08-235-28/+13
| | | | | | | | | | | | | | | 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.
* Remove experimental buffer API.David Thompson2018-06-251-33/+0
|
* Add tile map example.David Thompson2018-01-294-0/+131
| | | | | | | | * examples/images/tiles.png: New file. * examples/map/example.tmx: New file. * examples/tiled.scm: New file. * Makefile.am (EXTRA_DIST): Add them. * examples/images/AUTHORS: Credit the author of the tileset.
* Move color module into render namespace.David Thompson2017-08-081-1/+1
|
* Add buffer module.David Thompson2017-05-021-0/+33
| | | | | | | | | * chickadee/buffer.scm: New file. * Makefile.am (SOURCES): Add it. * .dir-locals.el: Add indent rules for with-buffer and with-current-buffer. * examples/buffer.scm: New file. * doc/api.texi (Buffers): Add docs.
* examples: Add nine-patch example.David Thompson2017-01-263-0/+32
| | | | | | * examples/nine-patch.scm: New file. * examples/images/dialog-box.png: New file. * examples/AUTHORS: New file.
* examples: Add line segment example.David Thompson2017-01-251-0/+31
| | | | * examples/lines.scm: New file.
* render: Add bitmap font support.David Thompson2017-01-244-0/+275
| | | | | | | | | * chickadee/render/font.scm: New file. * Makefile.am (SOURCES): Add it. * examples/text.scm: New file. * examples/fonts/AUTHORS: New file. * examples/fonts/good_neighbors_starling.png: New file. * examples/fonts/good_neighbors_starling.xml: New file.
* examples: sprite: Quit the demo when close button is pressed.David Thompson2017-01-241-0/+1
|
* Add basic sprite example.David Thompson2017-01-232-0/+17