Hello all, I am working on a game with a background built from pixels with a random value for the grass color.
I use this code to get the pixel color values: pixels.g = love.math.random(125, 200)
On the PC build I get pic 1.
But whenever I put it on iOS I get pic 2.
I suspect the is some problem with the love.math.random not being cross-platform in the new version of love??
But I'm not sure at all.
Thank you for any help in advance!
love.math.random not working on iOS in Love V 11.1
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: love.math.random not working on iOS in Love V 11.1
You have LÖVE 0.10 on your pc, but 11 on your iOS device. The color range changed from 0-255 to 0-1, meaning you need to divide your result by 255 in order to make it work.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
-
- Prole
- Posts: 1
- Joined: Sat Apr 28, 2018 12:57 pm
Re: love.math.random not working on iOS in Love V 11.1
I tried installing LOVE on my iPhone X running iOS 11.4. But the app freeze and gradually crashes itself. How to work it out?
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests