summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* math: Move transform module to sly/math directory.David Thompson2014-11-081-1/+1
| | | | | | | | | | | | | * sly/transform.scm: Delete. * sly/render/transform.scm: New file. * Makefile.am (SOURCES): Add new file. Delete old one. * sly/render/camera.scm: Use (sly math transform). * sly/render/mesh.scm: Likewise. * sly/render/renderer.scm: Likewise. * sly/render/scene.scm: Likewise. * sly/render/shader.scm: Likewise. * sly/window.scm: Likewise. * examples/simple.scm: Likewise.
* render: Move scene module to sly/render directory.David Thompson2014-11-082-2/+2
| | | | | | | | * sly/scene.scm: Delete. * sly/render/scene.scm: New file. * Makefile.am (SOURCES): Add new file. Delete old one. * examples/simple.scm: Use (sly render scene). * examples/tilemap.scm: Likewise.
* render: Move tileset module to sly/render directory.David Thompson2014-11-082-2/+2
| | | | | | | | * sly/tileset.scm: Delete. * sly/render/tileset.scm: New file. * Makefile.am (SOURCES): Add new file. Delete old one. * examples/animation.scm: Use (sly render tileset). * examples/tileset.scm: Likewise.
* render: Move sprite module to sly/render directory.David Thompson2014-11-078-8/+8
| | | | | | | | | | | | | | | * sly/sprite.scm: Delete. * sly/render/sprite.scm: New file. * Makefile.am (SOURCES): Add new file and delete old one. * sly/font.scm: Use (sly render sprite). * examples/animation.scm: Likewise. * examples/common.scm: Likewise. * examples/coroutine.scm: Likewise. * examples/joystick.scm: Likewise. * examples/particles.scm: Likewise. * examples/simple.scm: Likewise. * examples/tilemap.scm: Likewise. * examples/transition.scm: Likewise.
* render: Move texture module to sly/render directory.David Thompson2014-11-075-5/+5
| | | | | | | | | | | | | | | | | | | | * sly/texture.scm: Delete. * sly/render/texture.scm: New file. * Makefile.am (SOURCES): Add it. * sly/animation.scm: Use (sly render texture). * sly/font.scm: Likewise. * sly/mesh.scm: Likewise. * sly/render/context.scm: Likewise. * sly/render/framebuffer.scm: Likewise. * sly/render/renderer.scm: Likewise. * sly/shape.scm: Likewise. * sly/sprite.scm: Likewise. * sly/tileset.scm: Likewise. * examples/coroutine.scm: Likewise. * examples/joystick.scm: Likewise. * examples/particles.scm: Likewise. * examples/tilemap.scm: Likewise. * examples/transition.scm: Likewise.
* Rename (sly helpers) module to (sly utils).David Thompson2014-11-071-1/+1
| | | | | | | | | | | | | * sly/helpers.scm: Delete. * sly/utils.scm: New file. * Makefile.am (SOURCES): Remove old file. Add new one. * sly/render/camera.scm: s/helpers/utils/ * sly/scene.scm: Likewise. * sly/shader.scm: Likewise. * sly/sprite.scm: Likewise. * sly/texture.scm: Likewise. * sly/transform.scm: Likewise. * examples/tilemap.scm: Likewise.
* examples: Update 2048.David Thompson2014-09-221-109/+109
| | | | * examples/2048/2048: Update.
* examples: Update simple example.David Thompson2014-09-221-6/+24
| | | | * examples/simple.scm: Update.
* examples: Update tilemap example.David Thompson2014-09-101-52/+54
| | | | * examples/tilemap.scm: Update it.
* examples: Update scene-graph example.David Thompson2014-09-071-58/+62
| | | | * examples/scene-graph.scm: Update to use new scene-node DSL.
* examples: Add crate texture.David Thompson2014-09-061-0/+0
| | | | * examples/images/crate.png: New file.
* examples: Update scene graph example.David Thompson2014-09-061-54/+74
|
* Update scene graph example.David Thompson2014-08-251-28/+57
| | | | * examples/scene-graph: Update.
* Add scene graph example.David Thompson2014-08-251-0/+128
| | | | * examples/scene-graph.scm: New file.
* Use a single default shader for all meshes.David Thompson2014-08-251-1/+0
| | | | | | | | | | | | | | | | | * data/shaders/default-fragment.glsl: New file. * data/shaders/default-vertex.glsl: New file. * data/shaders/font-fragment.glsl: Delete. * data/shaders/font-vertex.glsl: Delete. * data/shaders/sprite-fragment.glsl: Delete. * data/shaders/sprite-vertex.glsl: Delete. * examples/common.scm: Remove call to enable-sprites. * sly/font.scm (font-shader): Delete. (enable-fonts): Remove shader loading. (make-label): Use default shader. * sly/shape.scm (make-cube): Make texture and shader optional keyword arguments. * sly/sprite.scm (sprite-shader, enable-sprites): Delete. (make-sprite): Make shader an optional keyword argument.
* 2048: Make it more convenient to run within Emacs.David Thompson2014-08-091-0/+4
| | | | * examples/2048/2048: Add local variable setting for compile-command.
* Add joystick module.Jordan Russell2014-08-011-0/+102
| | | | | | | | * sly/joystick.scm: New file. * examples/joystick.scm: New file. * Makefile.am (SOURCES): Add sly/joystick.scm. * TODO.org (Input): Mark as 'done'. * sly/math.scm (linear-scale): New procedure.
* Add copyright information for Jordan Russel.David Thompson2014-07-031-0/+1
| | | | | * AUTHORS: New file. * examples/2048/2048: Add copyright info for Jordan Russel.
* 2048: Fix board-win? and improve board-insert.Jordan Russell2014-07-031-12/+12
| | | | | | * examples/2048/2048 (board-win?): Check the board passed in, not a new one. (board-insert): Simplify. (replace-at): New procedure.
* Add transition example.David Thompson2014-07-021-0/+45
| | | | * examples/transition.scm: New file.
* Rename guile-2d to Sly!David Thompson2014-06-288-67/+67
| | | | Massive find/replace job.
* Replace vector2 module with a more generic vector module.David Thompson2014-06-077-49/+46
| | | | | | | | | | | | | | | | | | | | | | | | | * 2d/vector2.scm: Delete it. * 2d/vector.scm: New file. * Makefile.am (SOURCES): s/vector2/vector. * 2d/font.scm: * 2d/keyboard.scm: * 2d/mouse.scm: * 2d/rect.scm: * 2d/shader.scm: * 2d/sprite.scm: * 2d/texture.scm: * 2d/transform.scm: * 2d/window.scm: * examples/2048/2048: * examples/animation.scm: * examples/coroutine.scm: * examples/font.scm: * examples/particles.scm: * examples/simple.scm: * examples/tilemap.scm: Use vectors instead of defunct vector2.
* s/guile-2048/2048/David Thompson2014-05-212-1/+1
|
* Make sprites immutable.David Thompson2014-05-072-10/+15
| | | | | | | | | | | | | * 2d/sprite.scm (<sprite>): Make immutable. (set-sprite-drawable!, set-sprite-position!, set-sprite-scale!) (set-sprite-rotation!, set-sprite-color!, set-sprite-anchor!): Delete. (set-sprite-drawable, set-sprite-position, set-sprite-scale) (set-sprite-rotation, set-sprite-color, set-sprite-anchor): New procedures. * examples/coroutine.scm: * examples/particles.scm: Use immutable sprite setters.
* Add current-agenda parameter.David Thompson2014-05-044-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * 2d/agenda.scm (current-agenda): New variable. (with-agenda): New macro. (agenda-time, tick-agenda!, clear-agenda!, schedule) (schedule-interval, schedule-each, wait): Remove agenda parameter. * 2d/game.scm (game-agenda): Delete it. (update): Tick current agenda. * 2d/helpers.scm (define-guardian): Remove agenda argument. * 2d/repl.scm (start-2d-repl): Remove agenda argument to schedule-each. * 2d/signal.scm (signal-sample, signal-delay, signal-throttle): Remove agenda parameter. * 2d/sprite.scm: * examples/common.scm: * examples/coroutine.scm: * examples/font.scm: * examples/particles.scm: Remove mention of game-agenda. * README.org: Update example snippets.
* Rename game loop procedures and remove parameter.David Thompson2014-04-248-10/+10
| | | | | | | | | | | | | | | | | | | | | | * 2d/game.scm (tick-interval): No longer a parameter. (run-game-loop, start-game-loop): Rename. (quit-game, stop-game-loop): Rename. * examples/animation.scm: Use start-game-loop and stop-game-loop. * examples/common.scm: Use start-game-loop and stop-game-loop. * examples/coroutine.scm: Use start-game-loop and stop-game-loop. * examples/font.scm: Use start-game-loop and stop-game-loop. * examples/guile-2048/guile-2048.scm: Use start-game-loop and stop-game-loop. * examples/particles.scm: Use start-game-loop and stop-game-loop. * examples/simple.scm: Use start-game-loop and stop-game-loop. * examples/tilemap.scm: Use start-game-loop and stop-game-loop.
* Rename example file.David Thompson2014-03-311-0/+0
| | | | | | * examples/guile-2048/guile-2048: Rename. * examples/guile-2048/guile-2048.scm: New file.
* Add 2048 clone example.David Thompson2014-03-312-0/+482
| | | | | | * examples/guile-2048/guile-2048: New file. * examples/guile-2048/tile.png: New image.
* Don't load font shaders upon importing (2d font) module.David Thompson2014-03-291-0/+2
| | | | | | | * 2d/font.scm (font-shader): Set to #f initially. (enable-fonts): New procedure. * examples/font.scm: Enable fonts.
* Don't load sprite shaders upon importing (2d sprite) module.David Thompson2014-03-291-0/+3
| | | | | | | * 2d/sprite.scm (sprite-shader): Set to #f initially. (enable-sprites): New procedure. * 2d/common.scm: Enable sprites.
* Don't open window upon importing the (2d window) module.David Thompson2014-03-291-0/+1
| | | | | | * 2d/window.scm (open-window): Remove default argument. * examples/common.scm: Open a window.
* Don't start the REPL server upon importing (2d repl).David Thompson2014-03-101-0/+2
| | | | | | * 2d/repl.scm (start-2d-repl): New procedure. * examples/common.scm: Start the REPL server. * sandbox: Start the REPL server.
* Change license to GPLv3+.David Thompson2014-03-088-1/+136
|
* Update font example.David Thompson2014-03-081-19/+5
| | | | * examples/font.scm: Remove GC counter.
* Integrate cooperative REPL server.David Thompson2014-03-081-4/+2
| | | | | | | | | * 2d/repl.scm: New file. * 2d/repl/repl.scm: Delete it. * 2d/repl/server.scm: Delete it. * Makfile.am (REPL_SOURCES): Delete it. (SOURCES): Add '2d/repl.scm'. * examples/common.scm: Use cooperative REPL module.
* Remove shader example.David Thompson2014-02-174-59/+0
| | | | | | | | * examples/Makefile.am (examples_DATA): Remove 'shader.scm'. (shaderdir, shader_DATA): Remove. * examples/shader.scm: Delete file. * examples/shaders/fragment-shader.glsl: Delete file. * examples/shaders/vertex-shader.glsl: Delete file.
* Add missing example module.David Thompson2014-02-171-0/+1
| | | | * examples/common.scm: Import (2d signal).
* Update font example.David Thompson2014-02-172-28/+21
| | | | | * examples/common.scm: Change format for displaying FPS in console. * examples/font.scm: Use new signal API generating labels.
* Remove example font from Makefile.am.David Thompson2014-02-171-3/+0
| | | | * examples/Makefile.am (fontdir, font_DATA): Delete them.
* Remove sprite batch from tilemap example.David Thompson2014-02-161-7/+5
| | | | * examples/tilemap.scm: Remove references to sprite batches.
* Rewrite font module.David Thompson2014-02-163-10/+42
| | | | | | | | | | | | | | FTGL has been dropped in favor of SDL_ttf. * 2d/font: Rewrite everything! * 2d/wrappers/ftgl.scm: Delete it. * configure.ac: Check for SDL_ttf. * data/Makefile.am (shaders_DATA): Add font shaders. * data/shaders/font-fragment.glsl: New shader. * data/shaders/font-vertex.glsl: New shader. * examples/font.scm: Rewrite font example. * examples/fonts/AUTHORS: Delete it. * examples/fonts/Boxy-Bold.ttf: Delete it.
* Remove sprite batch from particles example.David Thompson2014-02-161-8/+6
| | | | | | | This slows down the demo considerably, but sprite batches need to be rewritten in order to be actually performant and of real value. * examples/particle.scm (batch): Delete it.
* Print FPS to stdout in examples.David Thompson2014-02-151-1/+9
| | | | * examples/common.scm: Use (2d fps) module.
* Remove AUTOMAKE_OPTIONS from examples/Makefile.am.David Thompson2014-02-111-2/+0
| | | | * examples/Makefile.am (AUTOMAKE_OPTIONS): Remove it.
* Add examples Makefile.David Thompson2014-02-091-0/+27
| | | | | | * Makefile.am (SUBDIRS): Add 'examples'. * configure.ac (AC_CONFIG_FILES): Add 'examples/Makefile'. * examples/Makefile.am: New file.
* Add shader module.David Thompson2014-02-093-0/+53
| | | | | | | | * 2d/shader.scm: New module. * Makefile.am: Add 2d/shader.scm to SOURCES. * examples/shader.scm: New example. * examples/shaders/fragment-shader.glsl: New shader. * examples/shaders/vertex-shader.glsl: New shader.
* Add new coroutine macro.David Thompson2014-02-061-11/+9
| | | | | | | | * 2d/coroutine.scm (call-with-coroutine): New name for coroutine. (coroutine): New macro. (colambda, codefine, codefine*): Use call-with-coroutine. * examples/coroutine.scm: Use coroutine macro. * README.org: Update coroutine and agenda examples.
* Remove dynamic scoping of agendas.David Thompson2014-02-062-4/+4
| | | | | | | | | | | | | | | | * 2d/agenda.scm: (*global-agenda*, current-agenda, with-agenda): Delete. (agenda?, agenda-time): Export. (schedule-every, schedule-each): Rename schedule-every to schedule-each. (schedule-next): Delete. * 2d/game.scm: (game-agenda): New variable. (update): Tick game-agenda. * 2d/repl.scm: Use new agenda API. * 2d/sprite.scm: Use new agenda API. * 2d/time.scm: (time-every, time-each, time-delay): Change signature and use new agenda API. * examples/coroutine.scm: Use new agenda API. * examples/particles.scm: Use new agenda API.
* Close example programs when window is closed.David Thompson2014-01-261-0/+4
| | | | * examples/common.scm: Add window close hook.
* Remove obsolete examples.David Thompson2014-01-204-233/+0
|