Re: The Owls Massacre [v0.002]
Posted: Mon Jun 10, 2013 4:22 pm
One suggestion here: your laser value is showing up as some fairly long and ugly value sometimes, like 6.8149999999999997, when really 6.8 would be fine.
A quick and easy way to fix this, when you're drawing the text to the screen, just wrap your player.laser code in math.floor(). Or if you want to be more fancy, you can add a round function like this:
which will allow you to choose how many values after the decimal point you want to show. So the usage here would be:
Also it's generally best not to have spaces in filenames, since those tend to be replaced by ugly "%20" when downloaded.
So for example when I downloaded your 'The Owls Massacre.love' file, it was downloaded as 'The%20Owls%20Massacre.love'. Spaces also makes things complicated when trying to run files from a command line, since there you need to add an escape character \.
Instead of spaces, I would suggest just getting used to using underscores, like 'The_Owls_Massacre.love'.That way it will always display correctly and you'll avoid any possible issues
A quick and easy way to fix this, when you're drawing the text to the screen, just wrap your player.laser code in math.floor(). Or if you want to be more fancy, you can add a round function like this:
Code: Select all
function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end
Code: Select all
love.graphics.print("Laser:".. round(player.laser,2), 0, 0)
Also it's generally best not to have spaces in filenames, since those tend to be replaced by ugly "%20" when downloaded.
So for example when I downloaded your 'The Owls Massacre.love' file, it was downloaded as 'The%20Owls%20Massacre.love'. Spaces also makes things complicated when trying to run files from a command line, since there you need to add an escape character \.
Instead of spaces, I would suggest just getting used to using underscores, like 'The_Owls_Massacre.love'.That way it will always display correctly and you'll avoid any possible issues