![]() ![]() Leda was written in roughly 24 hours and coded in 48. And of course, I'm going to indulge my speech-making little starlet self who never was. In the spirit of sharing all the coding struggles and victories that go into making a Work of Interactive Fiction, I've uploaded the source code for Leda and the Swan. A vain, vestigial hope from when I initially started writing this.)! However, if you’re fine with all of that, then it’s OK to use >s in your StoryInit passage.Happy Source Code Amnesty Day ( It's still April 1st somewhere.I think. */ works in all sections of your code (passages, the JavaScript section, and the Stylesheet section), so I’d recommend using that markup for your comments.Īlso, using >s in the StoryInit passage means that you’re unnecessarily creating more passages, and that can eventually lead to slowing down the Twine editor if you have too many passages. There are a couple of ways to do comment block markup, but this particular markup /*. So your code might look something like this: /* Variable setup section - Start */ If you want to break your StoryInit into “chunks”, I’d recommend using comment blocks instead. That’s because the code would spread out over multiple passages, which makes it easy to overlook how one chunk of code might adversely affect another chunk of code and it makes it harder to debug. Since data on the setup object isn’t saved with the story variables when the player saves the game, it’s best to only use that setup object for static (unchanging) data and/or your own custom functions, since otherwise any changes would be lost when the player reloads a save and that setup data gets reset to the “default” values given in the “setup” sections.Īlso, while using > in your StoryInit passage will work, I personally don’t like it because it can make debugging more difficult. ![]() Otherwise, it doesn’t really matter where you put it, as long as it’s in one of the JavaScript, “ widget”, or StoryInit passages.īasically, yes. ![]() (*: Command line Twine compilers, such as Tweego, allow you to have multiple “ stylesheet” and/or “ script” sections.)Īll that means is that, if any of those sections need your data on the setup object, you’ll need to create that data either earlier in that same section or a section which is run earlier. Or, if neither of the above happen, then the starting passage will be run. Otherwise, if a save or an autosave is to be loaded, it will load that session and continue from there.Ĭ. If an existing session exists (such as if the player hit the “Reload” button in their browser) the play session is restored and the current passage is run.ī. Code in any “ widget” tagged passages is run.Ī. ![]()
0 Comments
Leave a Reply. |