Loading Media Issues

Previous topic - Next topic

XanthorXIII

While I have found a work around to get my media to load I need to know the proper way of doing it when building my programs. Under my project I create a media folder, I stick my sprites and what not into that folder. I then go to build the application. Everything compiles and the program runs, oh lovely just a black screen.
What I found then was that I had to copy the media folder to another folder apps. What am I doing incorrectly to not get it to run in the build phase?
Technically I should be able to stick a folder called media in my project directory that gets copied over or it runs from that. I think I saw something about that in one of the patch notes but something I'm doing is not quite right.
Owlcat has wise

Bursar

When you compiled your app, you should have noticed a directory had been created called 'myapp.app', and your .exe file is located in that directory.

Your Media directory needs to live inside that directory. You don't need a seperate media directory at the same level as your project files.

XanthorXIII

Does the folder get created when I create my project so I can put those files there first before I compile?
Owlcat has wise

MrTAToad

The .app directory (and thus the Media directory) gets created when the program is compiled.

You can, of course, create the directory structure beforehand - but if you change the program name, a new directory structure will get created with the new name.

XanthorXIII

So on First Compile and run it's going to fail on me because it can't find the media to load? Doesn't that seem a bit odd?

Owlcat has wise

MrTAToad

I usually compile the program after typing in a few lines - that way the correct directory structure is present.

It might however, be best if the .app & sub-directory creation is moved to when the project is created.

XanthorXIII

In doing my work I'd almost like to have a work directory and a output directory. While I guess it's not much of a bother doing what I'm told is the proper way of handling files, I would think that having the work and output directory separate would be ideal.
Am I not mistaken?
Owlcat has wise

MrTAToad

No, because doing that causes immense problems for Mac executables - its why the .app directory (and the media folder inside it) was created.

XanthorXIII

Ok, that answers the why question for me.
Thank you.
Owlcat has wise