Device Type Detection

I should probably add this to the wiki, but essentially:

Windows/OSX → TYPE_MOUSEMOVEMENT
iOS/Android → TYPE_TOUCH
Xbone → TYPE_GAMEPAD1

In the future windows could change with the win10 app (defaulting to touch when in tablet mode, etc.)

Platform is not exposed because we haven’t seen a good use for it. Some people suggested analytics, but what does that get you? If you know a lot of people play on android for example, what will you do with that info? Make your touch controls better? Can’t you just track what types of input your users are using? Also track how big the screen your users are using? Both of these will give you more granularity into who your users are.

There might be a good reason out there (I suspect there is), but the arguments presented so far don’t convince me you get something extra out of knowing what platform your users are on. Type of screen and type of input seem to give you everything you would need. We could probably do more in the type of screen department, I agree.

I have a proposal to expose GuiService:IsTenFootInterface(), which would return true anytime you are running on a screen that is meant to be used about ten feet away from the user (think consoles, appletv, etc.). We could do more to expose physical size of the screen your code is running on as well. If we expose the ability to detect input types and screen sizes, what could you do with knowing your game is running on windows? android? iOS? a potato?

6 Likes