Page 2 of 3

Re: Windows bubble notifications

Posted: Fri Sep 26, 2014 8:35 am
by Jasoco
Positive07 wrote:
Jasoco wrote:Please fix please! I want 0.9.2 because it fixes an issue I reported about teeny tiny error messages on HighDPI enabled projects on Retina displays.
Maybe a little outdated but you can grab it anyway (since the fix you want is there)
Thanks. It works great. Also, today I learned that love.math.noise returns a different pattern between versions.

Oh, and the error font looks so nice and smooth in HighDPI at 2x font size. I love Retina.

Re: Windows bubble notifications

Posted: Fri Sep 26, 2014 2:21 pm
by slime
Jasoco wrote:Thanks. It works great. Also, today I learned that love.math.noise returns a different pattern between versions.
Hmm, are you sure? I didn't think that code had changed.

Re: Windows bubble notifications

Posted: Fri Sep 26, 2014 2:35 pm
by Ref

Code: Select all

function love.load()
	love.window.setMode(200,200)
	love.graphics.setBackgroundColor(0,0,155)
	--for love 9.2 NOTE:message can't contain spaces!
	type = {'info','warning','error'}
	showMessage = true
	end

function love.draw()
	love.graphics.setColor(155,155,0)
	love.graphics.circle('fill',100,100,100)
	if showMessage then
	love.window.showMessageBox(type[2], 'title of box','select something')
	showMessage = false
	end
	end
On Love 9.2 (downloaded from hawkthorne) gives me the message 'select' - not 'select something'.
Is this what you are seeing?
I'm on Windows 7 and iup's message box works fine.

Re: Windows bubble notifications

Posted: Fri Sep 26, 2014 3:05 pm
by Positive07
Weird for me it is the whole thing... but you were right, there is no difference between the types
WIndows 7 - 32bits

Re: Windows bubble notifications

Posted: Fri Sep 26, 2014 4:57 pm
by slime
The types are just hints for the operating system's native message box functionality to use. Some (e.g. OS X) make use of it, some don't.

Also you probably shouldn't override Lua's 'type' function. :P

Re: Windows bubble notifications

Posted: Sun Sep 28, 2014 2:27 am
by Jasoco
slime wrote:
Jasoco wrote:Thanks. It works great. Also, today I learned that love.math.noise returns a different pattern between versions.
Hmm, are you sure? I didn't think that code had changed.
Pretty sure. In my RPG project, I was generating a sample world map from the noise pattern. I had placed a couple bridges and villages and the player position and it would always load and generate the same way.

Now it generates completely differently using the same values.

At least on OS X. I don't know if Noise is different between operating systems.

Re: Windows bubble notifications

Posted: Sun Sep 28, 2014 2:52 am
by slime
Are you using love.math.random + love.math.setRandomSeed (or a RandomGenerator object + randomgenerator:setSeed) in your world generation code?

Re: Windows bubble notifications

Posted: Sun Sep 28, 2014 7:45 am
by Jasoco
Actually yes. A Löve RNG is part of the positioning. Did love.random stuff change instead? That might be the problem. So RNG seeds are going to be different between versions? Either way, it's still going to change things between versions. Is there no way they could have kept the seed generator between 0.9.1 and 0.9.2?

Basically this code will generate a different value?

Code: Select all

local rng = love.math.newRandomGenerator(seed)
local scaling = 0.7
local scale = 2 ^ (scaling * 5)
local xoffset = rng:random(100000)
local yoffset = rng:random(10000)

local n = love.math.noise((xoffset) / scale, (yoffset) / scale)
print(n)
In 0.9.1 I get > 0.038758784532547
In 0.9.2 I get > 0.93525159358978

If I remove the RNG part and generate noise from a set position instead:

0.9.1 > 0.7114549279213
0.9.2 > 0.7114549279213

So I guess RNG was changed. Not Noise. Sorry to keep this off-topic.

Does this mean that saving the state of a seed generated in 0.9.1 will load it wrong in 0.9.2?

Re: Windows bubble notifications

Posted: Sun Sep 28, 2014 6:02 pm
by slime
Jasoco wrote:Is there no way they could have kept the seed generator between 0.9.1 and 0.9.2?
I'll push the change back to 0.10, since it can break 0.9.x code.

Re: Windows bubble notifications

Posted: Sun Sep 28, 2014 6:48 pm
by Jasoco
slime wrote:
Jasoco wrote:Is there no way they could have kept the seed generator between 0.9.1 and 0.9.2?
I'll push the change back to 0.10, since it can break 0.9.x code.
Was there any important change that prompted it to generate differently? I know nothing about how an RNG works. As long as random and noise remain consistent between platforms and versions.