Renpy, A scene with nothing to do

StygianSerpent

New Member
Dec 23, 2022
6
2
Firstly, apologies for posting this question as I'm sure the answer is out there. I've tried to find out but am having trouble wording it correctly.

Basically, I'm currently making a game that involves a map system, different times and different days. So far so good, these bits all work nicely.

What I'm having trouble with is an easy way to make the game simply sit on a screen and not do anything. What I mean is;
  • You use the map to travel to Classroom A but there's nothing going on there/no event.
  • the game simply shows the screen, maybe one line of dialogue and does nothing else.
  • The user can then click the map toggle button and select a different location.
I've made this work using a loop of a single dialogue and a variable to avoid the script continuing if they click anywhere else, but it just feels like I'm doing this wrong.

Let me know if this isn't clear or you want code snippets etc. Any help would be greatly appreciated
 

GNVE

Active Member
Jul 20, 2018
701
1,158
From a players perspective may I suggest not doing that. How fun is it to go through a dozen locations for nothing to happen. I know a lot of games do this but that doesn't make it good game design. Please reconsider and only turn on locations that are actually worth going to in the map screen. If no locations have anything going on then allow to skip time from the map screen. Streamline the game. Make your players happy rather than do what everyone else is doing badly.
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,046
7,388
From a players perspective may I suggest not doing that. How fun is it to go through a dozen locations for nothing to happen. I know a lot of games do this but that doesn't make it good game design. Please reconsider and only turn on locations that are actually worth going to in the map screen. If no locations have anything going on then allow to skip time from the map screen. Streamline the game. Make your players happy rather than do what everyone else is doing badly.
I think you misunderstood.

He's asking for the classic sandbox system, a set of locations you can visit at anytime, which may or may not have events depending on some variable.

-edit-
While it would be smart to hide those locations if they do not have any event at that point of the story, it might still be necessary if his game has collectibles or other stuff outside of events going on that map.
 
  • Like
Reactions: StygianSerpent

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,355
15,269
GNVE said my thoughts regarding the practice, but there's a challenge in the question.


What I'm having trouble with is an easy way to make the game simply sit on a screen and not do anything.
Hmm... It's a really interesting question, and for once I'm not sarcastic.

Generally games show you a "there nothing here" narration, then force you back to the map.
Python:
label kitchen:
    if not girl.location == "kitchen":
        "There's nothing to do here"
        call screen map
    # Implicit /else/
    [whatever you want when the girl is here]
But leaving you on the empty location and waiting for you to click on the map button, I don't think someone is doing it.

One way to do could be to loop over a pause:
Python:
label kitchen:
    if not girl.location == "kitchen":
        "There's nothing to do here"
        label .loop:
            pause
            jump .loop
    # Implicit /else/
    [whatever you want when the girl is here]
Another way could be to prevent all click except on the map button:
Python:
screen emptyPlace():
    modal True

    imagebutton map:
        xpos X ypos Y
        action Hide ( "emptyPlace" ), Show( "map" )

label kitchen:
    if not girl.location == "kitchen":
        "There's nothing to do here"
        call screen emptyPlace
    # Implicit /else/
    [whatever you want when the girl is here]

But in the end, this would just add annoyance to the annoyance already pointed by GNVE.

Not only you're sent to an empty, and so currently useless, location, but in top of that you've to figure how to go out of it.



While it would be smart to hide those locations if they do not have any event at that point of the story, it might still be necessary if his game has collectibles or other stuff outside of events going on that map.
He would then not ask this question, knowing that he will call the screen with the collectibles after the "nothing here" narration line.
 

StygianSerpent

New Member
Dec 23, 2022
6
2
Thanks everyone.

From a players perspective may I suggest not doing that. How fun is it to go through a dozen locations for nothing to happen. I know a lot of games do this but that doesn't make it good game design. Please reconsider and only turn on locations that are actually worth going to in the map screen. If no locations have anything going on then allow to skip time from the map screen. Streamline the game. Make your players happy rather than do what everyone else is doing badly.

This point is valid. What I was going for was the impression of the freedom to go where they wanted, But you're right and I may not be properly considering how tedious this could become at times.

Generally games show you a "there nothing here" narration, then force you back to the map.
Python:
label kitchen:
if not girl.location == "kitchen":
"There's nothing to do here"
call screen map
# Implicit /else/
[whatever you want when the girl is here]

I think this is basically what I was after, however I've set my map up as a toggle that comes over the screen:

Python:
screen GameMapUI:
    imagebutton:
        xalign 1.0
        yalign 0.2
        xoffset -15
        yoffset 5
        idle "UI/map_idle.png"
        hover "UI/map_hover.png"
        action ToggleScreen("MapUI")
So I may run into the issue that they can simply just click it off again afterwards. However, mainly did this because I found it aesthetically pleasing, so can adjust if I need to. Will test when I'm back home.

Thanks again everyone for the quick/helpful replies!
 

Nicke

Well-Known Member
Game Developer
Jul 2, 2017
1,195
3,079
Thanks everyone.

This point is valid. What I was going for was the impression of the freedom to go where they wanted, But you're right and I may not be properly considering how tedious this could become at times.
As long as you have a system where you show what girl is in a location at that time, or some other symbol if there's an event etc, there's no harm in letting people visit empty locations if they want to. This is something that should be part of a sandbox either way in my opinion.

Randomly clicking places over and over to look for events is usually not anybody's idea of fun.
 
  • Like
Reactions: StygianSerpent

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,355
15,269
I think this is basically what I was after, however I've set my map up as a toggle that comes over the screen:
Then just add a flag, passed as argument, that will, or not, permit to toggle the map off:
Python:
screen MapUI( onOnly=False ):

    [the screen as it is actually]

    if onOnly:
        imagebutton:
            idle Solid( "#00000000" )
            xalign 1.0
            yalign 0.2
            xoffset -15
            yoffset 5
            xsize [width of map_idle.png]
            ysize [height of map_idle.png]
            action NullAction()
        
[...]

label kitchen:
    if not girl.location == "kitchen":
        "There's nothing to do here"
        call screen MapUI( onOnly=True )
When called from "kitchen", the flag will be on, and the UI button while be behind a transparent mask that will prevent all clicks on it.
And all the other time, the flag will be off, since it's its default state, letting the UI button be reachable.
 
  • Like
Reactions: StygianSerpent

GNVE

Active Member
Jul 20, 2018
701
1,158
I think you misunderstood.

He's asking for the classic sandbox system, a set of locations you can visit at anytime, which may or may not have events depending on some variable.

-edit-
While it would be smart to hide those locations if they do not have any event at that point of the story, it might still be necessary if his game has collectibles or other stuff outside of events going on that map.
How did I misunderstand? I know OP is describing standard sandbox mechanics. I am just saying why you don't really want them. Why it is bad game design for 90% or more of all games in this niche using it.

Many developers use sandbox because other devs are using a sandbox and all the cool AAA kids are doing it. But in our niche having more than one person working on a game is unusual let alone the dozens if not hundreds you'd need to fill a sandbox game with enough content to make a sandbox game worth it.

And if a game uses a sandbox you often get a hint system or the like where I need to go through one or more menu's to see where to go next. So rather than smooth gameplay I need to stop the story, check where next scene will be, go there, wait for the right time, play scene, repeat.

I am not saying that sandbox is never the answer. Especially in a more management focussed game sandbox like mechanics can make more sense. I am just saying that most games would be better if they weren't a sandbox. I myself have two game ideas where sandbox may make sense (one heavily influenced by HHS+ and one influenced by Stargate/Terra Nova/The Long World/the Bible/Frostpunk/time travel in general). But before committing to sandbox mechanics in those games there will be a look at if they really need them and if they can be streamlined in some way. (Don't hold your breath either of them will ever see the light of day, I am not very prolific when it comes to making games.)

Oh and while not on the topic if you do want to divide the day into early morning/pre breakfast/late morning/pre lunch/midday/ etc please do not make a time where all I can do is to go home and click on the bed to go to sleep. Why is that a thing in some games?
 
  • Like
Reactions: StygianSerpent

StygianSerpent

New Member
Dec 23, 2022
6
2
Then just add a flag, passed as argument, that will, or not, permit to toggle the map off:
Python:
screen MapUI( onOnly=False ):

    [the screen as it is actually]

    if onOnly:
        imagebutton:
            idle Solid( "#00000000" )
            xalign 1.0
            yalign 0.2
            xoffset -15
            yoffset 5
            xsize [width of map_idle.png]
            ysize [height of map_idle.png]
            action NullAction()
       
[...]

label kitchen:
    if not girl.location == "kitchen":
        "There's nothing to do here"
        call screen MapUI( onOnly=True )
When called from "kitchen", the flag will be on, and the UI button while be behind a transparent mask that will prevent all clicks on it.
And all the other time, the flag will be off, since it's its default state, letting the UI button be reachable.
This is perfect, thank you