Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Can't access media folder template_windows_vs2015 /w AGK 2.0.15d

Author
Message
FM77
8
Years of Service
User Offline
Joined: 6th Oct 2015
Location:
Posted: 13th Nov 2015 22:38 Edited at: 2nd Dec 2015 23:11
SOLVED: I did not carry over my media folder from old project into new "Final" build folder properly, it was 1 directory down in the template...
Thanks alot for the info and example though.



The template folders don't have media folders, when I used visual studio 2013 I simply created one named "media" and once compiled it automatically changed folder name "media" to "media - Source" and never had any issues.

Now that I am using 2015, I can't get an image to load. I have tried putting the media file in "root", made directories named "media", and "media - Source". I have also tried pointing to directory with load.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Nov 2015 20:05 Edited at: 15th Nov 2015 20:07
The string "~media\image.png" was never going to work. The backslash in a string made with double quotes is the escape character. Use forward slash for directory separater, not backward one.

Here is an example of how I have been creating a string for loading an image:


But I don't get that the executable creates a directory "media - source".

Cheers,
Ancient Lady
FM77
8
Years of Service
User Offline
Joined: 6th Oct 2015
Location:
Posted: 16th Nov 2015 18:01 Edited at: 16th Nov 2015 18:03
My template from vs2013, AppGameKit 2.0.14b works fine and pulls media from inside the template folder from root up/whatever the folder is named without pointing to folder.

All I want to do is load media like LoadImage/LoadAudio, but both vs2013/vs2015 on AppGameKit 2.0.15d template no longer can find files in my template folder even if I point to them correctly.
agk::LoadImage(1, "image.png"); // console returns > Failed to load image: image.png

So it works for you on new version?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 17th Nov 2015 03:26
I haven't had the time to work with the latest version, last one used was 2.014(something). I am working on a project at my day job that is taking 60ish hours a week. No time for personal projects at home at the moment.
Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-04-26 23:17:17
Your offset time is: 2024-04-26 23:17:17