When replacing images to smaller ones causing white Actor

Hello,

So I've been replacing my PNGs with with JPGs.
When I do this and open the project the Images that I've replaced turn into White Actors in other words not
loading the image. I've checked the XML file and I've noticed that the file size is not being update it.

Weird thing is it was working before but now it doesn't work anymore
because the file size is not being updated it in the XML file. I've tried with a new scene and the same thing happens.

The process that've used to replace the image.

1- Import the png into gamesalad

2- save gamesalad

3- go to images folder replace the png with jpg (keeping the same img name)

4- go to the XML file find the img name and replace the PNG with JPG

5- Open the project - Actor shows as a white actor.

6- Chek XML image size is still the same as the PNG

Same thing happens if I replace PNGs with PNGs (however with PNGs gamesalad doesn't covert the PNGs so it updates the XML fine)

Any idea why that would happen?

Cheers

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    GameSalad doesn't support JPEGs, so you will (depending on the circumstance) experience these kinds of issues.

  • wilsongaluchowilsongalucho Member Posts: 180
    edited September 2015

    Hi Socks :) well I have a water animation and all in JPEGs and all my Menus are JPGEGs and they ARE working fine. The thing is now even with fresh projects if I replace PNGs with PNGs in the Image folder the XML doesn't update.

  • wilsongaluchowilsongalucho Member Posts: 180
    edited September 2015

    Hmm why isn't my PRO badge showing I am a PRO user !

  • wilsongaluchowilsongalucho Member Posts: 180

    Now I've just started using the PNG converters, which now makes my Jpgs look silly. But only found out now. But anyway.. still weird that it worked before and now no longer is.

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2015

    @wilsongalucho said:
    Hi Socks :) well I have a w animation and all in JPEGs and all my Menus are JPGEGs and they ARE working fine.

    Not supporting something doesn't necessarily mean it won't work, it means that there may well be some circumstances where a practice outside of recomendations might cause issues. Sticking pencils in holes meant for bolts might hold a structure up, but there will be a threshold where the pencils break whereas bolts would not - in this situation someone could say (in response to 'bolts are the recommended fastener') "well I have a structure held together with pencils and it's working fine."

    PNGs are the recommended format, JPEGs can cause issues like the one you describe, past success with JPEGs is no guarantee of JPEGs viability in all other circumstances.

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2015

    @wilsongalucho said:
    Now I've just started using the PNG converters . . .

    GameSalad have gone to some lengths to steer people away from using PNG converters, the recommended format is uncompressed PNGs.

  • GeorgeGSGeorgeGS Member, PRO Posts: 478

    I just did exactly what I think you described and it worked.

    • Added an actor with a png image then saved the project and quit Creator.
    • Edited Assets.xml and changed file.png to file.jpg
    • Copied file.jpg to the Images directory and deleted file.png
    • Reopened the project in Creator and it worked.

    The file size in the XML file isn't going to update automatically, because as far as we are concerned nothing changed since it was done behind the back of Creator. It shouldn't make a difference what that number is.

    The only good reason to do this is if you're trying to keep the size of your APK or APP file down and you have large images that won't be too degraded by jpg compression. The size of the file on disk will not make any difference at all to the memory footprint of your game.

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2015

    @GeorgeGS

    Was I wrong when I said GameSalad doesn't support JPEGs ? I thought that was the case now, that it was recommended we not use JPEGs ?

  • GeorgeGSGeorgeGS Member, PRO Posts: 478

    @Socks said:
    Was I wrong when I said GameSalad doesn't support JPEGs ? I thought that was the case now, that it was recommended we not use JPEGs ?

    If you import a jpg into Creator it will convert the image to png for you. If you hack around in the xml files we don't actively try to stop you, just because the engine will load jpg files and it can be useful in the one particular case outlined above.

  • SocksSocks London, UK.Member Posts: 12,822

    @GeorgeGS said:
    If you import a jpg into Creator it will convert the image to png for you. If you hack around in the xml files we don't actively try to stop you, just because the engine will load jpg files and it can be useful in the one particular case outlined above.

    Thanks for the clarification.

  • SocksSocks London, UK.Member Posts: 12,822

    @wilsongalucho

    Ignore my previous posts, if you can get JPEGs to work go for it.

  • wilsongaluchowilsongalucho Member Posts: 180

    Thanks @Socks and @GeorgeGS . :)

  • wilsongaluchowilsongalucho Member Posts: 180

    @GeorgeGS said:
    I just did exactly what I think you described and it worked.

    • Added an actor with a png image then saved the project and quit Creator.
    • Edited Assets.xml and changed file.png to file.jpg
    • Copied file.jpg to the Images directory and deleted file.png
    • Reopened the project in Creator and it worked.

    The file size in the XML file isn't going to update automatically, because as far as we are concerned nothing changed since it was done behind the back of Creator. It shouldn't make a difference what that number is.

    The only good reason to do this is if you're trying to keep the size of your APK or APP file down and you have large images that won't be too degraded by jpg compression. The size of the file on disk will not make any difference at all to the memory footprint of your game.

    Yes the reason why it's because I'm trying to keep it under the 50 mb mark for google play.

    Yap was working for me both on the creator and on the device. It still does work on the creator, but once I tried on the device didn't work anymore but only the new ones the old ones that were there still work fine. I know you say the file size in XML doesn't matter but this is the only inconsistent factor I found since when I changed the PNGs to JPGs the file size also changed in the XML and now it doesn't even with fresh projects I read someone had the same issue and somehow it fixed. Anyway just thought I should share what I found regarding the changing images.

    Best Regards to you both :)

  • GeorgeGSGeorgeGS Member, PRO Posts: 478

    @wilsongalucho said:
    I know you say the file size in XML doesn't matter but this is the only inconsistent factor I found since when I changed the PNGs to JPGs the file size also changed in the XML and now it doesn't even with fresh projects I read someone had the same issue and somehow it fixed. Anyway just thought I should share what I found regarding the changing images.

    I need to do some device testing for something else today, so I'll take a look at this too. I didn't see that the size was important to the engine for regular preview, but it may be a little different on a device.

  • GeorgeGSGeorgeGS Member, PRO Posts: 478

    @wilsongalucho I've tested a few projects I made where I replaced some or all of the png files with jpg and it's working on an Android device for me as well as the preview. Can you send me a project or publishing link for the one that isn't working and I can take a look at that. Maybe there's an issue with a larger project I don't see in my small test projects.

Sign In or Register to comment.