Can't display images

No matter what I do, I can’t display images within the prologue scene. I’ve done the following things and checked them.

  1. I’ve coded in the proper command. (*image image_name.png center)
  2. The images (both .png files) are in the appropriate mygame folder. Both are less than 1MB.
  3. I’ve updated ChoiceScript to the latest version found on GitHub.
  4. I’ve tested it, and it failed Quicktest, stating that the images are not found, even though they’re in the appropriate folder.
  5. I’ve compiled it using compile.html, and the images aren’t displayed.
  6. I’ve run it through index.html, and the images are displayed.

And before one asks, I mainly use Visual Studio Code to program everything.

Are you sure you are using the correct extension of image files? Is it something else like .jpeg perhaps?

I double-checked in Windows, and they’re indeed the correct extension.

Do the filenames match? Perhaps quicktest is case-sensitive while browser is not?

The file names indeed match. I didn’t even use any special characters; I used camel case for the filenames, and even copy-pasted them into the code.

Maybe I can upload the images in question as well as the screenshot to demonstrate?

1 Like

Hmm. What if you use lowercase?

hmm. What if you put the images on some other place (imgur, dropbox, googledrive) and just use the *image command followed by its http:// hiperlink?

I literally just link my images on my projects.

It doesn’t work, either.

So here are the images in question.


And the screenshot of the error.

1 Like

Try *image foldername/imagename.png.

Still not working.

Wouldn’t have worked anyway, I meant: *image foldername/imagename.png center (you might have noticed my mistake and tried this).

Is the image name too long?

Shortened the filenames, but still doesn’t work.

Did it work if hosted on dashingdon? If it does, it kinda feels like a file location issue.

Edit: there a trick to getting images to display once compiled also. The CS built in compiler doesn’t natively compile images. Something about zipping into a folder (if you search the forum there are instructions somewhere as a reply to a recent post of mine but I haven’t done it yet.) Alternately you can compile images into scenes via CSIDE.

1 Like

OK, I’ll wait for those instructions so I can continue coding the first demo and upload it to Dashingdon the next month. Those images are made by myself, as I want to make the prologue more cinematic.

1 Like

I know that is kind of off topic, but I must say.

These images are awesome my man. Looks like a classy retro game in late 80s, early 90s.

Damn I miss DOS games… lol!

1 Like

(Further links and things on this thread.)

You’re indeed right; the native CS compiler doesn’t recognize images right off the bat, and thus the images have to be in the same folder as the compiled HTML file.
I guess I’ll ignore the errors related with that file location issue when I run Quicktest, and then move on.

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.