Repository navigation
Each game now lives in its own project folder. Games made with an earlier version need a small migration: see Migrating a game from an older version.
Cada juego va ahora en su propia carpeta de proyecto. Los juegos hechos con una versión anterior necesitan una pequeña migración: consulta Migrar un juego de una versión anterior.
English
Projects
- A game is a folder with a
cyd_project.ini(main file, target, paths and options). Create one withmake_adventure.py --new FOLDER [TARGET], or with New… in the GUI. make_adv.cmd/make_adv.shtake the project folder as an argument (on Windows you can drop the folder ontomake_adv.cmd), and the GUI opens projects and remembers the recent ones. CYD's own folder is no longer a game.- The output goes to the project's
OUTPUTfolder; intermediate files toOUTPUT/cyd_tmp(kept with--keep-temp) and the compressed images toOUTPUT/cyd_cache, so unchanged images are not compressed again. - The loading screen is
IMAGES/LOAD.screverywhere by default.
Language and compiler
INCLUDE LIB "file.cyd"includes a bundled library (or one from your library folders). A plainINCLUDElooks next to the file, then in the project root, then in the include folders. A library included twice is included once.- Search folders for each case:
-I/--include-path,--lib-path,--import-path(andinclude_paths,lib_paths,import_pathsincyd_project.ini). - Messages start with the place, relative to the project:
ERROR [PARSER] chapters/one.cyd:12:5: .... The VS Code highlighter 2.7.0 reads this format. - Strict colon mode now also requires the colon after text and after multi-line statements (before, only the first code block was checked).
- Native routines (
IMPORT/CALL,ASM) verified on all six targets, esxdos included. MENUKEY action, keychanges the menu keys andMENUJOY typeadds a Sinclair (port 1 or 2) or cursor joystick, which works at the same time as the keyboard. The settings live in the interpreter: they take no variables.- The menus no longer select with
M(useSPACE,ENTERor the key set withMENUKEY), and the Kempston fire button now also turns the page when a page pause waits. - Fixed: a file included twice was reported as a circular include;
-T,-t,-Cand-cinmake_adventure.pydidn't reach the compiler. - Fixed:
TYPERATEused its value with the two bytes swapped (TYPERATE 1waited 256 times longer than it should,TYPERATE 256almost nothing). Games that useTYPERATEwith a value from 1 to 255 now print much faster: multiply the value by 256 to keep the old speed. The compiler warns about them. - Fixed: with
-trim, a program that usedMINbut notMAX(or the other way round) did not compile, and-trimnever left out the code ofGETATTR. - Fixed on MLD (Dandanator): the cursor keys (CAPS SHIFT + 5 to 8) and SYMBOL SHIFT with a letter gave wrong codes, so the cursor keys did not move the menus.
- Fixed on Linux and macOS: images and tracks are found whatever the case of their names (
000.pt3,000.PT3), as on Windows. The music of thetestexample was left out without a word.
Documentation and tools
- The manuals and tutorials are now at https://cronomantic.github.io/ChooseYourDestiny/ (the wiki is retired), with the code highlighted.
- Manuals and tutorials reviewed against the compiler: examples that did not compile, wrong values and missing parts fixed; the tutorial now covers
DO … UNTIL. - The Windows package includes Python 3.15.2 (Tcl/Tk 9).
- The window icon of both GUIs (the compiler's and the Dandanator ROM builder's) is the new logo ("CYD" in the title bar, the whole logo in the taskbar), and on Windows the taskbar shows it instead of Python's.
examples/Delerictis now a small but complete adventure, with pictures of its ten locations, and a Controles screen that showsMENUKEYandMENUJOY.- New example
examples/menu_keys: redefine the menu keys and choose a joystick, explained step by step in the tutorial. - Fixed in the GUI: the progress bar of the text compression filled the log with one line for each step; now it moves forward on a single line, as in a terminal.
- New section of the manual, External tools: tools by other authors to make adventures with CYD and to play them. By Tranqui69, CYD Studio (a visual gamebook editor) and CYD Player (CYD games to play in the browser); by rtorralba, ZX Story Flow (a visual editor of choice-based adventures that exports to CYD).
- When the interpreter does not fit in its target, the error says how much the sound effects, the music player, the abbreviations, the character set and the rest take.
- New document for CYD developers,
doc/dev/VM.md: how the virtual machine runs the bytecode, and what each opcode does.
Español
Proyectos
- Un juego es una carpeta con un
cyd_project.ini(fichero principal, target, rutas y opciones). Se crea conmake_adventure.py --new CARPETA [TARGET], o con Nuevo… en la GUI. make_adv.cmd/make_adv.shreciben la carpeta del proyecto como argumento (en Windows puedes soltar la carpeta sobremake_adv.cmd), y la GUI abre proyectos y recuerda los recientes. La carpeta de CYD ya no es un juego.- La salida va a la carpeta
OUTPUTdel proyecto; los ficheros intermedios aOUTPUT/cyd_tmp(se conservan con--keep-temp) y las imágenes comprimidas aOUTPUT/cyd_cache, así que las imágenes que no cambian no se vuelven a comprimir. - La pantalla de carga es
IMAGES/LOAD.scren todas partes por defecto.
Lenguaje y compilador
INCLUDE LIB "fichero.cyd"incluye una librería de las que trae CYD (o de tus carpetas de librerías). UnINCLUDEnormal busca junto al fichero, después en la raíz del proyecto y después en las carpetas de include. Una librería incluida dos veces se incluye una sola vez.- Carpetas de búsqueda para cada caso:
-I/--include-path,--lib-path,--import-path(einclude_paths,lib_paths,import_pathsencyd_project.ini). - Los mensajes empiezan por el sitio, relativo al proyecto:
ERROR [PARSER] capitulos/uno.cyd:12:5: .... El resaltador de VS Code 2.7.0 lee este formato. - El modo estricto de dos puntos los exige también después de texto y de sentencias de varias líneas (antes solo se comprobaba el primer bloque de código).
- Rutinas nativas (
IMPORT/CALL,ASM) verificadas en los seis targets, esxdos incluido. MENUKEY accion, teclacambia las teclas de los menús yMENUJOY tipoañade un joystick Sinclair (puerto 1 o 2) o de cursor, que funciona a la vez que el teclado. La configuración vive en el intérprete: no ocupa variables.- Los menús ya no seleccionan con
M(se usaESPACIO,ENTERo la tecla puesta conMENUKEY), y el disparo del Kempston pasa también de página cuando hay una pausa de página. - Corregido: un fichero incluido dos veces se daba por include circular;
-T,-t,-Cy-cdemake_adventure.pyno llegaban al compilador. - Corregido:
TYPERATEusaba su valor con los dos bytes al revés (TYPERATE 1esperaba 256 veces más de la cuenta yTYPERATE 256casi nada). Los juegos que usanTYPERATEcon un valor de 1 a 255 imprimen ahora mucho más rápido: multiplica el valor por 256 para mantener la velocidad de antes. El compilador avisa de ellos. - Corregido: con
-trim, un programa que usabaMINpero noMAX(o al revés) no compilaba, y-trimnunca quitaba el código deGETATTR. - Corregido en MLD (Dandanator): las teclas de cursor (CAPS SHIFT + 5 a 8) y SYMBOL SHIFT con una letra daban códigos erróneos, así que las teclas de cursor no movían los menús.
- Corregido en Linux y macOS: las imágenes y las pistas se encuentran sin importar las mayúsculas de su nombre (
000.pt3,000.PT3), como en Windows. La música del ejemplotestse quedaba fuera sin avisar.
Documentación y herramientas
- Los manuales y tutoriales están ahora en https://cronomantic.github.io/ChooseYourDestiny/ (la wiki se retira), con el código coloreado.
- Manuales y tutoriales revisados contra el compilador: corregidos ejemplos que no compilaban, valores erróneos y partes que faltaban; el tutorial explica ya
DO … UNTIL. - El paquete de Windows incluye Python 3.15.2 (Tcl/Tk 9).
- El icono de la ventana de las dos GUI (la del compilador y la que genera la ROM del Dandanator) es el logo nuevo («CYD» en la barra de título, el logo entero en la barra de tareas), y en Windows la barra de tareas lo muestra en lugar del de Python.
examples/Delerictes ahora una aventura pequeña pero completa, con imágenes de sus diez localidades y una pantalla de Controles que enseñaMENUKEYyMENUJOY.- Ejemplo nuevo
examples/menu_keys: redefinir las teclas de los menús y elegir joystick, explicado paso a paso en el tutorial. - Corregido en la GUI: la barra de progreso de la compresión de texto llenaba el registro con una línea por cada paso; ahora avanza en una sola línea, como en una terminal.
- Sección nueva del manual, Herramientas externas: herramientas de otros autores para crear aventuras con CYD y para jugarlas. De Tranqui69, CYD Studio (un editor visual de librojuegos) y CYD Player (juegos de CYD para jugar en el navegador); de rtorralba, ZX Story Flow (un editor visual de aventuras por opciones que exporta a CYD).
- Cuando el intérprete no cabe en su target, el error dice cuánto ocupan los efectos de sonido, el reproductor de música, las abreviaturas, el juego de caracteres y el resto.
- Documento nuevo para quien desarrolle CYD,
doc/dev/VM.md: cómo ejecuta el bytecode la máquina virtual y qué hace cada opcode.
Full Changelog: v1.6.6...v1.7.0