utodev / pcdaad Goto Github PK
View Code? Open in Web Editor NEWA DAAD adventure writer engine interpreter for PC/MSDOS in VGA 256 colours mode
License: MIT License
A DAAD adventure writer engine interpreter for PC/MSDOS in VGA 256 colours mode
License: MIT License
Probando con el PCDAAD y el JDAAD incluidos en el último DAAD-Ready 8 me encontré una cosa curiosa. Llevaba un objeto contenedor, una caja, y otro par de objetos normales, un libro y una pistola. Tenía programada una acción METER TODO en CAJA en la cual, efectivamente, metía el libro y la pistola en la caja y... después metía la caja en la caja, con lo que ésta desaparecía del juego a efectos prácticos (se la llevaba a su localidad asignada) 0_0!!
Lo más fino que he tenido tiempo de atinar es que parece ser que el DOALL de PCDAAD y JDAAD no ejecuta la parte del paso 2 de la descripción de DOALL del manual que dice lo de: "If Noun(Adjective)1 matches Noun(Adjective)2 then a return is made to step 1. This implements the "Verb ALL EXCEPT object" facility of the parser."
On the ZX Spectrum target I have this code
GOTO 25
RESTART
The text scrolls up the screen and the description is printed below, however PCDAAD starts to print the description text over the top of the existing text. I need to force a CLS to make it readable
GOTO 25
CLS
RESTART
Pequeñas diferencias de comportamiento de DOALL en PCDAAD 1.2 (Mislata, el último que me pasate, vamos) respecto de los intérpretes originales:
DAAD clásico no permite anidar DOALLs e interrumpirá inmediatamente el juego con un Runtime error 4 tal y como avisa el manual.
PCDAAD sí que lo permite, lo cual puede considerarse incorrecto o interesante según se mire. En manos cuidadosas permitiría hacer cosas que el original no podría. Ahora bien:
Consideremos 2 DOALL anidados, llamémosles PADRE e HIJO:
Si HIJO está en el mismo proceso que PADRE al interrumpirse HIJO (o bien simplemente completarse por primera vez) se interrumpirá también PADRE tanto si le tocaba como si no.
Ésto no sucederá, sin embargo, si HIJO está en un proceso distinto de PADRE, es decir, dentro del DOALL PADRE se llama a otro proceso y el DOALL HIJO está dentro de éste. En ese caso PADRE e HIJO completarían sus respectivas iteraciones anidadas como cabría esperar.
Pero...
Ahora ya independientemente de que haya anidaciones o no.
DOALL en PCDAAD funciona parentemente bien para ejecutar acciones COGER y DEJAR normalitas, como en las plantillas base, pero si el autor pretende crear una propia puede pasar algo raro.
Pongamos que ponemos un verbo XYZZY en el vocabulario y en PRO 5 hacemos que XYZZY invoque un sencillo DOALL que emita un mensaje por cada objeto presente (HERE), tal que así:
XYZZY _ DOALL HERE
MESSAGE "Objeto HERE: _"
Si hay objetos presentes en la localidad no se percibirá ninguna anomalía, pero si no los hubiera el DOALL se ejecutará con el último objeto sobre el que se haya realizado alguna acción, aunque sea un simple EX, o, en su defecto, con el primer objeto de la lista de objetos en lugar de salir con un "No puedes hacer eso" que es lo que haría el original.
En el fichero de ejemplo enlazado hay varios objetos en la localidad al sur de la de inicio. XYZZY realizará un DOALL HERE en PRO 5 y llamará a PRO 8 donde intentará un DOALL CARRIED.
Se pueden hacer pruebas comentando y/o descomentando la llamada a PRO 8, haciendo XYZZYs en la localidad donde están los objetos o en las que no, llevando o no llevando cosas, y comparar con cualquiera de los intérpretes clásicos:
https://drive.google.com/file/d/1eF5feignqlGEPK_HgXp4bU6fE_1FfVdd/view?usp=sharing
Prueba a compilar y ejecutar con DAAD Ready para MSDOS (usando PCDAAD 1.2) y nada más empezar teclea algo como EX GAFAS (las gafas no están ahí y te dirá que no, hasta ahí normal) e inmediatamente después un XYZZY. Luego ve al sur, donde están todos los objetos y prueba XYZZY otra vez. Muy curioso todo :-)
When a carriage return happens and next char is a space, it is not skipped.
If I type for example, GET HAT and I already have the hat SYSMESS 25 is used, but there is an extra space between the message and the referenced object which doesn't appear in the other interpreters.
You already have the hat
instead of
You already have the hat
Hi.
I declare my object's names with prepotitions: 'A thing', 'An object', etc.
Some system messages erases the prepotiion but the add an extra space, so a system message like 'Mesg _' shows 'Mesg object' (with two spaces).
I think this is a mistake because (1) if I remove te space in the system message (like 'Mesg_'), I obtain an input like 'MsgObject' without any space and (2) I tested it with other interprete (Spectrum tape) and spaces are fine.
Thank you.
Despite these issues, this interpreter is a great tool and I'm enjoying using it.
Hi.
Line 931 (in _REMOVE condact) in condacts.pas file is:
if (getFlag(FPLAYER)>= getFlag(FOBJECTS_CONVEYABLE)) then
Should first flag be FCARRIED instead of FPLAYER?
My point is FPLAYER is the LOC of the player (flag 38 in flags.pas) I see no reason to compare LOC of the player with number of objects conveyable at the time to remove an item.
Thank you in advance.
When running in automatic mode (-I parameter) same random things happen at same moment. Check the Turbo Pascal random number generator and look it there is a better option.
SAY HOLA END
When the END condact is triggered the game asks if you wish to play again, pressing Y and Enter causes the game to close.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.