| View previous topic :: View next topic |
| Author |
Message |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Tue Oct 17, 2006 4:05 pm Post subject: v0.20 Errors. |
|
|
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: |
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! |
|
| Back to top |
|
 |
SnowyDisposition
Joined: 27 Sep 2006 Posts: 4
|
Posted: Wed Nov 08, 2006 1:49 am Post subject: |
|
|
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: | | 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. :) |
|
| Back to top |
|
 |
romero126
Joined: 24 Dec 2005 Posts: 200
|
Posted: Thu Nov 09, 2006 8:07 am Post subject: |
|
|
| Code: |
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. |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Sat Nov 11, 2006 5:03 am Post subject: |
|
|
| Just want to say he didn't call you a noob. He said that about the guy who told him the "BS story". |
|
| Back to top |
|
 |
be2003
Joined: 20 Apr 2006 Posts: 144
|
Posted: Tue Nov 14, 2006 4:04 pm Post subject: |
|
|
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: |
width, height = Font.getTextSize(font, string)
|
you should receive the correct values _________________ - be2003
blog |
|
| Back to top |
|
 |
be2003
Joined: 20 Apr 2006 Posts: 144
|
Posted: Tue Nov 14, 2006 4:13 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Wed Nov 22, 2006 10:27 am Post subject: |
|
|
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) |
|
| Back to top |
|
 |
|