GLBasic forum

Main forum => GLBasic - en => Topic started by: Kyo on 2014-Jul-31

Title: Help with SETSHOEBOX
Post by: Kyo on 2014-Jul-31
Since I have not found a easy way to shrink graphics and audio, I decided to use the command: SETSHOEBOX

But when i use a file .sbx and start the game, the problem is seems not erase from memory the last file loaded!

For example:
Start Logo splash - Work Fine
Start Menu - Work Fine
Start Map - Above the map puts the background of the Menu
Loading - Don't see any background
Game Loop - Almost all the sprites are unpacked, taken from other image files (also deleted from memory with command LOADSPRITE "", num_image)
All Musics and Sounds Work Fine

If I use the folder (without command SETSHOEBOX) all Work Fine!

Why?  :giveup:

I have to Pack all File (images and Music) Plese Help me!  :nw:
Title: Re: Help with SETSHOEBOX
Post by: Kyo on 2014-Jul-31
OK I found the stupid problem ...

If I use the name of Files with Numbers (Examples: 1.png, 2.png) I do not know why but SETSHOEBOX don't work!  >:D

I have all Images to point directly to them with only number as the name!

And the Images are many!

is there any way to solve this problem without having to rename all the files?

Stupid SETSHOEBOX!  :whip:
Title: Re: Help with SETSHOEBOX
Post by: erico on 2014-Jul-31
Here I can“t be of any help...never tried shoebox.
Title: Re: Help with SETSHOEBOX
Post by: MrTAToad on 2014-Jul-31
It would be odd not accepting files with numbers - I'll give it a go later.
Title: Re: Help with SETSHOEBOX
Post by: Kyo on 2014-Jul-31
Same with path ... Example:

- Dog/1/1.png
- Cat/1/1.png

SETSHOEBOX creates confusion!  :whip: >:D
Title: Re: Help with SETSHOEBOX
Post by: MrTAToad on 2014-Jul-31
You dont use pathing with shoebox - it's all a flat file system :

Code (glbasic) Select
SETSHOEBOX "Media/p.sbx","Media/p.sbx"

LOADSPRITE "p2.png",0
DRAWSPRITE 0,100,100
SHOWSCREEN
KEYWAIT


Try this code (and extra the zip file into a Media directory), and it should be fine.
Title: Re: Help with SETSHOEBOX
Post by: Kyo on 2014-Jul-31
My files structure is this:

Code (glbasic) Select


-Media
     |_ Character
               |_Player1
                       |_1.png
                       |_2.png
                       |_etc.
               |_Player2
                       |_1.png
                       |_2.png
                       |_etc.
               |_Enemy1
                       |_1.png
                       |_2.png
                       |_etc.
               |_etc.

     |_ Levels
               |_Lv_1
                       |_1.png
                       |_2.png
                       |_etc.
               |_Lv_2
                       |_1.png
                       |_2.png
                       |_etc.
       |_etc.


I use this for Andoroid, ios, windows etc.  and remove the path structure now is unthinkable!

Now i have to reneme all images with suffix... horrible system  :whip:
Title: Re: Help with SETSHOEBOX
Post by: MrTAToad on 2014-Jul-31
You will have to make sure each filename was unique!
Title: Re: Help with SETSHOEBOX
Post by: Kyo on 2014-Jul-31
I know and I have renamed all files  :S
Fortunately there exist Total Commander  :good: