Skip to content
Vulpen-StudioPublic

About

Learning operating system for kids. Slideshow-based environment for exploring math, images, reading, and writing through self-organized datasets.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

126 Commits

Folders and files

Repository files navigation

Turtle-OS

A slideshow for children to learn by. You sort pictures by topic into folders, and Turtle-OS shows them one at a time, each zooming out from close up, with its topic's name written underneath for the child to learn the word, in a new order each time it starts. The right and left arrow keys turn to the next and the previous picture.

Turtle-OS is a Vulpen project. Vulpen stays a repository of its own, and nothing of Turtle-OS goes into it.

Important

Turtle-OS runs by itself, in a window of its own, but it needs Vulpen-GPU. Vulpen builds and runs it, so ./run.sh needs a checkout of Vulpen-GPU beside this repository, as ../Vulpen-GPU. Without one, it stops and says how to clone it.

Path Holds
turtle-os/ the slideshow: a Vulpen view (view.vlp) and a folder for each of its nodes
data/ the pictures, sorted by topic: 59 animals, eight example pictures, and how to add your own
run.sh builds Vulpen and Turtle-OS, then runs Turtle-OS
todo.md what it lacks, and what could come next
docs/architecture/ the principles it is built by

Run

  1. Install what Vulpen needs, as its prerequisites list: above all a GPU and driver with Vulkan 1.1 or newer, descriptor indexing and buffer device address.

  2. Clone Turtle-OS, and Vulpen-GPU beside it on Vulpen's dev branch, which Turtle-OS is built and checked on:

    git clone https://github.com/Vulpen-Studio/Turtle-OS.git
    git clone -b dev https://github.com/Vulpen-Studio/Vulpen-GPU.git
    

    so the two sit side by side:

    ├── Turtle-OS/
    └── Vulpen-GPU/
    
  3. Run it from Turtle-OS' folder (cd Turtle-OS):

    ./run.sh                          # builds Vulpen and Turtle-OS, then opens Turtle-OS in a window
    ./run.sh --release                # the same, optimized
    ./run.sh --ide                    # inside Vulpen's ide, with its editor, graph and terminal
    VULPEN=~/src/Vulpen-GPU ./run.sh  # with Vulpen elsewhere
    

    The first run builds Vulpen, which takes a few minutes; later runs start in seconds.

Point it to your pictures

Turtle-OS shows every PNG, JPEG, BMP, TGA or GIF in a folder named images/, at any depth inside its picture folder. Sort the pictures by topic, each topic's in an images/ folder of its own:

data/
└── biology/
    └── animals/
        ├── birds/
        │   └── blue_tit/
        │       ├── name.txt          the topic's name, which it does not show yet (todo.md)
        │       └── images/
        │           ├── example-blue-tit-in-blossom.jpg
        │           └── example-blue-tit-on-a-twig.jpg
        └── mammals/
            ├── elephant/
            │   └── images/
            └── fox/
                └── images/

A clone comes with 59 animal topics and eight example pictures, of the fox, the elephant, the blue tit and the turtle, so the first run shows pictures. data/README.md says how to add an animal, and where each example comes from. Git keeps the pictures you add out of the repository.

The picture folder is the folder param of the slides node, in turtle-os/view.vlp:

[node "slides"]
param = folder=../data

A relative folder counts from turtle-os/, where view.vlp is, so ../data is this repository's own data/. To show pictures kept somewhere else, change that one line:

Your pictures are in The line
this repository's data/ (the default) param = folder=../data
a data/ folder beside this repository, next to Vulpen-GPU/ param = folder=../../data
a folder of your own param = folder=/home/you/Pictures/turtle
a USB stick param = folder=/media/you/TURTLE/pictures
one topic only param = folder=../../data/biology/animals/mammals/fox

The folder may also be a topic's images/ folder itself. Save view.vlp while Turtle-OS runs and it looks in the new folder at once. If it finds no pictures, its log says where it looked.

Inside the ide (./run.sh --ide), a line in its terminal does the same, and view save keeps it:

turtle-os: param set slides folder /home/you/Pictures/turtle
turtle-os: view save

A line's words hold no blanks, so a folder whose path has one, as My Pictures, goes into view.vlp itself, where the whole line counts.

Use it

Do How
The next picture → (right arrow)
The picture before ← (left arrow)
Fill the screen with the pointer hidden, and back F11
Quit Escape, or the window's close button

Inside the ide, Escape and F11 stay the ide's: Escape leaves its perform mode. Every press is a command, so the ide's terminal or a script can turn the pictures too: turtle-os: slides next, turtle-os: slides previous.

The other params in view.vlp, each changed the same way:

Node Param What it does
slides language the language of the name written under each picture, by its code in the topics' name.txt: EN, the default, or NL (every Dutch name but pinguïn). SK and PT names show once Vulpen's font draws their letters (request); until then a name it cannot draw shows no band, and the log names it
slides seed random shuffles the pictures anew each run, and the log names the seed it drew; a whole number, as seed=7, shows them in the same order every run
controls fullscreen yes starts filling the screen with the pointer hidden, as the OpenGL ES Turtle-OS always started; no, the default, starts in a window (why)
screen zoom_from, zoom_to, zoom_half_life each picture starts zoom_from times the window's size (7.5), and shrinks toward zoom_to (1.05, its edges just past the window's), half the way left every zoom_half_life seconds (0.57)
caption text_height the name's letters' height, line and all, as a share of the window's height (0.1)
font face, height the typeface, Andika, made for children learning to read, and the pixels its letters are drawn at before they are scaled to the window (160)

The band's and the letters' colors are panel and text in turtle-os/palette/theme.ini: red, green and blue, and for the band an alpha, which makes it see-through.

How it is built

The model, the view and the controller are separate nodes (T02), which meet only through view.vlp's connections and through commands:

Part Node What it reads and changes
Model slides lists the pictures in the images/ folders under its folder, shuffles them by its seed, keeps which one is shown and decodes it into its picture, and reads each topic's name in its language from the topic's name.txt; changes only by its params and its commands, slides next and slides previous
View screen draws the picture slides shows over the window, zoomed from when slides showed it, which contracts/Shown.h hands it
View caption writes the name slides shows, centered on a see-through band across the window's bottom, for the rects and glyphs parts to draw
Controller controls reads the keys, and sends the lines a person could type: slides next, slides previous, quit, window fullscreen on

font, palette, rects and glyphs are Vulpen's library parts, dropped in by recipe drop: copies of their own, which Turtle-OS may change (V03). font bakes Andika, under the SIL Open Font License (Andika-OFL.txt), where Vulpen's bakes Roboto Mono, and palette's theme makes the band see-through.

turtle-os/shared/Picture.h is a copy of Vulpen's own, which decodes a picture with stb_image, and keeps Vulpen's license, the Mozilla Public License 2.0.

What changed from the OpenGL ES version

Turtle-OS was an OpenGL ES 2.0 program of its own, with C++17, GLFW and a Makefile, last at commit dc22ee7 in this repository's history (git checkout dc22ee7 shows it). The repository has one branch, main, which holds Turtle-OS on Vulpen. On Vulpen it does the same as before, with these differences:

  • It needs Vulkan. Vulpen needs a GPU and driver with Vulkan 1.1 or newer, descriptor indexing and buffer device address. The Pinebook Pro the OpenGL ES version ran on has no Vulkan driver for its Mali-T860, so Turtle-OS no longer runs there.
  • It opens in a window. F11, or fullscreen=yes, fills the screen, as the OpenGL ES version always did.
  • Where it looks. The OpenGL ES version looked in data/ under the folder it was started from. This one counts a relative folder from view.vlp's folder, so it finds the same pictures wherever it is started from, and folder points anywhere.
  • What it shows. PNG, JPEG, BMP, TGA and GIF: what it decodes. The OpenGL ES version also listed WebP files, which it never decoded, and showed 1000 pictures at most; this one shows them all.
  • The zoom eases by the second, where the OpenGL ES version eased by the frame, so it looks the same on a fast screen and a slow one; its numbers are the OpenGL ES version's at 60 frames a second.
  • Escape quits a run of its own; inside the ide, it is the ide's.
  • The name under the picture. Each topic's name.txt is written under its pictures, in the language language names. The OpenGL ES version never showed it.

About

Learning operating system for kids. Slideshow-based environment for exploring math, images, reading, and writing through self-organized datasets.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages