diff options
37 files changed, 3209 insertions, 652 deletions
@@ -508,25 +508,24 @@ and smile, because you've just generated your first Haunt site!")) #:manual? #t #:description `((p "Chickadee is a game development toolkit for " - ,(anchor "Guile Scheme" "https://gnu.org/s/guile") - " built on top of " - ,(anchor "SDL2" "http://libsdl.org") - " and OpenGL.") + ,(anchor "Guile Scheme" "https://gnu.org/s/guile") ".") ,(centered-image "/images/chickadee/logo.png" "Chickadee logo") (p "Chickadee aims to provide all the features that -parenthetically inclined game developers need to make 2D (and -eventually 3D) games in Scheme, such as:") +parenthetically inclined game developers need to make games in Scheme, +such as:") (ul (li "extensible, fixed-timestep game loop") (li "OpenGL-based rendering engine") - (li "keyboard, mouse, controller input") - (li "REPL-driven development model")) + (li "keyboard, mouse, controller input events") + (li "vectors, matrices, bounding boxes, easing functions, etc.") + (li "asynchronous scripting")) (p "Here is a simple example:") ,(highlight-scheme "(use-modules (chickadee) (chickadee math vector) (chickadee render sprite) - (chickadee render texture)) + (chickadee render texture) + (chickadee sdl)) (define sprite #f) @@ -534,12 +533,9 @@ eventually 3D) games in Scheme, such as:") (set! sprite (load-image \"images/chickadee.png\"))) (define (draw alpha) - (draw-sprite sprite (vec2 256.0 176.0))) - -(add-hook! load-hook load) -(add-hook! draw-hook draw) + (draw-sprite sprite #v(256.0 176.0))) -(run-game) +(run-game/sdl #:load load #:draw draw) ") (p (small ,(anchor "chickadee sprite by Refuzzle, CC0" "http://opengameart.org/content/winter-birds")))) diff --git a/manuals/chickadee/API-Reference.html b/manuals/chickadee/API-Reference.html index 0dcd1de..d5fdbbe 100644 --- a/manuals/chickadee/API-Reference.html +++ b/manuals/chickadee/API-Reference.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: API Reference</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>API Reference (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: API Reference"> -<meta name="keywords" content="The Chickadee Game Toolkit: API Reference"> +<meta name="description" content="API Reference (The Chickadee Game Toolkit)"> +<meta name="keywords" content="API Reference (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -99,13 +99,11 @@ Next: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="n" rel=" <table class="menu" border="0" cellspacing="0"> <tr><td align="left" valign="top">• <a href="Kernel.html#Kernel" accesskey="1">Kernel</a>:</td><td> </td><td align="left" valign="top">The fundamental components. </td></tr> -<tr><td align="left" valign="top">• <a href="Input.html#Input" accesskey="2">Input</a>:</td><td> </td><td align="left" valign="top">Keyboard, mouse, and controller input. -</td></tr> -<tr><td align="left" valign="top">• <a href="Math.html#Math" accesskey="3">Math</a>:</td><td> </td><td align="left" valign="top">Linear algebra and more. +<tr><td align="left" valign="top">• <a href="Math.html#Math" accesskey="2">Math</a>:</td><td> </td><td align="left" valign="top">Linear algebra, spatial partitioning, and more. </td></tr> -<tr><td align="left" valign="top">• <a href="Graphics.html#Graphics" accesskey="4">Graphics</a>:</td><td> </td><td align="left" valign="top">Eye candy. +<tr><td align="left" valign="top">• <a href="Graphics.html#Graphics" accesskey="3">Graphics</a>:</td><td> </td><td align="left" valign="top">Eye candy. </td></tr> -<tr><td align="left" valign="top">• <a href="Audio.html#Audio" accesskey="5">Audio</a>:</td><td> </td><td align="left" valign="top">Sound effects and music. +<tr><td align="left" valign="top">• <a href="Scripting.html#Scripting" accesskey="4">Scripting</a>:</td><td> </td><td align="left" valign="top">Bringing the game world to life. </td></tr> </table> diff --git a/manuals/chickadee/Agendas.html b/manuals/chickadee/Agendas.html new file mode 100644 index 0000000..eced92c --- /dev/null +++ b/manuals/chickadee/Agendas.html @@ -0,0 +1,221 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Agendas (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Agendas (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Agendas (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Scripting.html#Scripting" rel="up" title="Scripting"> +<link href="Scripts.html#Scripts" rel="next" title="Scripts"> +<link href="Scripting.html#Scripting" rel="prev" title="Scripting"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Agendas"></a> +<div class="header"> +<p> +Next: <a href="Scripts.html#Scripts" accesskey="n" rel="next">Scripts</a>, Up: <a href="Scripting.html#Scripting" accesskey="u" rel="up">Scripting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Agendas-1"></a> +<h4 class="subsection">2.4.1 Agendas</h4> + +<p>To schedule a task to be performed later, an “agenda” is used. +There is a default, global agenda that is ready to be used, or +additional agendas may be created for different purposes. The +following example prints the text “hello” when the agenda has +advanced to time unit 10. +</p> +<div class="example"> +<pre class="example">(at 10 (display "hello\n")) +</pre></div> + +<p>Most of the time it is more convenient to schedule tasks relative to +the current time. This is where <code>after</code> comes in handy: +</p> +<div class="example"> +<pre class="example">(after 10 (display "hello\n")) +</pre></div> + +<p>Time units in the agenda are in no way connected to real time. It’s +up to the programmer to decide what agenda time means. A simple and +effective approach is to map each call of the update hook +(see <a href="Kernel.html#Kernel">Kernel</a>) to 1 unit of agenda time, like so: +</p> +<div class="example"> +<pre class="example">(add-hook! update-hook (lambda (dt) (update-agenda 1))) +</pre></div> + +<p>It is important to call <code>update-agenda</code> periodically, otherwise +no tasks will ever be run! +</p> +<p>In addition to using the global agenda, it is useful to have multiple +agendas for different purposes. For example, the game world can use a +different agenda than the user interface, so that pausing the game is +a simple matter of not updating the world’s agenda while continuing to +update the user interface’s agenda. The current agenda is dynamically +scoped and can be changed using the <code>with-agenda</code> special form: +</p> +<div class="example"> +<pre class="example">(define game-world-agenda (make-agenda)) + +(with-agenda game-world-agenda + (at 60 (spawn-goblin)) + (at 120 (spawn-goblin)) + (at 240 (spawn-goblin-king))) +</pre></div> + +<dl> +<dt><a name="index-make_002dagenda"></a>Procedure: <strong>make-agenda</strong></dt> +<dd><p>Return a new task scheduler. +</p></dd></dl> + +<dl> +<dt><a name="index-agenda_003f"></a>Procedure: <strong>agenda?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is an agenda. +</p></dd></dl> + +<dl> +<dt><a name="index-current_002dagenda"></a>Procedure: <strong>current-agenda</strong></dt> +<dt><a name="index-current_002dagenda-1"></a>Procedure: <strong>current-agenda</strong> <em><var>agenda</var></em></dt> +<dd><p>When called with no arguments, return the current agenda. When called +with one argument, set the current agenda to <var>agenda</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-with_002dagenda"></a>Syntax: <strong>with-agenda</strong> <em><var>agenda</var> <var>body</var> …</em></dt> +<dd><p>Evaluate <var>body</var> with the current agenda set to <var>agenda</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-agenda_002dtime"></a>Procedure: <strong>agenda-time</strong></dt> +<dd><p>Return the current agenda time. +</p></dd></dl> + +<dl> +<dt><a name="index-update_002dagenda"></a>Procedure: <strong>update-agenda</strong> <em><var>dt</var></em></dt> +<dd><p>Advance the current agenda by <var>dt</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-schedule_002dat"></a>Procedure: <strong>schedule-at</strong> <em><var>time</var> <var>thunk</var></em></dt> +<dd><p>Schedule <var>thunk</var>, a procedure of zero arguments, to be run at +<var>time</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-schedule_002dafter"></a>Procedure: <strong>schedule-after</strong> <em><var>delay</var> <var>thunk</var></em></dt> +<dd><p>Schedule <var>thunk</var>, a procedure of zero arguments, to be run after +<var>delay</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-schedule_002devery"></a>Procedure: <strong>schedule-every</strong> <em><var>interval</var> <var>thunk</var> [<var>n</var>]</em></dt> +<dd><p>Schedule <var>thunk</var>, a procedure of zero arguments, to be run every +<var>interval</var> amount of time. Repeat this <var>n</var> times, or +indefinitely if not specified. +</p></dd></dl> + +<dl> +<dt><a name="index-at"></a>Syntax: <strong>at</strong> <em><var>time</var> <var>body</var> …</em></dt> +<dd><p>Schedule <var>body</var> to be evaluated at <var>time</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-after"></a>Syntax: <strong>after</strong> <em><var>delay</var> <var>body</var> …</em></dt> +<dd><p>Schedule <var>body</var> to be evaluated after <var>delay</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-every"></a>Syntax: <strong>every</strong> <em><var>interval</var> <var>body</var> …</em></dt> +<dt><a name="index-every-1"></a>Syntax: <strong>every</strong> <em>(<var>interval</var> <var>n</var>) <var>body</var> …</em></dt> +<dd><p>Schedule <var>body</var> to be evaluated every <var>interval</var> amount of +time. Repeat this <var>n</var> times, or indefinitely if not specified. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="Scripts.html#Scripts" accesskey="n" rel="next">Scripts</a>, Up: <a href="Scripting.html#Scripting" accesskey="u" rel="up">Scripting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> + + + +</body> +</html> diff --git a/manuals/chickadee/Audio.html b/manuals/chickadee/Audio.html deleted file mode 100644 index 755efb9..0000000 --- a/manuals/chickadee/Audio.html +++ /dev/null @@ -1,177 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<!-- Copyright (C) 2017 David Thompson davet@gnu.org - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.3 -or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU -Free Documentation License". - -A copy of the license is also available from the Free Software -Foundation Web site at http://www.gnu.org/licenses/fdl.html. - - -The document was typeset with -http://www.texinfo.org/ (GNU Texinfo). - --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> -<head> -<title>The Chickadee Game Toolkit: Audio</title> - -<meta name="description" content="The Chickadee Game Toolkit: Audio"> -<meta name="keywords" content="The Chickadee Game Toolkit: Audio"> -<meta name="resource-type" content="document"> -<meta name="distribution" content="global"> -<meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<link href="index.html#Top" rel="start" title="Top"> -<link href="Index.html#Index" rel="index" title="Index"> -<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> -<link href="API-Reference.html#API-Reference" rel="up" title="API Reference"> -<link href="Copying-This-Manual.html#Copying-This-Manual" rel="next" title="Copying This Manual"> -<link href="Viewports.html#Viewports" rel="prev" title="Viewports"> -<style type="text/css"> -<!-- -a.summary-letter {text-decoration: none} -blockquote.indentedblock {margin-right: 0em} -blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} -blockquote.smallquotation {font-size: smaller} -div.display {margin-left: 3.2em} -div.example {margin-left: 3.2em} -div.lisp {margin-left: 3.2em} -div.smalldisplay {margin-left: 3.2em} -div.smallexample {margin-left: 3.2em} -div.smalllisp {margin-left: 3.2em} -kbd {font-style: oblique} -pre.display {font-family: inherit} -pre.format {font-family: inherit} -pre.menu-comment {font-family: serif} -pre.menu-preformatted {font-family: serif} -pre.smalldisplay {font-family: inherit; font-size: smaller} -pre.smallexample {font-size: smaller} -pre.smallformat {font-family: inherit; font-size: smaller} -pre.smalllisp {font-size: smaller} -span.nolinebreak {white-space: nowrap} -span.roman {font-family: initial; font-weight: normal} -span.sansserif {font-family: sans-serif; font-weight: normal} -ul.no-bullet {list-style: none} -@media (min-width: 1140px) { - body { - margin-left: 14rem; - margin-right: 4rem; - max-width: 52rem; - } -} - -@media (min-width: 800px) and (max-width: 1140px) { - body { - margin-left: 6rem; - margin-right: 4rem; - max-width: 52rem; - } -} - -@media (max-width: 800px) { - body { - margin: 1rem; - } -} - ---> -</style> -<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> - - -</head> - -<body lang="en"> -<a name="Audio"></a> -<div class="header"> -<p> -Previous: <a href="Graphics.html#Graphics" accesskey="p" rel="prev">Graphics</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> -</div> -<hr> -<a name="Audio-1"></a> -<h3 class="section">2.5 Audio</h3> - -<p>Chickadee has two data types for audio: samples and music. Samples -are for short sound effects like explosions. Music is for, well, -uh…, music. -</p> -<p>Supported file formats include WAV and OGG. -</p> -<dl> -<dt><a name="index-load_002dsample"></a>Scheme Procedure: <strong>load-sample</strong> <em><var>file</var></em></dt> -<dd><p>Load audio sample from <var>file</var>. -</p></dd></dl> - -<dl> -<dt><a name="index-set_002dsample_002dvolume_0021"></a>Scheme Procedure: <strong>set-sample-volume!</strong> <em><var>volume</var></em></dt> -<dd><p>Set the volume that all samples are played at to <var>volume</var>, an -integer value between 0 and 128. -</p></dd></dl> - -<dl> -<dt><a name="index-play_002dsample"></a>Scheme Procedure: <strong>play-sample</strong> <em><var>sample</var></em></dt> -<dd><p>Play <var>sample</var>. Pretty straightforward! -</p></dd></dl> - -<dl> -<dt><a name="index-load_002dmusic"></a>Scheme Procedure: <strong>load-music</strong> <em><var>file</var></em></dt> -<dd><p>Load music from <var>file</var>. -</p></dd></dl> - -<dl> -<dt><a name="index-music_002dvolume"></a>Scheme Procedure: <strong>music-volume</strong></dt> -<dd><p>Return the volume level for music, an integer value between 0 and 128. -</p></dd></dl> - -<dl> -<dt><a name="index-set_002dmusic_002dvolume_0021"></a>Scheme Procedure: <strong>set-music-volume!</strong> <em><var>volume</var></em></dt> -<dd><p>Set the volume that music is played at to <var>volume</var>, an integer -value between 0 and 128. -</p></dd></dl> - -<dl> -<dt><a name="index-play_002dmusic"></a>Scheme Procedure: <strong>play-music</strong> <em><var>music</var> [<var>loop?</var>]</em></dt> -<dd><p>Play <var>music</var>. If <var>loop?</var>, play it over and over and over and -over and… -</p></dd></dl> - -<dl> -<dt><a name="index-pause_002dmusic"></a>Scheme Procedure: <strong>pause-music</strong></dt> -<dd><p>Pause the current music track. -</p></dd></dl> - -<dl> -<dt><a name="index-resume_002dmusic"></a>Scheme Procedure: <strong>resume-music</strong></dt> -<dd><p>Resume the current music track. -</p></dd></dl> - -<dl> -<dt><a name="index-rewind_002dmusic"></a>Scheme Procedure: <strong>rewind-music</strong></dt> -<dd><p>estart the current music track from the beginning. -</p></dd></dl> - -<dl> -<dt><a name="index-stop_002dmusic"></a>Scheme Procedure: <strong>stop-music</strong></dt> -<dd><p>Stop playing the current music track. -</p></dd></dl> - -<dl> -<dt><a name="index-music_002dplaying_003f"></a>Scheme Procedure: <strong>music-playing?</strong></dt> -<dd><p>Return <code>#t</code> if music is currently playing. -</p></dd></dl> - -<dl> -<dt><a name="index-music_002dpaused_003f"></a>Scheme Procedure: <strong>music-paused?</strong></dt> -<dd><p>Return <code>#t</code> if music is currently paused. -</p></dd></dl> - - - - -</body> -</html> diff --git a/manuals/chickadee/Input.html b/manuals/chickadee/Basics.html index d559126..dd3898c 100644 --- a/manuals/chickadee/Input.html +++ b/manuals/chickadee/Basics.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Input</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Basics (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Input"> -<meta name="keywords" content="The Chickadee Game Toolkit: Input"> +<meta name="description" content="Basics (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Basics (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> -<link href="API-Reference.html#API-Reference" rel="up" title="API Reference"> -<link href="Math.html#Math" rel="next" title="Math"> -<link href="Kernel.html#Kernel" rel="prev" title="Kernel"> +<link href="Math.html#Math" rel="up" title="Math"> +<link href="Vectors.html#Vectors" rel="next" title="Vectors"> +<link href="Math.html#Math" rel="prev" title="Math"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} @@ -87,14 +87,32 @@ ul.no-bullet {list-style: none} </head> <body lang="en"> -<a name="Input"></a> +<a name="Basics"></a> <div class="header"> <p> -Next: <a href="Math.html#Math" accesskey="n" rel="next">Math</a>, Previous: <a href="Kernel.html#Kernel" accesskey="p" rel="prev">Kernel</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Vectors.html#Vectors" accesskey="n" rel="next">Vectors</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> -<a name="Input-1"></a> -<h3 class="section">2.2 Input</h3> +<a name="Basics-1"></a> +<h4 class="subsection">2.2.1 Basics</h4> + +<dl> +<dt><a name="index-pi"></a>Variable: <strong>pi</strong></dt> +<dd><p>An essential constant for all trigonometry. <code>π</code> is the ratio +of a circle’s circumferences to its diameter. Since <code>π</code> is an +irrational number, the <var>pi</var> in Chickadee is a mere floating point +approximation that is “good enough.” +</p></dd></dl> + +<dl> +<dt><a name="index-pi_002f2"></a>Variable: <strong>pi/2</strong></dt> +<dd><p>Half of <var>pi</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-cotan"></a>Procedure: <strong>cotan</strong> <em><var>z</var></em></dt> +<dd><p>Return the cotangent of <var>z</var>. +</p></dd></dl> diff --git a/manuals/chickadee/Bezier-Curves.html b/manuals/chickadee/Bezier-Curves.html new file mode 100644 index 0000000..6a49b59 --- /dev/null +++ b/manuals/chickadee/Bezier-Curves.html @@ -0,0 +1,174 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Bezier Curves (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Bezier Curves (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Bezier Curves (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Math.html#Math" rel="up" title="Math"> +<link href="Path-Finding.html#Path-Finding" rel="next" title="Path Finding"> +<link href="Easings.html#Easings" rel="prev" title="Easings"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Bezier-Curves"></a> +<div class="header"> +<p> +Next: <a href="Path-Finding.html#Path-Finding" accesskey="n" rel="next">Path Finding</a>, Previous: <a href="Easings.html#Easings" accesskey="p" rel="prev">Easings</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Bezier-Curves-1"></a> +<h4 class="subsection">2.2.8 Bezier Curves</h4> + +<p>The <code>(chickadee math bezier)</code> module provides an API for +describing cubic Bezier curves in 2D space. These curves are notably +used in font description, vector graphics programs, and when it comes +to games: path building. With Bezier curves, it’s somewhat easy to +create a smooth looking path for an enemy to move along, for example. +Bezier curves become particularly interesting when they are chained +together to form a Bezier “path”, where the end point of one curve +becomes the starting point of the next. +</p> +<p>Currently, the rendering of Bezier curves is rather crude and provided +mostly for visualizing and debugging curves that would be unseen in +the final game. See See <a href="Lines-and-Shapes.html#Lines-and-Shapes">Lines and Shapes</a> for more information. +</p> +<dl> +<dt><a name="index-make_002dbezier_002dcurve"></a>Procedure: <strong>make-bezier-curve</strong> <em><var>p0</var> <var>p1</var> <var>p2</var> <var>p3</var></em></dt> +<dd><p>Return a new Bezier curve object whose starting point is <var>p0</var>, +ending point is <var>p3</var>, and control points are <var>p1</var> and +<var>p2</var>. All points are 2D vectors. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dcurve_003f"></a>Procedure: <strong>bezier-curve?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a Bezier curve. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dcurve_002dp0"></a>Procedure: <strong>bezier-curve-p0</strong> <em><var>bezier</var></em></dt> +<dd><p>Return the starting point of <var>bezier</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dcurve_002dp1"></a>Procedure: <strong>bezier-curve-p1</strong> <em><var>bezier</var></em></dt> +<dd><p>Return the first control point of <var>bezier</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dcurve_002dp2"></a>Procedure: <strong>bezier-curve-p2</strong> <em><var>bezier</var></em></dt> +<dd><p>Return the second control point of <var>bezier</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dcurve_002dp3"></a>Procedure: <strong>bezier-curve-p3</strong> <em><var>bezier</var></em></dt> +<dd><p>Return the end point of <var>bezier</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dpath"></a>Procedure: <strong>bezier-path</strong> <em>. <var>control-points</var></em></dt> +<dd><p>Return a list of connected bezier curves defined by +<var>control-points</var>. The first curve is defined by the first 4 +arguments and every additional curve thereafter requires 3 additional +arguments. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dcurve_002dpoint_002dat"></a>Procedure: <strong>bezier-curve-point-at</strong> <em><var>bezier</var> <var>t</var></em></dt> +<dd><p>Return the coordinates for <var>bezier</var> at <var>t</var> (a value in the +range [0, 1] representing how far from the start of the curve to +check) as a 2D vector. +</p></dd></dl> + +<dl> +<dt><a name="index-bezier_002dcurve_002dpoint_002dat_0021"></a>Procedure: <strong>bezier-curve-point-at!</strong> <em><var>dest</var> <var>bezier</var> <var>t</var></em></dt> +<dd><p>Modify the 2D vector <var>dest</var> in-place to contain the coordinates +for <var>bezier</var> at <var>t</var>. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="Path-Finding.html#Path-Finding" accesskey="n" rel="next">Path Finding</a>, Previous: <a href="Easings.html#Easings" accesskey="p" rel="prev">Easings</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> + + + +</body> +</html> diff --git a/manuals/chickadee/Blending-and-Depth-Testing.html b/manuals/chickadee/Blending-and-Depth-Testing.html index 72b6140..2591a95 100644 --- a/manuals/chickadee/Blending-and-Depth-Testing.html +++ b/manuals/chickadee/Blending-and-Depth-Testing.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Blending and Depth Testing</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Blending and Depth Testing (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Blending and Depth Testing"> -<meta name="keywords" content="The Chickadee Game Toolkit: Blending and Depth Testing"> +<meta name="description" content="Blending and Depth Testing (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Blending and Depth Testing (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -94,7 +94,7 @@ Next: <a href="Vertex-Arrays.html#Vertex-Arrays" accesskey="n" rel="next">Vertex </div> <hr> <a name="Blending-and-Depth-Testing-1"></a> -<h4 class="subsection">2.4.6 Blending and Depth Testing</h4> +<h4 class="subsection">2.3.7 Blending and Depth Testing</h4> diff --git a/manuals/chickadee/Channels.html b/manuals/chickadee/Channels.html new file mode 100644 index 0000000..f313c4f --- /dev/null +++ b/manuals/chickadee/Channels.html @@ -0,0 +1,146 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Channels (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Channels (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Channels (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Scripting.html#Scripting" rel="up" title="Scripting"> +<link href="Copying-This-Manual.html#Copying-This-Manual" rel="next" title="Copying This Manual"> +<link href="Tweening.html#Tweening" rel="prev" title="Tweening"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Channels"></a> +<div class="header"> +<p> +Previous: <a href="Tweening.html#Tweening" accesskey="p" rel="prev">Tweening</a>, Up: <a href="Scripting.html#Scripting" accesskey="u" rel="up">Scripting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Channels-1"></a> +<h4 class="subsection">2.4.4 Channels</h4> + +<p>Channels are a tool for communicating amongst different scripts. One +script can write a value to the channel and another can read from it. +Reading or writing to a channel suspends that script until there is +someone on the other end of the line to complete the transaction. +</p> +<p>Here’s a simplistic example: +</p> +<div class="example"> +<pre class="example">(define c (make-channel)) + +(script + (forever + (let ((item (channel-get c))) + (pk 'got item)))) + +(script + (channel-put c 'sword) + (channel-put c 'shield) + (channel-put c 'potion)) +</pre></div> + +<dl> +<dt><a name="index-make_002dchannel"></a>Procedure: <strong>make-channel</strong></dt> +<dd><p>Return a new channel +</p></dd></dl> + +<dl> +<dt><a name="index-channel_003f"></a>Procedure: <strong>channel?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a channel. +</p></dd></dl> + +<dl> +<dt><a name="index-channel_002dget-1"></a>Procedure: <strong>channel-get</strong> <em><var>channel</var></em></dt> +<dd><p>Retrieve a value from <var>channel</var>. The current script suspends +until a value is available. +</p></dd></dl> + +<dl> +<dt><a name="index-channel_002dput"></a>Procedure: <strong>channel-put</strong> <em><var>channel</var> <var>data</var></em></dt> +<dd><p>Send <var>data</var> to <var>channel</var>. The current script suspends until +another script is available to retrieve the value. +</p></dd></dl> + + + + +</body> +</html> diff --git a/manuals/chickadee/Copying-This-Manual.html b/manuals/chickadee/Copying-This-Manual.html index 493541d..f9a7c77 100644 --- a/manuals/chickadee/Copying-This-Manual.html +++ b/manuals/chickadee/Copying-This-Manual.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Copying This Manual</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Copying This Manual (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Copying This Manual"> -<meta name="keywords" content="The Chickadee Game Toolkit: Copying This Manual"> +<meta name="description" content="Copying This Manual (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Copying This Manual (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="index.html#Top" rel="up" title="Top"> <link href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" rel="next" title="GNU Free Documentation License"> -<link href="Audio.html#Audio" rel="prev" title="Audio"> +<link href="Channels.html#Channels" rel="prev" title="Channels"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} diff --git a/manuals/chickadee/Easings.html b/manuals/chickadee/Easings.html new file mode 100644 index 0000000..55f385c --- /dev/null +++ b/manuals/chickadee/Easings.html @@ -0,0 +1,171 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Easings (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Easings (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Easings (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Math.html#Math" rel="up" title="Math"> +<link href="Bezier-Curves.html#Bezier-Curves" rel="next" title="Bezier Curves"> +<link href="Quaternions.html#Quaternions" rel="prev" title="Quaternions"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Easings"></a> +<div class="header"> +<p> +Next: <a href="Bezier-Curves.html#Bezier-Curves" accesskey="n" rel="next">Bezier Curves</a>, Previous: <a href="Quaternions.html#Quaternions" accesskey="p" rel="prev">Quaternions</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Easings-1"></a> +<h4 class="subsection">2.2.7 Easings</h4> + +<dl> +<dt><a name="index-linear"></a>Procedure: <strong>linear</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-smoothstep"></a>Procedure: <strong>smoothstep</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dquad"></a>Procedure: <strong>ease-in-quad</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002dout_002dquad"></a>Procedure: <strong>ease-out-quad</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dout_002dquad"></a>Procedure: <strong>ease-in-out-quad</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dcubic"></a>Procedure: <strong>ease-in-cubic</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002dout_002dcubic"></a>Procedure: <strong>ease-out-cubic</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dout_002dcubic"></a>Procedure: <strong>ease-in-out-cubic</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dquart"></a>Procedure: <strong>ease-in-quart</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002dout_002dquart"></a>Procedure: <strong>ease-out-quart</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dout_002dquart"></a>Procedure: <strong>ease-in-out-quart</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dquint"></a>Procedure: <strong>ease-in-quint</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002dout_002dquint"></a>Procedure: <strong>ease-out-quint</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dout_002dquint"></a>Procedure: <strong>ease-in-out-quint</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dsine"></a>Procedure: <strong>ease-in-sine</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002dout_002dsine"></a>Procedure: <strong>ease-out-sine</strong> <em><var>t</var></em></dt> +</dl> + +<dl> +<dt><a name="index-ease_002din_002dout_002dsine"></a>Procedure: <strong>ease-in-out-sine</strong> <em><var>t</var></em></dt> +</dl> + + + + +</body> +</html> diff --git a/manuals/chickadee/Fonts.html b/manuals/chickadee/Fonts.html index 198bddb..a4ed5c6 100644 --- a/manuals/chickadee/Fonts.html +++ b/manuals/chickadee/Fonts.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Fonts</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Fonts (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Fonts"> -<meta name="keywords" content="The Chickadee Game Toolkit: Fonts"> +<meta name="description" content="Fonts (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Fonts (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -94,7 +94,7 @@ Next: <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing" acces </div> <hr> <a name="Fonts-1"></a> -<h4 class="subsection">2.4.5 Fonts</h4> +<h4 class="subsection">2.3.6 Fonts</h4> <p>Unlike the traditional TrueType font format that many are accustomed to, Chickadee loads and renders bitmap fonts in the @@ -122,9 +122,7 @@ each font size needed. This is where the “signed distance field” rendering technique comes in. Introduced by <a href="http://www.valvesoftware.com/.../2007/SIGGRAPH2007_AlphaTestedMagnification.pdf">Valve</a> in 2007, signed distance field fonts can be efficiently stored in a bitmap and be rendered at arbitrary scale factors with good -results. Chickadee can render both traditional bitmap fonts and -signed distance field fonts. <em>Signed distance field font -rendering is not yet available, so be patient.</em> +results. </p> <p>While Chickadee does not yet offer a tool for converting TTF fonts into FNT fonts, tools such as @@ -135,44 +133,45 @@ in the meantime. font)</code> module. </p> <dl> -<dt><a name="index-load_002dfont"></a>Scheme Procedure: <strong>load-font</strong> <em><var>file</var></em></dt> +<dt><a name="index-load_002dfont"></a>Procedure: <strong>load-font</strong> <em><var>file</var></em></dt> <dd><p>Load the Angel Code formatted XML document in <var>file</var> and return a new font object. </p></dd></dl> <dl> -<dt><a name="index-font_003f"></a>Scheme Procedure: <strong>font?</strong> <em><var>obj</var></em></dt> +<dt><a name="index-font_003f"></a>Procedure: <strong>font?</strong> <em><var>obj</var></em></dt> <dd><p>Return <code>#t</code> if <var>obj</var> is a font object. </p></dd></dl> <dl> -<dt><a name="index-font_002dface"></a>Scheme Procedure: <strong>font-face</strong> <em><var>font</var></em></dt> +<dt><a name="index-font_002dface"></a>Procedure: <strong>font-face</strong> <em><var>font</var></em></dt> <dd><p>Return the name of <var>font</var>. </p></dd></dl> <dl> -<dt><a name="index-font_002dline_002dheight"></a>Scheme Procedure: <strong>font-line-height</strong> <em><var>font</var></em></dt> +<dt><a name="index-font_002dline_002dheight"></a>Procedure: <strong>font-line-height</strong> <em><var>font</var></em></dt> <dd><p>Return the line height of <var>font</var>. </p></dd></dl> <dl> -<dt><a name="index-font_002dline_002dheight-1"></a>Scheme Procedure: <strong>font-line-height</strong> <em><var>font</var></em></dt> +<dt><a name="index-font_002dline_002dheight-1"></a>Procedure: <strong>font-line-height</strong> <em><var>font</var></em></dt> <dd><p>Return the line height of <var>font</var>. </p></dd></dl> <dl> -<dt><a name="index-font_002dbold_003f"></a>Scheme Procedure: <strong>font-bold?</strong> <em><var>font</var></em></dt> +<dt><a name="index-font_002dbold_003f"></a>Procedure: <strong>font-bold?</strong> <em><var>font</var></em></dt> <dd><p>Return <code>#t</code> if <var>font</var> is a bold font. </p></dd></dl> <dl> -<dt><a name="index-font_002ditalic_003f"></a>Scheme Procedure: <strong>font-italic?</strong> <em><var>font</var></em></dt> +<dt><a name="index-font_002ditalic_003f"></a>Procedure: <strong>font-italic?</strong> <em><var>font</var></em></dt> <dd><p>Return <code>#t</code> if <var>font</var> is an italicized font. </p></dd></dl> <dl> -<dt><a name="index-draw_002dtext"></a>Scheme Procedure: <strong>draw-text</strong> <em><var>font</var> <var>text</var> <var>position</var></em></dt> -<dd><p>[#:scale] [#:rotation] [#:blend-mode] +<dt><a name="index-draw_002dtext"></a>Procedure: <strong>draw-text</strong> <em><var>font</var> <var>text</var> <var>position</var></em></dt> +<dd><p>[#:origin] [#:scale] [#:rotation] [#:blend-mode] + [#:start 0] [#:end <code>(string-length text)</code>] </p> <p>Draw the string <var>text</var> with the first character starting at <var>position</var> using <var>font</var>. @@ -181,6 +180,9 @@ new font object. <pre class="example">(draw-text font "Hello, world!" (vec2 128.0 128.0)) </pre></div> +<p>To render a substring of <var>text</var>, use the <var>start</var> and <var>end</var> +arguments. +</p> <p>Refer to <code>draw-sprite</code> (see <a href="Sprites.html#Sprites">Sprites</a>) for information about the other arguments. </p></dd></dl> diff --git a/manuals/chickadee/Framebuffers.html b/manuals/chickadee/Framebuffers.html index c57a82a..d7bedc4 100644 --- a/manuals/chickadee/Framebuffers.html +++ b/manuals/chickadee/Framebuffers.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Framebuffers</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Framebuffers (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Framebuffers"> -<meta name="keywords" content="The Chickadee Game Toolkit: Framebuffers"> +<meta name="description" content="Framebuffers (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Framebuffers (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -94,7 +94,50 @@ Next: <a href="Viewports.html#Viewports" accesskey="n" rel="next">Viewports</a>, </div> <hr> <a name="Framebuffers-1"></a> -<h4 class="subsection">2.4.9 Framebuffers</h4> +<h4 class="subsection">2.3.10 Framebuffers</h4> + +<p>A framebuffer is a chunk of memory that the GPU can render things +onto. By default, the framebuffer that is used for rendering is the +one belonging to the game window, but custom framebuffers can be used +as well. A common use-case for custom framebuffers is applying +post-processing effects: The entire scene is rendered to a +framebuffer, and then the contents of that framebuffer are applied to +a post-processing shader and rendered to the game window. The +post-processing shader could do any number of things: scaling, +antialiasing, motion blur, etc. +</p> +<dl> +<dt><a name="index-make_002dframebuffer"></a>Procedure: <strong>make-framebuffer</strong> <em><var>width</var> <var>height</var> [#:min-filter 'linear] [#:mag-filter 'linear] [#:wrap-s 'repeat] [#:wrap-t 'repeat]</em></dt> +<dd> +<p>Create a new framebuffer that is <var>width</var> pixels wide and <var>height</var> pixels high. +</p> +<p><var>min-filter</var> and <var>mag-filter</var> determine the scaling algorithm +applied to the framebuffer when rendering. By default, linear scaling +is used in both cases. To perform no smoothing at all, use +<code>nearest</code> for simple nearest neighbor scaling. This is typically +the best choice for pixel art games. +</p></dd></dl> + +<dl> +<dt><a name="index-framebuffer_003f"></a>Procedure: <strong>framebuffer?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a framebuffer. +</p></dd></dl> + +<dl> +<dt><a name="index-framebuffer_002dtexture"></a>Procedure: <strong>framebuffer-texture</strong> <em><var>fb</var></em></dt> +<dd><p>Return the texture backing the framebuffer <var>fb</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-framebuffer_002dviewport"></a>Procedure: <strong>framebuffer-viewport</strong> <em><var>fb</var></em></dt> +<dd><p>Return the default viewport (see <a href="Viewports.html#Viewports">Viewports</a>) used by the +framebuffer <var>fb</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-null_002dframebuffer"></a>Procedure: <strong>null-framebuffer</strong></dt> +<dd><p>The default framebuffer. +</p></dd></dl> diff --git a/manuals/chickadee/GNU-Free-Documentation-License.html b/manuals/chickadee/GNU-Free-Documentation-License.html index 62ad23f..3c9e2c5 100644 --- a/manuals/chickadee/GNU-Free-Documentation-License.html +++ b/manuals/chickadee/GNU-Free-Documentation-License.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: GNU Free Documentation License</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>GNU Free Documentation License (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: GNU Free Documentation License"> -<meta name="keywords" content="The Chickadee Game Toolkit: GNU Free Documentation License"> +<meta name="description" content="GNU Free Documentation License (The Chickadee Game Toolkit)"> +<meta name="keywords" content="GNU Free Documentation License (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -106,7 +106,7 @@ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. </pre></div> -<ol> +<ol start="0"> <li> PREAMBLE <p>The purpose of this License is to make a manual, textbook, or other @@ -282,7 +282,7 @@ Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: </p> -<ol> +<ol type="A" start="1"> <li> Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section diff --git a/manuals/chickadee/Graphics.html b/manuals/chickadee/Graphics.html index 0afe5bc..f10cc89 100644 --- a/manuals/chickadee/Graphics.html +++ b/manuals/chickadee/Graphics.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Graphics</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Graphics (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Graphics"> -<meta name="keywords" content="The Chickadee Game Toolkit: Graphics"> +<meta name="description" content="Graphics (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Graphics (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="API-Reference.html#API-Reference" rel="up" title="API Reference"> <link href="Rendering-Engine.html#Rendering-Engine" rel="next" title="Rendering Engine"> -<link href="Rectangles.html#Rectangles" rel="prev" title="Rectangles"> +<link href="Path-Finding.html#Path-Finding" rel="prev" title="Path Finding"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} @@ -90,11 +90,11 @@ ul.no-bullet {list-style: none} <a name="Graphics"></a> <div class="header"> <p> -Next: <a href="Audio.html#Audio" accesskey="n" rel="next">Audio</a>, Previous: <a href="Math.html#Math" accesskey="p" rel="prev">Math</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Scripting.html#Scripting" accesskey="n" rel="next">Scripting</a>, Previous: <a href="Math.html#Math" accesskey="p" rel="prev">Math</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Graphics-1"></a> -<h3 class="section">2.4 Graphics</h3> +<h3 class="section">2.3 Graphics</h3> <p>Chickadee aims to make hardware-accelerated graphics rendering as simple and efficient as possible by providing high-level APIs that @@ -112,17 +112,19 @@ blocks to implement additional rendering techniques. </td></tr> <tr><td align="left" valign="top">• <a href="Sprites.html#Sprites" accesskey="3">Sprites</a>:</td><td> </td><td align="left" valign="top">Draw 2D images. </td></tr> -<tr><td align="left" valign="top">• <a href="Lines-and-Shapes.html#Lines-and-Shapes" accesskey="4">Lines and Shapes</a>:</td><td> </td><td align="left" valign="top">Draw line segments and polygons. +<tr><td align="left" valign="top">• <a href="Tile-Maps.html#Tile-Maps" accesskey="4">Tile Maps</a>:</td><td> </td><td align="left" valign="top">Draw 2D tile maps. +</td></tr> +<tr><td align="left" valign="top">• <a href="Lines-and-Shapes.html#Lines-and-Shapes" accesskey="5">Lines and Shapes</a>:</td><td> </td><td align="left" valign="top">Draw line segments and polygons. </td></tr> -<tr><td align="left" valign="top">• <a href="Fonts.html#Fonts" accesskey="5">Fonts</a>:</td><td> </td><td align="left" valign="top">Drawing text. +<tr><td align="left" valign="top">• <a href="Fonts.html#Fonts" accesskey="6">Fonts</a>:</td><td> </td><td align="left" valign="top">Drawing text. </td></tr> -<tr><td align="left" valign="top">• <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing" accesskey="6">Blending and Depth Testing</a>:</td><td> </td><td align="left" valign="top">Control how pixels are combined. +<tr><td align="left" valign="top">• <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing" accesskey="7">Blending and Depth Testing</a>:</td><td> </td><td align="left" valign="top">Control how pixels are combined. </td></tr> -<tr><td align="left" valign="top">• <a href="Vertex-Arrays.html#Vertex-Arrays" accesskey="7">Vertex Arrays</a>:</td><td> </td><td align="left" valign="top">Create 2D/3D models. +<tr><td align="left" valign="top">• <a href="Vertex-Arrays.html#Vertex-Arrays" accesskey="8">Vertex Arrays</a>:</td><td> </td><td align="left" valign="top">Create 2D/3D models. </td></tr> -<tr><td align="left" valign="top">• <a href="Shaders.html#Shaders" accesskey="8">Shaders</a>:</td><td> </td><td align="left" valign="top">Create custom GPU programs. +<tr><td align="left" valign="top">• <a href="Shaders.html#Shaders" accesskey="9">Shaders</a>:</td><td> </td><td align="left" valign="top">Create custom GPU programs. </td></tr> -<tr><td align="left" valign="top">• <a href="Framebuffers.html#Framebuffers" accesskey="9">Framebuffers</a>:</td><td> </td><td align="left" valign="top">Render to texture. +<tr><td align="left" valign="top">• <a href="Framebuffers.html#Framebuffers">Framebuffers</a>:</td><td> </td><td align="left" valign="top">Render to texture. </td></tr> <tr><td align="left" valign="top">• <a href="Viewports.html#Viewports">Viewports</a>:</td><td> </td><td align="left" valign="top">Restrict rendering to </td></tr> diff --git a/manuals/chickadee/Grid.html b/manuals/chickadee/Grid.html new file mode 100644 index 0000000..f6e1cbf --- /dev/null +++ b/manuals/chickadee/Grid.html @@ -0,0 +1,223 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Grid (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Grid (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Grid (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Math.html#Math" rel="up" title="Math"> +<link href="Matrices.html#Matrices" rel="next" title="Matrices"> +<link href="Rectangles.html#Rectangles" rel="prev" title="Rectangles"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Grid"></a> +<div class="header"> +<p> +Next: <a href="Matrices.html#Matrices" accesskey="n" rel="next">Matrices</a>, Previous: <a href="Rectangles.html#Rectangles" accesskey="p" rel="prev">Rectangles</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Grid-1"></a> +<h4 class="subsection">2.2.4 Grid</h4> + +<p>The <code>(chickadee math grid)</code> module provides a simple spatial +partitioning system for axis-aligned bounding boxes +(see <a href="Rectangles.html#Rectangles">Rectangles</a>) in 2D space. The grid divides the world into +tiles and keeps track of which rectangles occupy which tiles. When +there are lots of moving objects in the game world that need collision +detection, the grid greatly speeds up the process. Instead of +checking collisions of each object against every other object (an +O(n^2) operation), the grid quickly narrows down which objects could +possibly be colliding and only performs collision testing against a +small set of objects. +</p> +<p>In addition to checking for collisions, the grid also handles the +resolution of collisions. Exactly how each collision is resolved is +user-defined. A player bumping into a wall may slide against it. An +enemy colliding with a projectile shot by the player may get pushed +back in the opposite direction. Two players colliding may not need +resolution at all and will just pass through each other. The way this +works is that each time an object (A) is moved within the grid, the +grid looks for an object (B) that may possibly be colliding with A. A +user-defined procedure known as a “filter” is then called with both +A and B. If the filter returns <code>#f</code>, it means that even if A and +B are colliding, no collision resolution is needed. In this case the +grid won’t waste time checking if they really do collide because it +doesn’t matter. If A and B are collidable, then the filter returns a +procedure that implements the resolution technique. The grid will +then perform a collision test. If A and B are colliding, the resolver +procedure is called. It’s the resolvers job to adjust the objects +such that they are no longer colliding. The grid module comes with a +very simple resolution procedure, <code>slide</code>, that adjusts object A +by the smallest amount so that it no longer overlaps with B. By using +this filtering technique, a game can resolve collisions between +different objects in different ways. +</p> +<dl> +<dt><a name="index-make_002dgrid"></a>Procedure: <strong>make-grid</strong> <em>[<var>cell-size</var> 64]</em></dt> +<dd><p>Return a new grid partitioned into <var>cell-size</var> tiles. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_003f"></a>Procedure: <strong>grid?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a grid. +</p></dd></dl> + +<dl> +<dt><a name="index-cell_003f"></a>Procedure: <strong>cell?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a grid cell. +</p></dd></dl> + +<dl> +<dt><a name="index-cell_002dcount"></a>Procedure: <strong>cell-count</strong> <em><var>cell</var></em></dt> +<dd><p>Return the number of items in <var>cell</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_002dcell_002dsize"></a>Procedure: <strong>grid-cell-size</strong> <em><var>grid</var></em></dt> +<dd><p>Return the cell size of <var>grid</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_002dcell_002dcount"></a>Procedure: <strong>grid-cell-count</strong> <em><var>grid</var></em></dt> +<dd><p>Return the number of cells currently in <var>grid</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_002ditem_002dcount"></a>Procedure: <strong>grid-item-count</strong> <em><var>grid</var></em></dt> +<dd><p>Return the number of items in <var>grid</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_002dadd"></a>Procedure: <strong>grid-add</strong> <em><var>grid</var> <var>item</var> <var>x</var> <var>y</var> <var>width</var> <var>height</var></em></dt> +<dd> +<p>Add <var>item</var> to <var>grid</var> represented by the axis-aligned bounding +box whose lower-left corner is at (<var>x</var>, <var>y</var>) and is +<var>width</var> x <var>height</var> in size. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_002dremove"></a>Procedure: <strong>grid-remove</strong> <em><var>grid</var> <var>item</var></em></dt> +<dd><p>Return <var>item</var> from <var>grid</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_002dclear"></a>Procedure: <strong>grid-clear</strong> <em><var>grid</var></em></dt> +<dd><p>Remove all items from <var>grid</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-grid_002dmove"></a>Procedure: <strong>grid-move</strong> <em><var>grid</var> <var>item</var> <var>position</var> <var>filter</var></em></dt> +<dd><p>Attempt to move <var>item</var> in <var>grid</var> to <var>position</var> (a 2D +vector) and check for collisions. For each collision, <var>filter</var> +will be called with two arguments: <var>item</var> and the item it collided +with. If a collision occurs, <var>position</var> may be modified to +resolve the colliding objects. +</p></dd></dl> + +<dl> +<dt><a name="index-for_002deach_002dcell"></a>Procedure: <strong>for-each-cell</strong> <em><var>proc</var> <var>grid</var> [<var>rect</var>]</em></dt> +<dd><p>Call <var>proc</var> with each cell in <var>grid</var> that intersects +<var>rect</var>, or every cell if <var>rect</var> is <code>#f</code>. +</p></dd></dl> + +<dl> +<dt><a name="index-for_002deach_002ditem"></a>Procedure: <strong>for-each-item</strong> <em><var>proc</var> <var>grid</var></em></dt> +<dd><p>Call <var>proc</var> for each item in <var>grid</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-slide"></a>Procedure: <strong>slide</strong> <em><var>item</var> <var>item-rect</var> <var>other</var> <var>other-rect</var> <var>goal</var></em></dt> +<dd> +<p>Resolve the collision that occurs between <var>item</var> and <var>other</var> +when moving <var>item-rect</var> to <var>goal</var> by sliding <var>item-rect</var> +the minimum amount needed to make it no longer overlap +<var>other-rect</var>. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="Matrices.html#Matrices" accesskey="n" rel="next">Matrices</a>, Previous: <a href="Rectangles.html#Rectangles" accesskey="p" rel="prev">Rectangles</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> + + + +</body> +</html> diff --git a/manuals/chickadee/Index.html b/manuals/chickadee/Index.html index 3c1df5e..b5168e5 100644 --- a/manuals/chickadee/Index.html +++ b/manuals/chickadee/Index.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Index</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Index (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Index"> -<meta name="keywords" content="The Chickadee Game Toolkit: Index"> +<meta name="description" content="Index (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Index (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -103,16 +103,20 @@ Previous: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="p" r <a class="summary-letter" href="#Index_fn_letter-D"><b>D</b></a> +<a class="summary-letter" href="#Index_fn_letter-E"><b>E</b></a> + <a class="summary-letter" href="#Index_fn_letter-F"><b>F</b></a> <a class="summary-letter" href="#Index_fn_letter-G"><b>G</b></a> -<a class="summary-letter" href="#Index_fn_letter-K"><b>K</b></a> - <a class="summary-letter" href="#Index_fn_letter-L"><b>L</b></a> <a class="summary-letter" href="#Index_fn_letter-M"><b>M</b></a> +<a class="summary-letter" href="#Index_fn_letter-N"><b>N</b></a> + +<a class="summary-letter" href="#Index_fn_letter-O"><b>O</b></a> + <a class="summary-letter" href="#Index_fn_letter-P"><b>P</b></a> <a class="summary-letter" href="#Index_fn_letter-Q"><b>Q</b></a> @@ -125,25 +129,45 @@ Previous: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="p" r <a class="summary-letter" href="#Index_fn_letter-U"><b>U</b></a> +<a class="summary-letter" href="#Index_fn_letter-V"><b>V</b></a> + <a class="summary-letter" href="#Index_fn_letter-W"><b>W</b></a> +<a class="summary-letter" href="#Index_fn_letter-Y"><b>Y</b></a> + </td></tr></table> <table class="index-fn" border="0"> <tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-A">A</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Path-Finding.html#index-a_002a"><code>a*</code></a>:</td><td> </td><td valign="top"><a href="Path-Finding.html#Path-Finding">Path Finding</a></td></tr> <tr><td></td><td valign="top"><a href="Kernel.html#index-abort_002dgame"><code>abort-game</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-after_002ddraw_002dhook"><code>after-draw-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-after"><code>after</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-agenda_002dtime"><code>agenda-time</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-agenda_003f"><code>agenda?</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-at"><code>at</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-B">B</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-before_002ddraw_002dhook"><code>before-draw-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dcurve_002dp0"><code>bezier-curve-p0</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dcurve_002dp1"><code>bezier-curve-p1</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dcurve_002dp2"><code>bezier-curve-p2</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dcurve_002dp3"><code>bezier-curve-p3</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dcurve_002dpoint_002dat"><code>bezier-curve-point-at</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dcurve_002dpoint_002dat_0021"><code>bezier-curve-point-at!</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dcurve_003f"><code>bezier-curve?</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-bezier_002dpath"><code>bezier-path</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-C">C</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-controller_002dadd_002dhook"><code>controller-add-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-controller_002dmove_002dhook"><code>controller-move-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-controller_002dpress_002dhook"><code>controller-press-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-controller_002drelease_002dhook"><code>controller-release-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-controller_002dremove_002dhook"><code>controller-remove-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-cancel_002dscript"><code>cancel-script</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-cell_002dcount"><code>cell-count</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-cell_003f"><code>cell?</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-channel_002dget"><code>channel-get</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Channels.html#index-channel_002dget-1"><code>channel-get</code></a>:</td><td> </td><td valign="top"><a href="Channels.html#Channels">Channels</a></td></tr> +<tr><td></td><td valign="top"><a href="Channels.html#index-channel_002dput"><code>channel-put</code></a>:</td><td> </td><td valign="top"><a href="Channels.html#Channels">Channels</a></td></tr> +<tr><td></td><td valign="top"><a href="Channels.html#index-channel_003f"><code>channel?</code></a>:</td><td> </td><td valign="top"><a href="Channels.html#Channels">Channels</a></td></tr> +<tr><td></td><td valign="top"><a href="Basics.html#index-cotan"><code>cotan</code></a>:</td><td> </td><td valign="top"><a href="Basics.html#Basics">Basics</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-current_002dagenda"><code>current-agenda</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-current_002dagenda-1"><code>current-agenda</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-current_002dblend_002dmode"><code>current-blend-mode</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-current_002ddepth_002dtest"><code>current-depth-test</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-current_002dframebuffer"><code>current-framebuffer</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> @@ -152,11 +176,32 @@ Previous: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="p" r <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-current_002dviewport"><code>current-viewport</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-D">D</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-draw_002dhook"><code>draw-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Lines-and-Shapes.html#index-draw_002dbezier_002dcurve"><code>draw-bezier-curve</code></a>:</td><td> </td><td valign="top"><a href="Lines-and-Shapes.html#Lines-and-Shapes">Lines and Shapes</a></td></tr> +<tr><td></td><td valign="top"><a href="Lines-and-Shapes.html#index-draw_002dbezier_002dpath"><code>draw-bezier-path</code></a>:</td><td> </td><td valign="top"><a href="Lines-and-Shapes.html#Lines-and-Shapes">Lines and Shapes</a></td></tr> <tr><td></td><td valign="top"><a href="Lines-and-Shapes.html#index-draw_002dline"><code>draw-line</code></a>:</td><td> </td><td valign="top"><a href="Lines-and-Shapes.html#Lines-and-Shapes">Lines and Shapes</a></td></tr> <tr><td></td><td valign="top"><a href="Sprites.html#index-draw_002dnine_002dpatch"><code>draw-nine-patch</code></a>:</td><td> </td><td valign="top"><a href="Sprites.html#Sprites">Sprites</a></td></tr> <tr><td></td><td valign="top"><a href="Sprites.html#index-draw_002dsprite"><code>draw-sprite</code></a>:</td><td> </td><td valign="top"><a href="Sprites.html#Sprites">Sprites</a></td></tr> <tr><td></td><td valign="top"><a href="Fonts.html#index-draw_002dtext"><code>draw-text</code></a>:</td><td> </td><td valign="top"><a href="Fonts.html#Fonts">Fonts</a></td></tr> +<tr><td></td><td valign="top"><a href="Tile-Maps.html#index-draw_002dtile_002dmap"><code>draw-tile-map</code></a>:</td><td> </td><td valign="top"><a href="Tile-Maps.html#Tile-Maps">Tile Maps</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Index_fn_letter-E">E</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dcubic"><code>ease-in-cubic</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dout_002dcubic"><code>ease-in-out-cubic</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dout_002dquad"><code>ease-in-out-quad</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dout_002dquart"><code>ease-in-out-quart</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dout_002dquint"><code>ease-in-out-quint</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dout_002dsine"><code>ease-in-out-sine</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dquad"><code>ease-in-quad</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dquart"><code>ease-in-quart</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dquint"><code>ease-in-quint</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002din_002dsine"><code>ease-in-sine</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002dout_002dcubic"><code>ease-out-cubic</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002dout_002dquad"><code>ease-out-quad</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002dout_002dquart"><code>ease-out-quart</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002dout_002dquint"><code>ease-out-quint</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-ease_002dout_002dsine"><code>ease-out-sine</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-every"><code>every</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-every-1"><code>every</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-F">F</a></th><td></td><td></td></tr> <tr><td></td><td valign="top"><a href="Fonts.html#index-font_002dbold_003f"><code>font-bold?</code></a>:</td><td> </td><td valign="top"><a href="Fonts.html#Fonts">Fonts</a></td></tr> @@ -165,56 +210,182 @@ Previous: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="p" r <tr><td></td><td valign="top"><a href="Fonts.html#index-font_002dline_002dheight"><code>font-line-height</code></a>:</td><td> </td><td valign="top"><a href="Fonts.html#Fonts">Fonts</a></td></tr> <tr><td></td><td valign="top"><a href="Fonts.html#index-font_002dline_002dheight-1"><code>font-line-height</code></a>:</td><td> </td><td valign="top"><a href="Fonts.html#Fonts">Fonts</a></td></tr> <tr><td></td><td valign="top"><a href="Fonts.html#index-font_003f"><code>font?</code></a>:</td><td> </td><td valign="top"><a href="Fonts.html#Fonts">Fonts</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-for_002deach_002dcell"><code>for-each-cell</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-for_002deach_002ditem"><code>for-each-item</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-forever"><code>forever</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Framebuffers.html#index-framebuffer_002dtexture"><code>framebuffer-texture</code></a>:</td><td> </td><td valign="top"><a href="Framebuffers.html#Framebuffers">Framebuffers</a></td></tr> +<tr><td></td><td valign="top"><a href="Framebuffers.html#index-framebuffer_002dviewport"><code>framebuffer-viewport</code></a>:</td><td> </td><td valign="top"><a href="Framebuffers.html#Framebuffers">Framebuffers</a></td></tr> +<tr><td></td><td valign="top"><a href="Framebuffers.html#index-framebuffer_003f"><code>framebuffer?</code></a>:</td><td> </td><td valign="top"><a href="Framebuffers.html#Framebuffers">Framebuffers</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-G">G</a></th><td></td><td></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-gpu_002dapply"><code>gpu-apply</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-gpu_002dapply_002a"><code>gpu-apply*</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> -<tr><td colspan="4"> <hr></td></tr> -<tr><th><a name="Index_fn_letter-K">K</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-key_002dpress_002dhook"><code>key-press-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-key_002drelease_002dhook"><code>key-release-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_002dadd"><code>grid-add</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_002dcell_002dcount"><code>grid-cell-count</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_002dcell_002dsize"><code>grid-cell-size</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_002dclear"><code>grid-clear</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_002ditem_002dcount"><code>grid-item-count</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_002dmove"><code>grid-move</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_002dremove"><code>grid-remove</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-grid_003f"><code>grid?</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-L">L</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-linear"><code>linear</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> <tr><td></td><td valign="top"><a href="Fonts.html#index-load_002dfont"><code>load-font</code></a>:</td><td> </td><td valign="top"><a href="Fonts.html#Fonts">Fonts</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-load_002dhook"><code>load-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> <tr><td></td><td valign="top"><a href="Textures.html#index-load_002dimage"><code>load-image</code></a>:</td><td> </td><td valign="top"><a href="Textures.html#Textures">Textures</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-load_002dmusic"><code>load-music</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-load_002dsample"><code>load-sample</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> +<tr><td></td><td valign="top"><a href="Tile-Maps.html#index-load_002dtile_002dmap"><code>load-tile-map</code></a>:</td><td> </td><td valign="top"><a href="Tile-Maps.html#Tile-Maps">Tile Maps</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-M">M</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-mouse_002dmove_002dhook"><code>mouse-move-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-mouse_002dpress_002dhook"><code>mouse-press-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-mouse_002drelease_002dhook"><code>mouse-release-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-music_002dpaused_003f"><code>music-paused?</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-music_002dplaying_003f"><code>music-playing?</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-music_002dvolume"><code>music-volume</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-make_002dagenda"><code>make-agenda</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Bezier-Curves.html#index-make_002dbezier_002dcurve"><code>make-bezier-curve</code></a>:</td><td> </td><td valign="top"><a href="Bezier-Curves.html#Bezier-Curves">Bezier Curves</a></td></tr> +<tr><td></td><td valign="top"><a href="Channels.html#index-make_002dchannel"><code>make-channel</code></a>:</td><td> </td><td valign="top"><a href="Channels.html#Channels">Channels</a></td></tr> +<tr><td></td><td valign="top"><a href="Framebuffers.html#index-make_002dframebuffer"><code>make-framebuffer</code></a>:</td><td> </td><td valign="top"><a href="Framebuffers.html#Framebuffers">Framebuffers</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-make_002dgrid"><code>make-grid</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-make_002didentity_002dmatrix4"><code>make-identity-matrix4</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Quaternions.html#index-make_002didentity_002dquaternion"><code>make-identity-quaternion</code></a>:</td><td> </td><td valign="top"><a href="Quaternions.html#Quaternions">Quaternions</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-make_002dmatrix4"><code>make-matrix4</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-make_002dnull_002dmatrix4"><code>make-null-matrix4</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Path-Finding.html#index-make_002dpath_002dfinder"><code>make-path-finder</code></a>:</td><td> </td><td valign="top"><a href="Path-Finding.html#Path-Finding">Path Finding</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-make_002drect"><code>make-rect</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002a"><code>matrix4*</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002d2d_002dtransform_0021"><code>matrix4-2d-transform!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002didentity_0021"><code>matrix4-identity!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002dmult_0021"><code>matrix4-mult!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002drotate"><code>matrix4-rotate</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002drotate_0021"><code>matrix4-rotate!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002drotate_002dz"><code>matrix4-rotate-z</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002drotate_002dz_0021"><code>matrix4-rotate-z!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002dscale"><code>matrix4-scale</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002dscale_0021"><code>matrix4-scale!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002dtranslate"><code>matrix4-translate</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_002dtranslate_0021"><code>matrix4-translate!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-matrix4_003f"><code>matrix4?</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Index_fn_letter-N">N</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Framebuffers.html#index-null_002dframebuffer"><code>null-framebuffer</code></a>:</td><td> </td><td valign="top"><a href="Framebuffers.html#Framebuffers">Framebuffers</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Index_fn_letter-O">O</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-orthographic_002dprojection"><code>orthographic-projection</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-P">P</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-pause_002dmusic"><code>pause-music</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-play_002dmusic"><code>play-music</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-play_002dsample"><code>play-sample</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> +<tr><td></td><td valign="top"><a href="Path-Finding.html#index-path_002dfinder_003f"><code>path-finder?</code></a>:</td><td> </td><td valign="top"><a href="Path-Finding.html#Path-Finding">Path Finding</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-perspective_002dprojection"><code>perspective-projection</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Basics.html#index-pi"><code>pi</code></a>:</td><td> </td><td valign="top"><a href="Basics.html#Basics">Basics</a></td></tr> +<tr><td></td><td valign="top"><a href="Basics.html#index-pi_002f2"><code>pi/2</code></a>:</td><td> </td><td valign="top"><a href="Basics.html#Basics">Basics</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-Q">Q</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-quit_002dhook"><code>quit-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Quaternions.html#index-quaternion"><code>quaternion</code></a>:</td><td> </td><td valign="top"><a href="Quaternions.html#Quaternions">Quaternions</a></td></tr> +<tr><td></td><td valign="top"><a href="Quaternions.html#index-quaternion_002dw"><code>quaternion-w</code></a>:</td><td> </td><td valign="top"><a href="Quaternions.html#Quaternions">Quaternions</a></td></tr> +<tr><td></td><td valign="top"><a href="Quaternions.html#index-quaternion_002dx"><code>quaternion-x</code></a>:</td><td> </td><td valign="top"><a href="Quaternions.html#Quaternions">Quaternions</a></td></tr> +<tr><td></td><td valign="top"><a href="Quaternions.html#index-quaternion_002dy"><code>quaternion-y</code></a>:</td><td> </td><td valign="top"><a href="Quaternions.html#Quaternions">Quaternions</a></td></tr> +<tr><td></td><td valign="top"><a href="Quaternions.html#index-quaternion_002dz"><code>quaternion-z</code></a>:</td><td> </td><td valign="top"><a href="Quaternions.html#Quaternions">Quaternions</a></td></tr> +<tr><td></td><td valign="top"><a href="Quaternions.html#index-quaternion_003f"><code>quaternion?</code></a>:</td><td> </td><td valign="top"><a href="Quaternions.html#Quaternions">Quaternions</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-R">R</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-resume_002dmusic"><code>resume-music</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-rewind_002dmusic"><code>rewind-music</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002darea"><code>rect-area</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dbottom"><code>rect-bottom</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dcenter_002dx"><code>rect-center-x</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dcenter_002dy"><code>rect-center-y</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dclamp"><code>rect-clamp</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dclamp_0021"><code>rect-clamp!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dclamp_002dx"><code>rect-clamp-x</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dclamp_002dy"><code>rect-clamp-y</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dclip"><code>rect-clip</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dclip_0021"><code>rect-clip!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dcontains_002dvec2_003f"><code>rect-contains-vec2?</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dcontains_003f"><code>rect-contains?</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dheight"><code>rect-height</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dinflate"><code>rect-inflate</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dinflate_0021"><code>rect-inflate!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dintersects_003f"><code>rect-intersects?</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dleft"><code>rect-left</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove"><code>rect-move</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove_0021"><code>rect-move!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove_002dby"><code>rect-move-by</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove_002dby_0021"><code>rect-move-by!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove_002dby_002dvec2"><code>rect-move-by-vec2</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove_002dby_002dvec2_0021"><code>rect-move-by-vec2!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove_002dvec2"><code>rect-move-vec2</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dmove_002dvec2_0021"><code>rect-move-vec2!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dright"><code>rect-right</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dtop"><code>rect-top</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dunion"><code>rect-union</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dunion_0021"><code>rect-union!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dwidth"><code>rect-width</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dwithin_003f"><code>rect-within?</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dx"><code>rect-x</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_002dy"><code>rect-y</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-rect_003f"><code>rect?</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> <tr><td></td><td valign="top"><a href="Kernel.html#index-run_002dgame"><code>run-game</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Kernel.html#index-run_002dgame_002fsdl"><code>run-game/sdl</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-S">S</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-set_002dmusic_002dvolume_0021"><code>set-music-volume!</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-set_002dsample_002dvolume_0021"><code>set-sample-volume!</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> -<tr><td></td><td valign="top"><a href="Audio.html#index-stop_002dmusic"><code>stop-music</code></a>:</td><td> </td><td valign="top"><a href="Audio.html#Audio">Audio</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-schedule_002dafter"><code>schedule-after</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-schedule_002dat"><code>schedule-at</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-schedule_002devery"><code>schedule-every</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-script"><code>script</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-script_002dcancelled_003f"><code>script-cancelled?</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-script_002dcomplete_003f"><code>script-complete?</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-script_002drunning_003f"><code>script-running?</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-script_003f"><code>script?</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-set_002drect_002dheight_0021"><code>set-rect-height!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-set_002drect_002dwidth_0021"><code>set-rect-width!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-set_002drect_002dx_0021"><code>set-rect-x!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-set_002drect_002dy_0021"><code>set-rect-y!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-set_002dvec2_002dx_0021"><code>set-vec2-x!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-set_002dvec2_002dy_0021"><code>set-vec2-y!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-set_002dvec3_002dx_0021"><code>set-vec3-x!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-set_002dvec3_002dy_0021"><code>set-vec3-y!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-set_002dvec3_002dz_0021"><code>set-vec3-z!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-sleep"><code>sleep</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="Grid.html#index-slide"><code>slide</code></a>:</td><td> </td><td valign="top"><a href="Grid.html#Grid">Grid</a></td></tr> +<tr><td></td><td valign="top"><a href="Easings.html#index-smoothstep"><code>smoothstep</code></a>:</td><td> </td><td valign="top"><a href="Easings.html#Easings">Easings</a></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-spawn_002dscript"><code>spawn-script</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-T">T</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-text_002dinput_002dhook"><code>text-input-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-time"><code>time</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Matrices.html#index-transform_0021"><code>transform!</code></a>:</td><td> </td><td valign="top"><a href="Matrices.html#Matrices">Matrices</a></td></tr> +<tr><td></td><td valign="top"><a href="Tweening.html#index-tween"><code>tween</code></a>:</td><td> </td><td valign="top"><a href="Tweening.html#Tweening">Tweening</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-U">U</a></th><td></td><td></td></tr> -<tr><td></td><td valign="top"><a href="Kernel.html#index-update_002dhook"><code>update-hook</code></a>:</td><td> </td><td valign="top"><a href="Kernel.html#Kernel">Kernel</a></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-update_002dagenda"><code>update-agenda</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Index_fn_letter-V">V</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2"><code>vec2</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002a"><code>vec2*</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002b"><code>vec2+</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002d"><code>vec2-</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dadd_0021"><code>vec2-add!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Rectangles.html#index-vec2_002dclamp_002dto_002drect_0021"><code>vec2-clamp-to-rect!</code></a>:</td><td> </td><td valign="top"><a href="Rectangles.html#Rectangles">Rectangles</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dcopy"><code>vec2-copy</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dcopy_0021"><code>vec2-copy!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002ddot_002dproduct"><code>vec2-dot-product</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dmagnitude"><code>vec2-magnitude</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dmult_0021"><code>vec2-mult!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dnormalize"><code>vec2-normalize</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dsub_0021"><code>vec2-sub!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dx"><code>vec2-x</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002dy"><code>vec2-y</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_002fpolar"><code>vec2/polar</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec2_003f"><code>vec2?</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3"><code>vec3</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002a"><code>vec3*</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002b"><code>vec3+</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002d"><code>vec3-</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dadd_0021"><code>vec3-add!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dcopy"><code>vec3-copy</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dcopy_0021"><code>vec3-copy!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002ddot_002dproduct"><code>vec3-dot-product</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dmagnitude"><code>vec3-magnitude</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dmult_0021"><code>vec3-mult!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dnormalize"><code>vec3-normalize</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dsub_0021"><code>vec3-sub!</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dx"><code>vec3-x</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dy"><code>vec3-y</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_002dz"><code>vec3-z</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> +<tr><td></td><td valign="top"><a href="Vectors.html#index-vec3_003f"><code>vec3?</code></a>:</td><td> </td><td valign="top"><a href="Vectors.html#Vectors">Vectors</a></td></tr> <tr><td colspan="4"> <hr></td></tr> <tr><th><a name="Index_fn_letter-W">W</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Agendas.html#index-with_002dagenda"><code>with-agenda</code></a>:</td><td> </td><td valign="top"><a href="Agendas.html#Agendas">Agendas</a></td></tr> <tr><td></td><td valign="top"><a href="Sprites.html#index-with_002dbatched_002dsprites"><code>with-batched-sprites</code></a>:</td><td> </td><td valign="top"><a href="Sprites.html#Sprites">Sprites</a></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-with_002dblend_002dmode"><code>with-blend-mode</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-with_002ddepth_002dtest"><code>with-depth-test</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> @@ -223,6 +394,9 @@ Previous: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="p" r <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-with_002dtexture"><code>with-texture</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> <tr><td></td><td valign="top"><a href="Rendering-Engine.html#index-with_002dviewport"><code>with-viewport</code></a>:</td><td> </td><td valign="top"><a href="Rendering-Engine.html#Rendering-Engine">Rendering Engine</a></td></tr> <tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Index_fn_letter-Y">Y</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="Scripts.html#index-yield"><code>yield</code></a>:</td><td> </td><td valign="top"><a href="Scripts.html#Scripts">Scripts</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> </table> <table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_fn_letter-A"><b>A</b></a> @@ -232,16 +406,20 @@ Previous: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="p" r <a class="summary-letter" href="#Index_fn_letter-D"><b>D</b></a> +<a class="summary-letter" href="#Index_fn_letter-E"><b>E</b></a> + <a class="summary-letter" href="#Index_fn_letter-F"><b>F</b></a> <a class="summary-letter" href="#Index_fn_letter-G"><b>G</b></a> -<a class="summary-letter" href="#Index_fn_letter-K"><b>K</b></a> - <a class="summary-letter" href="#Index_fn_letter-L"><b>L</b></a> <a class="summary-letter" href="#Index_fn_letter-M"><b>M</b></a> +<a class="summary-letter" href="#Index_fn_letter-N"><b>N</b></a> + +<a class="summary-letter" href="#Index_fn_letter-O"><b>O</b></a> + <a class="summary-letter" href="#Index_fn_letter-P"><b>P</b></a> <a class="summary-letter" href="#Index_fn_letter-Q"><b>Q</b></a> @@ -254,8 +432,12 @@ Previous: <a href="Copying-This-Manual.html#Copying-This-Manual" accesskey="p" r <a class="summary-letter" href="#Index_fn_letter-U"><b>U</b></a> +<a class="summary-letter" href="#Index_fn_letter-V"><b>V</b></a> + <a class="summary-letter" href="#Index_fn_letter-W"><b>W</b></a> +<a class="summary-letter" href="#Index_fn_letter-Y"><b>Y</b></a> + </td></tr></table> <hr> diff --git a/manuals/chickadee/Installation.html b/manuals/chickadee/Installation.html index a362263..4872008 100644 --- a/manuals/chickadee/Installation.html +++ b/manuals/chickadee/Installation.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Installation</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Installation (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Installation"> -<meta name="keywords" content="The Chickadee Game Toolkit: Installation"> +<meta name="description" content="Installation (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Installation (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> diff --git a/manuals/chickadee/Kernel.html b/manuals/chickadee/Kernel.html index 589c71e..c298723 100644 --- a/manuals/chickadee/Kernel.html +++ b/manuals/chickadee/Kernel.html @@ -16,21 +16,21 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Kernel</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Kernel (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Kernel"> -<meta name="keywords" content="The Chickadee Game Toolkit: Kernel"> +<meta name="description" content="Kernel (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Kernel (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="API-Reference.html#API-Reference" rel="up" title="API Reference"> -<link href="Input.html#Input" rel="next" title="Input"> +<link href="Math.html#Math" rel="next" title="Math"> <link href="API-Reference.html#API-Reference" rel="prev" title="API Reference"> <style type="text/css"> <!-- @@ -90,150 +90,118 @@ ul.no-bullet {list-style: none} <a name="Kernel"></a> <div class="header"> <p> -Next: <a href="Input.html#Input" accesskey="n" rel="next">Input</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Math.html#Math" accesskey="n" rel="next">Math</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Kernel-1"></a> <h3 class="section">2.1 Kernel</h3> <p>At the very core of Chickadee, in the <code>(chickadee)</code> module, lies -an event loop. This loop, or “kernel”, is responsible for creating -and managing the game window, dispatching input events, ensuring that -the game is updated at the desired interval, and rendering graphics. +an event loop. This loop, or “kernel”, is responsible for ensuring +that the game is updated at the desired interval, rendering the +current state of the game world, and handling errors if they occur. The kernel implements what is known as a “fixed timestep” game loop, meaning that the game simulation will be advanced by a fixed interval of time and will never vary from frame to frame, unlike some other styles of game loops. The appropriately named <code>run-game</code> and <code>abort-game</code> procedures are the entry and exit points to the -Chickadee kernel. +Chickadee game loop kernel. </p> <p>On its own, the kernel does not do very much at all. In order to -actually respond to input events, update game state, or draw something -to the game window, a hacker with a penchant for game development must -latch onto extension points built into the kernel, called “hooks”, -and specify what action ought to be taken for any given event. For -example, the <code>key-press-hook</code> can be used to respond to the -<code>a</code> key being pressed by swinging the player’s mighty sword. -There are many hooks available, so read on to learn about all of them. -For information about using Guile’s hook API, see See <a href="http://www.gnu.org/software/guile/manual/html_node/Hooks.html#Hooks">Hooks</a> in <cite>GNU Guile Reference Manual</cite>. +actually respond to input events, update game state, or render output, +the programmer must provide an engine. But don’t worry, you don’t +have to start from scratch! Chickadee comes with a simple engine that +uses SDL to create a graphical window and handle input devices, and +OpenGL to handle rendering. This default engine is enough for most +users to get started writing games quickly. More advanced users may +want to write a custom engine that uses a different I/O system. +Perhaps you are writing a text adventure or roguelike that reads from +and writes to a terminal instead of a graphical window. The game loop +kernel makes no assumptions. </p> <dl> -<dt><a name="index-run_002dgame"></a>Scheme Procedure: <strong>run-game</strong> <em>[#:window-title "Chickadee!"] [#:window-width 640] [#:window-height 480] [#:window-fullscreen? #f] [#:update-hz 60]</em></dt> +<dt><a name="index-run_002dgame"></a>Procedure: <strong>run-game</strong> <em>[#:update] [#:render] [#:time] [#:error] [#:update-hz 60]</em></dt> <dd> -<p>Start the event loop. This procedure will not return until +<p>Start the game loop. This procedure will not return until <code>abort-game</code> is called. </p> -<p>The <code>update-hook</code> will be run <var>update-hz</var> times per second. +<p>The core game loop is generic and requires four additional procedures +to operate: </p> -<p>A new graphical window will be opened with <var>window-width</var> x -<var>window-height</var> as its dimensions, <var>window-title</var> as its -title, and in fullscreen mode if <var>window-fullscreen?</var> is -<code>#t</code>. -</p></dd></dl> - -<dl> -<dt><a name="index-abort_002dgame"></a>Scheme Procedure: <strong>abort-game</strong></dt> -<dd><p>Stop the currently running Chickadee event loop. -</p></dd></dl> - -<dl> -<dt><a name="index-time"></a>Scheme Procedure: <strong>time</strong></dt> -<dd><p>Return the current game time in milliseconds. -</p></dd></dl> - -<dl> -<dt><a name="index-load_002dhook"></a>Scheme Variable: <strong>load-hook</strong></dt> -<dd><p>A hook that is run once when the event loop boots, before any other -hook is run. This hook is run with zero arguments. -</p> -<div class="example"> -<pre class="example">(add-hook! load-hook (lambda () (display "hello!\n"))) -</pre></div> +<ul> +<li> <var>update</var>: Called <var>update-hz</var> times per second to advance the +game simulation. This procedure is called with a single argument: The +amount of time that has passed since the last update, in milliseconds. +</li><li> <var>render</var>: Called each iteration of the loop to render the game to +the desired output device. This procedure is called with a single +argument: A value in the range [0, 1] which represents how much time +has past since the last game state update relative to the upcoming +game state update, as a percentage. Because the game state is updated +independent of rendering, it is often the case that rendering is +occuring between two updates. If the game is rendered as it was +during the last update, a strange side-effect will occur that makes +animation appear rough or “choppy”. To counter this, the +<var>alpha</var> value can be used to perfrom a linear interpolation of a +moving object between its current position and its previous position. +This odd trick has the pleasing result of making the animation look +smooth again, but requires keeping track of previous state. +</li><li> <var>time</var>: Called to get the current time in milliseconds. This +procedure is called with no arguments. +</li><li> <var>error</var>: Called when an error from the <var>update</var> or +<var>render</var> procedures reaches the game loop. This procedure is +called with three arguments: The call stack, the error key, and the +error arguments. If no error handler is provided, the default +behavior is to simply re-throw the error. +</li></ul> </dd></dl> <dl> -<dt><a name="index-update_002dhook"></a>Scheme Variable: <strong>update-hook</strong></dt> -<dd><p>A hook that is run every time the game simulation should be advanced. -This hook is run with a single argument <var>dt</var>, the fixed timestep -that was configured when the event loop was started, in milliseconds. -</p> -<div class="example"> -<pre class="example">(add-hook! update-hook (lambda (dt) (display "tick!\n"))) -</pre></div> - -</dd></dl> +<dt><a name="index-abort_002dgame"></a>Procedure: <strong>abort-game</strong></dt> +<dd><p>Stop the currently running Chickadee game loop. +</p></dd></dl> -<dl> -<dt><a name="index-before_002ddraw_002dhook"></a>Scheme Variable: <strong>before-draw-hook</strong></dt> -<dd><p>A hook that is run before a frame is rendered. This hook is run with -zero arguments. +<p>Since most users will want to write 2D/3D games with hardware +accelerated graphics rendering, controlled via keyboard, mouse, or +game controller, Chickadee comes with an easy to use engine just for +this purpose in the <code>(chickadee sdl)</code> module: +<code>run-game/sdl</code>. </p> -<div class="example"> -<pre class="example">(add-hook! before-draw-hook (lambda () (display "about to draw!\n"))) -</pre></div> - -</dd></dl> - <dl> -<dt><a name="index-after_002ddraw_002dhook"></a>Scheme Variable: <strong>after-draw-hook</strong></dt> -<dd><p>A hook that is run after a frame is rendered. This hook is run with -zero arguments. -</p> -<div class="example"> -<pre class="example">(add-hook! after-draw-hook (lambda () (display "done drawing!\n"))) -</pre></div> - -<p>Combined with <code>before-draw-hook</code>, one can perform a frames per -second calculation to monitor game performance and stability. +<dt><a name="index-run_002dgame_002fsdl"></a>Procedure: <strong>run-game/sdl</strong> <em>[#:window-title "Chickadee!"] [#:window-width 640] [#:window-height 480] [#:window-fullscreen? <code>#f</code>] [#:update-hz 60] [#:load] [#:update] [#:draw] [#:quit] [#:key-press] [#:key-release] [#:text-input] [#:mouse-press] [#:mouse-release] [#:mouse-move] [#:controller-add] [#:controller-remove] [#:controller-press] [#:controller-release] [#:controller-move] [#:error]</em></dt> +<dd> +<p>Run the Chickadee game loop using the SDL engine. </p> -</dd></dl> - -<dl> -<dt><a name="index-draw_002dhook"></a>Scheme Variable: <strong>draw-hook</strong></dt> -<dd><p>A hook that is run each time a frame should be rendered. This hook is -run with a single argument <var>alpha</var>, a value in the range [0, 1] -which represents how much time has past since the last game state -update relative to the upcoming game state update, as a percentage. -Because the game state is updated independent of rendering, it is -often the case that rendering is occuring between two updates. If the -game is rendered as it was during the last update, a strange -side-effect will occur that makes animation appear rough or -“choppy”. To counter this, the <var>alpha</var> value can be used to -perfrom a linear interpolation of a moving object between its current -position and its previous position. This odd trick has the pleasing -result of making the animation look smooth again, but requires keeping -track of previous state. +<p>A new graphical window will be opened with <var>window-width</var> x +<var>window-height</var> as its dimensions, <var>window-title</var> as its +title, and in fullscreen mode if <var>window-fullscreen?</var> is +<code>#t</code>. </p> +<ul> +<li> <var>load</var>: Called with zero arguments when the game window has opened +but before the game loop has started. Can be used to perform +initialization that requires an open window and OpenGL context such as +loading textures. -<div class="example"> -<pre class="example">(add-hook! draw-hook (lambda (alpha) (display "<(._.<) \n"))) -</pre></div> +</li><li> <var>update</var>: Called <var>update-hz</var> times per second with one +argument: The amount of time to advance the game simulation. -</dd></dl> +</li><li> <var>draw</var>: Called each time a frame should be rendered with a single +argument known as the <code>alpha</code> value. See the documentation for +<code>run-game</code> for an explanation of this value. -<dl> -<dt><a name="index-quit_002dhook"></a>Scheme Variable: <strong>quit-hook</strong></dt> -<dd><p>A hook that is run when the user clicks the close button on the game -window. This hook is run with zero arguments. -</p> -<div class="example"> -<pre class="example">(add-hook! quit-hook (lambda () (display "bye!\n"))) -</pre></div> +</li><li> <var>quit</var>: Called with zero arguments when the user tries to close +the game window. The default behavior is to exit the game. -</dd></dl> +</li><li> <var>key-press</var>: Called with four arguments when a key is pressed on +the keyboard: -<dl> -<dt><a name="index-key_002dpress_002dhook"></a>Scheme Variable: <strong>key-press-hook</strong></dt> -<dd><p>A hook that is run when a key is pressed on the keyboard. This hook -is run with four arguments: -</p> <ol> <li> <var>key</var>: The symbolic name of the “virtual” key that was pressed. For example: <code>backspace</code>. It’s called a virtual key because the operating system may map a physical keyboard key to another key -entirely, such as how the author binds the “caps lock” key to mean -“control”. +entirely, such as how the author likes to bind the “caps lock” key +to mean “control”. </li><li> <var>scancode</var>: The symbolic name of the physical key that was pressed. @@ -246,21 +214,9 @@ include <code>ctrl</code>, <code>alt</code>, and <code>shift</code>. </li></ol> -<div class="example"> -<pre class="example">(add-hook! key-press-hook - (lambda (key scancode modifiers repeat?) - (display "pressed key: ") - (display key) - (newline))) -</pre></div> - -</dd></dl> +</li><li> <var>key-release</var>: Called with three arguments when a key is released +on the keyboard: -<dl> -<dt><a name="index-key_002drelease_002dhook"></a>Scheme Variable: <strong>key-release-hook</strong></dt> -<dd><p>A hook that is run when a key is released on the keyboard. This hook -is run with three arguments: -</p> <ol> <li> <var>key</var>: The symbolic name of the “virtual” key that was released. @@ -272,20 +228,11 @@ were being held down when the key was released. </li></ol> -</dd></dl> +</li><li> <var>text-input</var>: Called with a single argument, a string of text, +when printable text is typed on the keyboard. -<dl> -<dt><a name="index-text_002dinput_002dhook"></a>Scheme Variable: <strong>text-input-hook</strong></dt> -<dd><p>A hook that is run when printable text is typed on the keyboard. This -hook is run with a single argument, <var>text</var>, a string containing -the text that was entered. -</p></dd></dl> - -<dl> -<dt><a name="index-mouse_002dpress_002dhook"></a>Scheme Variable: <strong>mouse-press-hook</strong></dt> -<dd><p>A hook that is run when a mouse button is pressed. This hook is run -with four arguments: -</p> +</li><li> <var>mouse-press</var>: Called with four arguments when a mouse button is +pressed: <ol> <li> <var>button</var>: The symbolic name of the button that was pressed, such as <code>left</code>, <code>middle</code>, or <code>right</code>. @@ -298,13 +245,9 @@ as <code>left</code>, <code>middle</code>, or <code>right</code>. </li></ol> -</dd></dl> +</li><li> <var>mouse-release</var>: Called with three arguments when a mouse button +is released: -<dl> -<dt><a name="index-mouse_002drelease_002dhook"></a>Scheme Variable: <strong>mouse-release-hook</strong></dt> -<dd><p>A hook that is run when a mouse button is released. This hook is run -with three arguments: -</p> <ol> <li> <var>button</var>: The symbolic name of the button that was released. @@ -314,13 +257,8 @@ with three arguments: </li></ol> -</dd></dl> +</li><li> <var>mouse-move</var>: Called with five arguments when the mouse is moved: -<dl> -<dt><a name="index-mouse_002dmove_002dhook"></a>Scheme Variable: <strong>mouse-move-hook</strong></dt> -<dd><p>A hook that is run when the mouse is moved. This hook is run with -five arguments: -</p> <ol> <li> <var>x</var>: The x coordinate of the mouse cursor. @@ -337,27 +275,15 @@ mouse was moved. </li></ol> -</dd></dl> +</li><li> <var>controller-add</var>: Called with a single argument, an SDL game +controller object, when a game controller is connected. -<dl> -<dt><a name="index-controller_002dadd_002dhook"></a>Scheme Variable: <strong>controller-add-hook</strong></dt> -<dd><p>A hook that is run when a game controller is connected. This hook is -run with a single argument, <var>controller</var>, the controller that was -connected. -</p></dd></dl> +</li><li> <var>controller-remove</var>: Called with a single argument, an SDL game +controller object, when a game controller is disconnected. -<dl> -<dt><a name="index-controller_002dremove_002dhook"></a>Scheme Variable: <strong>controller-remove-hook</strong></dt> -<dd><p>A hook that is run when a game controller is disconnected. This hook -is run with a single argument, <var>controller</var>, the controller that -was disconnected. -</p></dd></dl> +</li><li> <var>controller-press</var>: Called with two arguments when a button on a +game controller is pressed: -<dl> -<dt><a name="index-controller_002dpress_002dhook"></a>Scheme Variable: <strong>controller-press-hook</strong></dt> -<dd><p>A hook that is run when a button on a game controller is pressed. -This hook is run with two arguments: -</p> <ol> <li> <var>controller</var>: The controller that triggered the event. @@ -385,14 +311,9 @@ Possible buttons are: </li></ol> -</dd></dl> +</li><li> <var>controller-release</var>: Called with two arguments when a button on a +game controller is released: -<dl> -<dt><a name="index-controller_002drelease_002dhook"></a>Scheme Variable: <strong>controller-release-hook</strong></dt> -<dd><p>A hook that is run when a button on a game controller is released. -</p> -<p>This hook is run with two arguments: -</p> <ol> <li> <var>controller</var>: The controller that triggered the event. @@ -400,13 +321,9 @@ Possible buttons are: </li></ol> -</dd></dl> +</li><li> <var>controller-move</var>: Called with three arguments when an analog +stick or trigger on a game controller is moved: -<dl> -<dt><a name="index-controller_002dmove_002dhook"></a>Scheme Variable: <strong>controller-move-hook</strong></dt> -<dd><p>A hook that is run when an analog stick or trigger on a game -controller is moved. This hook is run with three arguments -</p> <ol> <li> <var>controller</var>: The controller that triggered the event. @@ -424,12 +341,27 @@ values are: </li></ol> +</li><li> <var>error</var>: Called with three arguments when an error occurs: + +<ol> +<li> <var>stack</var>: The call stack at the point of error. + +</li><li> <var>key</var>: The exception key. + +</li><li> <var>args</var>: The arguments thrown with the exception. + +</li></ol> + +<p>The default behavior is to re-throw the error. +</p> +</li></ul> + </dd></dl> <hr> <div class="header"> <p> -Next: <a href="Input.html#Input" accesskey="n" rel="next">Input</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Math.html#Math" accesskey="n" rel="next">Math</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> diff --git a/manuals/chickadee/Lines-and-Shapes.html b/manuals/chickadee/Lines-and-Shapes.html index 13232ab..05ad725 100644 --- a/manuals/chickadee/Lines-and-Shapes.html +++ b/manuals/chickadee/Lines-and-Shapes.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Lines and Shapes</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Lines and Shapes (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Lines and Shapes"> -<meta name="keywords" content="The Chickadee Game Toolkit: Lines and Shapes"> +<meta name="description" content="Lines and Shapes (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Lines and Shapes (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Graphics.html#Graphics" rel="up" title="Graphics"> <link href="Fonts.html#Fonts" rel="next" title="Fonts"> -<link href="Sprites.html#Sprites" rel="prev" title="Sprites"> +<link href="Tile-Maps.html#Tile-Maps" rel="prev" title="Tile Maps"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} @@ -90,18 +90,18 @@ ul.no-bullet {list-style: none} <a name="Lines-and-Shapes"></a> <div class="header"> <p> -Next: <a href="Fonts.html#Fonts" accesskey="n" rel="next">Fonts</a>, Previous: <a href="Sprites.html#Sprites" accesskey="p" rel="prev">Sprites</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Fonts.html#Fonts" accesskey="n" rel="next">Fonts</a>, Previous: <a href="Tile-Maps.html#Tile-Maps" accesskey="p" rel="prev">Tile Maps</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Lines-and-Shapes-1"></a> -<h4 class="subsection">2.4.4 Lines and Shapes</h4> +<h4 class="subsection">2.3.5 Lines and Shapes</h4> <p>Sprites are fun, but sometimes simple, untextured lines and polygons are desired. That’s where the <code>(chickadee render shapes)</code> module comes in! </p> <dl> -<dt><a name="index-draw_002dline"></a>Scheme Procedure: <strong>draw-line</strong> <em><var>start</var> <var>end</var> [#:thickness 0.5] [#:feather 1.0] [#:cap round] [#:color] [#:shader]</em></dt> +<dt><a name="index-draw_002dline"></a>Procedure: <strong>draw-line</strong> <em><var>start</var> <var>end</var> [#:thickness 0.5] [#:feather 1.0] [#:cap round] [#:color] [#:shader]</em></dt> <dd> <p>Draw a line segment from <var>start</var> to <var>end</var>. The line will be <var>thickness</var> pixels thick with an antialiased border <var>feather</var> @@ -113,6 +113,32 @@ the <var>shader</var> argument to override the built-in line segment shader. </p></dd></dl> +<dl> +<dt><a name="index-draw_002dbezier_002dcurve"></a>Procedure: <strong>draw-bezier-curve</strong> <em><var>bezier</var> [#:segments 32] [#:control-points?] [#:tangents?] [#:control-point-size 8] [#:control-point-color yellow] [#:tangent-color yellow] [#:thickness 0.5] [#:feather 1.0] [#:matrix]</em></dt> +<dd> +<p>Draw the curve defined by <var>bezier</var> using a resolution of N +<var>segments</var>. When <var>control-points?</var> is <code>#t</code>, the control +points are rendered as squares of size <var>control-point-size</var> pixels +and a color of <var>control-point-color</var>. When <var>tangents?</var> is +<code>#t</code>, the tangent lines from terminal point to control point are +rendered using the color <var>tangent-color</var>. +</p> +<p>All line segments rendered use <code>draw-line</code>, and thus the +arguments <var>thickness</var> and <var>feather</var> have the same effect as in +that procedure. +</p> +<p>A custom <var>matrix</var> may be passed for applications that require more +control over the final output. +</p></dd></dl> + +<dl> +<dt><a name="index-draw_002dbezier_002dpath"></a>Procedure: <strong>draw-bezier-path</strong> <em><var>path</var> [#:segments 32] [#:control-points?] [#:tangents?] [#:control-point-size 8] [#:control-point-color yellow] [#:tangent-color yellow] [#:thickness 0.5] [#:feather 1.0] [#:matrix]</em></dt> +<dd> +<p>Render <var>path</var>, a list of bezier curves. See the documentation for +<code>draw-bezier-curve</code> for an explanation of all the keyword +arguments. +</p></dd></dl> + diff --git a/manuals/chickadee/Math.html b/manuals/chickadee/Math.html index fcf9746..a41a7f8 100644 --- a/manuals/chickadee/Math.html +++ b/manuals/chickadee/Math.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Math</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Math (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Math"> -<meta name="keywords" content="The Chickadee Game Toolkit: Math"> +<meta name="description" content="Math (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Math (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="API-Reference.html#API-Reference" rel="up" title="API Reference"> -<link href="Vectors.html#Vectors" rel="next" title="Vectors"> -<link href="Input.html#Input" rel="prev" title="Input"> +<link href="Basics.html#Basics" rel="next" title="Basics"> +<link href="Kernel.html#Kernel" rel="prev" title="Kernel"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} @@ -90,11 +90,11 @@ ul.no-bullet {list-style: none} <a name="Math"></a> <div class="header"> <p> -Next: <a href="Graphics.html#Graphics" accesskey="n" rel="next">Graphics</a>, Previous: <a href="Input.html#Input" accesskey="p" rel="prev">Input</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Graphics.html#Graphics" accesskey="n" rel="next">Graphics</a>, Previous: <a href="Kernel.html#Kernel" accesskey="p" rel="prev">Kernel</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Math-1"></a> -<h3 class="section">2.3 Math</h3> +<h3 class="section">2.2 Math</h3> <p>Chickadee contains data types and procedures for performing the most common computations in video game simulations such as linear algebra @@ -102,12 +102,24 @@ with vectors and matrices and axis-aligned bounding box collision detection. </p> <table class="menu" border="0" cellspacing="0"> -<tr><td align="left" valign="top">• <a href="Vectors.html#Vectors" accesskey="1">Vectors</a>:</td><td> </td><td align="left" valign="top">Euclidean vectors. +<tr><td align="left" valign="top">• <a href="Basics.html#Basics" accesskey="1">Basics</a>:</td><td> </td><td align="left" valign="top">Commonly used, miscellaneous things. </td></tr> -<tr><td align="left" valign="top">• <a href="Matrices.html#Matrices" accesskey="2">Matrices</a>:</td><td> </td><td align="left" valign="top">Transformation matrices. +<tr><td align="left" valign="top">• <a href="Vectors.html#Vectors" accesskey="2">Vectors</a>:</td><td> </td><td align="left" valign="top">Euclidean vectors. </td></tr> <tr><td align="left" valign="top">• <a href="Rectangles.html#Rectangles" accesskey="3">Rectangles</a>:</td><td> </td><td align="left" valign="top">Axis-aligned bounding boxes. </td></tr> +<tr><td align="left" valign="top">• <a href="Grid.html#Grid" accesskey="4">Grid</a>:</td><td> </td><td align="left" valign="top">Spatial partitioning for bounding boxes. +</td></tr> +<tr><td align="left" valign="top">• <a href="Matrices.html#Matrices" accesskey="5">Matrices</a>:</td><td> </td><td align="left" valign="top">Transformation matrices. +</td></tr> +<tr><td align="left" valign="top">• <a href="Quaternions.html#Quaternions" accesskey="6">Quaternions</a>:</td><td> </td><td align="left" valign="top">Rotations about an arbitrary axis. +</td></tr> +<tr><td align="left" valign="top">• <a href="Easings.html#Easings" accesskey="7">Easings</a>:</td><td> </td><td align="left" valign="top">Easing functions for interesting animations. +</td></tr> +<tr><td align="left" valign="top">• <a href="Bezier-Curves.html#Bezier-Curves" accesskey="8">Bezier Curves</a>:</td><td> </td><td align="left" valign="top">Cubic Bezier curves and paths in 2D space. +</td></tr> +<tr><td align="left" valign="top">• <a href="Path-Finding.html#Path-Finding" accesskey="9">Path Finding</a>:</td><td> </td><td align="left" valign="top">Generic A* path finding. +</td></tr> </table> diff --git a/manuals/chickadee/Matrices.html b/manuals/chickadee/Matrices.html index 8630efd..5f664ef 100644 --- a/manuals/chickadee/Matrices.html +++ b/manuals/chickadee/Matrices.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Matrices</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Matrices (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Matrices"> -<meta name="keywords" content="The Chickadee Game Toolkit: Matrices"> +<meta name="description" content="Matrices (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Matrices (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Math.html#Math" rel="up" title="Math"> -<link href="Rectangles.html#Rectangles" rel="next" title="Rectangles"> -<link href="Vectors.html#Vectors" rel="prev" title="Vectors"> +<link href="Quaternions.html#Quaternions" rel="next" title="Quaternions"> +<link href="Grid.html#Grid" rel="prev" title="Grid"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} @@ -90,12 +90,169 @@ ul.no-bullet {list-style: none} <a name="Matrices"></a> <div class="header"> <p> -Next: <a href="Rectangles.html#Rectangles" accesskey="n" rel="next">Rectangles</a>, Previous: <a href="Vectors.html#Vectors" accesskey="p" rel="prev">Vectors</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Quaternions.html#Quaternions" accesskey="n" rel="next">Quaternions</a>, Previous: <a href="Grid.html#Grid" accesskey="p" rel="prev">Grid</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Matrices-1"></a> -<h4 class="subsection">2.3.2 Matrices</h4> +<h4 class="subsection">2.2.5 Matrices</h4> + +<p>The <code>(chickadee math matrix)</code> module provides an interface for +working with the most common type of matrices in game development: 4x4 +transformation matrices. +</p> +<a name="Another-Note-About-Performance"></a> +<h4 class="subsubsection">2.2.5.1 Another Note About Performance</h4> + +<p>Much like the vector API, the matrix API is commonly used in +performance critical code paths. In order to reduce the amount of +garbage generated and improve matrix multiplication performance, there +are many procedures that perform in-place modifications of matrix +objects. +</p> +<a name="Matrix-Operations"></a> +<h4 class="subsubsection">2.2.5.2 Matrix Operations</h4> + +<dl> +<dt><a name="index-make_002dmatrix4"></a>Procedure: <strong>make-matrix4</strong> <em><var>aa</var> <var>ab</var> <var>ac</var> <var>ad</var> <var>ba</var> <var>bb</var> <var>bc</var> <var>bd</var> <var>ca</var> <var>cb</var> <var>cc</var> <var>cd</var> <var>da</var> <var>db</var> <var>dc</var> <var>dd</var></em></dt> +<dd> +<p>Return a new 4x4 matrix initialized with the given 16 values in +column-major format. +</p></dd></dl> + +<dl> +<dt><a name="index-make_002dnull_002dmatrix4"></a>Procedure: <strong>make-null-matrix4</strong></dt> +<dd><p>Return a new 4x4 matrix with all values initialized to 0. +</p></dd></dl> + +<dl> +<dt><a name="index-make_002didentity_002dmatrix4"></a>Procedure: <strong>make-identity-matrix4</strong></dt> +<dd><p>Return a new 4x4 identity matrix. Any matrix multiplied by the +identity matrix yields the original matrix. This procedure is +equivalent to the following code: +</p> +<div class="example"> +<pre class="example">(make-matrix4 1 0 0 0 + 0 1 0 0 + 0 0 1 0 + 0 0 0 1) +</pre></div> + +</dd></dl> + +<dl> +<dt><a name="index-matrix4_003f"></a>Procedure: <strong>matrix4?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a 4x4 matrix. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002a"></a>Procedure: <strong>matrix4*</strong> <em>. <var>matrices</var></em></dt> +<dd><p>Return a new 4x4 matrix containing the product of multiplying all of +the given <var>matrices</var>. +</p> +<p>Note: Remember that matrix multiplication is <strong>not</strong> commutative! +</p></dd></dl> + +<dl> +<dt><a name="index-orthographic_002dprojection"></a>Procedure: <strong>orthographic-projection</strong> <em><var>left</var> <var>right</var> <var>top</var> <var>bottom</var> <var>near</var> <var>far</var></em></dt> +<dd> +<p>Return a new 4x4 matrix that represents an orthographic (2D) +projection for the horizontal clipping plane <var>top</var> and +<var>bottom</var>, the vertical clipping plane <var>top</var> and <var>bottom</var>, +and the depth clipping plane <var>near</var> and <var>far</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-perspective_002dprojection"></a>Procedure: <strong>perspective-projection</strong> <em><var>fov</var> <var>aspect-ratio</var> <var>near</var> <var>far</var></em></dt> +<dd> +<p>Return a new 4x4 matrix that represents a perspective (3D) projection +with a field of vision of <var>fov</var> radians, an aspect ratio of +<var>aspect-ratio</var>, and a depth clipping plane defined by <var>near</var> +and <var>far</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002dtranslate"></a>Procedure: <strong>matrix4-translate</strong> <em><var>x</var></em></dt> +<dd><p>Return a new 4x4 matrix that represents a translation by <var>x</var>, a 2D +vector, a 3D vector, or a rectangle (in which case the bottom-left +corner of the rectangle is used). +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002dscale"></a>Procedure: <strong>matrix4-scale</strong> <em><var>s</var></em></dt> +<dd><p>Return a new 4x4 matrix that represents a scaling along the X, Y, and +Z axes by the scaling factor <var>s</var>, a real number. +</p></dd></dl> +<dl> +<dt><a name="index-matrix4_002drotate"></a>Procedure: <strong>matrix4-rotate</strong> <em><var>q</var></em></dt> +<dd><p>Return a new 4x4 matrix that represents a rotation about an arbitrary +axis defined by the quaternion <var>q</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002drotate_002dz"></a>Procedure: <strong>matrix4-rotate-z</strong> <em><var>theta</var></em></dt> +<dd><p>Return a new 4x4 matrix that represents a rotation about the Z axis by +<var>theta</var> radians. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002didentity_0021"></a>Procedure: <strong>matrix4-identity!</strong> <em><var>matrix</var></em></dt> +<dd><p>Modify <var>matrix</var> in-place to contain the identity matrix. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002dmult_0021"></a>Procedure: <strong>matrix4-mult!</strong> <em><var>dest</var> <var>a</var> <var>b</var></em></dt> +<dd><p>Multiply the 4x4 matrix <var>a</var> by the 4x4 matrix <var>b</var> and store +the result in the 4x4 matrix <var>dest</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002dtranslate_0021"></a>Procedure: <strong>matrix4-translate!</strong> <em><var>matrix</var> <var>x</var></em></dt> +<dd><p>Modify <var>matrix</var> in-place to contain a translation by <var>x</var>, a 2D +vector, a 3D vector, or a rectangle (in which case the bottom-left +corner of the rectangle is used). +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002dscale_0021"></a>Procedure: <strong>matrix4-scale!</strong> <em><var>matrix</var> <var>s</var></em></dt> +<dd><p>Modify <var>matrix</var> in-place to contain a scaling along the X, Y, and +Z axes by the scaling factor <var>s</var>, a real number. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002drotate_0021"></a>Procedure: <strong>matrix4-rotate!</strong> <em><var>matrix</var> <var>q</var></em></dt> +<dd><p>Modify <var>matrix</var> in-place to contain a rotation about an arbitrary +axis defined by the quaternion <var>q</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002drotate_002dz_0021"></a>Procedure: <strong>matrix4-rotate-z!</strong> <em><var>matrix</var> <var>theta</var></em></dt> +<dd><p>Modify <var>matrix</var> in-place to contain a rotation about the Z axis by +<var>theta</var> radians. +</p></dd></dl> + +<dl> +<dt><a name="index-matrix4_002d2d_002dtransform_0021"></a>Procedure: <strong>matrix4-2d-transform!</strong> <em><var>matrix</var> [#:origin] [#:position] [#:rotation] [#:scale] [#:skew]</em></dt> +<dd> +<p>Modify <var>matrix</var> in-place to contain the transformation described +by <var>position</var>, a 2D vector or rectangle, <var>rotation</var>, a scalar +representing a rotation about the Z axis, <var>scale</var>, a 2D vector, +and <var>skew</var>, a 2D vector. The transformation happens with respect +to <var>origin</var>, a 2D vector. If an argument is not provided, that +particular transformation will not be included in the result. +</p></dd></dl> + +<dl> +<dt><a name="index-transform_0021"></a>Procedure: <strong>transform!</strong> <em><var>matrix</var> <var>v</var></em></dt> +<dd><p>Modify the 2D vector <var>v</var> in-place by multiplying it by the 4x4 +matrix <var>matrix</var>. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="Quaternions.html#Quaternions" accesskey="n" rel="next">Quaternions</a>, Previous: <a href="Grid.html#Grid" accesskey="p" rel="prev">Grid</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> diff --git a/manuals/chickadee/Path-Finding.html b/manuals/chickadee/Path-Finding.html new file mode 100644 index 0000000..63819aa --- /dev/null +++ b/manuals/chickadee/Path-Finding.html @@ -0,0 +1,180 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Path Finding (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Path Finding (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Path Finding (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Math.html#Math" rel="up" title="Math"> +<link href="Graphics.html#Graphics" rel="next" title="Graphics"> +<link href="Bezier-Curves.html#Bezier-Curves" rel="prev" title="Bezier Curves"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Path-Finding"></a> +<div class="header"> +<p> +Previous: <a href="Bezier-Curves.html#Bezier-Curves" accesskey="p" rel="prev">Bezier Curves</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Path-Finding-1"></a> +<h4 class="subsection">2.2.9 Path Finding</h4> + +<p>Most game worlds have maps. Often, these games have a need to move +non-player characters around in an unscripted fashion. For example, +in a real-time strategy game, the player may command one of their +units to attack something in the enemy base. To do so, the unit must +calculate the shortest route to get there. It wouldn’t be a very fun +game if units didn’t know how to transport themselves efficiently. +This is where path finding algorithms come in handy. The +<code>(chickadee math path-finding)</code> module provides a generic +implementation of the popular A* path finding algorithm. Just add a +map implementation! +</p> +<p>The example below defines a very simple town map and finds the +quickest way to get from the town common to the school. +</p> +<div class="example"> +<pre class="example">(define world-map + '((town-common . (town-hall library)) + (town-hall . (town-common school)) + (library . (town-common cafe)) + (school . (town-hall cafe)) + (cafe . (library school)))) +(define (neighbors building) + (assq-ref town-map building)) +(define (cost a b) 1) +(define (distance a b) 1) +(define pf (make-path-finder)) +(a* pf 'town-common 'school neighbors cost distance) +</pre></div> + +<p>In this case, the <code>a*</code> procedure will return the list +<code>(town-common town-hall school)</code>, which is indeed the shortest +route. (The other possible route is <code>(town-common library cafe +school)</code>.) +</p> +<p>The <code>a*</code> procedure does not know anything about about any kind of +map and therefore must be told how to look up neighboring nodes, which +is what the <code>neighbors</code> procedure in the example does. To +simulate different types of terrain, a cost procedure is used. In +this example, it is just as easy to move between any two nodes because +<code>cost</code> always returns 1. In a real game, perhaps moving from +from a field to a rocky hill would cost a lot more than moving from +one field to another. Finally, a heuristic is used to calculate an +approximate distance between two nodes on the map. In this simple +association list based graph it is tough to calculate a distance +between nodes, so the <code>distance</code> procedure isn’t helpful and +always returns 1. In a real game with a tile-based map, for example, +the heuristic could be a quick Manhattan distance calculation based on +the coordinates of the two map tiles. Choose an appropriate heuristic +for optimal path finding! +</p> +<dl> +<dt><a name="index-make_002dpath_002dfinder"></a>Procedure: <strong>make-path-finder</strong></dt> +<dd><p>Return a new path finder object. +</p></dd></dl> + +<dl> +<dt><a name="index-path_002dfinder_003f"></a>Procedure: <strong>path-finder?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a path finder. +</p></dd></dl> + +<dl> +<dt><a name="index-a_002a"></a>Procedure: <strong>a*</strong> <em><var>path-finder</var> <var>start</var> <var>goal</var> <var>neighbors</var> <var>cost</var> <var>distance</var></em></dt> +<dd> +<p>Return a list of nodes forming a path from <var>start</var> to <var>goal</var> +using <var>path-finder</var> to hold state. <var>neighbors</var> is a procedure +that accepts a node and returns a list of nodes that neighbor it. +<var>cost</var> is a procedure that accepts two neighboring nodes and +returns the cost of moving from the first to the second as a real +number. <var>distance</var> is a procedure that accepts two nodes and +returns an approximate distance between them. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Previous: <a href="Bezier-Curves.html#Bezier-Curves" accesskey="p" rel="prev">Bezier Curves</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> + + + +</body> +</html> diff --git a/manuals/chickadee/Quaternions.html b/manuals/chickadee/Quaternions.html new file mode 100644 index 0000000..de4c8e4 --- /dev/null +++ b/manuals/chickadee/Quaternions.html @@ -0,0 +1,146 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Quaternions (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Quaternions (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Quaternions (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Math.html#Math" rel="up" title="Math"> +<link href="Easings.html#Easings" rel="next" title="Easings"> +<link href="Matrices.html#Matrices" rel="prev" title="Matrices"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Quaternions"></a> +<div class="header"> +<p> +Next: <a href="Easings.html#Easings" accesskey="n" rel="next">Easings</a>, Previous: <a href="Matrices.html#Matrices" accesskey="p" rel="prev">Matrices</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Quaternions-1"></a> +<h4 class="subsection">2.2.6 Quaternions</h4> + +<p>In game development, the quaternion is most often used to represent +rotations. Why not use a matrix for that, you may ask. Unlike +matrices, quaternions can be interpolated (animated) and produce a +meaningful result. When interpolating two quaternions, there is a +smooth transition from one rotation to another, whereas interpolating +two matrices would yield garbage. +</p> +<dl> +<dt><a name="index-quaternion"></a>Procedure: <strong>quaternion</strong> <em><var>x</var> <var>y</var> <var>z</var> <var>w</var></em></dt> +<dd><p>Return a new quaternion with values <var>x</var>, <var>y</var>, <var>z</var>, and +<var>w</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-quaternion_003f"></a>Procedure: <strong>quaternion?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a quaternion. +</p></dd></dl> + +<dl> +<dt><a name="index-quaternion_002dw"></a>Procedure: <strong>quaternion-w</strong> <em><var>q</var></em></dt> +<dd><p>Return the W component of the quaternion <var>q</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-quaternion_002dx"></a>Procedure: <strong>quaternion-x</strong> <em><var>q</var></em></dt> +<dd><p>Return the X component of the quaternion <var>q</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-quaternion_002dy"></a>Procedure: <strong>quaternion-y</strong> <em><var>q</var></em></dt> +<dd><p>Return the Y component of the quaternion <var>q</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-quaternion_002dz"></a>Procedure: <strong>quaternion-z</strong> <em><var>q</var></em></dt> +<dd><p>Return the Z component of the quaternion <var>q</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-make_002didentity_002dquaternion"></a>Procedure: <strong>make-identity-quaternion</strong></dt> +<dd><p>Return the identity quaternion. +</p></dd></dl> + + + + +</body> +</html> diff --git a/manuals/chickadee/Rectangles.html b/manuals/chickadee/Rectangles.html index 6d0c9e8..edaf4e6 100644 --- a/manuals/chickadee/Rectangles.html +++ b/manuals/chickadee/Rectangles.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Rectangles</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Rectangles (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Rectangles"> -<meta name="keywords" content="The Chickadee Game Toolkit: Rectangles"> +<meta name="description" content="Rectangles (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Rectangles (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Math.html#Math" rel="up" title="Math"> -<link href="Graphics.html#Graphics" rel="next" title="Graphics"> -<link href="Matrices.html#Matrices" rel="prev" title="Matrices"> +<link href="Grid.html#Grid" rel="next" title="Grid"> +<link href="Vectors.html#Vectors" rel="prev" title="Vectors"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} @@ -90,12 +90,247 @@ ul.no-bullet {list-style: none} <a name="Rectangles"></a> <div class="header"> <p> -Previous: <a href="Matrices.html#Matrices" accesskey="p" rel="prev">Matrices</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Grid.html#Grid" accesskey="n" rel="next">Grid</a>, Previous: <a href="Vectors.html#Vectors" accesskey="p" rel="prev">Vectors</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Rectangles-1"></a> -<h4 class="subsection">2.3.3 Rectangles</h4> +<h4 class="subsection">2.2.3 Rectangles</h4> + +<p>The <code>(chickadee math rect)</code> module provides an API for +manipulating axis-aligned bounding boxes (AABBs). AABBs are often +used for collision detection in games. Common use-cases are defining +“hitboxes” in platformers or using them for the “broad phase” of a +collision detection algorithm that uses a more complex (and thus +slower) method of determining the actual collisions. +</p> +<p>Like some of the other math modules, there exists a collection of +functions that do in-place modification of rectangles for use in +performance critical code paths. +</p> +<dl> +<dt><a name="index-make_002drect"></a>Procedure: <strong>make-rect</strong> <em><var>x</var> <var>y</var> <var>width</var> <var>height</var></em></dt> +<dd><p>Create a new rectangle that is <var>width</var> by <var>height</var> in size and +whose bottom-left corner is located at (<var>x</var>, <var>y</var>). +</p></dd></dl> + +<dl> +<dt><a name="index-rect_003f"></a>Procedure: <strong>rect?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a rectangle. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dwithin_003f"></a>Procedure: <strong>rect-within?</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Return <code>#t</code> if <var>rect2</var> is completely within <var>rect1</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dintersects_003f"></a>Procedure: <strong>rect-intersects?</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Return <code>#t</code> if <var>rect2</var> overlaps <var>rect1</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dcontains_003f"></a>Procedure: <strong>rect-contains?</strong> <em><var>rect</var> <var>x</var> <var>y</var></em></dt> +<dd><p>Return <code>#t</code> if the coordinates (<var>x</var>, <var>y</var>) are within +<var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dcontains_002dvec2_003f"></a>Procedure: <strong>rect-contains-vec2?</strong> <em><var>rect</var> <var>v</var></em></dt> +<dd><p>Return <code>#t</code> if the 2D vector <var>v</var> is within the bounds of +<var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dx"></a>Procedure: <strong>rect-x</strong> <em><var>rect</var></em></dt> +<dd><p>Return the X coordinate of the lower-left corner of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dy"></a>Procedure: <strong>rect-y</strong> <em><var>rect</var></em></dt> +<dd><p>Return the Y coordinate of the lower-left corner of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dleft"></a>Procedure: <strong>rect-left</strong> <em><var>rect</var></em></dt> +<dd><p>Return the left-most X coordinate of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dright"></a>Procedure: <strong>rect-right</strong> <em><var>rect</var></em></dt> +<dd><p>Return the right-most X coordinate of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dbottom"></a>Procedure: <strong>rect-bottom</strong> <em><var>rect</var></em></dt> +<dd><p>Return the bottom-most Y coordinate of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dtop"></a>Procedure: <strong>rect-top</strong> <em><var>rect</var></em></dt> +<dd><p>Return the top-most Y coordinate of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dcenter_002dx"></a>Procedure: <strong>rect-center-x</strong> <em><var>rect</var></em></dt> +<dd><p>Return the X coordinate of the center of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dcenter_002dy"></a>Procedure: <strong>rect-center-y</strong> <em><var>rect</var></em></dt> +<dd><p>Return the Y coordinate of the center of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dwidth"></a>Procedure: <strong>rect-width</strong> <em><var>rect</var></em></dt> +<dd><p>Return the width of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dheight"></a>Procedure: <strong>rect-height</strong> <em><var>rect</var></em></dt> +<dd><p>Return the height of <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002darea"></a>Procedure: <strong>rect-area</strong> <em><var>rect</var></em></dt> +<dd><p>Return the surface area covered by <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dclamp_002dx"></a>Procedure: <strong>rect-clamp-x</strong> <em><var>rect</var> <var>x</var></em></dt> +<dd><p>Restrict <var>x</var> to the portion of the X axis covered by <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dclamp_002dy"></a>Procedure: <strong>rect-clamp-y</strong> <em><var>rect</var> <var>y</var></em></dt> +<dd><p>Restrict <var>y</var> to the portion of the Y axis covered by <var>rect</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dclamp"></a>Procedure: <strong>rect-clamp</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Return a new rect that adjusts the location of <var>rect1</var> so that it +is completely within <var>rect2</var>. An exception is thrown in the case +that <var>rect1</var> cannot fit completely within <var>rect2</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dmove"></a>Procedure: <strong>rect-move</strong> <em><var>rect</var> <var>x</var> <var>y</var></em></dt> +<dd><p>Return a new rectangle based on <var>rect</var> but moved to the +coordinates (<var>x</var>, <var>y</var>). +</p></dd></dl> +<dl> +<dt><a name="index-rect_002dmove_002dvec2"></a>Procedure: <strong>rect-move-vec2</strong> <em><var>rect</var> <var>v</var></em></dt> +<dd><p>Return a new rectangle based on <var>rect</var> but moved to the +coordinates in the 2D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dmove_002dby"></a>Procedure: <strong>rect-move-by</strong> <em><var>rect</var> <var>x</var> <var>y</var></em></dt> +<dd><p>Return a new rectangle based on <var>rect</var> but moved by (<var>x</var>, +<var>y</var>) units relative to its current location. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dmove_002dby_002dvec2"></a>Procedure: <strong>rect-move-by-vec2</strong> <em><var>rect</var> <var>v</var></em></dt> +<dd><p>Return a new rectangle based on <var>rect</var> but moved by the 2D vector +<var>v</var> relative to its current location. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dinflate"></a>Procedure: <strong>rect-inflate</strong> <em><var>rect</var> <var>width</var> <var>height</var></em></dt> +<dd><p>Return a new rectangle based on <var>rect</var>, but expanded by +<var>width</var> units on the X axis and <var>height</var> units on the Y axis, +while keeping the rectangle centered on the same point. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dunion"></a>Procedure: <strong>rect-union</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Return a new rectangle that completely covers the area of <var>rect1</var> +and <var>rect2</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dclip"></a>Procedure: <strong>rect-clip</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Return a new rectangle that is the overlapping region of <var>rect1</var> +and <var>rect2</var>. If the two rectangles do not overlap, a rectangle of +0 width and 0 height is returned. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002drect_002dx_0021"></a>Procedure: <strong>set-rect-x!</strong> <em><var>rect</var> <var>x</var></em></dt> +<dd><p>Set the left X coordinate of <var>rect</var> to <var>x</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002drect_002dy_0021"></a>Procedure: <strong>set-rect-y!</strong> <em><var>rect</var> <var>y</var></em></dt> +<dd><p>Set the bottom Y coordinate of <var>rect</var> to <var>y</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002drect_002dwidth_0021"></a>Procedure: <strong>set-rect-width!</strong> <em><var>rect</var> <var>width</var></em></dt> +<dd><p>Set the width of <var>rect</var> to <var>width</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002drect_002dheight_0021"></a>Procedure: <strong>set-rect-height!</strong> <em><var>rect</var> <var>height</var></em></dt> +<dd><p>Set the height of <var>rect</var> to <var>height</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dmove_0021"></a>Procedure: <strong>rect-move!</strong> <em><var>rect</var> <var>x</var> <var>y</var></em></dt> +<dd><p>Move <var>rect</var> to (<var>x</var>, <var>y</var>) in-place. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dmove_002dvec2_0021"></a>Procedure: <strong>rect-move-vec2!</strong> <em><var>rect</var> <var>v</var></em></dt> +<dd><p>Move <var>rect</var> to the 2D vector <var>v</var> in-place. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dmove_002dby_0021"></a>Procedure: <strong>rect-move-by!</strong> <em><var>rect</var> <var>x</var> <var>y</var></em></dt> +<dd><p>Move <var>rect</var> by (<var>x</var>, <var>y</var>) in-place. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dmove_002dby_002dvec2_0021"></a>Procedure: <strong>rect-move-by-vec2!</strong> <em><var>rect</var> <var>v</var></em></dt> +<dd><p>Move <var>rect</var> by the 2D vector <var>v</var> in-place. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dinflate_0021"></a>Procedure: <strong>rect-inflate!</strong> <em><var>rect</var> <var>width</var> <var>height</var></em></dt> +<dd><p>Expand <var>rect</var> by <var>width</var> and <var>height</var> in-place. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dunion_0021"></a>Procedure: <strong>rect-union!</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Modify <var>rect1</var> in-place to completely cover the area of both +<var>rect1</var> and <var>rect2</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dclip_0021"></a>Procedure: <strong>rect-clip!</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Modify <var>rect1</var> in-place to be the overlapping region of +<var>rect1</var> and <var>rect2</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-rect_002dclamp_0021"></a>Procedure: <strong>rect-clamp!</strong> <em><var>rect1</var> <var>rect2</var></em></dt> +<dd><p>Adjust the location of <var>rect1</var> in-place so that its bounds are +completely within <var>rect2</var>. An exception is thrown in the case +that <var>rect1</var> cannot fit completely within <var>rect2</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dclamp_002dto_002drect_0021"></a>Procedure: <strong>vec2-clamp-to-rect!</strong> <em><var>v</var> <var>rect</var></em></dt> +<dd><p>Restrict the coordinates of the 2D vector <var>v</var> so that they are +within the bounds of <var>rect</var>. <var>v</var> is modified in-place. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="Grid.html#Grid" accesskey="n" rel="next">Grid</a>, Previous: <a href="Vectors.html#Vectors" accesskey="p" rel="prev">Vectors</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> diff --git a/manuals/chickadee/Rendering-Engine.html b/manuals/chickadee/Rendering-Engine.html index 9bc09da..fa9f021 100644 --- a/manuals/chickadee/Rendering-Engine.html +++ b/manuals/chickadee/Rendering-Engine.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Rendering Engine</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Rendering Engine (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Rendering Engine"> -<meta name="keywords" content="The Chickadee Game Toolkit: Rendering Engine"> +<meta name="description" content="Rendering Engine (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Rendering Engine (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -94,7 +94,7 @@ Next: <a href="Textures.html#Textures" accesskey="n" rel="next">Textures</a>, Up </div> <hr> <a name="Rendering-Engine-1"></a> -<h4 class="subsection">2.4.1 Rendering Engine</h4> +<h4 class="subsection">2.3.1 Rendering Engine</h4> <p>Chickadee defines rendering using a metaphor familiar to Scheme programmers: procedure application. A shader (see <a href="Shaders.html#Shaders">Shaders</a>) is @@ -113,8 +113,8 @@ would be tedious to have to have to specify them each time <code>(chickadee render)</code> module. </p> <dl> -<dt><a name="index-gpu_002dapply"></a>Scheme Syntax: <strong>gpu-apply</strong> <em><var>shader</var> <var>vertex-array</var> [#:uniform-key <var>uniform-value</var> ...]</em></dt> -<dt><a name="index-gpu_002dapply_002a"></a>Scheme Syntax: <strong>gpu-apply*</strong> <em><var>shader</var> <var>vertex-array</var> <var>count</var> [#:uniform-key <var>uniform-value</var> ...]</em></dt> +<dt><a name="index-gpu_002dapply"></a>Syntax: <strong>gpu-apply</strong> <em><var>shader</var> <var>vertex-array</var> [#:uniform-key <var>uniform-value</var> ...]</em></dt> +<dt><a name="index-gpu_002dapply_002a"></a>Syntax: <strong>gpu-apply*</strong> <em><var>shader</var> <var>vertex-array</var> <var>count</var> [#:uniform-key <var>uniform-value</var> ...]</em></dt> <dd> <p>Render <var>vertex-array</var> using <var>shader</var> with the uniform values specified in the following keyword arguments. @@ -125,73 +125,68 @@ specified in the following keyword arguments. </dd></dl> <dl> -<dt><a name="index-current_002dviewport"></a>Scheme Procedure: <strong>current-viewport</strong></dt> -<dd><p>Return the currently bound viewport. See <a href="Viewports.html#Viewports">Viewports</a> for more -details about using viewports. +<dt><a name="index-current_002dviewport"></a>Procedure: <strong>current-viewport</strong></dt> +<dd><p>Return the currently bound viewport (see <a href="Viewports.html#Viewports">Viewports</a>). </p></dd></dl> <dl> -<dt><a name="index-current_002dframebuffer"></a>Scheme Procedure: <strong>current-framebuffer</strong></dt> -<dd><p>Return the currently bound framebuffer. See <a href="Framebuffers.html#Framebuffers">Framebuffers</a> for more -details about using framebuffers. +<dt><a name="index-current_002dframebuffer"></a>Procedure: <strong>current-framebuffer</strong></dt> +<dd><p>Return the currently bound framebuffer (see <a href="Framebuffers.html#Framebuffers">Framebuffers</a>). </p></dd></dl> <dl> -<dt><a name="index-current_002dblend_002dmode"></a>Scheme Procedure: <strong>current-blend-mode</strong></dt> -<dd><p>Return the currently bound blend mode. See <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">Blending and Depth Testing</a> for more details about using blend modes. +<dt><a name="index-current_002dblend_002dmode"></a>Procedure: <strong>current-blend-mode</strong></dt> +<dd><p>Return the currently bound blend mode (see <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">Blending and Depth Testing</a>). </p></dd></dl> <dl> -<dt><a name="index-current_002ddepth_002dtest"></a>Scheme Procedure: <strong>current-depth-test</strong></dt> -<dd><p>Return <code>#t</code> if depth testing is currently enabled. -See <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">Blending and Depth Testing</a> for more details about using the -depth test. +<dt><a name="index-current_002ddepth_002dtest"></a>Procedure: <strong>current-depth-test</strong></dt> +<dd><p>Return <code>#t</code> if depth testing is currently enabled (see <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">Blending and Depth Testing</a>). </p></dd></dl> <dl> -<dt><a name="index-current_002dtexture"></a>Scheme Procedure: <strong>current-texture</strong></dt> -<dd><p>Return the currently bound texture. See <a href="Textures.html#Textures">Textures</a> for more details -about using textures. +<dt><a name="index-current_002dtexture"></a>Procedure: <strong>current-texture</strong></dt> +<dd><p>Return the currently bound texture (see <a href="Textures.html#Textures">Textures</a>). </p></dd></dl> <dl> -<dt><a name="index-current_002dprojection"></a>Scheme Procedure: <strong>current-projection</strong></dt> -<dd><p>Return the currently bound projection matrix. See <a href="Matrices.html#Matrices">Matrices</a> for -more details about matrices. +<dt><a name="index-current_002dprojection"></a>Procedure: <strong>current-projection</strong></dt> +<dd><p>Return the currently bound projection matrix (see <a href="Matrices.html#Matrices">Matrices</a>). </p></dd></dl> <dl> -<dt><a name="index-with_002dviewport"></a>Scheme Syntax: <strong>with-viewport</strong> <em><var>viewport</var> <var>body</var> ...</em></dt> -<dd><p>Evaluate <var>body</var> with the current viewport bound to <var>viewport</var>. +<dt><a name="index-with_002dviewport"></a>Syntax: <strong>with-viewport</strong> <em><var>viewport</var> <var>body</var> ...</em></dt> +<dd><p>Evaluate <var>body</var> with the current viewport bound to <var>viewport</var> (see <a href="Viewports.html#Viewports">Viewports</a>). </p></dd></dl> <dl> -<dt><a name="index-with_002dframebuffer"></a>Scheme Syntax: <strong>with-framebuffer</strong> <em><var>framebuffer</var> <var>body</var> ...</em></dt> +<dt><a name="index-with_002dframebuffer"></a>Syntax: <strong>with-framebuffer</strong> <em><var>framebuffer</var> <var>body</var> ...</em></dt> <dd><p>Evaluate <var>body</var> with the current framebuffer bound to -<var>framebuffer</var>. +<var>framebuffer</var> (see <a href="Framebuffers.html#Framebuffers">Framebuffers</a>). </p></dd></dl> <dl> -<dt><a name="index-with_002dblend_002dmode"></a>Scheme Syntax: <strong>with-blend-mode</strong> <em><var>blend-mode</var> <var>body</var> ...</em></dt> +<dt><a name="index-with_002dblend_002dmode"></a>Syntax: <strong>with-blend-mode</strong> <em><var>blend-mode</var> <var>body</var> ...</em></dt> <dd><p>Evaluate <var>body</var> with the current blend mode bound to -<var>blend-mode</var>. +<var>blend-mode</var> (see <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">Blending and Depth Testing</a>). </p></dd></dl> <dl> -<dt><a name="index-with_002ddepth_002dtest"></a>Scheme Syntax: <strong>with-depth-test</strong> <em><var>depth-test?</var> <var>body</var> ...</em></dt> +<dt><a name="index-with_002ddepth_002dtest"></a>Syntax: <strong>with-depth-test</strong> <em><var>depth-test?</var> <var>body</var> ...</em></dt> <dd><p>Evaluate <var>body</var> with the depth-test disabled if <var>depth-test?</var> -is <code>#f</code>, or enabled otherwise. +is <code>#f</code>, or enabled otherwise (see <a href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">Blending and Depth Testing</a>). </p></dd></dl> <dl> -<dt><a name="index-with_002dtexture"></a>Scheme Syntax: <strong>with-texture</strong> <em><var>texture</var> <var>body</var> ...</em></dt> -<dd><p>Evaluate <var>body</var> with the current texture bound to <var>texture</var>. +<dt><a name="index-with_002dtexture"></a>Syntax: <strong>with-texture</strong> <em><var>texture</var> <var>body</var> ...</em></dt> +<dd><p>Evaluate <var>body</var> with the current texture bound to <var>texture</var> +(see <a href="Textures.html#Textures">Textures</a>). </p></dd></dl> <dl> -<dt><a name="index-with_002dprojection"></a>Scheme Syntax: <strong>with-projection</strong> <em><var>projection</var> <var>body</var> ...</em></dt> +<dt><a name="index-with_002dprojection"></a>Syntax: <strong>with-projection</strong> <em><var>projection</var> <var>body</var> ...</em></dt> <dd><p>Evaluate <var>body</var> with the current projection matrix bound to -<var>projection</var>. +<var>projection</var> (see <a href="Matrices.html#Matrices">Matrices</a>). </p></dd></dl> <hr> diff --git a/manuals/chickadee/Requirements.html b/manuals/chickadee/Requirements.html index d3e9918..e860a2f 100644 --- a/manuals/chickadee/Requirements.html +++ b/manuals/chickadee/Requirements.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Requirements</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Requirements (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Requirements"> -<meta name="keywords" content="The Chickadee Game Toolkit: Requirements"> +<meta name="description" content="Requirements (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Requirements (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> diff --git a/manuals/chickadee/Scripting.html b/manuals/chickadee/Scripting.html new file mode 100644 index 0000000..dd82e04 --- /dev/null +++ b/manuals/chickadee/Scripting.html @@ -0,0 +1,127 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Scripting (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Scripting (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Scripting (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="API-Reference.html#API-Reference" rel="up" title="API Reference"> +<link href="Agendas.html#Agendas" rel="next" title="Agendas"> +<link href="Viewports.html#Viewports" rel="prev" title="Viewports"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Scripting"></a> +<div class="header"> +<p> +Previous: <a href="Graphics.html#Graphics" accesskey="p" rel="prev">Graphics</a>, Up: <a href="API-Reference.html#API-Reference" accesskey="u" rel="up">API Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Scripting-1"></a> +<h3 class="section">2.4 Scripting</h3> + +<p>Game logic is a web of asynchronous events that are carefully +coordinated to bring the game world to life. In order to make an +enemy follow and attack the player, or move an NPC back and forth in +front of the item shop, or do both at the same time, a scripting +system is a necessity. Chickadee comes with an asynchronous +programming system in the <code>(chickadee scripting)</code> module. +Lightweight, cooperative threads known as “scripts” allow the +programmer to write asynchronous code as if it were synchronous, and +allow many such “threads” to run concurrently. +</p> +<p>But before we dig deeper into scripts, let’s discuss the simple act +of scheduling tasks. +</p> +<table class="menu" border="0" cellspacing="0"> +<tr><td align="left" valign="top">• <a href="Agendas.html#Agendas" accesskey="1">Agendas</a>:</td><td> </td><td align="left" valign="top">Scheduling tasks. +</td></tr> +<tr><td align="left" valign="top">• <a href="Scripts.html#Scripts" accesskey="2">Scripts</a>:</td><td> </td><td align="left" valign="top">Cooperative multitasking. +</td></tr> +<tr><td align="left" valign="top">• <a href="Tweening.html#Tweening" accesskey="3">Tweening</a>:</td><td> </td><td align="left" valign="top">Animations. +</td></tr> +<tr><td align="left" valign="top">• <a href="Channels.html#Channels" accesskey="4">Channels</a>:</td><td> </td><td align="left" valign="top">Publish data to listeners. +</td></tr> +</table> + + + + +</body> +</html> diff --git a/manuals/chickadee/Scripts.html b/manuals/chickadee/Scripts.html new file mode 100644 index 0000000..c9939f5 --- /dev/null +++ b/manuals/chickadee/Scripts.html @@ -0,0 +1,209 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Scripts (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Scripts (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Scripts (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Scripting.html#Scripting" rel="up" title="Scripting"> +<link href="Tweening.html#Tweening" rel="next" title="Tweening"> +<link href="Agendas.html#Agendas" rel="prev" title="Agendas"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Scripts"></a> +<div class="header"> +<p> +Next: <a href="Tweening.html#Tweening" accesskey="n" rel="next">Tweening</a>, Previous: <a href="Agendas.html#Agendas" accesskey="p" rel="prev">Agendas</a>, Up: <a href="Scripting.html#Scripting" accesskey="u" rel="up">Scripting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Scripts-1"></a> +<h4 class="subsection">2.4.2 Scripts</h4> + +<p>Now that we can schedule tasks, let’s take things to the next level. +It sure would be great if we could make procedures that described a +series of actions that happened over time, especially if we could do +so without contorting our code into a nest of callback procedures. +This is where scripts come in. With scripts we can write code in a +linear way, in a manner that appears to be synchronous, but with the +ability to suspend periodically in order to let other scripts have a +turn and prevent blocking the game loop. Building on top of the +scheduling that agendas provide, here is a script that models a child +trying to get their mother’s attention: +</p> +<div class="example"> +<pre class="example">(script + (while #t + (display "mom!") + (newline) + (sleep 60))) ; where 60 = 1 second of real time +</pre></div> + +<p>This code runs in an endless loop, but the <code>sleep</code> procedure +suspends the script and schedules it to be run later by the agenda. +So, after each iteration of the loop, control is returned back to the +game loop and the program is not stuck spinning in a loop that will +never exit. Pretty neat, eh? +</p> +<p>Scripts can suspend to any capable handler, not just the agenda. +The <code>yield</code> procedure will suspend the current script and pass +its “continuation” to a handler procedure. This handler procedure +could do anything. Perhaps the handler stashes the continuation +somewhere where it will be resumed when the user presses a specific +key on the keyboard, or maybe it will be resumed when the player picks +up an item off of the dungeon floor; the sky is the limit. +</p> +<p>Sometimes it is necessary to abruptly terminate a script after it has +been started. For example, when an enemy is defeated their AI routine +needs to be shut down. When a script is spawned, a handle to that +script is returned that can be used to cancel it when desired. +</p> +<div class="example"> +<pre class="example">(define script (script (while #t (display "hey\n") (sleep 60)))) +;; sometime later +(cancel-script script) +</pre></div> + +<dl> +<dt><a name="index-spawn_002dscript"></a>Procedure: <strong>spawn-script</strong> <em><var>thunk</var></em></dt> +<dd><p>Apply <var>thunk</var> as a script and return a handle to it. +</p></dd></dl> + +<dl> +<dt><a name="index-script"></a>Syntax: <strong>script</strong> <em><var>body</var> …</em></dt> +<dd><p>Evaluate <var>body</var> as a script and return a handle to it. +</p></dd></dl> + +<dl> +<dt><a name="index-script_003f"></a>Procedure: <strong>script?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a script handle. +</p></dd></dl> + +<dl> +<dt><a name="index-script_002dcancelled_003f"></a>Procedure: <strong>script-cancelled?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> has been cancelled. +</p></dd></dl> + +<dl> +<dt><a name="index-script_002drunning_003f"></a>Procedure: <strong>script-running?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> has not yet terminated or been +cancelled. +</p></dd></dl> + +<dl> +<dt><a name="index-script_002dcomplete_003f"></a>Procedure: <strong>script-complete?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> has terminated. +</p></dd></dl> + +<dl> +<dt><a name="index-cancel_002dscript"></a>Procedure: <strong>cancel-script</strong> <em><var>co</var></em></dt> +<dd><p>Prevent further execution of the script <var>co</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-yield"></a>Procedure: <strong>yield</strong> <em><var>handler</var></em></dt> +<dd><p>Suspend the current script and pass its continuation to the +procedure <var>handler</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-sleep"></a>Procedure: <strong>sleep</strong> <em><var>duration</var></em></dt> +<dd><p>Wait <var>duration</var> before resuming the current script. +</p></dd></dl> + +<dl> +<dt><a name="index-channel_002dget"></a>Procedure: <strong>channel-get</strong> <em><var>channel</var></em></dt> +<dd><p>Wait for a message from <var>channel</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-forever"></a>Syntax: <strong>forever</strong> <em><var>body</var> …</em></dt> +<dd><p>Evaluate <var>body</var> in an endless loop. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="Tweening.html#Tweening" accesskey="n" rel="next">Tweening</a>, Previous: <a href="Agendas.html#Agendas" accesskey="p" rel="prev">Agendas</a>, Up: <a href="Scripting.html#Scripting" accesskey="u" rel="up">Scripting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> + + + +</body> +</html> diff --git a/manuals/chickadee/Shaders.html b/manuals/chickadee/Shaders.html index 7b3a2a0..70173a4 100644 --- a/manuals/chickadee/Shaders.html +++ b/manuals/chickadee/Shaders.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Shaders</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Shaders (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Shaders"> -<meta name="keywords" content="The Chickadee Game Toolkit: Shaders"> +<meta name="description" content="Shaders (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Shaders (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -94,7 +94,7 @@ Next: <a href="Framebuffers.html#Framebuffers" accesskey="n" rel="next">Framebuf </div> <hr> <a name="Shaders-1"></a> -<h4 class="subsection">2.4.8 Shaders</h4> +<h4 class="subsection">2.3.9 Shaders</h4> <p>Shaders are programs for the GPU to evaluate. They are written in the OpenGL Shading Language, or GLSL. Chickadee does not currently diff --git a/manuals/chickadee/Sprites.html b/manuals/chickadee/Sprites.html index 0c114bd..29d16ea 100644 --- a/manuals/chickadee/Sprites.html +++ b/manuals/chickadee/Sprites.html @@ -16,21 +16,21 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Sprites</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Sprites (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Sprites"> -<meta name="keywords" content="The Chickadee Game Toolkit: Sprites"> +<meta name="description" content="Sprites (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Sprites (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Graphics.html#Graphics" rel="up" title="Graphics"> -<link href="Lines-and-Shapes.html#Lines-and-Shapes" rel="next" title="Lines and Shapes"> +<link href="Tile-Maps.html#Tile-Maps" rel="next" title="Tile Maps"> <link href="Textures.html#Textures" rel="prev" title="Textures"> <style type="text/css"> <!-- @@ -90,11 +90,11 @@ ul.no-bullet {list-style: none} <a name="Sprites"></a> <div class="header"> <p> -Next: <a href="Lines-and-Shapes.html#Lines-and-Shapes" accesskey="n" rel="next">Lines and Shapes</a>, Previous: <a href="Textures.html#Textures" accesskey="p" rel="prev">Textures</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Tile-Maps.html#Tile-Maps" accesskey="n" rel="next">Tile Maps</a>, Previous: <a href="Textures.html#Textures" accesskey="p" rel="prev">Textures</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Sprites-1"></a> -<h4 class="subsection">2.4.3 Sprites</h4> +<h4 class="subsection">2.3.3 Sprites</h4> <p>For those who are new to this game, a sprite is a 2D rectangular bitmap that is rendered to the screen. For 2D games, sprites are the @@ -104,8 +104,25 @@ stored in textures (see <a href="Textures.html#Textures">Textures</a>) and can b via the <code>draw-sprite</code> procedure. </p> <dl> -<dt><a name="index-draw_002dsprite"></a>Scheme Procedure: <strong>draw-sprite</strong> <em><var>texture</var> <var>region</var> [#:scale] [#:rotation] [#:blend-mode alpha] [#:texture-region] [#:shader]</em></dt> -</dl> +<dt><a name="index-draw_002dsprite"></a>Procedure: <strong>draw-sprite</strong> <em><var>texture</var> <var>position</var> [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] [#:rect] [#:shader]</em></dt> +<dd> +<p>Draw <var>texture</var> at <var>position</var>. +</p> +<p>Optionally, other transformations may be applied to the sprite. +<var>rotation</var> specifies the angle to rotate the sprite, in radians. +<var>scale</var> specifies the scaling factor as a 2D vector. All +transformations are applied relative to <var>origin</var>, a 2D vector, +which defaults to the lower-left corner. +</p> +<p>Alpha blending is used by default but the blending method can be +changed by specifying <var>blend-mode</var>. +</p> +<p>The area drawn to is as big as the texture, by default. To draw to an +arbitrary section of the screen, specify <var>rect</var>. +</p> +<p>Finally, advanced users may specify <var>shader</var> to change the way the +sprite is rendered entirely. +</p></dd></dl> <p>It’s not uncommon to need to draw hundreds or thousands of sprites each frame. However, GPUs (graphics processing units) are tricky @@ -129,7 +146,7 @@ the code that is calling <code>draw-sprite</code> a lot in the <code>with-batched-sprites</code> form. </p> <dl> -<dt><a name="index-with_002dbatched_002dsprites"></a>Scheme Syntax: <strong>with-batched-sprites</strong> <em><var>body</var> …</em></dt> +<dt><a name="index-with_002dbatched_002dsprites"></a>Syntax: <strong>with-batched-sprites</strong> <em><var>body</var> …</em></dt> <dd><p>Use batched rendering for all <code>draw-sprite</code> calls within <var>body</var>. </p></dd></dl> @@ -158,7 +175,7 @@ patch, they can be rendered at any size without unappealing scaling artifacts. </p> <dl> -<dt><a name="index-draw_002dnine_002dpatch"></a>Scheme Procedure: <strong>draw-nine-patch</strong> <em><var>texture</var> <var>region</var> [#:margin 0] [#:top-margin margin] [#:bottom-margin margin] [#:left-margin margin] [#:right-margin margin] [#:texture-region] [#:scale] [#:rotation] [#:blend-mode alpha] [#:shader]</em></dt> +<dt><a name="index-draw_002dnine_002dpatch"></a>Procedure: <strong>draw-nine-patch</strong> <em><var>texture</var> <var>rect</var> [#:margin 0] [#:top-margin margin] [#:bottom-margin margin] [#:left-margin margin] [#:right-margin margin] [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] [#:shader]</em></dt> <dd> <p>Draw a nine patch sprite. A nine patch sprite renders <var>texture</var> as a <var>width</var> x <var>height</var> rectangle whose stretchable areas are @@ -174,7 +191,7 @@ the other arguments. <hr> <div class="header"> <p> -Next: <a href="Lines-and-Shapes.html#Lines-and-Shapes" accesskey="n" rel="next">Lines and Shapes</a>, Previous: <a href="Textures.html#Textures" accesskey="p" rel="prev">Textures</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Tile-Maps.html#Tile-Maps" accesskey="n" rel="next">Tile Maps</a>, Previous: <a href="Textures.html#Textures" accesskey="p" rel="prev">Textures</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> diff --git a/manuals/chickadee/Textures.html b/manuals/chickadee/Textures.html index 66d9fe7..b9bb778 100644 --- a/manuals/chickadee/Textures.html +++ b/manuals/chickadee/Textures.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Textures</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Textures (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Textures"> -<meta name="keywords" content="The Chickadee Game Toolkit: Textures"> +<meta name="description" content="Textures (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Textures (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -94,10 +94,10 @@ Next: <a href="Sprites.html#Sprites" accesskey="n" rel="next">Sprites</a>, Previ </div> <hr> <a name="Textures-1"></a> -<h4 class="subsection">2.4.2 Textures</h4> +<h4 class="subsection">2.3.2 Textures</h4> <dl> -<dt><a name="index-load_002dimage"></a>Scheme Procedure: <strong>load-image</strong> <em><var>file</var> [#:min-filter nearest] [#:mag-filter nearest] [#:wrap-s repeat] [#:wrap-t repeat]</em></dt> +<dt><a name="index-load_002dimage"></a>Procedure: <strong>load-image</strong> <em><var>file</var> [#:min-filter nearest] [#:mag-filter nearest] [#:wrap-s repeat] [#:wrap-t repeat]</em></dt> <dd> <p>Load the image data from <var>file</var> and return a new texture object. </p> diff --git a/manuals/chickadee/Tile-Maps.html b/manuals/chickadee/Tile-Maps.html new file mode 100644 index 0000000..cdf4f6e --- /dev/null +++ b/manuals/chickadee/Tile-Maps.html @@ -0,0 +1,126 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Tile Maps (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Tile Maps (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Tile Maps (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Graphics.html#Graphics" rel="up" title="Graphics"> +<link href="Lines-and-Shapes.html#Lines-and-Shapes" rel="next" title="Lines and Shapes"> +<link href="Sprites.html#Sprites" rel="prev" title="Sprites"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Tile-Maps"></a> +<div class="header"> +<p> +Next: <a href="Lines-and-Shapes.html#Lines-and-Shapes" accesskey="n" rel="next">Lines and Shapes</a>, Previous: <a href="Sprites.html#Sprites" accesskey="p" rel="prev">Sprites</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Tile-Maps-1"></a> +<h4 class="subsection">2.3.4 Tile Maps</h4> + +<p>A tile map is a scene created by composing lots of small sprites, +called “tiles”, into a larger image. One program for editing such +maps is called <a href="http://mapeditor.org">Tiled</a>. Chickadee has native +support for loading and rendering Tiled maps in the <code>(chickadee +render tiled)</code> module. +</p> +<dl> +<dt><a name="index-load_002dtile_002dmap"></a>Procedure: <strong>load-tile-map</strong> <em><var>file-name</var></em></dt> +<dd><p>Load the Tiled formatted map in <var>file-name</var> and return a new tile +map object. +</p></dd></dl> + +<dl> +<dt><a name="index-draw_002dtile_002dmap"></a>Procedure: <strong>draw-tile-map</strong> <em><var>tile-map</var> [#:layers] [#:region] [#:origin] [#:position] [#:scale] [#:rotation]</em></dt> +<dd> +<p>Draw the layers of <var>tile-map</var>. By default, all layers are drawn. +To draw a subset of the available layers, pass a list of layer ids +using the <var>layers</var> keyword argument. +</p> +<p>Refer to <code>draw-sprite</code> (see <a href="Sprites.html#Sprites">Sprites</a>) for information about +the other arguments. +</p></dd></dl> + + + + +</body> +</html> diff --git a/manuals/chickadee/Tweening.html b/manuals/chickadee/Tweening.html new file mode 100644 index 0000000..3e344df --- /dev/null +++ b/manuals/chickadee/Tweening.html @@ -0,0 +1,132 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 2017 David Thompson davet@gnu.org + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 +or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled "GNU +Free Documentation License". + +A copy of the license is also available from the Free Software +Foundation Web site at http://www.gnu.org/licenses/fdl.html. + + +The document was typeset with +http://www.texinfo.org/ (GNU Texinfo). + --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Tweening (The Chickadee Game Toolkit)</title> + +<meta name="description" content="Tweening (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Tweening (The Chickadee Game Toolkit)"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Scripting.html#Scripting" rel="up" title="Scripting"> +<link href="Channels.html#Channels" rel="next" title="Channels"> +<link href="Scripts.html#Scripts" rel="prev" title="Scripts"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.indentedblock {margin-right: 0em} +blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smalllisp {margin-left: 3.2em} +kbd {font-style: oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: initial; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +@media (min-width: 1140px) { + body { + margin-left: 14rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (min-width: 800px) and (max-width: 1140px) { + body { + margin-left: 6rem; + margin-right: 4rem; + max-width: 52rem; + } +} + +@media (max-width: 800px) { + body { + margin: 1rem; + } +} + +--> +</style> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> + + +</head> + +<body lang="en"> +<a name="Tweening"></a> +<div class="header"> +<p> +Next: <a href="Channels.html#Channels" accesskey="n" rel="next">Channels</a>, Previous: <a href="Scripts.html#Scripts" accesskey="p" rel="prev">Scripts</a>, Up: <a href="Scripting.html#Scripting" accesskey="u" rel="up">Scripting</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Tweening-1"></a> +<h4 class="subsection">2.4.3 Tweening</h4> + +<p>Tweening is the process of transitioning something from an initial +state to a final state over a pre-determined period of time. In other +words, tweening is a way to create animation. The <code>tween</code> +procedure can be used within any script like so: +</p> +<div class="example"> +<pre class="example">(define x 0) +(script + ;; 0 to 100 in 60 ticks of the agenda. + (tween 60 0 100 (lambda (y) (set! x y)))) +</pre></div> + +<dl> +<dt><a name="index-tween"></a>Procedure: <strong>tween</strong> <em><var>duration</var> <var>start</var> <var>end</var> <var>proc</var> [#:step 1 #:ease <code>smoothstep</code> #:interpolate <code>lerp</code>]</em></dt> +<dd><p>Transition a value from <var>start</var> to <var>end</var> over <var>duration</var>, +sending each succesive value to <var>proc</var>. <var>step</var> controls the +amount of time between each update of the animation. +</p> +<p>To control how the animation goes from the initial to final state, an +“easing” procedure may be specified. By default, the +<code>smoothstep</code> easing is used, which is a more pleasing default +than a simplistic linear function. See <a href="Easings.html#Easings">Easings</a> for a complete list +of available easing procedures. +</p> +<p>The <var>interpolate</var> procedure computes the values in between +<var>start</var> and <var>end</var>. By default, linear interpolation (“lerp” +for short) is used. +</p></dd></dl> + + + + +</body> +</html> diff --git a/manuals/chickadee/Vectors.html b/manuals/chickadee/Vectors.html index eb79149..4857f0a 100644 --- a/manuals/chickadee/Vectors.html +++ b/manuals/chickadee/Vectors.html @@ -16,22 +16,22 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Vectors</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Vectors (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Vectors"> -<meta name="keywords" content="The Chickadee Game Toolkit: Vectors"> +<meta name="description" content="Vectors (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Vectors (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Math.html#Math" rel="up" title="Math"> -<link href="Matrices.html#Matrices" rel="next" title="Matrices"> -<link href="Math.html#Math" rel="prev" title="Math"> +<link href="Rectangles.html#Rectangles" rel="next" title="Rectangles"> +<link href="Basics.html#Basics" rel="prev" title="Basics"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} @@ -90,12 +90,255 @@ ul.no-bullet {list-style: none} <a name="Vectors"></a> <div class="header"> <p> -Next: <a href="Matrices.html#Matrices" accesskey="n" rel="next">Matrices</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Rectangles.html#Rectangles" accesskey="n" rel="next">Rectangles</a>, Previous: <a href="Basics.html#Basics" accesskey="p" rel="prev">Basics</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Vectors-1"></a> -<h4 class="subsection">2.3.1 Vectors</h4> +<h4 class="subsection">2.2.2 Vectors</h4> + +<p>Unlike Scheme’s vector data type, which is a sequence of arbitrary +Scheme objects, Chickadee’s <code>(chickadee math vector)</code> module +provides vectors in the linear algebra sense: Sequences of numbers +specialized for particular coordinate spaces. As of now, Chickadee +provides 2D and 3D vectors, with 4D vector support coming in a future +release. +</p> +<p>Here’s a quick example of adding two vectors: +</p> +<div class="example"> +<pre class="example">(define v (vec2+ (vec2 1 2) (vec2 3 4))) +</pre></div> + +<p>Since vectors are used so frequently, the reader macro <code>#v</code> is +used to cut down on typing: +</p> +<div class="example"> +<pre class="example">(define v (vec2+ #v(1 2) #v(3 4))) +</pre></div> + +<a name="A-Note-About-Performance"></a> +<h4 class="subsubsection">2.2.2.1 A Note About Performance</h4> + +<p>A lot of time has been spent making Chickadee’s vector operations +perform relatively efficiently in critical code paths where excessive +garbage generation will cause major performance issues. The general +rule is that procedures ending with <code>!</code> perform an in-place +modification of one of the arguments in order to avoid allocating a +new vector. These procedures are also inlined by Guile’s compiler in +order to take advantage of optimizations relating to floating point +math operations. The downside is that since these are not pure +functions, they do not compose well and create more verbose code. +</p> +<a name="g_t2D-Vectors"></a> +<h4 class="subsubsection">2.2.2.2 2D Vectors</h4> + +<dl> +<dt><a name="index-vec2"></a>Procedure: <strong>vec2</strong> <em><var>x</var> <var>y</var></em></dt> +<dd><p>Return a new 2D vector with coordinates (<var>x</var>, <var>y</var>). +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002fpolar"></a>Procedure: <strong>vec2/polar</strong> <em><var>r</var> <var>theta</var></em></dt> +<dd><p>Return a new 2D vector containing the Cartesian representation of the +polar coordinate (<var>r</var>, <var>theta</var>). The angle <var>theta</var> is +measured in radians. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_003f"></a>Procedure: <strong>vec2?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a 2D vector. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dx"></a>Procedure: <strong>vec2-x</strong> <em><var>v</var></em></dt> +<dd><p>Return the X coordinate of the 2D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dy"></a>Procedure: <strong>vec2-y</strong> <em><var>v</var></em></dt> +<dd><p>Return the Y coordinate of the 2D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dcopy"></a>Procedure: <strong>vec2-copy</strong> <em><var>v</var></em></dt> +<dd><p>Return a fresh copy of the 2D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dmagnitude"></a>Procedure: <strong>vec2-magnitude</strong> <em><var>v</var></em></dt> +<dd><p>Return the magnitude of the 2D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002ddot_002dproduct"></a>Procedure: <strong>vec2-dot-product</strong> <em><var>v1</var> <var>v2</var></em></dt> +<dd><p>Return the dot product of the 2D vectors <var>v1</var> and <var>v2</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dnormalize"></a>Procedure: <strong>vec2-normalize</strong> <em><var>v</var></em></dt> +<dd><p>Return the normalized form of the 2D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002b"></a>Procedure: <strong>vec2+</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Add <var>x</var>, either a 2D vector or a scalar (i.e. a real number), to +the 2D vector <var>v</var> and return a new vector containing the sum. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002d"></a>Procedure: <strong>vec2-</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Subtract <var>x</var>, either a 2D vector or a scalar, from the 2D vector +<var>v</var> and return a new vector containing the difference. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002a"></a>Procedure: <strong>vec2*</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Multiply the 2D vector <var>v</var> by <var>x</var>, a 2D vector or a scalar, +and return a new vector containing the product. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002dvec2_002dx_0021"></a>Procedure: <strong>set-vec2-x!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Set the X coordinate of the 2D vector <var>v</var> to <var>x</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002dvec2_002dy_0021"></a>Procedure: <strong>set-vec2-y!</strong> <em><var>v</var> <var>y</var></em></dt> +<dd><p>Set the Y coordinate of the 2D vector <var>v</var> to <var>y</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dcopy_0021"></a>Procedure: <strong>vec2-copy!</strong> <em><var>source</var> <var>target</var></em></dt> +<dd><p>Copy the 2D vector <var>source</var> into the 2D vector <var>target</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dadd_0021"></a>Procedure: <strong>vec2-add!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Perform an in-place modification of the 2D vector <var>v</var> by adding +<var>x</var>, a 2D vector or a scalar. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dsub_0021"></a>Procedure: <strong>vec2-sub!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Perform an in-place modification of the 2D vector <var>v</var> by +subtracting <var>x</var>, a 2D vector or a scalar. +</p></dd></dl> + +<dl> +<dt><a name="index-vec2_002dmult_0021"></a>Procedure: <strong>vec2-mult!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Perform an in-place modification of the 2D vector <var>v</var> by +multiplying it by <var>x</var>, a 2D vector or a scalar. +</p></dd></dl> +<a name="g_t3D-Vectors"></a> +<h4 class="subsubsection">2.2.2.3 3D Vectors</h4> + +<dl> +<dt><a name="index-vec3"></a>Procedure: <strong>vec3</strong> <em><var>x</var> <var>y</var></em></dt> +<dd><p>Return a new 2D vector with coordinates (<var>x</var>, <var>y</var>). +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_003f"></a>Procedure: <strong>vec3?</strong> <em><var>obj</var></em></dt> +<dd><p>Return <code>#t</code> if <var>obj</var> is a 3D vector. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dx"></a>Procedure: <strong>vec3-x</strong> <em><var>v</var></em></dt> +<dd><p>Return the X coordinate of the 3D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dy"></a>Procedure: <strong>vec3-y</strong> <em><var>v</var></em></dt> +<dd><p>Return the Y coordinate of the 3D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dz"></a>Procedure: <strong>vec3-z</strong> <em><var>v</var></em></dt> +<dd><p>Return the Z coordinate of the 3D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dcopy"></a>Procedure: <strong>vec3-copy</strong> <em><var>v</var></em></dt> +<dd><p>Return a fresh copy of the 3D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dmagnitude"></a>Procedure: <strong>vec3-magnitude</strong> <em><var>v</var></em></dt> +<dd><p>Return the magnitude of the 3D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002ddot_002dproduct"></a>Procedure: <strong>vec3-dot-product</strong> <em><var>v1</var> <var>v2</var></em></dt> +<dd><p>Return the dot product of the 3D vectors <var>v1</var> and <var>v2</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dnormalize"></a>Procedure: <strong>vec3-normalize</strong> <em><var>v</var></em></dt> +<dd><p>Return the normalized form of the 3D vector <var>v</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002b"></a>Procedure: <strong>vec3+</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Add <var>x</var>, either a 3D vector or a scalar (i.e. a real number), to +the 3D vector <var>v</var> and return a new vector containing the sum. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002d"></a>Procedure: <strong>vec3-</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Subtract <var>x</var>, either a 3D vector or a scalar, from the 3D vector +<var>v</var> and return a new vector containing the difference. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002a"></a>Procedure: <strong>vec3*</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Multiply the 3D vector <var>v</var> by <var>x</var>, a 3D vector or a scalar, +and return a new vector containing the product. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002dvec3_002dx_0021"></a>Procedure: <strong>set-vec3-x!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Set the X coordinate of the 3D vector <var>v</var> to <var>x</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002dvec3_002dy_0021"></a>Procedure: <strong>set-vec3-y!</strong> <em><var>v</var> <var>y</var></em></dt> +<dd><p>Set the Y coordinate of the 3D vector <var>v</var> to <var>y</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-set_002dvec3_002dz_0021"></a>Procedure: <strong>set-vec3-z!</strong> <em><var>v</var> <var>z</var></em></dt> +<dd><p>Set the Z coordinate of the 3D vector <var>v</var> to <var>z</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dcopy_0021"></a>Procedure: <strong>vec3-copy!</strong> <em><var>source</var> <var>target</var></em></dt> +<dd><p>Copy the 3D vector <var>source</var> into the 3D vector <var>target</var>. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dadd_0021"></a>Procedure: <strong>vec3-add!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Perform an in-place modification of the 3D vector <var>v</var> by adding +<var>x</var>, a 3D vector or a scalar. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dsub_0021"></a>Procedure: <strong>vec3-sub!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Perform an in-place modification of the 3D vector <var>v</var> by +subtracting <var>x</var>, a 3D vector or a scalar. +</p></dd></dl> + +<dl> +<dt><a name="index-vec3_002dmult_0021"></a>Procedure: <strong>vec3-mult!</strong> <em><var>v</var> <var>x</var></em></dt> +<dd><p>Perform an in-place modification of the 3D vector <var>v</var> by +multiplying it by <var>x</var>, a 3D vector or a scalar. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="Rectangles.html#Rectangles" accesskey="n" rel="next">Rectangles</a>, Previous: <a href="Basics.html#Basics" accesskey="p" rel="prev">Basics</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +</div> diff --git a/manuals/chickadee/Vertex-Arrays.html b/manuals/chickadee/Vertex-Arrays.html index 9b3f5b1..f3c9fa6 100644 --- a/manuals/chickadee/Vertex-Arrays.html +++ b/manuals/chickadee/Vertex-Arrays.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Vertex Arrays</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Vertex Arrays (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Vertex Arrays"> -<meta name="keywords" content="The Chickadee Game Toolkit: Vertex Arrays"> +<meta name="description" content="Vertex Arrays (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Vertex Arrays (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> @@ -94,7 +94,7 @@ Next: <a href="Shaders.html#Shaders" accesskey="n" rel="next">Shaders</a>, Previ </div> <hr> <a name="Vertex-Arrays-1"></a> -<h4 class="subsection">2.4.7 Vertex Arrays</h4> +<h4 class="subsection">2.3.8 Vertex Arrays</h4> diff --git a/manuals/chickadee/Viewports.html b/manuals/chickadee/Viewports.html index c54e7c9..2e46d12 100644 --- a/manuals/chickadee/Viewports.html +++ b/manuals/chickadee/Viewports.html @@ -16,21 +16,21 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Viewports</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Viewports (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Viewports"> -<meta name="keywords" content="The Chickadee Game Toolkit: Viewports"> +<meta name="description" content="Viewports (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Viewports (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Graphics.html#Graphics" rel="up" title="Graphics"> -<link href="Audio.html#Audio" rel="next" title="Audio"> +<link href="Scripting.html#Scripting" rel="next" title="Scripting"> <link href="Framebuffers.html#Framebuffers" rel="prev" title="Framebuffers"> <style type="text/css"> <!-- @@ -94,7 +94,7 @@ Previous: <a href="Framebuffers.html#Framebuffers" accesskey="p" rel="prev">Fram </div> <hr> <a name="Viewports-1"></a> -<h4 class="subsection">2.4.10 Viewports</h4> +<h4 class="subsection">2.3.11 Viewports</h4> diff --git a/manuals/chickadee/index.html b/manuals/chickadee/index.html index b10ea67..d7e8a56 100644 --- a/manuals/chickadee/index.html +++ b/manuals/chickadee/index.html @@ -16,16 +16,16 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> -<title>The Chickadee Game Toolkit: Top</title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<title>Top (The Chickadee Game Toolkit)</title> -<meta name="description" content="The Chickadee Game Toolkit: Top"> -<meta name="keywords" content="The Chickadee Game Toolkit: Top"> +<meta name="description" content="Top (The Chickadee Game Toolkit)"> +<meta name="keywords" content="Top (The Chickadee Game Toolkit)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="#Top" rel="start" title="Top"> <link href="Index.html#Index" rel="index" title="Index"> <link href="#SEC_Contents" rel="contents" title="Table of Contents"> @@ -102,27 +102,48 @@ ul.no-bullet {list-style: none} <li><a name="toc-API-Reference-1" href="API-Reference.html#API-Reference">2 API Reference</a> <ul class="no-bullet"> <li><a name="toc-Kernel-1" href="Kernel.html#Kernel">2.1 Kernel</a></li> - <li><a name="toc-Input-1" href="Input.html#Input">2.2 Input</a></li> - <li><a name="toc-Math-1" href="Math.html#Math">2.3 Math</a> + <li><a name="toc-Math-1" href="Math.html#Math">2.2 Math</a> + <ul class="no-bullet"> + <li><a name="toc-Basics-1" href="Basics.html#Basics">2.2.1 Basics</a></li> + <li><a name="toc-Vectors-1" href="Vectors.html#Vectors">2.2.2 Vectors</a> + <ul class="no-bullet"> + <li><a name="toc-A-Note-About-Performance" href="Vectors.html#A-Note-About-Performance">2.2.2.1 A Note About Performance</a></li> + <li><a name="toc-2D-Vectors" href="Vectors.html#g_t2D-Vectors">2.2.2.2 2D Vectors</a></li> + <li><a name="toc-3D-Vectors" href="Vectors.html#g_t3D-Vectors">2.2.2.3 3D Vectors</a></li> + </ul></li> + <li><a name="toc-Rectangles-1" href="Rectangles.html#Rectangles">2.2.3 Rectangles</a></li> + <li><a name="toc-Grid-1" href="Grid.html#Grid">2.2.4 Grid</a></li> + <li><a name="toc-Matrices-1" href="Matrices.html#Matrices">2.2.5 Matrices</a> + <ul class="no-bullet"> + <li><a name="toc-Another-Note-About-Performance" href="Matrices.html#Another-Note-About-Performance">2.2.5.1 Another Note About Performance</a></li> + <li><a name="toc-Matrix-Operations" href="Matrices.html#Matrix-Operations">2.2.5.2 Matrix Operations</a></li> + </ul></li> + <li><a name="toc-Quaternions-1" href="Quaternions.html#Quaternions">2.2.6 Quaternions</a></li> + <li><a name="toc-Easings-1" href="Easings.html#Easings">2.2.7 Easings</a></li> + <li><a name="toc-Bezier-Curves-1" href="Bezier-Curves.html#Bezier-Curves">2.2.8 Bezier Curves</a></li> + <li><a name="toc-Path-Finding-1" href="Path-Finding.html#Path-Finding">2.2.9 Path Finding</a></li> + </ul></li> + <li><a name="toc-Graphics-1" href="Graphics.html#Graphics">2.3 Graphics</a> <ul class="no-bullet"> - <li><a name="toc-Vectors-1" href="Vectors.html#Vectors">2.3.1 Vectors</a></li> - <li><a name="toc-Matrices-1" href="Matrices.html#Matrices">2.3.2 Matrices</a></li> - <li><a name="toc-Rectangles-1" href="Rectangles.html#Rectangles">2.3.3 Rectangles</a></li> + <li><a name="toc-Rendering-Engine-1" href="Rendering-Engine.html#Rendering-Engine">2.3.1 Rendering Engine</a></li> + <li><a name="toc-Textures-1" href="Textures.html#Textures">2.3.2 Textures</a></li> + <li><a name="toc-Sprites-1" href="Sprites.html#Sprites">2.3.3 Sprites</a></li> + <li><a name="toc-Tile-Maps-1" href="Tile-Maps.html#Tile-Maps">2.3.4 Tile Maps</a></li> + <li><a name="toc-Lines-and-Shapes-1" href="Lines-and-Shapes.html#Lines-and-Shapes">2.3.5 Lines and Shapes</a></li> + <li><a name="toc-Fonts-1" href="Fonts.html#Fonts">2.3.6 Fonts</a></li> + <li><a name="toc-Blending-and-Depth-Testing-1" href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">2.3.7 Blending and Depth Testing</a></li> + <li><a name="toc-Vertex-Arrays-1" href="Vertex-Arrays.html#Vertex-Arrays">2.3.8 Vertex Arrays</a></li> + <li><a name="toc-Shaders-1" href="Shaders.html#Shaders">2.3.9 Shaders</a></li> + <li><a name="toc-Framebuffers-1" href="Framebuffers.html#Framebuffers">2.3.10 Framebuffers</a></li> + <li><a name="toc-Viewports-1" href="Viewports.html#Viewports">2.3.11 Viewports</a></li> </ul></li> - <li><a name="toc-Graphics-1" href="Graphics.html#Graphics">2.4 Graphics</a> + <li><a name="toc-Scripting-1" href="Scripting.html#Scripting">2.4 Scripting</a> <ul class="no-bullet"> - <li><a name="toc-Rendering-Engine-1" href="Rendering-Engine.html#Rendering-Engine">2.4.1 Rendering Engine</a></li> - <li><a name="toc-Textures-1" href="Textures.html#Textures">2.4.2 Textures</a></li> - <li><a name="toc-Sprites-1" href="Sprites.html#Sprites">2.4.3 Sprites</a></li> - <li><a name="toc-Lines-and-Shapes-1" href="Lines-and-Shapes.html#Lines-and-Shapes">2.4.4 Lines and Shapes</a></li> - <li><a name="toc-Fonts-1" href="Fonts.html#Fonts">2.4.5 Fonts</a></li> - <li><a name="toc-Blending-and-Depth-Testing-1" href="Blending-and-Depth-Testing.html#Blending-and-Depth-Testing">2.4.6 Blending and Depth Testing</a></li> - <li><a name="toc-Vertex-Arrays-1" href="Vertex-Arrays.html#Vertex-Arrays">2.4.7 Vertex Arrays</a></li> - <li><a name="toc-Shaders-1" href="Shaders.html#Shaders">2.4.8 Shaders</a></li> - <li><a name="toc-Framebuffers-1" href="Framebuffers.html#Framebuffers">2.4.9 Framebuffers</a></li> - <li><a name="toc-Viewports-1" href="Viewports.html#Viewports">2.4.10 Viewports</a></li> + <li><a name="toc-Agendas-1" href="Agendas.html#Agendas">2.4.1 Agendas</a></li> + <li><a name="toc-Scripts-1" href="Scripts.html#Scripts">2.4.2 Scripts</a></li> + <li><a name="toc-Tweening-1" href="Tweening.html#Tweening">2.4.3 Tweening</a></li> + <li><a name="toc-Channels-1" href="Channels.html#Channels">2.4.4 Channels</a></li> </ul></li> - <li><a name="toc-Audio-1" href="Audio.html#Audio">2.5 Audio</a></li> </ul></li> <li><a name="toc-Copying-This-Manual-1" href="Copying-This-Manual.html#Copying-This-Manual">Appendix A Copying This Manual</a> <ul class="no-bullet"> |