A PHP script to generate and integrate custom puzzles for the game Kolotoc, a "Wheel of Fortune"-inspired game released on December 24, 2024.
This repository provides the script used to create a binary file (kolo2.bin
) that organizes puzzles into categories. The binary file can then be integrated into the game to add your own personalized content.
Caution
Maximum size of the kolo2.bin is 9851 bytes on a clean CPC6128. If you have ROM installed, the max size is himem()-32768
-
Text cleaning and formatting:
- Removes accents and special characters.
- Converts text to uppercase for consistency.
-
Binary file generation:
- Converts categorized puzzles from text files into a compact binary format optimized for Kolotoc.
-
Optional header file generation:
- Creates
.h
files for use in C projects (for advanced users).
- Creates
The generated binary file follows a specific structure:
- Signature: 3 bytes (
KWF
) to identify the format. - Number of categories: 1 byte.
- Category metadata:
- Title positions.
- Starting points and lengths of puzzle lists.
- Puzzle list:
- Positions and text of each puzzle.
- PHP installed on your system.
-
Prepare text files:
- Each file represents a category.
- Write one puzzle per line.
-
Run the script: Use the following command in your terminal:
php compile.php <folder>