Game basic UI questions ... noob

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
LongHairRkr
Newbie
Posts: 9
Joined: Fri Aug 02, 2019 1:53 am
Projects: the Neighborhood
Contact:

Game basic UI questions ... noob

#1 Post by LongHairRkr »

Hello there,

First, thank you for any help you can give! I've looked over the renpy manuals and searched for this problem. I'm sure it's a simple thing and I'm not using the right search terms. I know I've seen dozens of other games do what I'm looking for.

I'm working on a simple idea for a game. It's an open world game where you will discover secrets about the people around you. Everyone will have an affection meter thay determines how much you can find out about them. Navigation is room to room with image links: click on a door or arrow. I'm currently using show screen over a bg image to do this. Is there A better way?

I've gotten a good way into trying the first steps.od the game. I have screens and dialogue and sprites and all. I've tried looking into using the DSE and it doesn't fit what I want. I'm hoping I can get some tutorial links for some start up things:

1. I have a map that I want to be able to scroll. How do I get a map button constantly on the screen that comes back to the screen you were in previously and at the correct time of day?

2. I have a cellphone that I want to receive messages during the game. I also want it to have a page to display stats of individual characters on a bio screen. Ibalso want this to be constantly on screen and go back to wherever you were when you opened it just like the maps? Any ideas on how to make the character bio screens display stats would be great as well.

3. I have imagemaps of places you can go, rooms in your house, rooms in other people's houses, etc by clicking on the image or arrow. I know how to make time and days pass, but is there an easy way to make time track other than giving each day segment and day a separate label? Right now I'm giving each room a six segment day and seven day week to make a loop. Seems like a mess. Any better ideas? I know other games do it easily.

Example:
Label livingroom1monday:
Show bg livingroomem
Show screen livingroom1

Label livingroom2monday:
Show bg livingroom
Show screen livingroom2

You get the idea. Any links, tutorials, or suggestions?
I'm still fairly new to coding this stuff, but i catch on fairly quickly. I know this is a lot of information at once ... sorry. I'm new, but I have a grasp on what I need. I just need better ways to do it I think?

Thanks!!

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Game basic UI questions ... noob

#2 Post by Alex »

Everything can be done in several ways, if your code works - it's good.
How you can change it - depends of your skills in programming and Ren'Py, so you might want to change the script some more times.

As for suggestions and links:
You could try to make each location in a different label and put a bunch of conditions to trigger events in this location (like if day is... and time is... and NPC in this place - then..., etc.).
To make a scrollable map - try to put it inside a viewport (check the tutorial game and - https://www.renpy.org/doc/html/screens.html#viewport).

The simpliest cellphone would be just a screen that shows some info from a list of messages. More advanced samples there:
viewtopic.php?f=51&t=19295#p249702
viewtopic.php?f=51&t=50153

Bio screen sample - viewtopic.php?f=8&t=53959#p505785

LongHairRkr
Newbie
Posts: 9
Joined: Fri Aug 02, 2019 1:53 am
Projects: the Neighborhood
Contact:

Re: Game basic UI questions ... noob

#3 Post by LongHairRkr »

Thanks for the reply! I took a good look at the examples you gave, and I'm doing something pretty similar in all of those cases. So I'm not far off fortunately.

One issue I'm having and can't seem to find with all of these things ... How do I make them all go back to the screen you came in from?

When you pull up the viewport and click on one of the image links, it goes there fine but I can't get back out of the viewport without going somewhere else. Any suggestions what I might need to add, or ideas how to make a stationary back button?

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Game basic UI questions ... noob

#4 Post by Alex »

That depends of how you've structured your code.
You could simply show the map screen (the viewport one) and if player haven't choose place to go just hide this screen. Set the screen property 'modal' to True to prevent player's interaction with other game elements.

If you need to show second screen from a screen and later return back to the first screen, then you'll have to make return button show this first screen and hide second (you can set a list of actions for the button - put them in a square brackets).

Code: Select all

textbutton "xxx" action [Show("scr_one"), Hide("scr_two")]
You might need to set 'tag' property for those screens as well.
https://www.renpy.org/doc/html/screens. ... -statement

LongHairRkr
Newbie
Posts: 9
Joined: Fri Aug 02, 2019 1:53 am
Projects: the Neighborhood
Contact:

Re: Game basic UI questions ... noob

#5 Post by LongHairRkr »

That works. Thank you!

Post Reply

Who is online

Users browsing this forum: Bing [Bot]