• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android How to create buttons in the GUI?

yaragad

Member
I'm creating a mobile game and my Room is 1280x720, the same as game resolution.
I use a view to make the scroll, as scenary is generated. I also have a View Zoom depending on the speed.
As I have seen, Mobile devices Touch event is associated with an object, so... what should I do? My object is moving with the view and zooming and I just want it to be fixed in size and position.
The classic Draw GUI doesn't work, as Touch event is related to the object itself.

Thanks in advance.
 

FoxyOfJungle

Kazan Games
Just a spoiler: I’m creating a GUI editor for Game Maker Studio 2, it’s not quite right yet (very pre alpha), but I’m making progress little by little... It will be useful, I intend to make it free (I guess, I don't know yet..). It will be possible to create virtual joypad and keys and be used on android for example, and in a simple way. (remembering: I don't promise anything yet...)
 
Last edited:
D

Deleted member 13992

Guest
The quick and dirty way is to move the button with the view. I don't know exactly how you're scrolling, but something like this:

obj_button.x = view_xport[0] + var_offset;
 

FoxyOfJungle

Kazan Games
Does anyone have a solid reference for GUI scaling? Preferably for HTML5!
What do you refer to exactly? How will the game behave in HTML 5 or how to create a camera that works properly? I have these links that can be useful:

HTML 5:

Camera:
 
Top