Font:setPixelSizes(number width, number height) - When used with Font Font.createMonoSpaced() number for width is not porportional to (number width) See Example
Default = Font.createMonoSpaced()
Default:setPixelSizes(14, 14)
-- Font width is approx 8px
-- Font height is approx 12px?
Each cycle on LUA Player v0.20 takes alot longer to execute. Could there possibly be a way inside LUA Player to disable module checking if modules are not executed/loaded?
Also another question is why are the modules automatically loaded at runtime VS loaded on the fly? (IE loaded as needed?)
Just some bugs I thought you would like to know about!
Well one problem I see immediately with your code is that you're loading that font during every cycle. -.- It needs to be done at startup and never again.
I do want to say, though, that I have the same problem (doing things correctly) with any kind of loaded font. I recently got some BS story about how "ohh you just need to load it into a variable first" which really caught me off guard. Isn't that exactly what I'm doing when I say:
Default = Font.createMonoSpaced()
Default:setPixelSizes(14, 14)
-- Font width is approx 8px
-- Font height is approx 12px?
Is not representitve of each cycle nor is it representitve as actual code This is what we call psuedo code that does not discribe anything other than the fact that "Default:setPixelSizes(14, 14)" does not actually represent itself as 14x14 px It scales down to a lower size. As for the speed issue previously noted. Every variable is defined prior to any cycle, each cycle is represented by a physical number that resets every second and updated as such.
There is a significant slowdown on the basis of TTF fonts as well as fonts not described as default.
Don't call me a noob because didnt even take the time to read the post nor the code that was given to the letter. The above code is defintion declaration which gives variables created before blitting.
Please learn to read code and not think like an idiot.
i was looking through the luaplayer source in search of the cause of this "lagspike" and found that if anything is causing this "lagspike" (i have printed way more than ten lines and have never experienced this, btw i was using verdana as a loaded font), it would be the gu, every other function leading up to it is full proof... which has nothing to do with 0.20 errors...
and also, im not sure, but if you call it like this:
if you wanted porportional why didnt you use Font.createPorportional()?...
and about the cycle thing... there currently is no module checking to disable... all modules are loaded at luaplayers execution (which reduces the amount of random access memory available, not the time it fricken takes for one cycle...), and the reason that they are loaded "on the fly" and not as needed is that there would be constant dependency checking to make sure all needed modules are loaded (which would increase cycle time, which is bad...)