Quest files and seperate folders

OurJud
07 Jan 2016, 07:17
Can someone please explain how Quest calls game files and related content files from your PC when loading a game for editing?

I've just had a nightmare trying to get a game to load, and eventually had to create a single folder and put all my related stuff in there. This includes my game file, all my image files, any libraries, and all sound files. Only then did the game run properly.

However, when I was playing around with a previous game, I had one folder for my quest game (and a retrostyle library file), and within that folder I had an image folder and a sounds folder. With this arrangement I was able to run my game each time I loaded it from the Quest 'recent games' list.

I think I know what was happening - Quest was loading a game from a folder, then looking for the various images and sounds and finding only other folders. I just don't understand why I was previously able to have my images and sounds in their own folders (makes things much tidier).

The Pixie
07 Jan 2016, 08:01
When you add a library, image or sound to your game through the GUI, Quest will make a copy of it in your game folder if it is not already there. However, you can access files in other folders in code, just by giving the path.
picture("../images/death.png")

The problem with that is when you come to publish your game, Quest only bundles images and sounds in your game folder, so while it works fine in the editor, it will not work when you publish (I think library files will be fine, because in that case Quest adds the specific ones listed, and will go find them if elsewhere).

So yes, it would be neater, but don't do it.

OurJud
07 Jan 2016, 08:09
So when I come to upload, I have to make sure all image and sound files are loose, along with the main game file, in a single folder?

The Pixie
07 Jan 2016, 12:52
Your game has to access them from that folder too. In the example in my last post, if Quest is trying to find death.png from another folder, it will fail in your published game because the file is not in the stated place, even if it was included in the upload. The best way is to have all the files your game will use in the one folder right from the start.

OurJud
07 Jan 2016, 19:09
Ok, let me put it another way. If my game loads and plays as it should, when I load it from the desktop rather than through Quest, can I presume everything is in order for when I'm ready to upload?

jaynabonne
07 Jan 2016, 21:15
To test whether it should work online (generally), publish the game and then run the .quest file you would upload (just double-click it). The .quest file will either have things in the right place or not.

OurJud
07 Jan 2016, 22:48
Rightio! Ta, all.