Is there a way to start in fullscreen?
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.
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.
Is there a way to start in fullscreen?
I was wondering if I could make fullscreen the default in my game?
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.
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.
- 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:
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.
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.
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
As long as the 'f' keybinding is left intact, this should be reasonably safe.
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.
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
- 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:
This message has been redacted for incorrectness. Please read the next message for an accurate response.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!
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.
- 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:
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.
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.
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!
There was no inconvenience! =) Thanks for all the hard work being put into this program!
- 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:
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.
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.
Who is online
Users browsing this forum: No registered users