diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-12-13 21:20:42 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-12-13 21:28:08 -0500 |
commit | 75c5cdef5c72b4f88ae71ba37e7a94b609996279 (patch) | |
tree | 8f867222da14159cdcf4682dd90fdad1d1fc8a07 /doc | |
parent | fa30685ab7f8a3e44bc144b68a8516ba31de3cc4 (diff) |
Re-hide SDL2 details.
I know I'm backpedaling here, but I think it was a mistake to expose
SDL2 as much as I have here. I think it's better for people just
getting started to not have to wonder what SDL means. Making things
as usable as possible for beginners is an important goal, and
abstracting SDL2 + OpenGL things from the core game loop
implementation shouldn't require sacrificing that goal.
* chickadee.scm: Switch code with...
* chickadee/game-loop.scm: ...this! Which is copied straight from...
* chickadee/sdl.scm: ...this! Which is now deleted.
* Makefile.am (SOURCES): Add game-loop.scm, remove sdl.scm.
* examples/grid.scm: Update due to API breakage.
* examples/lines.scm: Ditto.
* examples/nine-patch.scm: Ditto.
* examples/sprite.scm: Ditto.
* examples/text.scm: Ditto.
* examples/tiled.scm: Ditto.
* doc/api.texi (Kernel): Update.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api.texi | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/doc/api.texi b/doc/api.texi index df68889..8254b13 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -8,16 +8,16 @@ @node Kernel @section Kernel -At the very core of Chickadee, in the @code{(chickadee)} module, lies -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} and -@code{abort-game} procedures are the entry and exit points to the -Chickadee game loop kernel. +At the very core of Chickadee, in the @code{(chickadee game-loop)} +module, lies 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*} and @code{abort-game} procedures are the entry +and exit points to the Chickadee game loop kernel. On its own, the kernel does not do very much at all. In order to actually respond to input events, update game state, or render output, @@ -79,10 +79,9 @@ Stop the currently running Chickadee game loop. 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)} module: -@code{run-game/sdl}. +this purpose in the @code{(chickadee)} module: @code{run-game}. -@deffn {Procedure} run-game/sdl [#:window-title "Chickadee!"] @ +@deffn {Procedure} run-game [#:window-title "Chickadee!"] @ [#:window-width 640] [#:window-height 480] @ [#:window-fullscreen? @code{#f}] [#:update-hz 60] @ [#:load] [#:update] [#:draw] [#:quit] @ @@ -91,7 +90,7 @@ this purpose in the @code{(chickadee sdl)} module: [#:controller-add] [#:controller-remove] [#:controller-press] @ [#:controller-release] [#:controller-move] [#:error] -Run the Chickadee game loop using the SDL engine. +Run the Chickadee game loop using the SDL engine in OpenGL mode. A new graphical window will be opened with @var{window-width} x @var{window-height} as its dimensions, @var{window-title} as its |