LOVE2PSP - Convert love scripts to psp
Posted: Tue Sep 04, 2012 4:27 am
Hello Love community i created a program that does what the topic title says. I called it LOVE2PSP it currently converts simple love api to psp lua api so that your love games can be ran on the psp without having to recode your scripts for psp.I recently began coding for psp again because i just repaired my broken psp lol, and thought to myself how great would it be if i was able to run my love scripts on my psp so i created this program. This program can also be used to create games for love. I plan on adding the option of converting psp scripts to love, but that would be later on. As of right now i am able to convert my old love projects to psp and have no problems. The program loads main.lua and reads it, it will organize your code on the right by category variables, images, audio etc. You can quickly search for the variable by clicking once or edit it quickly by double click or via right-clicking for the full option menu. When finish just save it. If you selected psp build it will convert the main.lua to be ran on psp it would no longer run on love so make sure you back up the file first. If you just want to edit main.lua for love and use LOVE2PSP functions then just select the love icon. Currently build errors are bugged so you will always receive 4 errors on functions missing so ignore it i will fix that later on. If your main.lua for psp build does not use any mouse functions then add an empty function like:
or you will have errors running it on lua player windows and the psp.
Functions: (currently working)
To do list:
How to get started:
1) Run LOVE2PSP.exe select file >> open, and select the file you want to convert
2) Once the file is selected you will get a pop-up menu select the PSP icon.
3) Save the file make a new folder drag or copy the files that your love script loads (images, audio, etc) into the new folder
4) In the PSP >> Required folder copy all the files and paste them into your new folder
5) Move the new folder onto your PSP >> Games folder and run it!
Requires that your PSP be hacked to run the scripts
Download includes:
PSP lua player windows: Run psp scripts on windows (Test the scripts)
PSP required files
LOVE2PSP.exe
VB6 Libraries (Might need to install them if you get errors running LOVE2PSP)
Love demos and PSP converted version
If you have audio being played on the script you can not use PSP lua player windows to run it since lua player windows does not support MP3 to run it on lua player windows you must edit main.lua and remove the codes love.audio.load, play, stop by commenting them out with "--" and in script.lua comment out load, play, and stop with "--"
Preview of LOVE2PSP: (Download below)
Preview of Graphical Mode layout:
Me setting up where i want the image to draw
Running the game to test it the position is the same.
Download:
http://www.mediafire.com/?o25aaaze9ti647x
If you would like for me to add an api to convert to psp that is not listed above then give me a reply here with an example of how to use it and i will add it to the next update. If you get any bugs/errors then give me a reply and i will fix it.
Code: Select all
function analogMove()
end
Functions: (currently working)
Code: Select all
- love.audio.load (currently only MP3 files OGG, WAV etc will be added later)
- love.audio.play (also works as love.audio.resume)
- love.audio.stop
- love.graphics.newImage
- love.graphics.draw
- love.graphics.print
- love.graphics.newFont
- love.graphics.setBackgroundColor() (have to set it under love.draw() because its treated as a image drawable)
- love.filesystem.load (not tested but should work)
- love.filesystem.newFile (not tested but should work)
- AnAL animations (newAnimation, Animation:Draw(x, y), Animation:update())
- love.keyboard.isDown() (currently only converts the keys up, down, left, and right to psp d-pad buttons up, down, left, and right)
- love.mouse.isDown("l") (This is limited since the psp does not use a mouse you can map the mouse movement keys onto the d-pad or analog, and the mouse left-click button will be set to the psp's "x" button you can change this through the options >> settings menu)
Code: Select all
- Love Lua socket api to psp
- Graphical Mode layout (rather than scripting and viewing code this mode allows the user to just add images etc and move them on screen without coding and run them in love/psp i can't explain so look below for the graphical mode layout preview screenshot)
1) Run LOVE2PSP.exe select file >> open, and select the file you want to convert
2) Once the file is selected you will get a pop-up menu select the PSP icon.
3) Save the file make a new folder drag or copy the files that your love script loads (images, audio, etc) into the new folder
4) In the PSP >> Required folder copy all the files and paste them into your new folder
5) Move the new folder onto your PSP >> Games folder and run it!
Requires that your PSP be hacked to run the scripts
Download includes:
PSP lua player windows: Run psp scripts on windows (Test the scripts)
PSP required files
LOVE2PSP.exe
VB6 Libraries (Might need to install them if you get errors running LOVE2PSP)
Love demos and PSP converted version
If you have audio being played on the script you can not use PSP lua player windows to run it since lua player windows does not support MP3 to run it on lua player windows you must edit main.lua and remove the codes love.audio.load, play, stop by commenting them out with "--" and in script.lua comment out load, play, and stop with "--"
Preview of LOVE2PSP: (Download below)
Preview of Graphical Mode layout:
Me setting up where i want the image to draw
Running the game to test it the position is the same.
Download:
http://www.mediafire.com/?o25aaaze9ti647x
If you would like for me to add an api to convert to psp that is not listed above then give me a reply here with an example of how to use it and i will add it to the next update. If you get any bugs/errors then give me a reply and i will fix it.