Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(3 edits) (+1)

Thanks. I commented it: IS_MOBILE = love.system.getOS() == "Android" or love.system.getOS() == "iOS". As long as I know you can not retrieve with getOs if a system is Sailfish, Aurora or Postmarket Os, it always return "linux". I hope it helps.

https://video.gamerstavern.online/w/7NT8ZXQdQAn9sjDgKxfjoW

This is my definitive version, I gave up on too much glow and added a performant nebula instead in which I worked hard on optimizing for phones. The result speaks for itself: 60fps most of the time and amazing graphics! Feel free to add whatever you like of my work if you like it, if you prefer something else that's fine!

I'll definitely try the nebula shader for the parallax background, I liked that effect a lot!

Regarding detecting mobile, you could try:

IS_MOBILE = love.system.getOS() == "Linux"
  and (require("ffi").arch == "arm" or require("ffi").arch == "arm64")

`jit.arch` (or `ffi.arch`) returns the architecture: https://luajit.org/ext_jit.html#jit_arch

You can assume Linux on ARM likely indicates a mobile platform, and also check for OpenGL ES to be safer:

local gl_vendor, gl_version = love.graphics.getRendererInfo()
if gl_version then
   is_es = string.find(gl_version:lower(), "es", 1, true) ~= nil
end
IS_MOBILE = love.system.getOS() == "Linux" and (require("ffi").arch == "arm" or require("ffi").arch == "arm64")
    and is_es

Have a nice one!