I need tips....

Ideas and games that are not yet publicly in production. This forum also contains the pre-2012 archives of the Works in Progress forum.
Message
Author
User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

I need tips....

#1 Post by The CRxTR »

Hello. I've not been here for a long time.

I'm making this dating sim and I'm using my own code, not depending on the DSE template.
I saw something in the demo of Ren'Py about image maps.
  • How can I make a image map?

    If so, do I use pixels as value for it?
Thanks.
CRxTR

User avatar
Showsni
Miko-Class Veteran
Posts: 563
Joined: Tue Jul 24, 2007 12:58 pm
Contact:

Re: I need tips....

#2 Post by Showsni »

For an image map, you'll need two pictures; one that's the usual view, and one that it switches to when you hover over a hotspot. (It could just be the same one if you want). Then you do something like:

Code: Select all

$ result = renpy.imagemap("normal.png", "hovered.png", [(100, 100, 300, 400, "school"),(500, 100, 700, 400, "home")])
This will show the "normal" picture to the user. If they hover the mouse over the rectangles at (100, 100) (the top left corner) to (300, 400) (lower right corner) or at (500, 100) to (700, 400) then the picture in that rectangle will change to the "hovered" picture. (You can call them whatever you want, of course.) Clicking on the rectangle will store either "school" or "home" in the result variable; so you can then do something like

Code: Select all

if result == "school":
   "I go to school."
if result == "home":
   "I go home."
You can have any number of hotspots like this, but they all have to be rectangular.

Read here:
http://www.renpy.org/wiki/renpy/doc/ref ... y.imagemap

for details, or check out the example in the demo game.

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#3 Post by The CRxTR »

I see. But, do I use pixels for:

Code: Select all

$ result = renpy.imagemap("normal.png", "hovered.png", [(*100, 100, 300, 400*, "school"),(*500, 100, 700, 400*, "home")])
I meant the fields w/ asterisks.
CRxTR

User avatar
mugenjohncel
Hentai Poofter
Posts: 2121
Joined: Sat Feb 04, 2006 11:13 pm
Organization: Studio Mugenjohncel
Location: Philippines
Contact:

Re: I need tips....

#4 Post by mugenjohncel »

You may also want to check this...
http://lemmasoft.renai.us/forums/viewto ... 168#p78168

"POOF" (Disappears)

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#5 Post by The CRxTR »

So, I use pixels for the vars?
CRxTR

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#6 Post by The CRxTR »

Oh.

Thanks guys.

I'll just post if I have problems. If I'm done with it, I'll just post it here too.
CRxTR

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#7 Post by The CRxTR »

Hi again.

I want to use another font for my title.

How do I assign another font for the title and another for the game?
CRxTR

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: I need tips....

#8 Post by Aleema »

What do you mean by the "title"?
If you want to change the font for the entire game, there is already a line commented out in your options.rpy.

Code: Select all

style.default.font = "fontname.ttf"
Replace the font with your own. :)

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#9 Post by The CRxTR »

I have another one.

I'm starting to run out of ideas for Romance on Sunset Boulevard. So I'll shift my focus on the main idea behind the suppose-to-be vn, Clinton Show.
Right now I need help on the UI. I'm planned this UI for my VN. It sort of a reminicent of LucasArts' Point-and-Click Adventures:

Suppose if I have this VN and the Player' name is Player 1.
The weird ball has some information and gave me a candle placed in the inventory.
So I go to the "player menu". (Inspired from the Ren'Py demo and I wonder if how did PyTom made it.)

Image
http://picasaweb.google.com/lh/photo/H8 ... directlink

I click the button and this UI shows up.

Image
http://picasaweb.google.com/lh/photo/sG ... directlink

That's it. Is there some post in this forum that can help me? And can someone help me understand UI implementation stuff?

Thanks.
CRxTR

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#10 Post by The CRxTR »

@ Aleema:
Aleema wrote:What do you mean by the "title"?
And on the "title" I mean....
Lets say the game begins:
The screen reveals the text (centered on the screen in another font that is not used by the UI): "Studio Somewhere presents"

That's what i meant.

Well, I could try making lots of images for the intro title (maybe an appropriate name for that, maybe...) but I need to save space on my HDD.
Aleema wrote:If you want to change the font for the entire game, there is already a line commented out in your options.rpy.

Code: Select all

style.default.font = "fontname.ttf"
And I read that in the reference manual before I started to post here. But thanks for reminding me. I'm replacing the font of the UI to make it more comic book styled. But I dont like the intro title to use comic book font. I like to use a formal font. Thanks for the tip anyways.
CRxTR

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: I need tips....

#11 Post by JQuartz »

The CRxTR wrote:So I go to the "player menu". (Inspired from the Ren'Py demo and I wonder if how did PyTom made it.)

Image
You can use ui.textbutton with overlay. Read about overlay here:http://www.renpy.org/wiki/renpy/doc/reference/Overlays
The CRxTR wrote:I click the button and this UI shows up.

Image
You can use ui.frame, ui.vbox, ui.hbox, ui.text, ui.textbutton. Read about ui here:http://www.renpy.org/wiki/renpy/doc/ref ... _Functions

The CRxTR wrote:The screen reveals the text (centered on the screen in another font that is not used by the UI): "Studio Somewhere presents"
You can use:

Code: Select all

label splashscreen:
    centered "{font=DejaVuSans.ttf}Studio Somewhere presents{/font}"
    return

    return
    
Last edited by JQuartz on Sun Oct 18, 2009 6:23 am, edited 1 time in total.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#12 Post by The CRxTR »

JQuartz wrote:
The CRxTR wrote:So I go to the "player menu". (Inspired from the Ren'Py demo and I wonder if how did PyTom made it.)

Image
You can use ui.textbutton with overlay. Read about overlay here:http://www.renpy.org/wiki/renpy/doc/reference/Overlays
Will it do the similar thing as the Ren'Py demo?

And could I place text on the UI popup (with the buttons below similar to my posted image)?

"I'M ADDING SOMETHING":
I kind of understood the overlay. How do I use the overlay on a button?
CRxTR

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: I need tips....

#13 Post by JQuartz »

The CRxTR wrote: The screen reveals the text (centered on the screen in another font that is not used by the UI): "Studio Somewhere presents"
You can use:

Code: Select all

label splashscreen:
    centered "{font=DejaVuSans.ttf}Studio Somewhere presents{/font}"
    return

    return
The CRxTR wrote:Will it do the similar thing as the Ren'Py demo?
If you mean it'll stay on the screen for the whole game, then yes.
The CRxTR wrote:And could I place text on the UI popup (with the buttons below similar to my posted image)?
You could ui.text like so:

Code: Select all

label player1_status:
    $ ui.frame()
    $ ui.vbox()
    $ ui.text("Player 1")
    $ ui.text("Status : Normal")
    $ ui.close()
    $ ui.interact()
The CRxTR wrote:I kind of understood the overlay. How do I use the overlay on a button?
An example:

Code: Select all

init python:
    button_show=True
    def player_menu():
        if button_show:
            ui.textbutton("Player 1", clicked=ui.callsinnewcontext("player1_status"), xalign=0.95,yalign=0.05)
        
    config.overlay_functions.append(player_menu)
    
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

User avatar
The CRxTR
Regular
Posts: 56
Joined: Sat Apr 18, 2009 4:55 am
Projects: "Project Fareena"
Organization: Cyclohexane Games
Tumblr: crxtrdude
Github: crxtrdude
itch: crxtrdude
Discord: CRxTRDude#9493
Contact:

Re: I need tips....

#14 Post by The CRxTR »

JQuartz wrote:You can use:

Code: Select all

label splashscreen:
    centered "{font=DejaVuSans.ttf}Studio Somewhere presents{/font}"
    return

    return
Will this:

Code: Select all

label splashscreen:
    scene black
    show text "{font=DejaVuSans.ttf}Studio Somewhere presents{/font}" with dissolve
    hide text with dissolve
    return
...work?
CRxTR

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: I need tips....

#15 Post by JQuartz »

The CRxTR wrote:Will this:
Code:...

...work?
Maybe you should add a renpy.pause like so:

Code: Select all

label splashscreen:
    scene black
    show text "{font=DejaVuSans.ttf}Studio Somewhere presents{/font}" with dissolve
    
    $ renpy.pause(1)
    hide text with dissolve
    return
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]