LetterBox 2

A simple kids game for Android. You have to find the correct first letter of the spelling of the animal shown.

Active Pure Nim score 65/100 · last commit 2026-09-04 · 1 stars · tests present · no docs generated

Summary

Latest Version Unknown
License Unknown
CI Status Failing
Stars 1
Forks 0
Open Issues 0
Last Commit 2026-09-04
Downloads 0
Last Indexed 2026-09-06 06:05

Installation

nimble install LetterBox 2
choosenim install LetterBox 2
git clone https://gitlab.com/eclabs2/letterbox

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
LetterBox 2 - - - - - - - - -

Source

Repository https://gitlab.com/eclabs2/letterbox
Homepage https://gitlab.com/eclabs2/letterbox
Registry Source gitlab

README

LetterBox 2

LetterBox 2 is a simple Android game that helps children learn initial letters. The app shows an animal or object, and the child chooses the first letter of its localized name from three options. Visual feedback, sound effects, and spoken names reinforce the answer.

Features

  • Animal-to-letter matching with three randomized answer choices.
  • Localized vocabulary and pronunciation for:
  • English
  • German
  • French
  • Spanish
  • Italian
  • Korean
  • Japanese
  • Polish
  • Brazilian Portuguese
  • Spoken animal or object names after a correct answer and when the image is tapped.
  • Separate positive and negative answer sounds; incorrect feedback is played at reduced volume.
  • Per-language letter selection with presets for all letters, the ten most frequent letters, or only the first alphabet entry.
  • Optional progress saving for each language and letter.
  • Mastered letters occur less often in the randomized letter queue.
  • Progress badges in the letter-selection dialog; a badge turns green when its letter reaches the mastery threshold.
  • Localized menu, dialog, and letter-selection controls.
  • Full-screen responsive letter selection:
  • Portrait places presets above the letter grid.
  • Landscape places presets to the left and keeps the grid to a maximum of four rows.

How It Works

Active game mode

AnimalsOnTop.kt displays an animal or object above three letter buttons. The displayed item is selected only from the letters enabled for the current language. Incorrect choices come from the complete alphabet for that language, so the game still works when only one or two letters are enabled.

A correct answer plays the positive feedback sound followed by the localized name. A wrong answer plays only the negative feedback sound and repeats the same item in the next round with newly randomized incorrect choices. Tapping the image speaks its localized name at any time.

Languages and vocabulary

LanguageProvider.kt defines the supported languages and maps every available drawable to its localized initial and name:

data class AnimalEntry(
    val drawable: Int,
    val translations: Map<AppLanguage, Pair<Char, String>>
)

The available alphabet is derived from the localized vocabulary. Japanese therefore uses Hiragana initials and Korean uses Hangul consonant initials instead of forcing Latin A–Z.

The selected language also controls Android string resources, so menus and dialogs use the same language as the game rather than the device locale.

Letter selection

The hamburger menu opens a full-screen letter-selection dialog. Selections are stored separately for every language. The dialog provides:

  • All — enables every available initial.
  • Top 10 — enables the configured frequent initials that exist in the current vocabulary.
  • Only A — enables the first available alphabet entry; for Japanese and Korean this is the first native-script entry rather than Latin A.

In portrait orientation the presets appear above the grid. In landscape they appear on the left. Landscape uses at least seven columns and adds columns when required to keep the grid within four rows.

Progress and mastery

Progress saving is optional and can be toggled from the hamburger menu. When enabled:

  • Progress is stored separately for every language and letter.
  • Only a correct answer on the first attempt increases the count.
  • A wrong first attempt resets that letter's consecutive-success count.
  • A later correct answer after a retry does not count as a first-attempt success.
  • Non-zero counts appear as badges in the letter-selection dialog.
  • Badges turn green after reaching the mastery threshold.

The threshold is configured in AnimalsOnTop.kt:

const val PROGRESS_THRESHOLD = 3

Letters below the threshold appear twice in each randomized queue. Mastered letters appear once, making practiced letters less frequent without removing them completely.

Sounds

  • yes.ogg — played after a correct answer.
  • no.ogg — played after an incorrect answer at reduced volume.
  • {drawable}_{language}.mp3 — localized animal or object pronunciation, for example hedgehog_en.mp3 or eagle_owl_pt_br.mp3.

Sounds are loaded and played through SoundPool.

Other activities

  • MainActivity (MainActivity.kt) — legacy letter-to-animal mode. It currently redirects to AnimalsOnTop.
  • LettersOnTop (LettersOnTop.kt) — fullscreen activity template that is not part of the active game flow.

Tech Stack

  • Language: Kotlin
  • Build: Gradle 8.7, Android Gradle Plugin 8.2.0
  • Java/Kotlin target: 17
  • Min SDK: 21 (Android 5.0)
  • Target SDK: 34 (Android 14)
  • UI: AndroidX AppCompat, ConstraintLayout
  • Persistence: Android SharedPreferences
  • Audio: Android SoundPool
  • Images: PNG resources generated from SVG sources with rsvg-convert
  • License: GPL-3.0

Project Structure

letterbox/
├── app/
│   ├── build.gradle
│   └── src/main/
│       ├── AndroidManifest.xml
│       ├── java/de/z11/letterbox2/
│       │   ├── MainActivity.kt
│       │   ├── AnimalsOnTop.kt          # Active game, menus, progress, audio
│       │   ├── LanguageProvider.kt       # Languages and localized vocabulary
│       │   ├── LettersOnTop.kt
│       │   └── Utils.kt
│       └── res/
│           ├── drawable/                 # Runtime image resources
│           ├── drawable/src/             # Original SVG sources and licenses
│           ├── layout/                    # Portrait/default layouts
│           ├── layout-land/               # Landscape letter-selection layout
│           ├── raw/                       # Feedback and pronunciation audio
│           ├── values/                    # Default strings, colors, and styles
│           └── values-*/                  # Localized string resources
├── dev/                                   # Resource and consistency scripts
├── fastlane/                              # F-Droid metadata
├── build.gradle
├── settings.gradle
├── Makefile
└── LICENSE

Building

Prerequisites

  • Android SDK with platform 34 and build-tools 34.0.0
  • JDK 17+
  • rsvg-convert only when regenerating images from SVG files

Build the APK

./gradlew assembleDebug

Output: app/build/outputs/apk/debug/app-debug.apk

Check letter resources

python3 dev/check_letters.py

Regenerate images from SVGs

make

This converts SVG files in app/src/main/res/drawable/src/ to PNG resources in app/src/main/res/drawable/.

Deployment

Fastlane is configured for F-Droid. Metadata lives in fastlane/metadata/android/en-US/.

License

GPL-3.0 — see LICENSE.

Animal images are from Pixabay and other sources documented in app/src/main/res/drawable/src/LICENSE.