Testing game does not show images, but no error message?

So I’m having an issue with getting images to load in my game. I’m not getting any error messages, but when I test the game in Firefox I’m getting the broken image icon instead of the image. I have the file in my “mygame” folder like I’m supposed to, it’s a .png file but I’ve been having the same issue with .jpg files and any other images I try to upload.

My code for it is: *image filename.type alignment

That’s what it says on the tutorial section of the site: is there something else I need to be doing to get it to load right? Do I need to list it like the scenes on the startup page or something? Everything else on my game seems to be working fine, I just can’t seem to get images to show up; it’s my first time making a game on this software, and I thought I was doing alright before I tried adding images.

1 Like

Can you post the exact code you are using?
Also, can you verify that the image is not corrupt by opening it regularly through Firefox?

Right now I am literally just trying to get images on. The entirety of the code for my startup page right now is:

*title Conduit
*author Jay M Profio

Image Test

*image SpriteRayne.png center

That’s all that’s on there right now, because I’m just using it to test the appearance of the image once I add it to my final game. The file name is exactly the same as in the code, capital letters and all. I opened the file in Firefox and it looks fine, it just doesn’t open with the code when I test it.

This is a screenshot of what I get. I don’t get any errors

Ok, try it with a .jpg
Does it give you the same message?

I just tested:
*image myimage.jpg center

For me, this works on mine.
Maybe ChoiceScript can’t process .png

I just saved the image as a .jpg, ran a test and got the same image result as before. I even changed the file type in the code. Running the quick test lists it as successful; everything is running fine but the image just doesn’t show up in the test.

Do you get the same result with a .jpg downloaded from the internet?

I just tried this, and yes. It’s exactly the same.

Ok, so the image is your “mygame” folder, correct?
And your code is in your “scenes” folder?
And both of these things are in the same dfabulich-choicescript folder?

Yes. Everything is in the right folders, I’ve checked and double checked. The automatic tests say everything is running properly with no errors, but when I compile and test the images are broken links.

Ok that might be something there… when you compile?
You don’t need to compile to test.
If on a PC, you just double click the index in your “mygame” folder.

1 Like

Ah I see that was it. The tutorial pages say to test via the “compile” command.

Silly tutorials :wink:
Does it work now?

Yes, it’s working now. Thanks very much, I didn’t realize “compile” was messing with the images

1 Like

Which tutorial pages? Compilation should work fine, but you’ll need to copy the images to the folder (location) of the compiled “game.html” file :slight_smile: