summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* render: color: Use f32vector under the hood.David Thompson2019-01-061-28/+34
| | | | | | | | | * chickadee/render/color.scm (<color>): Use a single field for storing bytevector. (make-color): Wrap f32vector. (color-r, color-g, color-b, color-a): Fetch channel values from f32vector. (color): New procedure.
* math: matrix: Add transform-x and transform-y procedures.David Thompson2019-01-061-8/+17
| | | | * chickadee/math/matrix.scm (transform-x, transform-y): New procedures.
* examples: Add game controller test.David Thompson2019-01-063-0/+79
| | | | | | * examples/game-controller.scm: New file. * examples/images/controller-buttons.png: New file. * Makefile.am (EXTRA_DIST): Add them.
* Remove redundant open-all-controllers procedure.David Thompson2019-01-061-8/+0
| | | | | | | | | I thought this was necessary to process controllers that were already connected to the computer before a Chickadee-using program was launched, but that doesn't seem to be the case. * chickadee.scm (open-all-controllers): Delete. (run-game): Remove call to open-all-controllers.
* Add controller-name procedure.David Thompson2019-01-061-0/+9
| | | | * chickadee.scm (controller-name): New procedure.
* Fix normalization of game controller axis values.David Thompson2019-01-061-3/+2
| | | | | * chickadee.scm (controller-axis): Fix math so that axis values are actually in the range [0, 1].
* render: texture: Fix error when splitting certain textures.David Thompson2019-01-061-4/+2
| | | | | | | | | | The split-texture procedure would throw an exception in the event that the image width/height could not be divided by tile width/height with 0 remainder. * chickadee/render/texture.scm (split-texture): Floor the results of dividing image dimensions by tile dimensions and ensure they are exact integers.
* guix: Update to latest guile-sdl2 commit.David Thompson2019-01-061-2/+2
|
* Makefile: Install compiled files in the proper location.David Thompson2018-12-161-1/+1
| | | | * Makefile.am (godir): Use "site-ccache", not "ccache".
* render: font: Export a default-font procedure.David Thompson2018-12-141-3/+5
| | | | | * chickadee/render/font.scm (default-font): Change from variable to procedure.
* Credit J-Robot for the pixel explosion image.David Thompson2018-12-141-0/+3
|
* Rename data/CREDITS to data/AUTHORS.David Thompson2018-12-142-1/+1
|
* Add particles example.David Thompson2018-12-143-0/+53
| | | | | | * examples/images/explosion.png: New file. * examples/particles.scm: New file. * Makefile.am (EXTRA_DIST): Add them.
* Fix game controller stuff.David Thompson2018-12-141-5/+5
| | | | | Forgot to prefix imported procedures since I define procedures with the same names.
* doc: Improve Fonts section.David Thompson2018-12-141-36/+13
|
* Add controller query procedures.David Thompson2018-12-141-4/+18
| | | | | | | Not ready to document them at this time since I have not done full tests with a USB controller yet. * chickadee.scm (controller-button-pressed?, controller-axis): New procedures.
* Add mouse query procedures.David Thompson2018-12-131-2/+23
| | | | | * chickadee.scm (mouse-x, mouse-y, mouse-button-pressed?, mouse-button-released?): New procedures.
* Re-add key-pressed? and key-released? procedures.David Thompson2018-12-132-3/+13
| | | | | * chickadee.scm (key-pressed?, key-released?): New procedures. * examples/grid.scm: Remove (sdl2 input keyboard) import.
* Re-hide SDL2 details.David Thompson2018-12-1311-318/+313
| | | | | | | | | | | | | | | | | | | | | 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
|
* Fix automake warning.David Thompson2018-12-131-1/+1
|
* render: font: Include a default font for convenience.David Thompson2018-12-1312-277/+274
| | | | | | | | | | | | | | | | | | | * 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.
* render: sprite: Use a single buffer for unbatched sprite mesh.David Thompson2018-12-131-36/+46
| | | | | * chickadee/render/sprite.scm (draw-sprite-unbatched): Combine vertices and texcoords into a single packed buffer.
* render: sprite: batch: Combine vertices and texcoords into one buffer.David Thompson2018-12-131-31/+36
| | | | | | | | | | | Not sure how much of a gain this is, but it's one less buffer to map each frame. * chickadee/render/sprite.scm (init-sprite-batch): Create combined vertex/texcoord buffer. (double-sprite-batch-size!): Map and copy only a single buffer. (sprite-batch-begin!): Map just one buffer. (sprite-batch-add!): Use new packed buffer layout.
* doc: Mention 'rect' in manual.David Thompson2018-12-131-1/+2
| | | | * doc/api.texi (Rectangles): Document 'rect' procedure.
* math: rect: Add make-rect alias.David Thompson2018-12-131-2/+4
| | | | * chickadee/math/rect.scm (rect): New procedure.
* render: font: Use set-vec2! where convenient.David Thompson2018-12-131-2/+1
| | | | * chickadee/render/font.scm (draw-text*): Use new set-vec2! procedure.
* render: sprite: Use set-vec2! where convenient.David Thompson2018-12-131-8/+4
| | | | | * chickadee/render/sprite (sprite-batch-add!): Use new set-vec2! procedure.
* math: vector: Add set-vec2! and set-vec3! procedures.David Thompson2018-12-132-5/+21
| | | | | * chickadee/math/vector.scm (set-vec2!, set-vec3!): New procedures. * doc/api.texi (Vectors): Document them.
* doc: Fix typos.David Thompson2018-12-121-6/+6
|
* doc: Rename "GPU Buffers" section to "Buffers".David Thompson2018-12-111-7/+7
|
* doc: Rename "Blending and Depth Testing" section to just "Blending".David Thompson2018-12-111-10/+8
|
* doc: Greatly expand public API documentation.David Thompson2018-12-111-101/+693
|
* render: shader: Change shader variable naming convention to camel case.David Thompson2018-12-111-5/+5
|
* render: shader: Improve docstrings.David Thompson2018-12-111-0/+9
|
* render: buffer: Improve docstrings.David Thompson2018-12-111-7/+64
|
* Bump to version 0.4.0.David Thompson2018-12-101-1/+1
|
* render: framebuffer: Add default projection matrix for convenience.David Thompson2018-12-102-12/+20
| | | | | | | | | * chickadee/render/framebuffer.scm (<framebuffer>)[projection]: New field. (make-framebuffer): Use an orthographic projection the same size as the framebuffer as the default projection matrix. * chickadee/render.scm (with-framebuffer): Apply default projection matrix.
* game-loop: Sleep thread a bit to avoid 100% CPU usage.David Thompson2018-12-091-1/+3
|
* math: grid: Simplify a formula.David Thompson2018-12-091-2/+2
| | | | | * chickadee/math/grid.scm (slide): Simplify formula for setting new goal coordinates.
* Add particle rendering module.David Thompson2018-12-073-0/+626
| | | | | | * chickadee/render/particles.scm: New file. * Makefile.am (SOURCES): Add it. * doc/api.texi (Particles): New subsection.
* render: buffer: Add support for int and double component types.David Thompson2018-12-051-2/+6
| | | | | * chickadee/render/buffer.scm (component-type-size, typed-buffer-type-gl): Add int and double cases.
* doc: Fix typo.David Thompson2018-12-051-1/+1
| | | | * doc/api.texi (Sprites): s/diving/dividing/
* render: blend: Fix additive blending mode.David Thompson2018-12-031-1/+1
| | | | | * chickadee/render/blend.scm (apply-blend-mode): Use the correct destination blending factor (one, not zero!) for additive blending.
* math: grid: A couple more optimizations.David Thompson2018-12-021-4/+3
| | | | | | | * chickadee/math/grid.scm (make-grid): Set a high minimum bucket size to avoid rehashing. (grid-move): Use memoized inexact->exact procedure. Fix return value of check procedure being ignored.
* math: grid: Refactor to improve performance a little bit.David Thompson2018-12-021-173/+163
| | | | | | | | There's still a lot of work needed to make the collision grid scale to any reasonable number of moving objects, but this is a first step. * chickadee/math/grid.scm: Big ol' refactor that I can't be bothered to list all the changes for.
* scripting: channel: Update copyright year.David Thompson2018-11-291-1/+1
|
* scripting: channel: Add channel-get! and channel-put! procedures.David Thompson2018-11-292-8/+31
| | | | | | * chickadee/scripting/channel.scm (channel-get!, channel-put!): New procedures. * doc/api.texi [Channels]: Add docs.
* queue: Add queue-length procedure.David Thompson2018-11-291-6/+9
| | | | * chickadee/queue.scm (queue-length): New procedure.
* scripting: channel: Remove unncessary module imports.David Thompson2018-11-291-2/+0
| | | | | * chickadee/scripting/channel.scm: Remove (ice-9 format) and (srfi srfi-11) imports.