v0.20 Errors.

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

v0.20 Errors.

Post by romero126 »

Huge lag on v.20

Is there any reason why there is a huge lagspike on loading more than 10 lines on fontprint?

width, height Font:getTextSize(string) returns nil, constantly (completly broken)

Font:setPixelSizes(number width, number height) - When used with Font Font.createMonoSpaced() number for width is not porportional to (number width) See Example

Code: Select all

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!
SnowyDisposition
Posts: 4
Joined: Wed Sep 27, 2006 11:41 am

Post by SnowyDisposition »

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:

Code: Select all

Default = Font.createMonoSpaced() 
Noobs these days, but anyway. If you find a solution to the slowdown I'd really love to use Verdana, a basic TTF font, in my lua game. :)
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

Code: Select all

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.
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

Just want to say he didn't call you a noob. He said that about the guy who told him the "BS story".
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

lol...

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:

Code: Select all

width, height = Font.getTextSize(font, string)
you should receive the correct values
- be2003
blog
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

also...

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...)
- be2003
blog
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

require "luastuff.lc"

doesn't seem to work anymore. Any ideas? Workarounds?

(at least psprintlua and ttlde 2.0 both use this, and they're both broken)
Post Reply