Lua Player version 0.15
Moderators: Shine, Insert_witty_name
Lua Player version 0.15
On http://www.luaplayer.org you can get the new version 0.15.
The changelog:
- timer bug fixed (was bug in PSPSDK) [mrbrown]
- wlan socket support (based on PspPet's "WiFi Multi-Test .03") [Shine]
- changed sceGu* and sceGum* functions to Gu.* and Gum.* [Shine]
- System.getFreeMemory added [Shine]
- Freetype added, with 2 default fonts (see http://www.gnome.org/fonts/ for the licence) [Shine]
The new functions are documented at http://wiki.ps2dev.org/psp:lua_player:functions and with the 2 new samples: True Type Font and WLAN. The WLAN example has a webserver integrated: Enter the IP of your PSP in your webbrowser and the PSP delivers a simple test page.
I'm sure there are many bugs, especially the new WLAN support needs to be enhanced, e.g. DNS lookup and some internal TODOs, but at least it works :-)
The changelog:
- timer bug fixed (was bug in PSPSDK) [mrbrown]
- wlan socket support (based on PspPet's "WiFi Multi-Test .03") [Shine]
- changed sceGu* and sceGum* functions to Gu.* and Gum.* [Shine]
- System.getFreeMemory added [Shine]
- Freetype added, with 2 default fonts (see http://www.gnome.org/fonts/ for the licence) [Shine]
The new functions are documented at http://wiki.ps2dev.org/psp:lua_player:functions and with the 2 new samples: True Type Font and WLAN. The WLAN example has a webserver integrated: Enter the IP of your PSP in your webbrowser and the PSP delivers a simple test page.
I'm sure there are many bugs, especially the new WLAN support needs to be enhanced, e.g. DNS lookup and some internal TODOs, but at least it works :-)
Last edited by Shine on Sat Jan 07, 2006 6:23 pm, edited 1 time in total.
Dude, you added wireless :P Not a pure socket.h implementation it seems, but perhaps that's for the good... 'Tho adding the LuaSocket library (http://luaforge.net/projects/luasocket/) would kick serious ass.
I need to get back to the luaplayer scene... *too much school*
I need to get back to the luaplayer scene... *too much school*
Hello
I've just noticed that there is maybe some problem when printing
text to a screen with Luaplayer0.15:
FOSK0.20 works smoothly under Luaplayer v0.12, but when running with Luaplayer v0.15,
the lines with null length are printed with the same content as the prev.lines.
source: http://fosk4psp.dynamicweb.hu/
file: kbrdfnct.lua
routine: disptxt()
EDIT:
the same thing happens with MikeHaggar's Text Browser.
I've just noticed that there is maybe some problem when printing
text to a screen with Luaplayer0.15:
FOSK0.20 works smoothly under Luaplayer v0.12, but when running with Luaplayer v0.15,
the lines with null length are printed with the same content as the prev.lines.
source: http://fosk4psp.dynamicweb.hu/
file: kbrdfnct.lua
routine: disptxt()
Code: Select all
for j = 1,k do
tx = j+starty
if (tx > 0)and (tx<numlines) then
screen:print(0, 8*(j-1), string.format("%s",string.sub(text[tx],startx,(string.len(text[tx])-mode1))), colors[2][1])
end
end
EDIT:
the same thing happens with MikeHaggar's Text Browser.
To fix your problem write this:mrn wrote:FOSK0.20 works smoothly under Luaplayer v0.12, but when running with Luaplayer v0.15,
the lines with null length are printed with the same content as the prev.lines.
Code: Select all
yourStringVariable
Code: Select all
string.format("%s", yourStringVariable)
Code: Select all
sv1 .. sv2
Code: Select all
string.format("%s%s", sv1, sv2)
Code: Select all
assert(string.format("%s", "1") == "1")
assert(string.format("%s", "") == "")
Code: Select all
assert(string.format("%s", "1") == "1")
assert(string.format("%s", "") == "1")
BTW: this list is not for me only, if someone can fix a bug, I would be happy to include it to Lua Player :-)
Re: Lua Player version 0.15
[quote=
- Freetype added, with 2 default fonts (see http://www.gnome.org/fonts/ for the licence) [Shine]
[/quote]
Arrrgh, just when I finished writing all those font-blitting routines for my game, you built it into the Player!!! :-)
But seriously, good job on the Freetype stuff (and thanks for adding color support). I'll definitely check it out.
- Freetype added, with 2 default fonts (see http://www.gnome.org/fonts/ for the licence) [Shine]
[/quote]
Arrrgh, just when I finished writing all those font-blitting routines for my game, you built it into the Player!!! :-)
But seriously, good job on the Freetype stuff (and thanks for adding color support). I'll definitely check it out.
LUA v.15
Possible bugs:
I noticed that when checking for the time in this version it returns the hour inaccurately at 5 hours later than usual. If system clock says 5:00 pm, the LUA v.15 returns the hour as 10:00 pm.
Also, wav files sound slightly distorted in this version. They have a crackling noise in LUA v.15, when they played perfectly well in LUA v.15.
I noticed that when checking for the time in this version it returns the hour inaccurately at 5 hours later than usual. If system clock says 5:00 pm, the LUA v.15 returns the hour as 10:00 pm.
Also, wav files sound slightly distorted in this version. They have a crackling noise in LUA v.15, when they played perfectly well in LUA v.15.
He has showed you, O man, what is good.
And what does the LORD require of you?
To act justly and to love mercy
and to walk humbly with your God. (Micah 6:8)
And what does the LORD require of you?
To act justly and to love mercy
and to walk humbly with your God. (Micah 6:8)
-
- Posts: 53
- Joined: Wed Aug 31, 2005 1:43 am
Is this new with v.15 because before (v.14) it was displaying the time according to the time zone set on my psp, if so is there a way to set the time zone within lua?JoshDB wrote:The time in Lua Player is GMT -+0
My current clock code.
Code: Select all
function Clock()
time = os.time()
dateString = os.date("%l:%M%p %m/%d/%Y")
dateFields = os.date("*t", time)
screen:print(169, 2, dateString, white)
end
I want my money back!?
just tried to replace the "screen:print" with "screen:fontPrint" in F.O.S.K
and it become really-really slow: I need to press a button 10-15 times
until the cursor reacts. Removing "string:format" does not speed it up at all
(just try it in the dispText routine.)
So, the question is, why is it so and how can I make it faster?
(the only thing coming to my mind is to copy the actual screen
and re-display it if there is no change like cursor movement...
but still, it does not solve the true-type font speed question.)
thnx, mrn
and it become really-really slow: I need to press a button 10-15 times
until the cursor reacts. Removing "string:format" does not speed it up at all
(just try it in the dispText routine.)
So, the question is, why is it so and how can I make it faster?
(the only thing coming to my mind is to copy the actual screen
and re-display it if there is no change like cursor movement...
but still, it does not solve the true-type font speed question.)
thnx, mrn
You can cache the font drawing, but I think the best would be if it is cached from Lua Player, because otherwise it is difficult for Lua scripts when inserting single characters, because all other characters has to be redrawn, so caching could be done only per character. Currently the problem is that the glyphs are rendered every time again. Perhaps the bitmap objects, which are produced by Freetype, should be cached.mrn wrote: So, the question is, why is it so and how can I make it faster?
(the only thing coming to my mind is to copy the actual screen
and re-display it if there is no change like cursor movement...
but still, it does not solve the true-type font speed question.)
Hey, dude -
When will version 0.15 for Windows platform be available?
I tried 3D Cube/index.lua from the version 0.14 distribution with the version 0.14 for Windows and I got a black screen.
It would be very helpful if I had a version 0.15 for Windows in order to experiment 3D stuff. I know OpenGL but Gu.* and Gum.* are not quite the same with OpenGL or even SDL. I spent a lot of time trying to figure out the differences.
Thanks.
When will version 0.15 for Windows platform be available?
I tried 3D Cube/index.lua from the version 0.14 distribution with the version 0.14 for Windows and I got a black screen.
It would be very helpful if I had a version 0.15 for Windows in order to experiment 3D stuff. I know OpenGL but Gu.* and Gum.* are not quite the same with OpenGL or even SDL. I spent a lot of time trying to figure out the differences.
Thanks.
Geo Massar
Retired Engineer
Retired Engineer
Shine, can you pls. implement the caching in one of the next versions of Lua Player?You can cache the font drawing, but I think the best would be if it is cached from Lua Player, because otherwise it is difficult for Lua scripts when inserting single characters, because all other characters has to be redrawn, so caching could be done only per character. Currently the problem is that the glyphs are rendered every time again. Perhaps the bitmap objects, which are produced by Freetype, should be cached.
It would allow to see much more from a text file, not to mention the look,
the zoomIn - zoomOut options, etc.
This would also support offline browser-type applications to be ported to Lua.
(btw, is there any offline browser for reading downloaded htm files?)
-
- Posts: 1
- Joined: Sun Oct 09, 2005 11:38 am
LuaPlayer is a great work!
I'm enjoying more than playing any games :)
Now, I have a suggestion for 3D services.
How about dividing vertex prepareing from Gum.drawArray?
I've added a small user data for storing prepared vertices,
drawing 3D objects became extremely faster.
(it could draw over 12000 triangles in 1/60 sec.)
Here is the source code.
http://geocities.com/lua_ema/lua3dgs.zip
I'm glad if you like it.
Thanks.
I'm enjoying more than playing any games :)
Now, I have a suggestion for 3D services.
How about dividing vertex prepareing from Gum.drawArray?
I've added a small user data for storing prepared vertices,
drawing 3D objects became extremely faster.
(it could draw over 12000 triangles in 1/60 sec.)
Here is the source code.
http://geocities.com/lua_ema/lua3dgs.zip
I'm glad if you like it.
Thanks.