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 / I moved my game project from macbook to windows,then how to set the image folder?

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 4th Dec 2011 13:40
Now my game can run in windows, but the images are in the same folder with template.exe . I want to put images in a folder named Image, it will look clear. How to do that?

The Miracrea Games
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 4th Dec 2011 14:24
i use tier 1 but should work the same in tier 2 ?

Tile_IMG = LoadImage ( "GFX/Tiles_Sheet.png" )

simply give the name an extension like this.

"GFX/Tiles_Sheet.png"

It should work for you.
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 4th Dec 2011 14:30
@cliff, Thank you. Yes ,it works. But the problem is that there are so many images in my game. about 400 images. It will take a lot of time to change the code. Is there a easy way?

The Miracrea Games
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Dec 2011 14:54 Edited at: 4th Dec 2011 14:55
Use:
integer = SetCurrentDir( "images" )

Returns 1 if folder exists.


Or find the equivalent in T2

halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 4th Dec 2011 15:14
@Digital Awakening, It really works. Thank you very much.

The Miracrea Games
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Dec 2011 16:04
You are welcome

Login to post a reply

Server time is: 2024-05-04 20:55:22
Your offset time is: 2024-05-04 20:55:22