We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm sort of still a noob in programing and I just want to create a story that depends on some simple choices. In Lazarus there was a: "process nameoftheprocess;" thingy which saved the lines of codes that I put in so I could refer to them later if I choos so. Now I can't really find that in Processing. Which command should I use and how? Also, is there a better a better way of creating story branches?
Answers
Hello,
Well, this is a broad question - or a bit vague.
Functions
Do you mean functions?
You can write a function which is a separate section of code lines with a name you can define. You call this by its name.
See
https://github.com/Kango/Processing-snippets/wiki/programming-and-functions
https://forum.processing.org/two/discussion/comment/102915/#Comment_102915
Do you mean IF
A branch in programming is done with
if
.See reference for this:
https://www.processing.org/reference/if.html
Do you mean a Text Adventure
When you mean story branch, do you mean what your sketch / program does OR do you mean a story like in a RPG [Role Play Game] / Text Adventure where a player can choose if "he goes south or west" et cetera? I can show you an example of how to do this. Here is the idea that you hold the story and branches in separate data and the program just reads this text file and can interpret it. This makes the program slim and lean. There are even editors to edit the story lines of those games.
see: https://forum.processing.org/two/discussion/comment/80542/#Comment_80542
Please ask more if you need more.
Best, Chrisir ;-)
Thanks for the answers :D This really helped me out :3
Great!