2
\$\begingroup\$

All the rooms in my game have the size of 1280x720, so normally my game runs like this:

enter image description here

When I try to enable fullscreen, none of the game's buttons respond to clicks, but the keyboard still works. So in the initial menu I clicked on the button to go to the settings room (image 1) and nothing happened, but when I typed "c" on my keyboard went to the settings room:

enter image description here

enter image description here

OBS - There is a distortion, but not the view in that image (I had to convert image 3 to jpg, because in png it was over 2MB in size).

I've thought about switching to 1920x1080 and hiding the title bar, but I'd really like to do things the "right way".


EDIT 1 - Another way to enable full screen. (It also does not work)

create event:

window_set_fullscreen(true);

EDIT 2 - By doing a few tests I noticed that when it is in full screen, the clicks behave as if it had a ghost room at the top left of the screen. Like this:

enter image description here

That is, I click the right side of the word music (in blue) and the language changes.

OBS - The buttons in my game are mostly sprites that I mapped and added a global left pressed event.

\$\endgroup\$
  • \$\begingroup\$ Not familiar with GameMaker, but is there a chance that you check for clicks based on pixels? Like if click happened between 100 and 200 pixels, music is clicked. If you did that, fullscreen just changes the position of all elements, and for a variety of reasons, its the wrong way of doing things. \$\endgroup\$ – TomTsagk Dec 11 '18 at 10:04
  • \$\begingroup\$ @TomTsagk Correct, I use this artifice so I do not have to create numerous objects to represent the buttons. \$\endgroup\$ – Boneco Sinforoso Dec 11 '18 at 21:46
  • \$\begingroup\$ Could you elaborate? Why would you need to create multiple objects? Can't you just check the button's dynamic position instead of static pixels? \$\endgroup\$ – TomTsagk Dec 11 '18 at 23:23
  • \$\begingroup\$ To create a button in GameMaker I see two possibilities: 1 - create an object for each button and add an event for each one. 2 - simply through a single object draw sprites and program clickable locations. I can put a part of the code in the question to explain it better. \$\endgroup\$ – Boneco Sinforoso Dec 11 '18 at 23:33
  • 1
    \$\begingroup\$ @TomTsagk The main controls for game maker objects are done via events which are preset conditions checked each frame which you can then either add code to be executed or a series of drag and drop functions. One of these events is “check clicked” or something to that effect. Not sure what “global” refers to but I’ve never gotten that event to work very consistently... ever, and I’ve been using the software for over 7 years. \$\endgroup\$ – The Great Duck Dec 22 '18 at 6:47
0
\$\begingroup\$

You are using the global left press event, which as far as I know does not work in the manner you desire (screen resizing). Use the non-global version.

If that fails then implement your own click detection code and also contact the creators of Game Maker (shoot them an email) because that should be working and did work with rescaling as of version 8.1 which is only 7 years old. There’s no reason for the event functionality to have changed. That’s bedrock level stuff. Change that on purpose and thousands of games will be reporting bugs so I’d certainly expect the non global to work in your case.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the answer. I intend to launch the game on Steam before doing anything you suggested. By my calculations on Wednesday having already released the game, I inform you if your answer has solved my problem and milestone as correct. \$\endgroup\$ – Boneco Sinforoso Dec 22 '18 at 21:22
  • \$\begingroup\$ You are aware it should take under five minutes to test the fix, right? \$\endgroup\$ – The Great Duck Dec 23 '18 at 1:00
  • \$\begingroup\$ I'm aware, I've already backed up and I just do not start testing now because I'm trying to convert the game to launch also on Android. \$\endgroup\$ – Boneco Sinforoso Dec 23 '18 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.