Mobile/Desktop FPS Controls

posted in jhocking
Published September 30, 2024 Imported
Advertisement

I’ve been wanting to make some little demo scenes based on monster/ghost characters my kids are drawing (initially it was my son’s idea, but my daughter wants in too) so I started by setting up controls for these little playable scenes:

Initially I just programmed some mouse+keyboard controls in order to experience the demo on computers. However I realized I wanted my son to be able to play these (I mean duh, they are his idea) and he only has access to a mobile tablet, not a full computer. Thus I picked up Control Freak 2 (a Unity asset for customizing input like this) and quickly knocked up some onscreen joysticks for mobile controls.

Then I had to write a bit of custom code in order to switch the control mode based on the device you’re playing on. That’s harder than expected, because Apple (of course it was Apple!) decided to have iPads report to the browser as a desktop device, instead of correctly reporting as a mobile device, in order to get the desktop version of websites. And truth be told, it’s still not perfect since what’s actually being detected in whether or not your device has a touchscreen, not desktop vs. mobile. There are some desktop/laptop devices with touchscreens, but that’s uncommon enough that I’m fine with how my controls work.

I haven’t yet decided on what exactly I’ll call these (case files? scenarios? hauntings?) but as soon as I do I’m going to start posting them on itch for my kids and their friends to check out.

Read more

Previous Entry Demo of Eschatown’s Map
1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement