| Crates.io | mrdirector |
| lib.rs | mrdirector |
| version | 0.2.0 |
| created_at | 2025-01-20 18:00:05.977483+00 |
| updated_at | 2025-03-24 19:22:11.73425+00 |
| description | A narrative game development package for the Turbo Game Engine. |
| homepage | |
| repository | https://github.com/jdcalvelli/mrdirector |
| max_upload_size | |
| id | 1524084 |
| size | 34,841 |
mrdirector is an extension package for the turbo game engine to help streamline the creation of games with branching narratives
warning: this project is in hyper omega alpha, so use at your own risk
current steps for integration:
create a scripts folder at the root of the turbo project directory
within the scripts folder, create a script.director file, within which the story will be written
add use mrdirector; to the top of your lib.rs
insure that your turbo init gamestate struct contains a property of type DirectorState
ensure that within the turbo::go! macro is the mrdirector::assess_current_line function
should now be ready to rock and roll!
<< [name] is the name of a passage>> [name] is a send to the passage of corresponding name]> [choice] denotes a choice, director can handle up to 4 choiceschoice texts that follow ]> are written out to text box
a set of choices choice must be followed by a set of sends on the next line, in the order that corresponds to the order of choices
e.g. line one: ]> choice one ]> choice two
e.g. line two: ]> first send ]> second send
choices can be crossed out by prepending a ~ in front of the text of the choice
]> ~text to be crossed outchoices that are displayed, but not actually available to the player, or are otherwise not intended to be selectable must send to the NULL send
e.g. ]> ~this choice shouldn't be clickable ]> this choice should be
e.g. >> NULL >> choice two send
[char]: [text] lines are statementscurrently, assumption is two characters, NOAH or MYLAN
char determines portrait display
text is written out to text boxes
! [cmd] / [arg] are command lines that execute more complicated actionscurrently implemented:
-- end denotes end of passageonce the script game hits an -- end block, the game ends
so all passages must send somewhere, or end the game
# starts a commentkeep in mind: the dsl is read at game runtime, so comments are not compiled out
this means that comments can, at present, affect execution time, so use them intentionally