On this page:
3.1 Page Kata (page-1)
3.2 Page Kata (page-2)
3.3 Page Kata (page-3)
3.4 Page Kata (page-4)
3.5 Page Kata (page-5)
3.6 Page Kata (page-6)
3.7 Page Kata (page-7)
3.8 Page Kata (page-8)

3 Page Katas

3.1 Page Kata (page-1)

read
Code a cutscene that has a page with an orange background.
code
#lang cutscene
 
(story-cutscene
  (page
   #:bg-color 'orange
   "The background"
   "is orange."))

3.2 Page Kata (page-2)

read
Code a cutscene that has a page with a blue border.
code
#lang cutscene
 
(story-cutscene
  (page
   #:border-color 'blue
   "The border"
   "is blue."))

3.3 Page Kata (page-3)

read
Code a cutscene that has a large space between the lines of text.
code
#lang cutscene
 
(story-cutscene
  (page
   #:line-padding 20
   "The space between"
   "the lines is larger."))

3.4 Page Kata (page-4)

Tip: The background options are: desert-bg, forest-bg, lava-bg, pink-bg, and snow-bg.
read
Code a cutscene that has an image as the background.
code
#lang cutscene
 
(story-cutscene
  (page
   #:bg forest-bg
   "This is a forest background."))

3.5 Page Kata (page-5)

Tip: The default page size is 800x600. The position (0,0) is the center of the page.
read
Code a cutscene that has a small page in the top left corner.
code
#lang cutscene
 
(story-cutscene
  (page
   #:width 200
   #:height 200
   #:relative-position (posn -300 -200)
   "This is a"
   "small page"
   "in the top"
   "left corner."))

3.6 Page Kata (page-6)

read
Code a cutscene that has 3 pages, each with their own duration.
code
#lang cutscene
 
(story-cutscene
  (page
   #:duration 3
   "This page will last 3 seconds.")
  (page
   #:duration 5
   "This one will last 5 seconds.")
  (page
   #:duration 10
   "This one will last 10 seconds!"))

3.7 Page Kata (page-7)

read
Code a cutscene that has 4 pages, each with text scrolling right, left, down, and right.
code
#lang cutscene
 
(story-cutscene
  (page
   #:mode 'scroll-right
   "text scrolling right -->")
  (page
   #:mode 'scroll-left
   "<-- text scrolling left")
  (page
   #:mode 'scroll-down
   "text scrolling down"
   "|"
   "v")
  (page
   #:mode 'scroll-up
   "^"
   "|"
   "text scrolling up"))

3.8 Page Kata (page-8)

Tip: mode also accepts a number (from 0 to 359) as the scrolling direction; 0 means scroll to the right.
read
Code a cutscene that has 4 pages, each with text scrolling to the four corners of the page.
code
#lang cutscene
 
(story-cutscene
  (page
   #:mode 'scroll-down-right
   "text scrolling to the bottom-right corner.")
  (page
   #:mode 'scroll-down-left
   "text scrolling to the bottom-left corner.")
  (page
   #:mode 'scroll-up-right
   "text scrolling to the top-right corner.")
  (page
   #:mode 'scroll-up-left
   "text scrolling to the top-left corner."))