Is there a way to start in fullscreen?

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.
Post Reply
Message
Author
User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

Is there a way to start in fullscreen?

#1 Post by Tage » Sat Dec 11, 2004 9:01 pm

I was wondering if I could make fullscreen the default in my game?

User avatar
PyTom
Ren'Py Creator
Posts: 15476
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:

#2 Post by PyTom » Sat Dec 11, 2004 10:57 pm

This isn't currently supported. Fullscreen can be kinda flaky on some of the platforms pygame supports, so I want it to be something the user has to enable, rather than something chosen by the game developer.

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#3 Post by Tage » Sun Dec 12, 2004 12:35 am

That's understandable. =) Thanks for the response.

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#4 Post by mikey » Sun Dec 12, 2004 7:27 am

I was just going to ask the same thing, on the other hand I really really really would like an option like that. Would it be possible to start the game windowed with not the main menu, but a sort of options menu where you could choose fullscreen? Like.

1. run game.exe
2. see Select windowed/fullscreen
3. then you select
4. see main menu (and continue normally)

An embedded launcher of some sort. The point is I would like the player to instantly plunge into the game, rather than seeing his desktop. With River Trap/BlackPencil there was a black background covering the desktop when the game was windowed, so there was no "distraction".

Anyway, I can also understand the reasons, just wanted to let you know. :wink:

User avatar
PyTom
Ren'Py Creator
Posts: 15476
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:

#5 Post by PyTom » Sun Dec 12, 2004 10:04 am

Hm... Thinking about it further, I think the following code could
be used to make the game start up in fullscreen the first time it is run.

Code: Select all

init:
    if not persistent.set_fullscreen:
        $ _preferences.fullscreen = True
        $ persistent.set_fullscreen = True
This will change the default value of the fullscreen preference the first time it is run, and after that respect the user's choice.

As long as the 'f' keybinding is left intact, this should be reasonably safe.

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#6 Post by Tage » Sun Dec 12, 2004 6:10 pm

That's neat. =)

For the life of me, the "persistent.askQuestion" if statement will not work for me. It's like the persistent attribute is not being saved! But try this, mikey.

Code: Select all

label splashscreen:
    if not persistent.askQuestion:
        $ ui.window(xfill=800, yfill=600, xmargin=0, ymargin=0, background=Solid((0,0,0,255)))
        $ ui.vbox(padding=10, xpos=0.5, ypos=0.5, xanchor="center", yanchor="center")
        $ ui.text("Please choose if you want a fullscreen or window:", color=(255,255,255,255))
        $ ui.textbutton("Fullscreen", clicked=ui.returns("f"))
        $ ui.textbutton("Window", clicked=ui.returns("w"))
        $ ui.close()
        $ choice = renpy.interact(suppress_overlay=True)
        if choice == "f":
            $ _preferences.fullscreen = True
        elif choice == "w":
            $ _preferences.fullscreen = False
        $ persistent.askQuestion = True
    return

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#7 Post by mikey » Sun Dec 12, 2004 6:59 pm

*copies and pastes code*
*will run home soon*
Thanks, I'll try it out and let you know (in 3 days, something came up :(

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#8 Post by Tage » Sun Dec 12, 2004 7:18 pm

No problem! I hope it works for you, lol. And I hope whatever came up gets resolved in a good way!

User avatar
PyTom
Ren'Py Creator
Posts: 15476
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:

#9 Post by PyTom » Sun Dec 12, 2004 11:27 pm

Tage wrote: For the life of me, the "persistent.askQuestion" if statement will not work for me. It's like the persistent attribute is not being saved!
This message has been redacted for incorrectness. Please read the next message for an accurate response.

That's weird. Does the game/saves/persistent file exist? Is it read-only? When you change a preference and quit the game, does it update the time on that file?

I tried running the code I gave, and it worked just fine for me.
Last edited by PyTom on Sun Dec 12, 2004 11:42 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 15476
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:

#10 Post by PyTom » Sun Dec 12, 2004 11:41 pm

Well, after a little more investigation, I caught a bug with persistent data that only manifested itself on windows. Specifically, I saved a file as binary (the correct way), but opened it as ascii (which corrupted the persisted data). The result was that the persistent data failed to be saved correctly.

Anyway, the fix is in the current code base, and I'll probably be releasing a 4.3.1 soon with this and the few other minor corrections.

We apologize for the inconvenience.

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#11 Post by Tage » Mon Dec 13, 2004 12:15 am

Ooo, thank you for fixing the bug! =) I hope it's the same bug! To answer your questions...the persistent file is there, it is not read-only, and the date is updated when I change preferences. Another weird thing is, your example worked for me! O.o Mine, however, did not! The only difference is that the "$ persistent.askQuestion" in my script is outside the init statement whereas yours is inside the init statement.

There was no inconvenience! =) Thanks for all the hard work being put into this program!

User avatar
PyTom
Ren'Py Creator
Posts: 15476
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:

#12 Post by PyTom » Mon Dec 13, 2004 12:17 am

My fragment won't work for you (mine will always force the game to fullscreen on windows... not what is wanted).

The bug is that persistent data is not being loaded in again on windows. And it's been squashed.

Update: To clarify, it will work when 4.3.1 will work, just not with stock 4.3 or before.
Last edited by PyTom on Mon Dec 13, 2004 12:29 am, edited 1 time in total.

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#13 Post by Tage » Mon Dec 13, 2004 12:22 am

gah, this proves I suck at being a tester, lol. :lol: You're right. :)

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#14 Post by mikey » Thu Dec 16, 2004 1:41 pm

Phew, FINALLY, the fullscreen code and me had some time together. And it works! Thanks! Really I have to say, renPy is a writer's dream. I can literally write into the code and still have a nice overview of what's going on.

User avatar
Tage
Regular
Posts: 194
Joined: Mon Nov 01, 2004 2:18 am
Location: Memphis, TN
Contact:

#15 Post by Tage » Thu Dec 16, 2004 6:26 pm

No problem! Yah, Ren'Py is really nice! n.n

Post Reply

Who is online

Users browsing this forum: Google [Bot]