Page 4 of 6

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Tue Sep 15, 2015 10:49 pm
by MyLegGuy
Why does my rectangle get longer as x1 gets bigger?

Code: Select all

Screen.fillRect(x, 16, 20, 52, Color.new(0,255,0))
Also, why does it crash when I try to launch a velf?
I have this:

Code: Select all

if Controls.check(Controls.read(), PSP2_CTRL_SELECT) then
Network.termFTP()		
System.loadElf("cache0:/lpp-vita.velf")
end
I have the velf at the root of where I'm able to put files. (Which I'm assuming is cache0)

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Wed Sep 16, 2015 10:47 am
by Dryon
Rinnegatamante wrote:
Dryon wrote:I can't install PSM Unity, I gave it all my afternoon but it didn't want I'm giving up. I can only count on a fix for normal PSM Dev Assistant by you now, and a PC player as alternative. I was so hyped to code again in LUA :?
If you're on 3.18 or below, it should be relatively simple to install PSM Dev Assistant for Unity using PKG installer.
I'm on 3.51 :/

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Wed Sep 16, 2015 12:06 pm
by Ervilha
MyLegGuy wrote:Why does my rectangle get longer as x1 gets bigger?

Code: Select all

Screen.fillRect(x, 16, 20, 52, Color.new(0,255,0))
The first and third parameters are the rectangle top left corner position (x,y) and
the second and fourth parameters are the rectangle bottom right corner position (x+w,y+h)
MyLegGuy wrote:
Also, why does it crash when I try to launch a velf?
I have this:

Code: Select all

if Controls.check(Controls.read(), PSP2_CTRL_SELECT) then
Network.termFTP()		
System.loadElf("cache0:/lpp-vita.velf")
end
I have the velf at the root of where I'm able to put files. (Which I'm assuming is cache0)
I think Network.termFTP() is the problem, it crashes for me every time, System.loadElf() should work ok.

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Wed Sep 16, 2015 5:40 pm
by Rinnegatamante
Ervilha wrote:
MyLegGuy wrote:Why does my rectangle get longer as x1 gets bigger?

Code: Select all

Screen.fillRect(x, 16, 20, 52, Color.new(0,255,0))
The first and third parameters are the rectangle top left corner position (x,y) and
the second and fourth parameters are the rectangle bottom right corner position (x+w,y+h)
MyLegGuy wrote:
Also, why does it crash when I try to launch a velf?
I have this:

Code: Select all

if Controls.check(Controls.read(), PSP2_CTRL_SELECT) then
Network.termFTP()		
System.loadElf("cache0:/lpp-vita.velf")
end
I have the velf at the root of where I'm able to put files. (Which I'm assuming is cache0)
I think Network.termFTP() is the problem, it crashes for me every time, System.loadElf() should work ok.
Yeah, termFTP is quite instable at the moment (the same problem afflict also debug FTP when an error occur).

For the rectangle, according to the documentation (http://rinnegatamante.it/lpp-vita_doc.html)

First two arguments are x1 and x2, third and forth argument are y1 and y2.

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Wed Sep 16, 2015 7:56 pm
by MyLegGuy
Thanks for the help!

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Thu Sep 17, 2015 11:51 pm
by MyLegGuy
Do you plan on adding a way to test your game without leaving the dev assistant and loading lpp-vita again using a computer? For example, make it possible to transfer over a new index.lua file through the ftp server, and then launch it.
I tried to accomplish this using dofile (something I stole from the menu example), but if I replace index.lua with a new one, it crashes when I try to load it. If it hasn't been changed, it won't crash when I try to launch it.

Also, there's no way to play sounds, right?

And when I do

Code: Select all

fps = Screen.getFramerate()
Screen.debugPrint(5, 236, fps, Color.new(0,0,0))
, it displays -7.7088853-38.

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Fri Sep 18, 2015 8:43 am
by Rinnegatamante
Thanks for your report, frameRate code comes from vita2dlib, probably it's quite bugged, i'll talk with xerpi later.

dofile should work, probably the issue is related to FTP (Do you call termFTP?).

For sounds, i cannot found any sound sample on vita-toolchain repository and it's very time consumpting make your own tests to add it.
If a sample appear, i can easily port luaSound from lpp-3ds repository (Which will bring WAV, AIFF and OGG sounds support to lpp-vita).

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Sat Sep 19, 2015 5:43 pm
by Virus
I (already) have an issue... x_x It shows me that there's an "Error loading image", but I wrote it correctly (I think)... ^^'
splashscreen = Screen.loadImage("cache0:/splashscreen.jpg")

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Sun Sep 20, 2015 7:59 pm
by Rinnegatamante
Virus wrote:I (already) have an issue... x_x It shows me that there's an "Error loading image", but I wrote it correctly (I think)... ^^'
splashscreen = Screen.loadImage("cache0:/splashscreen.jpg")
Is your file located in the root of MS when connecting with FTPvita?

Re: Lua Player Plus VITA (lpp-vita) - Lua interpreter for PS

Posted: Sun Sep 20, 2015 8:01 pm
by Virus
My image is correctly located in "cache0:/splashscreen.jpg", not in the root... :/