From 8953f3f68ce6d3ac4f52a4615ba5332ba91e86ba Mon Sep 17 00:00:00 2001 From: deadvey Date: Fri, 15 May 2026 19:31:39 +0100 Subject: [PATCH] Added a --- README.md | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++++- report.odt | Bin 15538 -> 15536 bytes 2 files changed, 192 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b218cdf..ab94fb2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,192 @@ -# Happening -Software for making interactive stories
-Under development +# HAPPENING +An interactive story telling software.
+ +## Install +This is not really out of development, but to run it, clone the repo, go into /server/ and use cargo run story.zip to run a file called story.zip that's in the /stories/ directory. + +## Technical Details + +### Back-end server -- Rust + +The server component of Happening will be written in Rust.
+Parses the code and sends it via the API.
+File layout:
+- animations/ +- features/ +- scenes/ +- images/ +- stories/ + - file.zip + - main.ha + - other.ha + - characters.json + - about.json + - animations/ + - features/ + - scenes/ + - images/ + +The variables are stored as a hashmap, characters are objects.
+ +### API + +Using the network interface, port 20264.
+ +Characters are sent to the frontend and stored there when the character is created on the frontend.
+``` +{ + +request_type: String, + +content: String, + +character: String, + +} +``` +### Frontend -- Python + +Things the frontend can do:
+ +- Output text +- Display the character +- Move characters around +- Display a choice to the user that gets sent back to the server + +### Syntax + +#### Setup + +This is done in the about.json file, +``` +{ + +"title": "My Great Story", + +"description": "please read!" + +} +``` +#### Characters +Referencing a character using the @, @NARRATOR is reserved for the Narrator.
+Customisation is done with @CHARACTER change \ into \
+ +attributes:
+ +- gender +- skin_color +- name +- eye_color +- pronoun_subject +- pronoun_object +- pronoun_deppos +- pronoun_indpos +- pronoun_reflex +- animation +- head +- hair +- torso +- arm +- leg +- hair_color +- top_clothing +- bottom_clothing +- shoes + +#### Outputs +``` +@CHARACTER says "this string +is multi-line +and ends with a" +``` +#### Variables + +Variables are referenced with the \$, only integers will be supported.
+ +#### Selection + +Condition based: +``` +if (condition) { + +} + +elif (condition) { + +} + +else + +} +``` +Choice based: +``` +choice "choice 1" { + +} + +or "choice 2" { + +} + +or "choice 3" { + +} +``` +#### Positioning +``` +@CHARACTER to position + +PAN to position +``` +#### Other +``` +label: + +GOTO label +``` +#### Ending +`END` to exit out of the story + +## Implemented stuff +### Commands +| Command | Implemented | +|-----------------|-------------| +| END | Yes | +| CHOICE/OR/OR | Yes | +| IF/ELSE IF/ELSE | No | +| GOTO | No | +| PAN | No | +### Character sub-commands +| Character Command | Implemented | +|-------------------|-------------| +| SAYS | Yes | +| CHANGE | Yes | +| TO | No | +| ANIMATE | No | +### Other Features +| Feature | Implemented | +| ------- | ----------- | +| Variables | No | +## Error codes + +| | | | +|---------|---------------------------------------------|-----------------------------------------------------------------------------------------| +| Code ID | Meaning | Possible remedies | +| 0 | Success | N/A | +| 1 | File unexpectedly reached termination point | Make sure there is an END statement in the code. | +| 2 | Data to send Mutex was poisoned | | +| 3 | Characters Mutex was poisoned | | +| 4 | | | +| 5 | | | +| 6 | | | +| 7 | | | +| 8 | | | +| 9 | | | +| 10 | No filename specified for | When running the server, pass the name of the story zipfile as an argument. | +| 11 | Failed to open file | Make sure the story zipfile exists and is accessible to the server. | +| 12 | Failed to open archive | Make sure the story file is a zip archive. | +| 13 | Unable to setup the characters hashmap. | Make sure the characters.json file exists, is valid JSON and contains valid characters. | +| 14 | Unable to read the main story file. | Make sure the story.ha file exists and is readable. | +| 15 | | | + diff --git a/report.odt b/report.odt index a73a9ffab6edb50e45f9676c45f2e852535dcd23..4241a4a1266b30cde05f8b518bde19ba4679c500 100644 GIT binary patch delta 2401 zcmdl~xuKFLz?+#xgn@yBfnmp_i9Fs+J0?wx)M45&X=A$^57UlGo6qyuF@k7*zHkW; zouS6X#I$45WyS5M%)rmyaNd#;-m=FbaGj#YKCzIHNIQ$5=8>6X>?5mTF1|5(u^ zdE@AHE&ccFSW=HpO<(->acbtH+AvGId49{^FO$EgsCs<4xVZT7hnJ78?bxwrVyd_{ zxA}g1OG|6Ld;0JB-pB3U@Kf*bp=ba18=Q@NnU&an^xJy7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