Device Info - Module to detect device's platform, type, etc

I actually made a post before about this, but I had to delete it because Roblox didn’t save my changes.

Also this is my very first community resource post! Please tell me if I am missing something on the post.

Hey guys, today I am presenting you Device Info.

You should use this for analytics purpose, not for the bad habits of detecting the device and making your game controls defaulted to the control that your game uses for keyboard and mouse, gamepad, etc.

Backstory of why did I make this module:

I actually made this because I got intrested on replicating World Builder’s device detection system.

I made this by combining UserSettings(), UserInputService, Camera, and GuiService.

After I made the basics, I decided to extend it further by adding graphics level detection, screen resolution detection, device orientation detection for mobile devices, mobile device type detection (phone or tablet).

Important notes: (OPEN)
  • I guarantee pc and mobile detection works correctly as possible, console and touchscreen laptops aren’t guranteed to work (I don’t have a console/gamepad and only my dad has a touchscreen laptop which I am not allowed to use)

  • Bugs can be reported here or at my github (link at my website)

  • This module can only be used on the client!

  • Again, you should use this for analytics purpose, not for the bad habits of detecting the device and making your game controls defaulted to the control that your game uses for keyboard and mouse, gamepad, etc.

You can get it here or you can play the module in action at live game here (It’s uncopylocked)

Pastebin source code: Link

You can credit me if you want to use this module, however you can also no need to credit me, that’s your choice.

I am open for bug reports, tips, and crictisms

Pictures:

Detection on my phone (I started at portrait mode and then switched to landascape):

More coming soon.

Links

DeviceInfo main page:
https://realethanplayzdev.github.io/Device%20Info/Device%20Info/

API Reference:
https://realethanplayzdev.github.io/Device%20Info/API%20Reference/

Usage:
https://realethanplayzdev.github.io/Device%20Info/Usage/

Is this useful for you?

  • Yes
  • No

0 voters

24 Likes

Actually, can someone play the game using a console and see if it detects correctly?

Oops… I forgot to add the api reference and usage link…

Sorry about the broken poll, but most people likes the module (the poll was broken because I didn’t knew how to use it correctly)

Thank you! You gave me some motivation to develop!

Also expect pastebin source code tommorow guys

Hey guys, as I promised I will add a pastebin link, I added it to the post!

Edit: Also updated the post.

Added a picture showing detection on my phone, there’s only 1 for now.

Awesome module! The thing is, your code looks super messy. Any plans on fixing this?

Thanks for the feedback! I will.

Heres my current plans for now:

  • Improvement :tm: if I can improve it

However I am being halted due school so I’ll fix the messy code and clean it up first tommorow.

Code has been cleaned.


The module is also updated to reflect the cleaned code changes.
1 Like

Dear everyone.
Starting from September 4, 2020. This module won’t be updated and maintaned anymore since I am abandoning and quitting Roblox (read my main account’s bio for more information), I will only update if something breaks. Thank you for supporting and using this module.

This post and my website will still be up however.

  • Ethan
1 Like

Until I can get that account back, I will be posting from here.

V2 released, an rewrite. As of October 4 2021, this module is not truly 100% guranteed to have full and correct detections, I was able to think of some ways that it can result false positives.

Note to users using V1: Multiple things (including method names, and return types) has changed, some of the detections are also optimized, an updated API documentation will be soon available

1 Like

Documentation updated:
https://realethanplayzdev.github.io/DeviceInfo/About/

Will you be fixing those throughout the next few Updates?

Can you elaborate on fixing what? If you’re talking about detection false positives, it’s not really fixable, the engine is obviously better at detecting things like what the module does

As people has said, develop your games to match any control changes, take example fron Lumber Tycoon 2 or Flood Escape 2, you can change from keyboard with mouse to controller anytime, etc

1 Like