|
#1
|
|||
|
|||
|
Love compatibility framework for zen x-fi2 lua
by Delirius current version 1.1.1 How to use: 1) copy dir "loveCompatibility" and file "conf.lua" to your app dir. 2) To include and initialize love compatibility, at the beginning of main.lua add: require "loveCompatibility.load"; main = function() And at the end of main.lua add: end; if(love) then love.run = main; else main(); end; As seen in example main bundled with this release. 3) change settings in "conf.lua" what you should change: - t.console - t.title - t.author - t.screen.width - t.screen.height (fullscreen doesn't work) Buttons: home button is mapped to escape. power button is mapped to f1. File operations: In love framework you can't write to application source folder. Every write operation is done into application data folder (on winsows7 it is "C:\Users\User\AppData\Roaming"). More information can be found in "http://love2d.org/wiki/love.filesystem". loveCompatibility copies all read and written files from source folder and all new files to data folder. Files can be deleted only in data folder, so if you have copy of file in your source folder, you can never get rid of it. Image resources bins: As with zen you can use images packed into resource bins. For packing and unpacking use ThievingSix's X-Fi2 Resource Compiler/Decompiler. When resource bin is used to load image, its contents are unpacked to data directory into _ResBin_ directory. Btw. Zen resource bins aren't compressed. Implementation: working functions "http://en.wikipedia.org/wiki/User:Thieving6/X-FI_2_Lua" Usable tables: - string - package - image - os - button - touch - control - screen - color - text (need original font) - io - coroutine (maybe) - math - table - coroutine - debug - audio - wav + most misc functions Missing tables: - accelerometer (i have no idea, how to implement it) Functions which doesn't work properly: - screen.backlight (obviously) - screen.orientation (to be done) - image.setbg (who knows what it does anyway?) - image.fill (never used it anyway) - os.rename (does someone use it anyway?) - io.popen (zen x-fi2 lua doesn't have this function working) - io.popen (zen x-fi2 lua doesn't have this function working) - io.tmpfile - io.output - io.input - io.stdin - io.stdout - io.stderr - print (on love works differently) History: 1.1.1 - fix: touch messages 1.1.0 - made compatible with Love2d 0.8.0 - compatibility with Love2d 0.7.2 is lost - fix: text color works 1.0.1 - fix: loading image 1.0 - wav table - audio table - image.setresource 0.8 initial public release To run example in Love2d simply change extension from zip to love. Added second Zip with new updated version for compatibility with Lova2d 0.8.0 Last edited by delirius; 08-21-2012 at 03:39 AM. Reason: update 1.1.1 |
|
|
|||
|
|
|
#2
|
|||
|
|||
|
greate thinking... but what of a enviorment are we using..?
Quote:
Last edited by Kalle Kula; 11-28-2011 at 03:16 AM. |
|
#3
|
|||
|
|||
|
Quote:
I have added download links |
|
#4
|
|||
|
|||
|
I have been able to do a love-version of my chess app and the speed improvements compared to the ADK simulator is amazing.
The standalone app fails and maybe It's not necessary to have that, anyway if you got some clue how to solve it. I get the same errors in Linux, Linux-Wine and Windows XP: Quote:
Quote:
|
|
#5
|
|||
|
|||
|
Try running it as admin. Or sudo if i am not mistaken on Linux (not expert there
.I seems it failed to create file or dir in user space. Could you send it to me? I will look at it tomorrow. Btw. do you have all necessary libs with standalone binary of your game? |
|
#6
|
|||
|
|||
|
Quote:
Quote:
Quote:
I guess the only reason to do a stand-alone app is that you don't have to update it if the Löve or the dependent libs gets updated. So don't spend so much time and effort on that(as it can be hard to detect ugliness of character-sets/path/case/name-mangling/... between Löve/Lua/Linux/Windows and DOS?). the ("copy /b love.exe+game.love game.exe") looks like DOS (not expert there), did you use that for your example-app I rather see that you try to get the wave/audio implemented. |
|
#7
|
|||
|
|||
|
new version with tables:
- audio - wav and resource bin support for loading images |
|
#8
|
|||
|
|||
|
Quote:
When you want to distribute app as exe you have to manually set identity in conf.lua. I tested it and it works. |
|
#9
|
|||
|
|||
|
I do a repost in the right thread. My original question was this:
Quote:
Code:
if love then wav.play(0) else wav.play() end And this things also solves things for my app
|
|
#10
|
|||
|
|||
|
i did some changes so you dont have to longer do:
Quote:
Could you please send me converted wav. Thank you in advance. |
|
#11
|
|||
|
|||
|
The message system don't aloud me to send a wav file. I guess you could use any short sound from apps in Application folder. If you have my BC Forest you can use the on.wav in the snd folder, Laserstrike also have a click sound. Using your app on the player the sound fades away slowly(volume gets lower with every click). See: http://www.anythingbutipod.com/forum...ghlight=volume Another quick and dirty solution is; as you have os.wait(200); in the while loop
Code:
mysound:close(); mysound = wav.load(wavFile); mysound:play() |
|
#12
|
|||
|
|||
|
Added second Zip with new updated version for compatibility with Lova2d 0.8.0.
Thanks to new version of love2d i have solved redrawing screen problem caused by buffering. |
|
#13
|
|||
|
|||
|
I have tested your work and it seems to handle touch messages differently.
No touch move or hold and always get a click message then the mouse has moved. I have used the creatives TouchDemo that is included in the simulator download for testing. |
|
#14
|
|||
|
|||
|
I will look into it. Have you used previous version of this lib? Is it different?
|
|
#15
|
|||
|
|||
|
Using the same TouchDemo app with Love 0.7.2 and your earlier lib working fine (tested with Windows Vista). The new lib was tested using Windows XP and linux-fedora
|
|
#16
|
|||
|
|||
|
update uploaded (version 1.1.1)
I hope i fixed move and hold messages. It works for me now. |
|
#17
|
|||
|
|||
|
Touch messages working fine. Would be nice if you can do the same with button messages. I always get a button.click() and no button.hold()
|
|
#18
|
|||
|
|||
|
ok, i will look into that.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 04:06 PM.












Linear Mode
