Custom user interface

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#31 Post by DaFool »

monele, this little game is so insanely cute :D :D :D :D :D
Just polish it more, replace the copyrighted elements, and you got yourself a winner!

Also wondering, what the heck this has to do with U-Planet? Hehehe, anyway, awesome little project. Most of the stuff you're doing I have no clue how to implement.

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#32 Post by monele »

Eehh @_@... well technically this was supposed to be for PyTom only ^^;... especially when all sources and stuff are in there ^^;...
Eh... ah well... I'm glad you're positive about it though ^^ (*looks at "4 downloads"....* so much for a surprise...)

This has nothing to do with UP, obviously. It's just a side project I'm doing for when I'm fed up or not inspired by the main project. It's also a lot more game-ish so it's a nice change. This way I can be productive all the time.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#33 Post by PyTom »

Okay, tracked down this bug, and boy is it a doozy. Basically, the combination of RLE encoding (which I added for UP, so no good deed goes unpunished), the dissolve transition, and the scaling operation of the image on the next screen. The fact that it was occuring a screen or so after the dissolve made it that much more difficult to debug.

To put this in perspective, "monele" is now a shortcut in my debugger.

Anyway, a fix will be out in the next release of Ren'Py. I'll make the RLE optimization something that needs to be requested manually, as part of this.

Until then, the workaround is not to use im.Scale on the icons, but just prescale them.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#34 Post by monele »

the combination of RLE encoding (which I added for UP, so no good deed goes unpunished), the dissolve transition, and the scaling operation of the image on the next screen.
The Good, the Bad and the Brute ? o_o
To put this in perspective, "monele" is now a shortcut in my debugger.
^^;;;;... Why am I not feeling flattered ? ^^;
Anyway, a fix will be out in the next release of Ren'Py. I'll make the RLE optimization something that needs to be requested manually, as part of this.

Until then, the workaround is not to use im.Scale on the icons, but just prescale them.
Mmm, I see... So by RLE, you mean this new bilinear filtering algorithm ? :/... Sadness... But hey, the half-size buttons were not very readable anyway ^^;...

Sorry for giving you so much work :(

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

#35 Post by Watercolorheart »

PyTom wrote:"monele" is now a shortcut in my debugger.
(laugh)
I'm not even the same person anymore

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#36 Post by monele »

I'm in a quote, I'm in a quote !.... Wait... this still isn't good ! XD

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#37 Post by PyTom »

RLE (Run Length Encoding) is used to improve the performance of images that consist mostly of empty space. Basically, it's a way of telling the blitter engine that a long run of pixels contain nothing, and so it's okay to skip over them.

Without RLE, blitting to the screen takes time proportional to the number of pixels in the image. With RLE, it take time proportional to the number of _non-transparent_ pixels in the image. This can often be a significant speedup.

To solve the crashing problem, I now keep a normal copy of the image alongside the RLE copy. The space usage is n + m, where n is the number of pixels in the image, and m is the number of non-transparent pixels in the image. Since on images like full-screen backgrounds this could double the size of the image, in 5.6 you will need to explicitly request RLE by writing:

image magic start = Image("magic_stars.png", rle=True)

Bilinear filtering is still there. I did too much work to remove it. :-)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#38 Post by monele »

Didn't know RLE that much, I'm enlightened now :). Aah algorithms~
Bilinear filtering is still there. I did too much work to remove it.
Eheh, would think so ^.^

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

#39 Post by Watercolorheart »

monele, I tried to play your demo ... um ... how do I get to the laboratory to make potions?

And how do I access status->Staff? I get some kind of error message when I try ...
I'm not even the same person anymore

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#40 Post by monele »

Lol ^.^. Note that it's the Ren'Py section, not the Work in Progress one ;). It's not a demo but a to-be-debugged version :). Explains why you get the error. Also explains why you can't do much, since it's really just me testing interface stuff ^.^.
If I find the courage to work some more on it during the next days, I'll probably post something playable sometime soon though, so stay tuned ^^.

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#41 Post by monele »

Mmm, there's something I've wanted to do for some time but I'm not sure it's possible :

Code: Select all

ui.frame(xpos=0.22, ypos=0.85, style="banner")
ui.text(name, style="parch", size=25)
Can I somehow have the result of this displayed permanently, just as an image would using "show" ?

I've noticed there's a "what" parameter to show... that is supposed to take Displayables... So maybe if I could turn all this into a Displayable ?

(the problem of all the ui stuff is that it disappears at the next interaction of course ^^)


EDIT : Nevermind, managed to find it on my own, yay ^.^. May Ren'Py never stop rockin' !

(and for the curiouses(?)) :

Code: Select all

nbanner = renpy.display.layout.Window(Text("Some text", style="parch", size=25), style="banner")
renpy.show("namebanner", [Position(xpos=.22, ypos=.85, xanchor=0.5, yanchor=0.5)], what=nbanner)

Post Reply

Who is online

Users browsing this forum: Google [Bot], henne, Ocelot, snotwurm