Difference between revisions of "love.(underscore)os"

m (Undo revision 28919 by Alejandroalzate (talk) Just forgot to tick "this is a minor edit")
(Tag: Undo)
Line 11: Line 11:
 
Other good example is that if a device is known for having trouble running your game warn the user of such problems, a more shady use of this example is blocking/filtering/redirecting a device from an online service/feature that the game has, either because it gives too much advantage or makes problems on your server where you host it (a.k.a separating mobile/desktop/console users from each other unless they want to compete with other platforms or a platform does ''*not*'' meet your standards being blocked right away, either by processing power or unfair advantage)
 
Other good example is that if a device is known for having trouble running your game warn the user of such problems, a more shady use of this example is blocking/filtering/redirecting a device from an online service/feature that the game has, either because it gives too much advantage or makes problems on your server where you host it (a.k.a separating mobile/desktop/console users from each other unless they want to compete with other platforms or a platform does ''*not*'' meet your standards being blocked right away, either by processing power or unfair advantage)
  
This variable can *Officialy* have 4 outcomes that most of the time are self explanatory '''''"Windows" "Android" "Mac" "Iphone"''''' Also the ports can make use of this variable making them unreliable on non official supported platforms ports.
+
This variable can *Officialy* have 4 outcomes that most of the time are self explanatory "Windows" "Android" "Mac" "Iphone". Also take note that the ports can make use of this variable making them unreliable on non official supported platforms ports.

Revision as of 16:39, 19 September 2023

love._os


This is an platform dependent string that tells your game in what platform is running on.

This is useful when trying to make a multi-platform game where you can account on the capabilities of such device A good example of this is when a game detects that is running on mobile it'll show the on-screen gamepad if no physical input devices like a gamepad or mouse & keyboard are present.

Another good example is being a perfectionist and following theming rules of the device like accent color and dark mode, since there's no internal *generic* API call that love could provide us like lets *make stuff up* an so we call love.graphics.getSystemTheme() or something, we have to implement it ourselves and this depends of the platform: on windows is a registry key, on android we have to call a C++ function or something along those lines, on linux is even harder it depends on the window manager, desktop enviroment and what distro is the user running on, And for mac and iphone honestly it is not in my realm of knowledge.

Other good example is that if a device is known for having trouble running your game warn the user of such problems, a more shady use of this example is blocking/filtering/redirecting a device from an online service/feature that the game has, either because it gives too much advantage or makes problems on your server where you host it (a.k.a separating mobile/desktop/console users from each other unless they want to compete with other platforms or a platform does *not* meet your standards being blocked right away, either by processing power or unfair advantage)

This variable can *Officialy* have 4 outcomes that most of the time are self explanatory "Windows" "Android" "Mac" "Iphone". Also take note that the ports can make use of this variable making them unreliable on non official supported platforms ports.