I have looked over Raconteur and vorple but they both seem to complicate things in ways I am not understanding. And I fear they may limit what I am trying to build. (probably not vorple but still)
I have two questions that are currently pressing that I haven’t been able to solve right now…
How do I create health bars or energy meters and things like that? (I am willing to guess it involves that css thing)
- Yes it involves progress bars. Undum already has all the CSS for these, but I guess you need to show a bar in a quality block, for a quality.
Look at QualityDefinition docs. You can write the title parameter like this (see #ui_library block in HTML):
<span class="name" data-attr="name">Quality Name</span>
<span class="value" data-attr="value">24</span>
<div class="progress_bar_color" data-attr="width" style="width:24%">
<span class="left_label" data-attr="left_label">Left Label</span>
<span class="right_label" data-attr="right_label">Right Label</span>
There are other ways to do that but this is most Undum-like. And yes, this is 100% real web development.
- No, there is no HTML API for that.
Thankyou SOOO much for that progress bar thing! that will really improve what I am planning.
I already have built an extra function that cleans up previous links after switching ACTIONS. That way I can more cleanly progress the story without swaping situations as often. Thus saving the special headings for scene swaps. Also added in a name prompt that works even though loading a saved game.
I even have created a new sort of choice offer system.
The more I code this the LESS like vanilla undum it looks. At this rate I am actually building a game engine over the top of undum rather than a simple undum story.
I do have ONE question currently though… Why are the sandbox objects used to store data when it seems global objects and variables would do the same thing? Err… let me be more specific. I can either character.sandbox.door3locked=false OR door3locked=false. Is there a reason the sandbox is superior to this way? (I realize the scope idea and that it lets other parts of the window see the carried over objects when called *I think, but other than the character panel what other parts would care about the sandbox objects?)
Saving and loading. Undum doesn’t save any visited actions but saves sandbox objects by default.
Well… that certainly would do it. I can that that into consideration while coding as well.
My code has begun to get massive and things are getting harder and harder to find. I do my best to keep it “object oriented” I believe is the term for it.
But that also makes jumping down to build a new global function and then searching for where I WAS to use the function a painful experience.
As for remembering where I’m working: if I leave off in a particular spot between sessions, I usually leave a comment like this: “***CAROLYN CONTINUE HERE” and then I search for *** when I start my next session. Or, if I feel strongly enough about Definitely Starting There, I leave it uncommented to break the code so I can’t continue anywhere else.
I work in my OO-oriented fork called Salet; the Gulpfile is constructed to allow splitting the game into smaller chunks however I need; you can construct such thing (gulp + gulp-concat) for a regular Undum project. No other tips, sorry.