Jump to content


Photo

kbzip Extension


  • Please log in to reply
52 replies to this topic

#41 kburkhart84

kburkhart84

    GMC Member

  • GMC Member
  • 1605 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

#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

#43 kburkhart84

kburkhart84

    GMC Member

  • GMC Member
  • 1605 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

#44 Orswen

Orswen

    GMC Member

  • New Member
  • 103 posts

Posted 07 July 2011 - 12:25 PM

ok , i get it now :)
  • 0

#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

    GMC Member

  • GMC Member
  • 1605 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

#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

    GMC Member

  • GMC Member
  • 1605 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

#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
  • 167 posts
  • Version:GM:Studio

Posted 11 February 2012 - 08:17 PM

what is streamed loading exactly?
  • 0

#51 kburkhart84

kburkhart84

    GMC Member

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

Posted 12 February 2012 - 03:10 AM

Streamed loading would be loading something on the fly, letting other things happen at the same time. In this instance, it would be loading things, maybe one or two sprites per step, while letting all the objects continue drawing and executing step events, allowing for example a progress bar, or any animation or even a mini-game if you wanted to go on, while the other things are loading.

Assuming I added it to this extension, I would allow you to specify how many things per steps, or even 1 every few steps(similar to GM's things where a whole number is an amount of steps, and a fraction is either a percent chance or specifically 1 every x steps). In this manner you could use it in a typical loading screen with progress bar, you could up the intensity with a mini-game(loading less things less often to keep full-speed) or even load slower than that, little by little through a level of the game, say a top-down shooter where you begin loading when you get to the boss of one level the contents of another.
  • 0

#52 Energy Engine

Energy Engine

    GMC Member

  • New Member
  • 156 posts

Posted 15 May 2012 - 04:43 AM

Okay, small issue but I feel that this must be posted since I had some trouble with it and is an easily overlooked issue.

For all those wondering how this DLL uses the sprites in the pack file, just remember to have the variable name you have assigned in the graphic creator tool to be the same as the one which you will be using to assign the archive and sprite load functions. Then assign that same variable to the sprite_index function in game maker.

I know most of you already know this but for newer people or those that don't (or didn't like myself), this is the way to do it.

That is all... :sweat:
  • 0

#53 newkill

newkill

    Silver Sword Games

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

Posted 23 July 2012 - 06:58 PM

If I understand correctly, this allows you to put all your ressources in a .zip file that people can't access, so you can load externally all your ressources instead of saving them in a heavy .exe while not having to worry about people stealing your ressources?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users