A way to detect if the screen is touched?

Well making a mobile version here is a little harder for me and when i launch as a Computer player the mobile controller appears still… So what i want to know and ask is if i do something like this:

//initialize
this.mobileControls.enabled = false;
.........
//onTouchStart
this.mobileControls.enabled = true;

would this actually work?

You can check if the devices has a touch screen by if (this.app.touch) { /*has touch screen*/ } Buy that only solves half the issue as laptops have both mouse and touchscreen features.

You could only show the touch screen controls on the first touch and hide them when the user starts using the mouse.

If you had a start screen, you can check if the user used the touch screen or mouse to press the start button and then show/hide the touch controls based on that.

1 Like

Ok thank you! I will try to add a start screen here in a bit and see what i can do.

Is there a way i could style loadouts and menu screens like this mobile game (Forward Assault) Image result for Forward assault main menu

It has a play button that takes the screen to a game mode type (DeathMatch, Bomb Defuse etc,) Or you can go to a server menu showing you every server that is running (Outside of ranked play) limiting to about 10 players. Is it possible to make a similar set up here in playcanvas? It may be a little to much to ask but maybe something like this project

https://playcanvas.com/project/585801/overview/caeds-hostis-battle-royal

But without the player script and what not. From what i seen the code for the servers is the same code for the player. (Unless it was changed) but i feel all this may be too much on the memory issue. The mobile game Forward assault is maybe 400MB and i can only load 200MB.
Maybe something simple like this unity sample?


(Asset Page: https://assetstore.unity.com/packages/essentials/network-lobby-41836 )
I plan on making select spawns later on But a minimum and maximum player set kinda like this:
Or maybe a simple menu like this game:

Im not sure if this can happen or how it can happen but i would love some help. Of course i will start slow i will not rush into making this all at once… Maybe just a play button spawning the player at a random spot on the map and then just shoot each other. But with people actually playing the app the room could be over crowded so i plan on limiting how many people can join but that would have to be later as i said because right now would be unfair because its running on the same server.
If i make a server select would the servers have to run on more than just the local server the Real Time Multiplayer Example does?

Making this will be difficult and time consuming but i am willing to do it. I would really love some help and i just want to make this a fun experience and learn along the way.

Yes.

Yes.

20 characters

What/how could i use to make these types of screens? Find some layouts and configure in my own gesture?

Is it possible to make the menu on an online (Browser app) like pixlr and transfer the images to the editor and edit the buttons and what not there?

@yaustar Ok so i am kinda moving the Html css direction… I have the buttons here on the bottom left i will continue working with this until i seem to get it right. Thanks

Ok have my buttons ready… (Only quickplay will be enabled right now…) But i have been looking at the main menu tutorial you made… and i dont think i could go to through the same approach with html buttons right? or could i add like if the html button (quickPLay) isPressed then it loads the new scene hierarchy and destroys the old?