iiYO Community

Full Version: Ideas For Features And Improvements
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3

Guest

@friar_tuck This is not possible with the engine right now. Personally, I think it would just be distracting from the visual novel to be honest, but if anyone implements this, I'm not against integrating it into the engine officially.
Would love to have a composite images feature.

Maybe something like:

Code:
       <imagepack name="alice" x="300px" y="0" z="10" xAnchor="50%">
           <image src="assets/images/alice/base.png" name="base" />
           <image src="assets/images/alice/happy.png" name="happy" />
            <image src="assets/images/alice/sad.png" name="sad" />
       </imagepack>

Where base.png is Alice's sprite with no expression, and happy.png is just Alice's happy face. Setting "alice" to "happy" would post a composite image of base.png and happy.pny together.

I typically do that in my downloadable VNs to save space, but this would also decrease loading time quite a bit, I imagine.
Hi sake-bento!

Welcome to the forums and sorry for the signup trouble last time with the old forum software.

I remember someone requesting something similar and I agree that it'll be worthwile to add this feature. I'll think about how I could improve the imagepacks. I already have a vague idea for how that could work. I suppose I'll add a new kind of imagepack (maybe "composite"?) so that we can keep backwards compatibility with older games.

My idea would use some kind of "tags" instead of names for the images. Each image could have one or more tags and you could activate tags on the imagepack separately. The imagepack/composite would show all the images associated with the active tags. There should also be an attribute to specify a "layer" on each image, starting at 0 for the base and the highest layer number for the images on top. Maybe the layer could be implied by the order of the images in the composite asset definition. I guess a command for dropping all the tags at once would be good, too, so that you don't have to keep track of which tags are active.

Would this do what you want?
That sounds really handy! And preserving backwards compatibility is a bonus, since I do have some older stuff that doesn't use the composite sprites.
Hi sake-bento,

I implemented the new composite asset today. Please test it using the most recent WebStoryEngine.js file from GitHub here:
https://raw.githubusercontent.com/iiyo/W...yEngine.js

You can see an example of how to use the new asset here:
https://github.com/iiyo/WebStory-Engine/...s/game.xml

If it works as expected, I can draft a new release to make it official. Smile
Just a quick heads up that it's now possible to use a simplified language for the stories which compiles to the usual XML. You can take a look at it here:
https://github.com/iiyo/WebStory-Engine/...p/game.xml

Lines (not the line command) that start with a hash are simplified XML. The first word after the hash is the element name, followed optionally by a comma-separated list of attributes. The biggest difference to XML being that you don't have to write any extra syntax:


Code:
# show asset jack, duration 200


This translates to:


Code:
<show asset="jack" duration="200" />


But you can even shorten that some more, because there's some special syntax for the asset= and duration= attributes, which are used quite often:


Code:
# show @jack, :200


This translates to the same as the other "hash command" above!

If you need to use commas in an attribute value (e.g. for the composite tags), you can quote it:

Code:
# tag @jack, add "smile, sunglasses", remove "frown, fist"

But probably even more useful is that you can now write line commands like this:


Code:
(( j: Hello, this is Jack speaking. ))

Hope some of you will find this useful. And yes, this doesn't mean you can't use the old syntax anymore (interesting for those of you who use the engine as some kind of library for another project, not to make games yourself). The old syntax still works like you'd expect it to.
Pages: 1 2 3