Page 1 of 1

Side Image (and anomalous problem)

Posted: Fri Apr 02, 2010 10:32 am
by squark
I'm going to be concentrating on making it look nice for the demo build, so I was wondering; is it possible to assign multiple side images in any way - even if it's to do with some other instruction/command or even to the point of creating a new definition?
What I'd hope to do with this is to make my characters seem a little more alive by giving them expressive faces/emotions - happy, sad, annoyed, whatever - so as to add something nice but unneccessary. I realise there are other engines out there that will easily do this, but I'm getting nicely comfortable with Ren'Py right now.

Anomalous problem: The text isn't disappearing after a click - that is to say that when a new line is being displayed, the old one is faded behind it, eventually making the subsequent lines seem garbled. The only thing I can think of that I've done is changing the default font and size to something that more suits the mood of the game.

Re: Side Image (and anomalous problem)

Posted: Sat Apr 03, 2010 8:02 am
by chronoluminaire
What do you mean by assigning multiple side images?
You can use ShowingSwitch to make the side image for a character change based on what images are visible. That may be what you want.

Re: Side Image (and anomalous problem)

Posted: Sat Apr 03, 2010 12:13 pm
by squark
I meant to the same character. So let's say I have side images labelled per emotion. For example, in that picture that would probably end up being *name*laugh. What I'd want is in her next line of text, I'd want it to change back to a neutral expression.

Aside from that, can anyone help me with the text problem?

Re: Side Image (and anomalous problem)

Posted: Sat Apr 03, 2010 12:28 pm
by chronoluminaire
Ah, I suspect your text problem is caused because you don't have a full-screen image behind everything.
That background image isn't big enough. Ren'Py needs a solid (non-transparent) pixel at every point on the screen.

You have two options:
1) Edit all your background images such that they're sized to match your game's screen size, with solid black (not transparency) filling the gaps.
2) Change all your "scene" statements so that rather than "scene roof", you go "scene black" then "show roof".

This is a long-standing piece of incredibly confusing Ren'Py behaviour. I don't know why Ren'Py doesn't default to putting a solid black image behind everything, instead doing this pretend-black that doesn't clear properly, but that's the way it is.


For your side image, if you want her side image to change back to a neutral expression, are you going to have the main image shown above the text box also change to neutral? If so, a ShowingSwitch will do just what you want. If not, it'll be rather more fiddly. You may end up having to define two sets of images - one for the main visible sprite, and one set of images that just display "null" that the ShowingSwitch can check for.

Re: Side Image (and anomalous problem)

Posted: Sat Apr 03, 2010 1:59 pm
by squark
Ah thanks, you're a star ^^v
Perhaps this false black will be fixed in Ren'Py 7.
Hmmm... I'd hoped to just show the dialogue image. It may be more reaslistic to show the sprite as well, subject to change much later on.

Re: Side Image (and anomalous problem)

Posted: Sun Apr 04, 2010 12:05 am
by PyTom
chronoluminaire wrote: I don't know why Ren'Py doesn't default to putting a solid black image behind everything, instead doing this pretend-black that doesn't clear properly, but that's the way it is.
Speed.

Putting those black pixels on the screen would take time, and in most cases, that would be wasted time.

Re: Side Image (and anomalous problem)

Posted: Mon Apr 05, 2010 5:11 pm
by squark
Fixed. Now I can buckle down on the combat and inventory systems. Got the side image to display without the main sprite without much hassle ^^v

Re: Side Image (and anomalous problem)

Posted: Wed Apr 07, 2010 8:11 am
by Jake
PyTom wrote: Putting those black pixels on the screen would take time, and in most cases, that would be wasted time.
It would waste a few CPU cycles on one hand, and save dozens of amateur developers a trip to the forum to ask questions about an apparently bizarre problem on the other hand.

It would seem to me like it's worth doing, particularly since:

A) It's likely a negligible amount of time in the vast majority of cases even if you do always blank the framebuffer black before drawing anything, particularly since Ren'Py doesn't re-draw if nothing's changed, and once Ren'Py is running on OpenGL it'll be farmed off to the graphics cards in most cases anyway.

B) It could more than likely be optimized out in the vast majority of cases - for example, if someone has called 'scene someimage' where 'someimage' is known to not have an alpha channel (came from a JPEG) and is larger than the viewport and appropriately positioned (trivial to check).

Isn't Ren'Py supposed to make it easy for non-programmers to create VNs? If some people were worried about the performance overhead and sure they'd fixed leaky BGs in their VNs, you could even make the colour to blank to a configurable option and do nothing if the colour is alpha-0.

Re: Side Image (and anomalous problem)

Posted: Wed Apr 07, 2010 11:23 am
by duanemoody
PyTom wrote:
chronoluminaire wrote: I don't know why Ren'Py doesn't default to putting a solid black image behind everything, instead doing this pretend-black that doesn't clear properly, but that's the way it is.
Speed.

Putting those black pixels on the screen would take time, and in most cases, that would be wasted time.
If you wrote a browser using this sort of logic people would burn you in effigy.

Re: Side Image (and anomalous problem)

Posted: Sun Apr 11, 2010 6:07 pm
by squark
PyTom is NOT developing a browser, as far as I know. I understand the analogy, but it is vastly different to browser programming.