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 / Trouble loading images

Author
Message
TravisG
7
Years of Service
User Offline
Joined: 16th Feb 2017
Location:
Posted: 16th Feb 2017 23:27
Currently following along with https://www.youtube.com/watch?v=lOdDfiMNMvM and I'm having problems loading the sprite I want to use. The code is the exact same as shown in the video, but I'll include the file as well. I have the image I want to use in the media folder, is there anything I'm missing?
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 17th Feb 2017 07:51
Without seeing your source code and image name it's hard to say. Try just using spr = LoadSprite("imagename.png") instead of the LoadImage and CreateSprite commands.
TravisG
7
Years of Service
User Offline
Joined: 16th Feb 2017
Location:
Posted: 17th Feb 2017 07:57
Oh, sorry, I thought I included the file. The code I'm using is

SetVirtualResolution(1024,768)
LoadImage(1,"Smile.png")
CreateSprite(1,1)
do
sync()
loop

I'll try the loadsprite command and report back if the issue was fixed.
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 17th Feb 2017 07:59
Are you using Windows or Linux? Windows file system is not case sensitive, Linux is. So IMAGE.Png is the same as image.png on Windows, but on Linux and Android, they would be two different files.
13/0

Login to post a reply

Server time is: 2024-03-29 15:41:51
Your offset time is: 2024-03-29 15:41:51