Jump to content


Photo

kbzip Extension


  • Please log in to reply
68 replies to this topic

#1 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 05 January 2011 - 07:47 AM

I am now releasing my kbzip extension. No credit is required, so feel free. There is a help file included.

***There is now another new version, 1.2. I had to remove encryption since it wasn't working anyway, but I added a couple of functions, one for checking if specific files exist in archives, and another for getting the amount of files in the archives.

**Note there is now a new version. The link is updated.
There are a couple of bug fixes, and a couple new functions for directly loading individual sprites or backgrounds from archives, without using the graphic archive loading functions.

My extension is help in run-time and content creation time. During content creation, you use my external programs to create the archives. You can use the general archives, which can contain anything you want. And you can use the graphics archives, which can only contain Game Maker files for sprites and backgrounds(.gm***) files. For the graphic archives, you also specify a variable that you want the sprite/background to be loaded into, and once you load it at run-time, it will have that graphic loaded into the variable you specify. Details are given in the help file, but you can use globals, local variables, or you can force it to be local to another instance instead of the function calling instance.

During run-time, my extension can be used to extract the general archives, either as a whole, or specific files as you need them. You can also create archives during run-time, for example if you want to take advantage of the zip password encryption to atleast somewhat thwart hackers, by zipping your save games, config files, insert whatever you want here. And of course you can load in the graphics archives.

The archives themselves are actually zip files, though you can name them whatever you want to, including .nameofgame of you wanted to. The extension will load and save them all the same. For the general archives, you can use my program, which makes it easy to specify the zip password, or you could use another program, such as WinRAR, or the WindowsOS integrated SendToZip functionality. As long as you are creating normal zip files, with or without password encryption, they are compatible with my extension. But, the graphics archives must be created with my program. They are also normal zip files, but a text file is included that specifies what files are loaded into what variables, so if you want that functionality, you use the program.

About Game Maker compatibility, I'm using GM8, and the graphics loading functions are using the ones in GM8. The general archives should be fine for GM7 though. I haven't tested this, but it should work fine.

OK, enough chit-chat, the download link follows.

HERE IT IS, MEDIAFIRE LINK

The download includes the extension(which includes the help file), and the two external programs.

Any questions, comments, bugs, anything, please let me know. Thanks.

Edited by kburkhart84, 29 August 2011 - 03:58 AM.

  • 5

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#2 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 08 January 2011 - 05:56 PM

Nice work
  • 0

#3 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 08 January 2011 - 11:52 PM

Nice work


Thanks. I only have 3 downloads according to mediafire, so if you downloaded it, then I assume two more have downloaded it, and still have not had anything to say. I guess that could be a good thing, since everybody rushes to say the negative, and are pretty slow to say the positive.

Do you plan on using it?? If so, how?
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#4 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 27 January 2011 - 06:59 PM

There is now an update. The first post has the new link for the download.

I fixed a couple of bugs, and added a known bugs topic in the help file. If anyone is able to help me isolate the specific details of that bug, I would greatly appreciate it.

I have also added a couple of functions for directly loading sprites and backgrounds from archives. You don't have to use graphics archives for this, rather you can use regular archives. You still have to use GM8's file formats (.gmspr, .gmbck), but you can still store whatever files you want, and extract, load, delete them yourself. I use GM8's files because they already include all of the details, including everything in the sprite properties sheet.

As usual, any comments and criticisms is appreciated.

I am also looking at adding a few features.

One is similar to how the classic R.E.A.L. extension works, where you make a loading bar( or whatever you want really) and little by little the resources get loaded, so that there is no freeze meanwhile.

Another involves the external programs. I need to add buttons in the graphic archiver creator so that you can either only change the file, or the variable, without having to change both at once.

The last one with the external programs would be to have you specify a directory, and the regular archiver would add all files in the directory, that aren't already in the directory, and remove the files that are no longer there. This one also applies to the graphics archiver, except that it would filter out the sprites/backgrounds in case something else was there, and for new files, would ask for the name of the variable to use.

What do you guys think??? Would the above features make the extension much better?? I'm probably going to add them anyway for my personal use, but I would still like some opinions.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#5 M_I_Soft

M_I_Soft

    GMC Member

  • GMC Member
  • 198 posts
  • Version:GM8

Posted 29 January 2011 - 01:47 PM

Found a slight bug when I try to unzip all the files on start up - it gives a dll error saying that MSVCR100.dll is missing.

Here's a screenshot of the error...
Posted Image
  • 0

#6 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 30 January 2011 - 06:49 AM

Found a slight bug when I try to unzip all the files on start up - it gives a dll error saying that MSVCR100.dll is missing.

Here's a screenshot of the error...
Posted Image


Thanks. It looks like some kind of thing to do with linking in Visual C++. Most people who have done any testing don't get that error, but a couple(including you) do, so I need to figure out what I'm linking to, and if I need it, link static, and if I don't, remove it altogether.

Thanks.

EDIT**

Can you test this version here??

I recompiled it and it may have fixed the problem. But, since I don't have a machine that was causing the error, I have no way to confirm if it fixed the problem. Thanks in advance.

Edited by kburkhart84, 30 January 2011 - 07:48 AM.

  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#7 M_I_Soft

M_I_Soft

    GMC Member

  • GMC Member
  • 198 posts
  • Version:GM8

Posted 30 January 2011 - 01:39 PM

Yep that's sorted it out - only thing I can't get running is the extraction with password, but that's not too much of an issue really.

Seems to be pretty damn rapid too I must admit - I'm extracting a full directory with my sound files in and it's almost unnoticeable where it's extracting the files, no slow down at all.

Thanks for the update.

Leigh
  • 0

#8 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 30 January 2011 - 06:56 PM

Yep that's sorted it out - only thing I can't get running is the extraction with password, but that's not too much of an issue really.

Seems to be pretty damn rapid too I must admit - I'm extracting a full directory with my sound files in and it's almost unnoticeable where it's extracting the files, no slow down at all.

Thanks for the update.

Leigh


Two things: Are you using a string for the password??

And two, I know there is a bug somewhere in the encrypted file extraction. Some files survive, and some come out corrupt. I first though it had to do with a space(' ') character in the file name, but then I found a 7MB excel worksheet that has a space in the name, and it survives fine. I need someone to help test if I can find them, so I can figure out what survives and what doesn't.

In any case, simply not using the encryption works perfectly fine, and since you can have the archives be whatever file extension you want, it isn't obvious what kind of file it is unless you load up the binary header of the file(or rename it to .zip).

Thanks for testing the issue for me!!
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#9 M_I_Soft

M_I_Soft

    GMC Member

  • GMC Member
  • 198 posts
  • Version:GM8

Posted 30 January 2011 - 08:00 PM

Yep, bog standard string for the encryption password with no spaces or anything like that in the password or file name. It managed to extract the folder ok, just not any of the files in it (which seems to be normal as the files are encrypted but not the folders it seems in zips).

I've adjusted the file extraction location now on the main exe so all is fine as it cleans itself up after the game has ended and is pretty well nested too so very unlikely it'll be picked up. Not that it matters anyway as it's just the sound files but I was testing it as a matter of course just in case I did need it in future.
  • 0

#10 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 30 January 2011 - 10:11 PM

I've never worked with my extension using directorys, rather only individual files, and if it somehow works like that, it wasn't my doing. That may have something to do with it as well. Thanks for testing though.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#11 M_I_Soft

M_I_Soft

    GMC Member

  • GMC Member
  • 198 posts
  • Version:GM8

Posted 31 January 2011 - 12:43 PM

Yeah I just zipped up the directory I wanted and made sure it had the directory structure in place then when I did the kbzipUnzipAll it recreates the directory structure for me.
I agree though it's probably that stopping the decryption from working, but still a great extension and incredibly fast!
  • 0

#12 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 31 January 2011 - 02:12 PM

Yeah I just zipped up the directory I wanted and made sure it had the directory structure in place then when I did the kbzipUnzipAll it recreates the directory structure for me.
I agree though it's probably that stopping the decryption from working, but still a great extension and incredibly fast!


Wow, I guess I'll have to do some testing working with directories. It may be that when using directories internal to the zip, it suddenly includes that as part of the filename, and therefore when extracted, it includes it. When I was coding the dll part, I wasn't thinking about how zips can do that.

On the other hand, I don't think that has anything to do with the decryption because I was never testing with directories at all, and sometimes it works, sometimes it doesn't. I need some more testing done, but it may be exclusive the gmspr files, but then may not. I really don't know.

About the speed, I'm using a really small and simple API for zip/unzip called ziputils. It takes code from gzip and zlib and removes a lot of the unneeded overhead, which makes it fast. I didn't have anything to compare it to, but you have confirmed the speed, so thanks for that!!
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#13 M_I_Soft

M_I_Soft

    GMC Member

  • GMC Member
  • 198 posts
  • Version:GM8

Posted 02 February 2011 - 02:05 AM

If you want a quick challenge try downloading my current Haunted Mansion beta and see if you can spot where I do the extraction. Even on my old laptop it's barely noticable!
I'll be adding another archive in the next release too for the map data don't think that'll be causing any trouble either though...
  • 0

#14 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 02 February 2011 - 03:55 AM

If you want a quick challenge try downloading my current Haunted Mansion beta and see if you can spot where I do the extraction. Even on my old laptop it's barely noticable!
I'll be adding another archive in the next release too for the map data don't think that'll be causing any trouble either though...


I think I'll just have to believe you, especially considering that for the most part, on my not too bad laptop, I sometimes don't see the files ever, atleast through windows explorer. Every so often, a full-screen size background will show up, and even then, it is a very short time, not near enough for someone to try to copy it somehwere else.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#15 reek

reek

    GMC Member

  • New Member
  • 66 posts

Posted 03 February 2011 - 03:02 AM

Thanks for the nice work. I have been looking for this kind of an add-on to GM for some time. I've used Ultra-crypt in the past and I was tired of all the hoops you need to jump through to use it. After getting the same "MSVCR100.dll is missing" error I finally got an example GMK test working, but without using password protection on the zip file.

The drawback to me is that that is one of the main reasons I want this type of zip/unzip ability, so that the data files can be password protected. But the password function is basically "broken" and doesn't yet work. Obfuscating the filename is a weak protection and I would feel a lot better being able to have an actual password for the zip file.

Edited by reek, 03 February 2011 - 03:02 AM.

  • 0

#16 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 03 February 2011 - 04:52 AM

Thanks for the nice work. I have been looking for this kind of an add-on to GM for some time. I've used Ultra-crypt in the past and I was tired of all the hoops you need to jump through to use it. After getting the same "MSVCR100.dll is missing" error I finally got an example GMK test working, but without using password protection on the zip file.

The drawback to me is that that is one of the main reasons I want this type of zip/unzip ability, so that the data files can be password protected. But the password function is basically "broken" and doesn't yet work. Obfuscating the filename is a weak protection and I would feel a lot better being able to have an actual password for the zip file.


About the dll error, you can look through the above posts and download one that has that error fixed. I haven't put that in the first post yet, but you can still use it.

About the encryption problem, do you think you could do some tests and figure out what files exactly(atleast for you) work and don't work with encryption. I'm sure they encrypt fine using my program, because I have used WinRAR to confirm them, but when my extension decrypts the files, some work and some don't. It isn't a size thing, and it isn't completely having anything to do with space characters in the file name, so I'm not sure what it is. I'm doing some tests myself too, so I can try to figure it out, but any help I can get would be appreciated. If I can't get this, I may end up having to redo the back end API, instead of using ziputils.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#17 AndrewFM

AndrewFM

    GMC Member

  • GMC Member
  • 289 posts
  • Version:GM:Studio

Posted 07 February 2011 - 12:29 PM

This is really nice... works like a charm! :)

However, one suggestion. Can you add a function to check if a file exists inside the archive? I mean, right now you technically could do it just by attempting to extract the file and checking if the return value was 0, but that seems messy.

Regarding the encryption problem: I tried txt, wav, and png files so far. None of them worked (encrypted) except for wav. And for wav, I was using the SuperSound dll, so I'm not even sure if they would have worked with GM's sound_add().

Edited by AndrewFM, 07 February 2011 - 04:44 PM.

  • 0

Current project: http://andrewfm.itch.io/up


#18 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 07 February 2011 - 04:59 PM

This is really nice... works like a charm! :)

However, one suggestion. Can you add a function to check if a file exists inside the archive? I mean, right now you technically could do it just by attempting to extract the file and checking if the return value was 0, but that seems messy.

Regarding the encryption problem: I tried txt, wav, and png files so far. None of them worked (encrypted) except for wav. And for wav, I was using the SuperSound dll, so I'm not even sure if they would have worked with GM's sound_add().


Thanks for the testing. I don't see why I couldn't add that function for you. I don't want to promise, but I should have it within a couple days.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#19 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 09 February 2011 - 09:46 PM

I have now added two requested functions. One is for confirming whether a file exists in an archive or not, and the other is for getting how many files are in an archive. I have also fixed the missing dll error.

See the first post for the new link.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#20 AndrewFM

AndrewFM

    GMC Member

  • GMC Member
  • 289 posts
  • Version:GM:Studio

Posted 10 February 2011 - 02:11 AM

Minor issue: There's a typo in one of the function names. In GM8's dropdown box, it shows the new function name as kbzipFilesExists(), when it's actually kbzipFileExists()
  • 0

Current project: http://andrewfm.itch.io/up


#21 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 10 February 2011 - 03:23 AM

Minor issue: There's a typo in one of the function names. In GM8's dropdown box, it shows the new function name as kbzipFilesExists(), when it's actually kbzipFileExists()


I have uploaded a new one here!!

Sorry about that. It was a typo in the extension creator where you define what goes in the intellisense. That's why the functions wasn't working right. The correct name is without the 's' of course. Grab the new one.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#22 PrinceOthman

PrinceOthman

    GMC Member

  • GMC Member
  • 487 posts
  • Version:GM:Studio

Posted 14 February 2011 - 02:51 PM

Does this add folders as whole? If yes, how?
  • 0

Try pressing this rep_up.png button next to my post, and tell me what happens.  :)
add.png


#23 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 14 February 2011 - 04:53 PM

Does this add folders as whole? If yes, how?


As far as using my zipping programs, you just select files. A planned feature is to simply select a folder and have it add all of those files automatically.

As far is folders internal to the zip files, I think when using my extension to extract, it should not matter, but I have no way to create them that way. But, if you use a program such as WinRAR, WinZip, 7-zip, to create the zip files, you should be able to create folders that way inside the zip files.

But, for game usage, I don't think it really matter too much inside the zip itself, since it all gets extracted. And for both the graphics and regular zip programs that I have created for this extension, I have the folder search feature planned.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#24 PrinceOthman

PrinceOthman

    GMC Member

  • GMC Member
  • 487 posts
  • Version:GM:Studio

Posted 14 February 2011 - 04:55 PM

I want the feature to be able to zip the folder, and the files in it. Can you do that?
  • 0

Try pressing this rep_up.png button next to my post, and tell me what happens.  :)
add.png


#25 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 17 February 2011 - 04:04 AM

I want the feature to be able to zip the folder, and the files in it. Can you do that?


I will look into it. I'm for sure that I will add to my programs the ability to add all files inside of a specified folder, but about the folders internal to the zip, I'm not sure. It is something that I don't have a use for, and so depending on how much work I would have to do to make it happen will determine whether it does or not.

BTW, exactly what are you trying to accomplish that you couldn't do in another way. Since I'm using it for external resource loading, all I do is extract files to a directory, load the resources into Game Maker, and then delete the files. Since I know the file names, there is no need to worry about directories, as long as I'm looking in the same place for the files as where I extracted them.

If you need files in directories after doing extraction, you could simply create one zip per directory, and extract each zip to wherever you want the files. So a zip named "graphics.zip" you could extract to a sub-folder called "Graphics", and so on for other resource types.

But like I said, what exactly are you trying to accomplish? Why do you have to have directories internal to the zip files? Maybe I could help you get around your problem in another manner.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#26 PrinceOthman

PrinceOthman

    GMC Member

  • GMC Member
  • 487 posts
  • Version:GM:Studio

Posted 17 February 2011 - 02:02 PM

It's ok. I found another DLL that can do that.
  • 0

Try pressing this rep_up.png button next to my post, and tell me what happens.  :)
add.png


#27 57E

57E

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM:Studio

Posted 09 June 2011 - 10:00 AM

Is this another case of "does not work properly with gm81"?
Becouse no matter what I try the kbzipAddFileToZip() function always fails.
  • 0

#28 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 09 June 2011 - 04:13 PM

It worked fine for me, using GM 8.1 newest release.

You first create the new zip using the kbzipCreateZip() function. Then you use the add file to zip, using the kbzipAddFileToZip() function. Then use kbzipCloseZip() to close the file, after adding all the files you needed. You can only use one zip at a time when creating zips, and you must close it when you are finished.

If you can't get it to work, you could give me an example .gm81 showing that it doesn't work, and I can check why.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#29 57E

57E

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM:Studio

Posted 10 June 2011 - 08:12 AM

Here is an example file.
  • 0

#30 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 10 June 2011 - 05:04 PM

Here is an example file.


Your test isn't working on my computer either.

I think it has to do somehow with using working_directory to grab the file locations. I believe that working_directory is whatever the last place GM did something with external files. So, when you create that text file, that directory is now the working directory. What I don't get is that when trying to create the zip, it gets it right, but not when adding. So, I got it working by instead of using working_directory, creating your global variable to simply be "Level Board/TEMP", without that. Here is the catch though. It appears that you must use forward slash '/' to get it all to work right as well. I had to adjust that.

The reason my extension works without using working_directory is because though GM changes it's version of working_directory, it doesn't change for dll's or other windows processes of course. So, my dll still works based off of wherever the executable is, and so simply omitting the working_directory part fixes the problem, and since you aren't going to be having those folders moved around once you are done with the game, it won't be a problem.


Also, you had forgotten the slash before the filename BIN.txt when adding it to the zip, though you had added it when you were creating the file.

Now, I also got it working with the .u3d model files. Your problem is here.
kbzipAddFileToZip(global.temp_folder+file);
        //show_error(global.temp_folder+"\"+file,false);
You put the '/' in the show_error line, but didn't put it when adding the file to the zip. When you make it...
[code
kbzipAddFileToZip(global.temp_folder+'/'+file);
//show_error(global.temp_folder+"\"+file,false);
[/code]
It suddenly works. But, I tried with a backslash '\' instead of the forward '/' and it no longer works. So now you know, anytime you use my extension, just make sure you use forward slashes.

Here is my "fixed" version.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#31 57E

57E

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM:Studio

Posted 11 June 2011 - 08:54 AM

It suddenly works. But, I tried with a backslash '\' instead of the forward '/' and it no longer works. So now you know, anytime you use my extension, just make sure you use forward slashes.


You might want to change that in future versions. As in game maker all file path strings like those working_directory, program_directory and temp_directory as well as get_open_filename() use backslash '\'.

BTW the fixed version you uploaded isn't fixed. It is the original file with an added executable wich doesn't seem to be working either.
But I'll see if I could get it working with these things in mind.
  • 0

#32 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 11 June 2011 - 02:55 PM

It suddenly works. But, I tried with a backslash '\' instead of the forward '/' and it no longer works. So now you know, anytime you use my extension, just make sure you use forward slashes.


You might want to change that in future versions. As in game maker all file path strings like those working_directory, program_directory and temp_directory as well as get_open_filename() use backslash '\'.

BTW the fixed version you uploaded isn't fixed. It is the original file with an added executable wich doesn't seem to be working either.
But I'll see if I could get it working with these things in mind.


Sorry about that, I believe I may have simply zipped up the files, and forgot to hit the save button in GM first. If you can't get it to work, I'll redo it.

And yeah, I still have the code for this, so I may eventually add that. I also need to figure out how to get the extraction of encrypted files to work too. I can't promise anything though, because I'm in the middle of a project.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#33 57E

57E

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM:Studio

Posted 12 June 2011 - 09:10 AM

Well I got it working, sort of.

When packing files it seems to save the directories as well.
If I pack a file "Level Board/TEMP/BIN.txt" and then open the zip the bin.txt is located inside "Level Board/TEMP/" there as well?
Not a big deal, but kind of unnecessary for me.

Packing files from any where else than the game's exe location does not work at all. Which means that I can't use temp_directory (tried replacing all '\' with '/' via string_replace_all(), no use).


Now let's see how complicated the file extraction is...
  • 0

#34 57E

57E

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM:Studio

Posted 20 June 2011 - 05:25 PM

I know you said youre busy, but I noticed few more things, when trying to get the extraction code working, that you might be intrested of if you some day decide to update this.
kbzipUnzipAll('Level Board/LoadTest.zip',working_directory);
For kbzipUnzipAll function the first argument (location of the file) must be without working_directory and backslash characters, as with kbzipAddFileToZip.
BUT the second argument i.e. the location where the files are extracted must have working_directory and it doesn't seem to mind about backslashes in the string. Without the working_directory variable (for example just 'Level Board/Loadtest contents') the unziping fails,
But if the second argument is an empty string '' the files are unziped to the root of the drive which contains the game files, in my case they appear in G:\

It's most likely same thing with kbzipUnzipFile, but I haven't tested it yet.

Edited by 57E, 20 June 2011 - 05:28 PM.

  • 0

#35 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 21 June 2011 - 12:18 AM

I know you said youre busy, but I noticed few more things, when trying to get the extraction code working, that you might be intrested of if you some day decide to update this.

kbzipUnzipAll('Level Board/LoadTest.zip',working_directory);
For kbzipUnzipAll function the first argument (location of the file) must be without working_directory and backslash characters, as with kbzipAddFileToZip.
BUT the second argument i.e. the location where the files are extracted must have working_directory and it doesn't seem to mind about backslashes in the string. Without the working_directory variable (for example just 'Level Board/Loadtest contents') the unziping fails,
But if the second argument is an empty string '' the files are unziped to the root of the drive which contains the game files, in my case they appear in G:\

It's most likely same thing with kbzipUnzipFile, but I haven't tested it yet.


That is indeed interesting. Knowing the code, I'm not sure why it would do that. I may look into it, thanks for the heads up.

So, who wants a gml version?? No dlls, and so it would work on a Mac, but it still wouldn't be appliable to mobile platforms. I don't know if gml can do it fast enough to make it useful, but it might.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#36 Gamer_Dude64

Gamer_Dude64

    GM Html5 Programmer

  • GMC Member
  • 169 posts
  • Version:GM:Studio

Posted 23 June 2011 - 06:40 PM

gml version sounds great!.... only thing is the speed...;

still, even if it is slower than crap, i still think you should post the gml version, i would like to see it.



good luck! :)
  • 0

User of- [GameMaker 7 lite/GameMaker 8 Pro/GameMaker 8.1 Standard/GameMaker Studio Professional]

Check out GM:Studio .gmx documentation here written by Dark Matter.

 


#37 57E

57E

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM:Studio

Posted 04 July 2011 - 09:37 AM

It looks like that the filepath problems were fixed by the latest gm8.1 version.

At least adding files from outside games working directory and temp_directory is working now.
It also looks like that the use "/" instead of "\" rule doesn't matter anymore either. :D

I haven't got time to test the unpacking functions throughly, but I guess it should now work normaly too.

Edited by 57E, 04 July 2011 - 09:38 AM.

  • 0

#38 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 04 July 2011 - 10:42 PM

It looks like that the filepath problems were fixed by the latest gm8.1 version.

At least adding files from outside games working directory and temp_directory is working now.
It also looks like that the use "/" instead of "\" rule doesn't matter anymore either. :D

I haven't got time to test the unpacking functions throughly, but I guess it should now work normaly too.


Awesomeness!!!

It never occurred to me that a change in GM would have affected that, considering the dll does the actual file functions, not GM. But hey, I'll take it. :)
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#39 57E

57E

    GMC Member

  • GMC Member
  • 63 posts
  • Version:GM:Studio

Posted 05 July 2011 - 06:33 AM

Extraction too is working flawlessly now.
You can ignore all the things that I posted here earlier.
  • 0

#40 Orswen

Orswen

    GMC Member

  • New Member
  • 103 posts

Posted 05 July 2011 - 09:29 AM

i just ask
is it possible to load ini file or read data structure file from the zip directly? :wacko:
  • 0
I want to learn advance GML!!!

Currently making a Tales-series like RPG game...(A big project)
Currently progress: 1%
The storyline has come to Chapter 3.

#41 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 05 July 2011 - 03:52 PM

Extraction too is working flawlessly now.
You can ignore all the things that I posted here earlier.


Sweet!! Thanks for the heads up.

i just ask
is it possible to load ini file or read data structure file from the zip directly? :wacko:


It does not do either of those things. You can easily extract something to the temp directory, delete the zip file you pulled it from, and recreate it with the new file after you did whatever (such as update an INI file.)
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#42 Orswen

Orswen

    GMC Member

  • New Member
  • 103 posts

Posted 06 July 2011 - 01:40 PM

ok, so...
the ds file also must be done in the same way?
  • 0
I want to learn advance GML!!!

Currently making a Tales-series like RPG game...(A big project)
Currently progress: 1%
The storyline has come to Chapter 3.

#43 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 06 July 2011 - 03:23 PM

ok, so...
the ds file also must be done in the same way?


I'm not sure was a "ds" file is, but what I said applies to any regular archives you use. You have to work with the files outside of the archive, because GM can't work with files directly. I'm not about to implement file read/write directly to zip, when all you have to do is extract, modify, then re-archive the files you want to work with.

If you are using the other "special" archive, the one that my extension can create, just for sprites and backgrounds, you can use it without extracting files, because my extension does it for you as it loads the files into GM. But I don't think that is what you are talking about, since your other post mentioned data and INI files.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#44 Orswen

Orswen

    GMC Member

  • New Member
  • 103 posts

Posted 07 July 2011 - 12:25 PM

ok , i get it now :)
  • 0
I want to learn advance GML!!!

Currently making a Tales-series like RPG game...(A big project)
Currently progress: 1%
The storyline has come to Chapter 3.

#45 wimlore

wimlore

    GMC Member

  • GMC Member
  • 124 posts

Posted 30 January 2012 - 01:08 AM

Doesn't work for windows 2000? :( It gives me an error during initial load saying it failed to call the DecodePointer, error with KERNEL32.DLL, which I am assuming is a function that is not supported by win2k, and has nothing to do with your extension not working as intended. I am wondering if this would do the same thing if it were a dll? Oh well, less than 1% of the people online these days are using win2k :P Other than that it works beautifully. If only it worked for win2k would I be smitten :whistle:
  • 0

#46 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 30 January 2012 - 05:17 AM

Doesn't work for windows 2000? :( It gives me an error during initial load saying it failed to call the DecodePointer, error with KERNEL32.DLL, which I am assuming is a function that is not supported by win2k, and has nothing to do with your extension not working as intended. I am wondering if this would do the same thing if it were a dll? Oh well, less than 1% of the people online these days are using win2k :P Other than that it works beautifully. If only it worked for win2k would I be smitten :whistle:


Wow, I never expected anyone to try it on win2k. My extension doesn't do anything in particular that shouldn't work on win2k, but considering the errors you are getting, I'm thinking that maybe other extensions may have problems on win2k, have you tried any?

My extension IS a dll, but all wrapped up in the package, so you don't have to include it in your directory, and you don't have to mess with defining functions, like your external dlls.

Anyway, I'm glad you like the extension.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#47 wimlore

wimlore

    GMC Member

  • GMC Member
  • 124 posts

Posted 30 January 2012 - 04:44 PM

Wow you replied! I was about to PM you regarding the issue :) No I have not tested any other extensions but I was wondering the exact same thing. I suppose it would be easier to test another extension rather than you slaving like an animal to fix my problem :biggrin: , but I will not have to do that for a few more days since I am rarely forced to work on the win2k machine. Honestly, this is the first extension I have ever needed to download. :thumbsup:

Short success story: I was loading/unloading resources using background_add_background(file) during run-time, and there were very noticable hang-ups. Installed kbzip and replaced all my background_add_background lines with the kbzipLoadBackground function(Thats it!!!) and boom, hardly even noticable hang-ups. Feels like it is 160% faster.

Anyways, I am sure the issue is with win2k and I will try and get back to you on wether I can run a GEX on win2k at all. Thanks again for this awesome extension, oh and nice website :) But it gave me an error when I tried to comment on your tetris clone :confused: ...
  • 0

#48 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1969 posts
  • Version:GM:Studio

Posted 31 January 2012 - 03:09 AM

Wow you replied! I was about to PM you regarding the issue :) No I have not tested any other extensions but I was wondering the exact same thing. I suppose it would be easier to test another extension rather than you slaving like an animal to fix my problem :biggrin: , but I will not have to do that for a few more days since I am rarely forced to work on the win2k machine. Honestly, this is the first extension I have ever needed to download. :thumbsup:

Short success story: I was loading/unloading resources using background_add_background(file) during run-time, and there were very noticable hang-ups. Installed kbzip and replaced all my background_add_background lines with the kbzipLoadBackground function(Thats it!!!) and boom, hardly even noticable hang-ups. Feels like it is 160% faster.

Anyways, I am sure the issue is with win2k and I will try and get back to you on wether I can run a GEX on win2k at all. Thanks again for this awesome extension, oh and nice website :) But it gave me an error when I tried to comment on your tetris clone :confused: ...


Well, let me know about the win2k issue. I don't think I could do anything to fix it anyway, but at the least I'd like to know about it.

Success...actually, I'm not sure why that would happen. Since GameMaker doesn't give us access directly to the resources, my script actually extracts the file, loads it in(using GM's background loading functions) and then deletes the file, so it isn't just sitting there for anyone to find it. My only guess would be that somehow the file is cached in the hard drive's cache space once it is extracted, and maybe never actually gets written to the "real" harddrive space. Reading and writing to the cache space is much quicker than the actual hard drive, so maybe that has something to do with it. Any way, I'm glad it worked out.

I can make a suggestion for you, but it could make the game a little more complicated, though it may be better in the long run for you, especially if you have lots of sprites and backgrounds you are loading in. My extension has a separate program for creating "special" archives, which contain groups of sprites and backgrounds. When creating that archive, you also define what variables the sprites and backgrounds get loaded into. Then, at run-time, you can call a single extension function, and it will load all of those sprites and backgrounds into all those variables, all at once. Sure, it theoretically isn't really faster, because the loading functions are still getting called, but it can save code writing. It would also allow you to have different graphics for levels, using the same variable names, though you would make sure you called the deletion function first, in order to free the previously loaded graphics. Then, you could have different archives for different "themes" and easily switch between them. There is a catch to this though...you'd have to exclusively use the game maker sprite/background file formats(*.gmspr/*.gmbck). This is because that format includes all the details of the sprite, including all the animations, the center, the mask settings, everything, and so I didn't have to hassle with all of that, and rather use GM's GUI to load and export the sprites. Anyway, it's a suggestion.

Lastly, thanks for checking my site out. I never actually tested the comment system(I'm using wordpress) but I'll take a looksy.

**

If anyone sees this, maybe they can give me some opinions. How much use would I get out of this extension if I added "streamed" loading. I've seen one other extension that does it, but it is pretty old(TARC or something like that), and if I added it, it would allow things to be loaded little by little, making it easy to create a loading screen. Then, you could easily queue up a few operations(loading and deleting resources), then fire away, and you would also get access to a "percentage" so you could show something like that. What do you guys think? I may create it anyway, if nothing but for my personal usage, but I'm not sure.
  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#49 wimlore

wimlore

    GMC Member

  • GMC Member
  • 124 posts

Posted 31 January 2012 - 07:53 AM

If anyone sees this, maybe they can give me some opinions. How much use would I get out of this extension if I added "streamed" loading. I've seen one other extension that does it, but it is pretty old(TARC or something like that), and if I added it, it would allow things to be loaded little by little, making it easy to create a loading screen. Then, you could easily queue up a few operations(loading and deleting resources), then fire away, and you would also get access to a "percentage" so you could show something like that. What do you guys think? I may create it anyway, if nothing but for my personal usage, but I'm not sure.

...That would be tits. :thumbsup:
  • 0

#50 Gamer_Dude64

Gamer_Dude64

    GM Html5 Programmer

  • GMC Member
  • 169 posts
  • Version:GM:Studio

Posted 11 February 2012 - 08:17 PM

what is streamed loading exactly?
  • 0

User of- [GameMaker 7 lite/GameMaker 8 Pro/GameMaker 8.1 Standard/GameMaker Studio Professional]

Check out GM:Studio .gmx documentation here written by Dark Matter.

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users