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.
love.math.random not working on iOS in Love V 11.1
- Attachments
-
- Screen Shot 2018-04-17 at 1.43.57 PM.png (32.45 KiB) Viewed 137 times
-
- Image-1.jpg (22.86 KiB) Viewed 137 times
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
Who is online
Users browsing this forum: No registered users and 8 guests