Windows bubble notifications

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Windows bubble notifications

Post 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.
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Windows bubble notifications

Post 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.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Windows bubble notifications

Post 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.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Windows bubble notifications

Post by Positive07 »

Weird for me it is the whole thing... but you were right, there is no difference between the types
WIndows 7 - 32bits
Attachments
It works
It works
title of box.png (14.93 KiB) Viewed 2641 times
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Windows bubble notifications

Post 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
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Windows bubble notifications

Post 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.
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Windows bubble notifications

Post by slime »

Are you using love.math.random + love.math.setRandomSeed (or a RandomGenerator object + randomgenerator:setSeed) in your world generation code?
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Windows bubble notifications

Post 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?
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Windows bubble notifications

Post 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.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Windows bubble notifications

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests