Page 6 of 12

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sat Jul 10, 2010 11:45 am
by PyTom
Yeah, that one's my fault - I inverted the sense of a check that prevented a divide by zero.

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sat Jul 10, 2010 4:27 pm
by unknown5
11a didn't run for me, but 11b works fine. got some of the same stuff others did

1) "Exception: Couldn't determine text style."

2) a flash of the checkerboard pattern underneath my layers on the splash page and at a jump to a scene with a transition

3) "pygame window"

also, the compiler barked at me because i didn't put a space after the $
for a line of python code, which i guess it let me do before, heh.

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sat Jul 10, 2010 6:59 pm
by PyTom
I've put out a 6.11.0c version. This should:

- Fixes the "Couldn't determine text style" problem.
- Be a little more conservative when using graphics hardware. It will no longer use framebuffer_object, unless explicitly asked.
- Only compile python code once, preventing Ren'Py from reporting errors in zombie code.
- Reset the window caption and icon when changing from fullscreen to windowed mode (or vice versa).
- Make the video playback texture transient, hopefully fixing movie playback problems.
- Play test sounds on the sound channel, rather than numbered channel. This fixes duplicate sounds when playing a test sound.
- Ensure that auto-forward always works.

It also include some support for helping me debug the remaining bugs.

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sat Jul 10, 2010 11:01 pm
by Spiky Caterpillar
PyTom wrote:Hm... now can you try it on the game with the problem?
I tried, but it didn't actually demonstrate the problem when run from the command line - and now it's obstinately refusing to lock up for me at all; I'll send more traces if I manage to get it to show up again.

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sat Jul 10, 2010 11:08 pm
by PyTom
Spiky Caterpillar wrote:and now it's obstinately refusing to lock up for me at all
That's not a bug... it's a feature!

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 3:42 am
by jack_norton
The xalign/yalign are all changed? :oops:
The scenes I made previously have all the wrong offsets now, for example my "showenemy code":

Code: Select all

label showenemy(enm):
    $renpy.music.play ("snd/enemy.ogg",loop=False)
    scene black
    show i_panel at Position(xpos=1.5,yalign=0.5)
    transform enmshw:
        xalign 0.5 yalign 0.5 alpha 0
        linear 1.0 alpha 1.0
        linear 1.0 xalign 0.05
        pause 1.0
        linear 1.0 zoom 0.75
    $renpy.show("r_"+Enemy[enm][1],[enmshw])
        
    show i_panel:
        xpos 1.5 yalign 0.5
        linear 1.5 xpos 0.0
    image test:
        contains:
            Null()
            pause 2.0
            xalign 0.9 yalign 0.0
            Text(Enemy[enm][2],style="bix",size=64,slow_cps=8,slow=True)
        contains:
            Null()
            pause 3.0
            xalign 0.5 yalign 0.97
            Text("click to continue",style="bix",size=32,slow_cps=8,slow=True)
    show test
    transform blink(d):
        alpha 0
        pause d
        linear 0.5 alpha 1.0
        
    python:
        with ui.vbox(-2,xmaximum=500,xfill=True,xpos=470,ypos=150):
            ui.at(blink(2))
            ui.text("Hit Points: "+str(Enemy[enm][3]),size=25,style="bix2")
            ui.at(blink(2.4))
            ui.text("HP Regen: "+str(Enemy[enm][19])+"/turn",size=25,style="bix2")
            ui.at(blink(2.8))
            ui.text("XP When Killed: "+str(Enemy[enm][18]),size=25,style="bix2")
            ui.at(blink(3.2))
            ui.text("Attack: "+DmgT[Enemy[enm][5]],size=25,style="bix2")
            ui.at(blink(3.6))
            ui.text("Damage: ("+str(Enemy[enm][6])+"-"+str(Enemy[enm][7])+")",size=25,style="bix2")
            ui.at(blink(4.0))
            ui.text("Armor Rating:",size=25,style="bix2")
        with ui.vbox(-2,xmaximum=500,xfill=True,xpos=760,ypos=150):
            ui.at(blink(2.2))
            ui.text("Skill Points: "+str(Enemy[enm][4]),size=25,style="bix2")
            ui.at(blink(2.6))
            ui.text("SP Regen: "+str(Enemy[enm][20])+"/turn",size=25,style="bix2")
            ui.at(blink(3.0))
            ui.text("Evasion: "+str(Enemy[enm][15])+"%",size=25,style="bix2",xalign=1.0)
            ui.at(blink(3.4))
            ui.text("Accuracy: "+str(Enemy[enm][9])+"%",size=25,style="bix2",xalign=1.0)
            ui.at(blink(3.8))
            ui.text("x Rate of Fire: "+str(Enemy[enm][8]),size=25,style="bix2")
            for i in range(5):
                ui.at(blink(4.2+i*0.15))
                ui.text(str(Enemy[enm][10+i])+" vs "+DmgT[i],size=25,style="bix2",xalign=1.0)
        with ui.vbox(-2,xmaximum=530,xfill=True,xpos=470,ypos=480):
            ui.at(blink(5.4))
            ui.text("Special Move: "+EnemySk[Enemy[enm][16]][2]+" ("+str(EnemySk[Enemy[enm][16]][3])+"sp)",size=25,style="bix2")
            ui.at(blink(5.6))
            ui.text(EnemySk[Enemy[enm][16]][1],size=22,style="bix2")
            
        renpy.pause()
    return
produces this video (you can see errors in fade in/out, but especially alignment). The text on the right have disappeared, becaue I used xalign=1.0 :D
http://www.winterwolves.net/PS_wrong.avi

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 3:50 am
by jack_norton
There are also minor problems in fonts. I just barely noticed it! Look at the 2 screenshots below, near the letter "g", I put the mouse pointer near it so you can spot too:

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 5:23 am
by jack_norton
Just to clarify, I tried even to use the tip in the docs:

Code: Select all

init python:
    style.image_placement.xpos = 0.5
    style.image_placement.ypos = 1.0
    style.image_placement.xanchor = 0.5
    style.image_placement.yanchor = 1.0

    config.default_transform = None
but still I get very different behaviour for xalign vs previous versions (I think it should be possible to mantain this compatibility otherwise you should have to manually check all the xalign in the code!).
Even for a simple textbutton:

Code: Select all

ui.frame(ypos=2,yminimum=100,ymaximum=100,xmaximum=250, xminimum=250,xfill=True,style="rpgA")
tt=Tooltip("Click to set this enemy as the current target of the active Hero. You can also use TAB key to cycle between targets.")
            ui.textbutton("{color=#FFF}{size=18}"+tmpEnemy[i][2]+"{/size}{/color}\n\n",[b]xalign=0.5[/b],ypos=-15,clicked=ui.returns((100+i,active_order)),xminimum=250,yminimum=100,style="default",hovered=tt.show, unhovered=tt.hide)
previously the text was centered (xalign=0.5), now is all on the left... :|
BTW I'm having lots of fun using the new screen language, is incredibly powerful! finally can add good SFX to my battle engine without going nuts!

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 11:21 am
by PyTom
Jack, for the enemy placement problem, can you come up with a smaller example? And maybe screenshots of the old vs new behavior?

For the font problem, is that a TTF font, or an image-based font?

Thanks.

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 11:26 am
by jack_norton
Nevermind, I managed to fix the enemy placement: I had to add xalign 0.0 on starting position and then use xpos 0.0 ending position (before I was just using xalign 0.0).
The font is a TTF font, I can't get that one centered, I've tried many combinations but it just won't center, not sure why :D
I understand this version is a big change, but would be cool if there was a working solution/hack to keep the old behaviour of xalign, so I could update all my old games to use openGL and not have to test them carefully step by step to spot potential alignment bugs :)

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 11:31 am
by PyTom
Can I get access to the TTF font file? It looks like it might be drawing below the bottom of the GL texture.

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 11:55 am
by jack_norton
Here it is :)

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 12:01 pm
by PyTom
I just comitted a fix to the xalign bug. It actually was nothing of the sort. What was happening, was that I had mistyped something in the implementation of textbutton, and so it was using the string 'default' rather than the variable default, which would have used the button_text style.

As a random note, you can now write your call to frame:

Code: Select all

ui.frame(ypos=2,yminimum=100,ymaximum=100,xmaximum=250, xminimum=250,xfill=True,style="rpgA")
as

Code: Select all

ui.frame(area=(0, 2, 100, 250), style="rpgA") 

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 12:17 pm
by PyTom
jack_norton wrote:I understand this version is a big change, but would be cool if there was a working solution/hack to keep the old behaviour of xalign, so I could update all my old games to use openGL and not have to test them carefully step by step to spot potential alignment bugs :)
Did you try:

Code: Select all

init python:
    config.transform_uses_child_position = False
? The combination of that and the code you posted should lead to behavior identical to that of 6.10.

Re: Ren'Py 6.11.0 Pre-Released

Posted: Sun Jul 11, 2010 12:38 pm
by jack_norton
Cool new way to use ui.frame, much easier!
And yes lol I used either config.transform_uses_child_position = False or the code I posted, but never occurred me to use BOTH! :oops: now the animation works like before!
Going to download latest version and continue testing :)