Mobile Controls?

Hey all, I’m just curious about how making a game for mobile devices works here. Under the triggers and such there is no way to put in touch screen controls or anything like that so how exactly would that work? It seems its only designed to take in keyboard and mouse controls for PC.

1 Like

Also… is there a certain size for the overall game to be if you want it to fit ell on mobile screens?

It’s been a while since I made a game for mobile devices, but I would say using GUI objects with click triggers would be your best bet for touch screen controls.

Have all GUI controls 50% alpha so you can see behind them, have clicking send a message to the player or whatever you need.

Let’s say you have left and right on the keyboard and space for jump. Everywhere that you have those buttons, connect message mailboxes to those behaviors as well. If space connects to jump, make the message be JUMP and the mailbox for JUMP connects to everything that a space bar is connected to.

On the GUI screen, you could have a big round A button, and clicking that button sends the message JUMP to the player. On mobile devices, touching that big A button will make you jump, just like space would on your computer.

Repeat that logic for every other button and directional key. Make the GUI buttons look however you like, but I would say 4 squares and a middle square for a + dpad would work fine for most situations, unless your game doesn’t use up or down, or uses diagonal keys.

@CrimsonBlackGames is 100% all mobile, so he would likely be able to offer better tips than I would, if he has time.

1 Like

Over and Out do not work for mobile- keep that in mind

I wish they did, but they apparently cant be

Over and out can’t work, because there is no way to hold a mouse over the button on a phone. When you click, it is basically clicking in that location, and the mouse doesn’t actually rest there. Same with touchscreen computers, the mouse disappears in touchscreen mode.

1 Like

@“Mhx Ar” What about going with your finger over the object.

Yeah, that should be the point of it

@CrimsonBlackGames For now you can just use mousemove and check if the location is the same as the object. And have some filters because the object it’s 32x32px. You probably already know this :stuck_out_tongue:

I do, except it only works with only one finger at a time, which I cant use for SB3 since it requires 2

https://flowlab.io/game/play/695503

Thank you for posting this. One of my students was asking about this. It was the first time in the years I have used it someone thought about making a game for ios

1 Like

Hello,

First things first:
This topic has been dead for literally six years, please don’t revive dead topics. It clogs up the category and may drown the newer, more needed, topics.

Second:

There was a recent update on Mobile. Now it is much easier, although this example is also very helpful.

Third:
Welcome to the community! If you ever need any help, tag me and I’ll see what I can do.

Thanks,
-Ember.Y

1 Like