Good morning Forum (at least for me it is…)
I’ve been writing a story with CS for a few weeks now and I added an image to the stats screen - a map of my fantasy setting. Everything is okay when I’m previewing the project with both CSIDE and the run-server function from Dan Fabulich. And when I upload my files to dashingdon the image appears as well.
The thing is: when I compile my game to a HTML file, the image appears as an icon as if it was corrupted. It happens with both the official CoG compiler and the compiler from CSIDE.
Anyone knows what is happening and how I can solve this?
Thanks in advance,
Pedro J. E. Santos
Can you paste the full URL of the image (whether it’s a local file in the same folder as the index html file, or within a subdirectory, or an image stored online somewhere)? And the specific line of code that’s referring to this image? Might be an issue with the code not finding the image file based on the given location.
The URL of the image? I’m sorry but how can I see that?
The code is *image Epieisia.jpg - the image is called exactly the same (Epieisia.jpg) and it’s in the mygame folder (and not in the scenes folder). In the case of CSIDE, the image is in the same folder as the scene files and it knows it is because i can see it while I’m testing the game…
That happens because the html file itself won’t carry over the extra files, like image or sound. Put the images in the same folder as your html and it should work.
Thanks so much. It worked ahaha
@brushmen, the solution was found.
Thank you both for the help. Now, one more question, do i need to carry both html file and image to play the compiled version or is there another way to do it (offline that is)?
Bom dia for you too ahaha and obrigado
I don’t know if there’s another solution, like compiling to a different file, maybe an executable? But I hardly think there is. If you’re using the compiled html you’ll have to ship the images together.
The best way I can think of showing your game would be using dashingdon, but that’s online.
Yeah, dashingdon is a great help.
I even have a program that converts the web page of my game hosted on dashingdon and I convert it to an android app. Like that, I can play my game on my phone and tablet but has to be online.
I was thinking of learning to work on Android Studio to compile an offline version but i needed to get the compiled version to work offline. I’ll see what I can do.
Thanks for the advice!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.