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.

AppGameKit Classic Chat / vs2010 small example program problem

Author
Message
roujesky
19
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 6th Jun 2012 04:53
finally the project to build and run. but I have a problem. when I run the small example, it is like it cant find the jpg file. it is there, really. but, the display shows what looks like load failure...
attached is a screenshot of the code and the game window.
i dont know if this means anything, but both id and backdrop variables have the value 0x2711. seems like an odd coincidence...

thanks

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Jun 2012 06:14
LoadImage does not take absolute file paths. At least it doesn't in Tier1 and I assume that applies to Tier2.

The app will initially look for the files in the 'media' directory directly under the directory that the executable file is run from.

Cheers,
Ancient Lady
polomint
12
Years of Service
User Offline
Joined: 3rd Apr 2012
Location: Lancashire, United Kingdom
Posted: 6th Jun 2012 10:58 Edited at: 6th Jun 2012 10:58
Find the Final folder which is under your solution folder, then add a "media" folder and put all your gfx etc in there..

Then to load images etc, use



That's how I do it anyway, although I have noticed that on Tier 2 for BlackBerry Playbook it really doesn't like a path starting with a '/' heh

EDIT: I tend to only use .png's too

Blackberry App Development & ZX Spectrum Game Development.
roujesky
19
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 6th Jun 2012 16:33
I dont have a final directory. Does the wizard create that automatically or do I create it manually?
I copied the files to the debug directory and removed the path from the loadimage and it worked.
I cannot WAIT til someone writes a book about AGC (and has several chapters devoted to native development)!!!!

thanks!
Pilz X Schizo
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Massachusetts, USA
Posted: 6th Jun 2012 17:24
It may be in either the Debug or Release Folder. It all depends on how you have your program set up, but you will put your media in the folder where your .exe is being built to. It should be in a folder below all your source files. If you have it set up with Debug and Release, be sure to put your media in the Release folder also if you build it in Release mode.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Jun 2012 18:06
roujesky, you will want to make sure that you have your VS project set to use the Release build before you put your game on the market.

Then you'll need to copy your media directory to that file.

Or, you can play with both the configurations and tell it to put the final output (not the intermediate stuff) into a directory of your own choosing and put the media directory under that. In this way you won't have to remember to move, add or delete files as you continue developing your game.

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-05-02 22:35:28
Your offset time is: 2024-05-02 22:35:28