Imagemap doesn't work anymore

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
Gedeon
Newbie
Posts: 5
Joined: Thu Jan 23, 2020 10:49 am
Contact:

Imagemap doesn't work anymore

#1 Post by Gedeon » Thu Jan 23, 2020 11:09 am

Good morning everybody,
(First post - and I'm french, so please be tolerant with my language)

I work on linux for 3 years but just for a hobby. I'm still a newbie even if I understand more and more.
I use the renpy.sh file. But the .exe works with Wine.

As the title says: imagemap, for screens, is not working anymore. At the beginning I thought I made a mistake on my script, but even in the tutorial, their imagemap doesn't work. It's like the function is off, I just can see the ground image, not the hover one. Clicking is useless, for sure.
So I erased the application and downloaded it again. But it's the same. Turned off the computer, but nothing.

So I looked in forums if somebody had the same problem, but, for the first time, I found strictly nothing.
I even don't know how to find where the problem is.
Can someone help me?

Thank you
Gedeon

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

Re: Imagemap doesn't work anymore

#2 Post by Alex » Thu Jan 23, 2020 2:14 pm

Hard to tell anything without seeing code for your imagemap. Provide the part of code with imagemap (is it a screen that contains imagemap) and part of code where you actually show this imagemap to player.

User avatar
rayminator
Veteran
Posts: 343
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Imagemap doesn't work anymore

#3 Post by rayminator » Thu Jan 23, 2020 2:32 pm

it probably because you don't have the the hotspots config right

example: it's the numbers you have to change sometime the image picker doesn't give you right spots so you have to play around with one button at a time

Code: Select all

imagemap:
            ground 'gui/main_menu.png'
            hover 'gui/main_menu_hover.png'

            hotspot (200, 350, 215, 30) action Start()
if you are a beginner then I do suggest using imagebuttons instead this way you can see them where they are by using xpos and ypos or xalign and yalign

Gedeon
Newbie
Posts: 5
Joined: Thu Jan 23, 2020 10:49 am
Contact:

Re: Imagemap doesn't work anymore

#4 Post by Gedeon » Thu Jan 23, 2020 3:31 pm

Thanks for the answer, but you didn't understand, or I surely expressed badly my problem

It's not a problem of code because every imagemaps don't work, even with games which are not mine. I noticed it when I was coding, but I found it on every game I downloaded from the net who worked correctly a week ago. I said: for example imagemaps from the Tutorial (on renpy) don't work.
I erased renpy creator and try again on the renpy games but it's always the same. And it's the only problem. When there's no imagemap, it works correctly.
It's not that I have a problem with creating renpy. I have a problem with reading renpy.

That's why I said I'm on linux. The fact is that I don't know any code to do a diagnostic with terminal.

And just to say: I never had a problem with coding imagemap since the begining but I finally understand how imagebuttons work a few months ago. I think imagemap is easier to create, clearer than imagebuttons.

Thank you again.

User avatar
rayminator
Veteran
Posts: 343
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Imagemap doesn't work anymore

#5 Post by rayminator » Thu Jan 23, 2020 4:51 pm

As Alex said share your code so we can help I have just tested the imagemap in screens for the menu it works fine there and also in game as well

Imagemaps explained by a dummy
viewtopic.php?f=51&t=46229#p467929

Customizing Menus
viewtopic.php?f=51&t=9812#p127254

I am using this one it works fine

Code: Select all

screen example_imagemap:
    imagemap:
        ground "Ground.jpg"
        hover "Hover.jpg"

        hotspot (8, 200, 78, 78) clicked Return("swim")
        hotspot (204, 50, 78, 78) clicked Return("science")
        hotspot (452, 79, 78, 78) clicked Return("art")
        hotspot (602, 316, 78, 78) clicked Return("go home")
        
label example:
    
    call screen example_imagemap
    
    $ result = _return
    
    if result == "swim":
        e "You picked swimming!"
    elif result == "science":
        e "You picked science!"
    elif result == "art":
        e "You picked art!"
    elif result == "go home":
        e "You went home!"

    return

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2836
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Imagemap doesn't work anymore

#6 Post by Imperf3kt » Thu Jan 23, 2020 5:45 pm

the code being used won't matter, Gedeon says that the behaviour is present even in the tutorial - something has gone wrong in ren'py itself.

which version of ren'py are you using, have you tried reinstalling it or updating if available?

also, bonjour, Gedeon, Je m'appelle Imperf3kt. comment ça va?

(that's about all the French I remember)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

Gedeon
Newbie
Posts: 5
Joined: Thu Jan 23, 2020 10:49 am
Contact:

Re: Imagemap doesn't work anymore

#7 Post by Gedeon » Thu Jan 23, 2020 6:02 pm

Hello Imperf3kt.
Ça va! Thank you to understand! And thanks to read my post entirely!

I uninstalled it (I said "erase" in the first post, I made a mistake...) and downloaded the new version. It changed nothing. So I uninstalled it again, and tried just to play with other games, not mine, downloaded from the internet, and which worked perfectly a week ago. And I had the same problem.

So it's not a problem with the renpy creator but with renpy in linux. Not a problem in creating but in reading, as I said.

There might be a problem during an update or something. Imagemap function has been deleted. But I don't know precisely what is this function, and how to put it on. That's what I'm looking for

Thanks

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2836
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Imagemap doesn't work anymore

#8 Post by Imperf3kt » Thu Jan 23, 2020 6:32 pm

generally reinstalling fixes these sorts of issues.
I'm not sure what might be causing this.

i wish you luck, but I'm afraid I can't help any further as I just don't know what it might be.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

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

Re: Imagemap doesn't work anymore

#9 Post by Alex » Fri Jan 24, 2020 12:19 pm

Another shot in the dark... Somethimes, not well configurated videocard causing glitches in buttons in Ren'Py projects.
Try to update video drivers, then hold shift while runing Ren'Py - there should open a screen where you could choose renderer, try different ones to see if it change anything.

Gedeon
Newbie
Posts: 5
Joined: Thu Jan 23, 2020 10:49 am
Contact:

Re: Imagemap doesn't work anymore

#10 Post by Gedeon » Fri Jan 24, 2020 1:13 pm

I'm not sure how to update video drivers. I did "sudo apt update" on the terminal, etc. But it changed nothing.

After, I holded shift while runing Renpy but nothing happened, neither with the .sh on the terminal, nor with the .exe on Wine application.

And I holded shift while running a renpy game, with the two files (.sh and .exe) and nothing happen.

So I'm not sure I understood what you mean.

Also I repeat that my problem is not with renpy creator, but in reading renpy games.

Thanks for your answer

User avatar
rayminator
Veteran
Posts: 343
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Imagemap doesn't work anymore

#11 Post by rayminator » Fri Jan 24, 2020 8:20 pm

What do you mean by reading renpy games by playing them?
Are you a creator that's making games if not you can ignore the last question?
Do you have python installed?

Gedeon
Newbie
Posts: 5
Joined: Thu Jan 23, 2020 10:49 am
Contact:

Re: Imagemap doesn't work anymore

#12 Post by Gedeon » Sat Jan 25, 2020 1:19 pm

Yes I mean playing.
As I said 3 times, even if I created a bit of renpy, my problem is from playing, not creating.
I don't understand what you mean by python installed.
I don't think it's a problem. As I said 3 times, I used to play perfectly a week ago, and except the imagemap's problem, renpy still works perfectly, in creating and playing.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]