GLBasic forum

Main forum => GLBasic - en => Topic started by: kamakazieturtle on 2008-Aug-16

Title: Another Quickie
Post by: kamakazieturtle on 2008-Aug-16
Just curious, anyway to load password protected compressed files. Like a .zip or .rar? This way I don't have one big folder full of images and other junk. Also is there a way to load images or other items from another folder? Such as loadsprite "folder\subfolder\sprite.bmp",0,0. Thanks in advance.
Title: Re: Another Quickie
Post by: Quentin on 2008-Aug-16
do you know the "shoebox" you can use with your GLBasic programs?

see helpfile for command SETSHOEBOX. I think this is what you're looking for?
Title: Re: Another Quickie
Post by: kamakazieturtle on 2008-Aug-16
I read through the help files description 40 times :S and I still can't comprehend it. I'm more hands on, so if someone has a quick example it would really help, and thanks Quentin for the help you've provided.
Title: Re: Another Quickie
Post by: Kuron on 2008-Aug-16
Look at the Shoebox example in your samples directory.  It shows you how to load files from a Shoebox file.
Title: Re: Another Quickie
Post by: kamakazieturtle on 2008-Aug-16
But how do I create the shoebox file?
Title: Re: Another Quickie
Post by: AndyH on 2008-Aug-16
There's a link to the Shoebox application under Tools.  Just point it at the directory you want to shoebox up (just like zipping) and that's it.  Is recursive so will pack up all the subdirectories in there too.

Then just add a command at the top of you program ...

SETSHOEBOX "ShoeBox.sbx", ""

Where ShoeBox.sbx is the name of your file.  Take a look at the help file for details, but basically just load your sprites etc as normal and if they are found in the shoebox file (using the same path) then it will load it from there.
Title: Re: Another Quickie
Post by: kamakazieturtle on 2008-Aug-16
Oh, no wonder, I thought I read something about that, but my link in the tools tab is gone so I had to make a new one. Thanks a lot everyone for the help, and especially the speed behind it. This is a very good forum.  :good:
Title: Re: Another Quickie
Post by: Kuron on 2008-Aug-17
It is worth noting that many of your menu options in the IDE are only available if you have a project or a file loaded.
Title: Re: Another Quickie
Post by: kamakazieturtle on 2008-Aug-17
I've seem to ran across another issue. Whenever I load my regular background, its about 4096x240. Everything goes smoothly but whenever I changed the background to the new one which is 8192x240. It stretches everything sideways and throws everything out of whack.  :S If anyone knows the answer it would be greatly appreciated.  =D
Title: Re: Another Quickie
Post by: Moru on 2008-Aug-17
isnt 4096 max?
Title: Re: Another Quickie
Post by: kamakazieturtle on 2008-Aug-17
Quote from: Moru on 2008-Aug-17
isnt 4096 max?

Thank You, I didn't know this. I think I should be able to fix it.  =D
Title: Re: Another Quickie
Post by: Moru on 2008-Aug-17
Are you making a side-scrolling game? If you are you might be better off creating small tiles instead, makes it much easier to program too.
Title: Re: Another Quickie
Post by: kamakazieturtle on 2008-Aug-17
Quote from: Moru on 2008-Aug-17
Are you making a side-scrolling game? If you are you might be better off creating small tiles instead, makes it much easier to program too.

Why yes I am, but unfortunately I have no clue on how to use tiles. I've never been able to figure it out.
Title: Re: Another Quickie
Post by: Moru on 2008-Aug-17
Search the web on it, there is even some on wikipedia I think. Just search for tile engine or similar :-) There is some on this board too, like the Mappy loader that loads tile-maps made in the Mappy editor. See my homepage :-)

The current version contains grafics from RPGMaker 2000 so I wouldn't use them in any game if I were you :-)
Title: Re: Another Quickie
Post by: PeeJay on 2008-Aug-19
I also did a very simple example of using a tilemap at http://www.glbasic.com/forum/index.php?topic=1336.0 (http://www.glbasic.com/forum/index.php?topic=1336.0) if you're not comfortable using Mappy