Don't get me wrong, I appreciate a little humor as much as the next guy. But I still haven't found a solution to my issue
Keep in mind there aren't any mobile settings, as such.
What you have instead are the
variants people have talked about.
large
,
medium
,
small
,
pc
,
ios
,
android
to name but a few.
Full list :
You must be registered to see the links
(as
peterppp) already stated.
They are not exclusive. Each is set if their criteria is met. For example, a Windows computer would likely be
large
AND
pc
. A phone might be
small
and
android
and
phone
, whereas a tablet might be
medium
and
android
and
tablet
.
These aren't settings. For your purposes, they are static values. You have no control of when or how they are set.
They are used to control which screens or values of variables are used by your script.
Perhaps you have a screen called
hello_world
(borrowed and simplified from the documentation).
Normally, it might be coded like:
Python:
screen hello_world():
text "Hello, World."
The screen would display "Hello, World." using the default text size.
However, because a phone screen is much smaller - perhaps you'd want to print the same text bigger. Or perhaps move it around because once the text is bigger it overlaps with the text next to it. This is where variants come in.
Instead it might be coded like:
Python:
screen hello_world():
text "Hello, World."
screen hello_world():
variant "small"
text "Hello, World." size 45
In this case, you effectively have two screens, both called
hello_world
. The first one is used most of the time. It is effectively the default screen used... UNLESS the "small" variant is true. In that case, the second definition for the screen is used.
It is always advisable to have one definition of the screen without a variant statement, so it becomes the default. I remember one person who'd coded a
large
version and a
small
version of a screen - then couldn't understand why things crashed when played on a tablet. Because there was no default and no
medium
- there effectively wasn't a screen to display. It would be normal to have the
large
/
pc
version as your default and only code overrides for
small
and/or
medium
.
You'll also see it impact the screen language definitions directly too.
For example, a phone screen being so small means that there isn't enough screen space to fit everything. Compromises need to be made.
You'll find these lines in most games, within the
screens.rpy
file.
Python:
## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0
This code basically says "side images won't be shown on small devices, where there isn't room to display them".
Even though side images are automatically scaled according to the resolution they are shown on, these images take up valuable screen space better used by something else (like the larger dialogue text).
Likewise, most advice on iOS and Android is to let the operating system handle quitting the game and not include a
[QUIT]
button. Also offering help about pressing "H" to hide the overlay and other keybindings doesn't really offer any help to a phone or tablet user.
So you'll find these lines too:
Python:
if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
## Help isn't necessary or relevant to mobile devices.
textbutton _("Help") action ShowMenu("help")
if renpy.variant("pc"):
## The quit button is banned on iOS and unnecessary on Android and Web.
textbutton _("Quit") action Quit(confirm=not main_menu)
Finally, you have the
gui.rpy
overrides.
Similar to the
if renpy.variant("pc")
type checks, the
gui.rpy
file usually has a section right at the end which changes the game's default GUI layout/sizing/images based on device type.
While not coded this way, its easy to think of it like:
Python:
## The size of normal dialogue text.
define gui.text_size = 22
if renpy.variant("small"):
define gui.text_size = 30
The actual block starts more like this:
Python:
################################################################################
## Mobile devices
################################################################################
init python:
@gui.variant
def small():
## Font sizes.
gui.text_size = 30
# ....
All of which is just the explanation for how RenPy deals with this sort of stuff.
In your case, if I had to guess, your game has a
variant "small"
version of
screen game_menu()
which doesn't include a background image. Or your
screen game_menu()
has some
if renpy.variant()
checks related to which background to use.
There's an outside chance that the
define gui.game_menu_background = "..."
has been overridden somewhere too, that would affect your background image.