| View previous topic :: View next topic |
| Author |
Message |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Wed Mar 15, 2006 12:51 am Post subject: LUA FilePAK 0.1 Beta |
|
|
Well... Tell me what you think guys.
http://haggar.pocketheaven.com/files/luapak01b.zip
This release is only for devs ;)
This program packs lots of files together into a single file.
This could be useful for people with games that have lots of level files.
There are currently 3 functions in unpak.lc:
returnvalue unpak(pakname,filename) - unpacks a file fully into the memory stick,
not recommended to use because it's very slow for big files.
returnvalue unpakFunc(pakname,filename) - runs a lua script in the pak file in
memory. It does the same thing as dofile("level01.lua") would do.
table unpakList(pakname) - gives a System.listDirectory() kind of table.
If the above made no sense whatsoever, then look at unpak.lua for examples.
You should use pak.lua to make a pak file before doing anything else. If you think
it's slow, then remove the big 1mb file from the test subdir. ;)
Whatever files you put in the test subdir will be added to the pak file (err... after you (re)run pak.lua that is, it doesn't get added by magic powers).
The exceptions are 0 byte files, and directories.
When you run the unpak function, the temp files will be put in the temp dir.
unpakFunc and unpakList doesn't need any temp files.
This is only a beta, so there's almost no checks for stuff that could go wrong.
Like missing pak files and missing test and temp dirs.
====
TODO
====
- Finish it.
- Add FileBrowser integration.
- Scrap it whenever PhysicsFS gets added to luaplayer.
========
CONTROLS
========
Select = Quit the scripts ;)
Oh... And this got nothing to do with .pak files you find in <insert game name here>. |
|
| Back to top |
|
 |
Wraggster
Joined: 26 Aug 2005 Posts: 121
|
Posted: Wed Mar 15, 2006 6:25 am Post subject: |
|
|
damn i was gonna post this until i read the devs only bit ;) _________________ Webmaster of http://www.dcemu.co.uk
DCEMU The Worlds Only Homebrew & Gaming Network of Sites. |
|
| Back to top |
|
 |
matriculated
Joined: 04 Mar 2006 Posts: 31
|
Posted: Sat Mar 18, 2006 5:38 am Post subject: |
|
|
| Does this compress the data? Combining this with modsyn's huffman compression would be a neat way to distribute Lua programs. If Lua apps were hosted this way, someone could make a Lua program to download these and install them directly to the memory stick without using a PC. |
|
| Back to top |
|
 |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Mon Mar 20, 2006 7:23 am Post subject: |
|
|
| Well... Somebody must send me lua-huff.rar then ;) |
|
| Back to top |
|
 |
matriculated
Joined: 04 Mar 2006 Posts: 31
|
|
| Back to top |
|
 |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Thu Mar 23, 2006 10:49 pm Post subject: |
|
|
| Umm... Nice broken link ;) |
|
| Back to top |
|
 |
matriculated
Joined: 04 Mar 2006 Posts: 31
|
Posted: Fri Mar 24, 2006 3:25 am Post subject: |
|
|
| Um, what? I just clicked on it, and downloaded it just now. ?!? |
|
| Back to top |
|
 |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Fri Mar 24, 2006 4:41 am Post subject: |
|
|
| Yep, it works fine now. |
|
| Back to top |
|
 |
|