PGE Won't Detect Custom PNGs [Fixed]

Description: It's archive, posting new is here viewforum.php?f=11

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 20
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #1by Sambo » 9 Oct 2015, 3:53

I'm using the feature recently added to SMBX with LunaLua to allow custom GFX to be in the .png format. However, PGE doesn't detect these custom GFX files and just displays the vanilla GFX in their place. This is to be expected, since PGE still thinks SMBX only works with .gif images, but it needs to be fixed for the sake of usability.
Last edited by Sambo on 5 Dec 2015, 3:56, edited 1 time in total.
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #2by Wohlstand » 9 Oct 2015, 16:15

Sorry, currently PGE detects that image filenames which defined in the INI-files (lvl_blocks.ini, lvl_bgo.ini, etc.) and to make PGE detect PNG images you would need to rename that images. However PGE's npc.txt has "image=" tag to set a custom filename of image. Anyway, that is not hard to add support of both PNG and GIFs detecting independent to file extension in the INI files and I will add that now ;-)

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #3by Wohlstand » 11 Oct 2015, 0:32

Just Implemented:
https://github.com/Wohlhabend-Networks/PGE-Projec ... cc48834f66bf3dbc2173ba1b2b12fb

But be careful: I will need also avoid looking for a mask if source CGFX image is PNG file, or that trying to find a mask which never using with PNG's and that applies a mask from a stuff folder... to already-transparent image, so, it will be drawn cuted-off if share of image is not same.

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 20
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #4by Sambo » 14 Oct 2015, 6:55

Should it work with custom GIFs and custom PNGs? Because I just updated PGE, and the PNGs still don't work.
Image
Current Project:
Image

Kevsoft M
Angry developer
Angry developer
Avatar
Kevsoft M
Angry developer
Angry developer
Age: 19
Reputation: 80
Posts: 377
Joined: 26 Apr 2014
Location: Austria

Post #5by Kevsoft » 14 Oct 2015, 10:21

Digging in the commit which Wohlstand posted, the code checks first for a gif and then for the PNG. It should be the other way round, as the png overrides the gif and not the other way around.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
Image
Wohlstand in interview:
Spoiler
Image

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #6by Wohlstand » 14 Oct 2015, 18:25

Kevsoft wrote:Digging in the commit which Wohlstand posted, the code checks first for a gif and then for the PNG. It should be the other way round, as the png overrides the gif and not the other way around.
You missed up: in the code algorithm is:

Code: Select all

RequestName - a default filename (npc-4.gif or npc-4m.gif)
//... Oh, shit! I had idea to prevent applying of a masks if PNG has been detected,
//I have an-idea: reject loading of mask file if detected "xm.gif" and "x.png" exists
FirstName - find this file first!
BackupName - find this if not empty and if first was not found

2)
if RequestName ends with ".gif", put RequestName to BackupName and put RequestName with replacement of end to "png" into FirstName (then, PNG will be looked up before GIF)
if RequestName ends with ".png", put RequestName to FirstName and put RequestName with replacement of end to "gif" into BackupName

3) if FirstName not exists and BackupName is not empty, find BackupName, and if not exist - return default path. If exist - return found path.

That code supports both vanilia and modern ways independent to default stuff, and then, legacy not ported to PGE episodes will be played in PGE even vanilia-based custom graphics has been used.

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 20
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #7by Sambo » 16 Oct 2015, 21:05

Well, whatever is going on, it isn't working. Here's what happens when I use PNGs:
ww1-Boingyboing Land_Section_1_26488.png

This is how it's supposed to look:
ww1-Boingyboing Land_Section_1_4882.png
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #8by Wohlstand » 16 Oct 2015, 21:52

Sambo wrote:Well, whatever is going on, it isn't working. Here's what happens when I use PNGs:
ww1-Boingyboing Land_Section_1_26488.png

This is how it's supposed to look:
ww1-Boingyboing Land_Section_1_4882.png
Please redownload PGE now because I applied some minor changes and updated it. It also contains support of both PNG and gifs CGFX with priority to PNG,
But be sure than I wasn't fixed masks and if you will put PNG image, it will still try to detect mask image and wait my minor fix to prevent that and everything will be finally fine.

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #9by Wohlstand » 18 Oct 2015, 17:00

Problem is completely fixed and all updates are uploaded

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 20
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #10by Sambo » 5 Dec 2015, 4:02

I just tried it, and the custom PNGs still aren't showing. Before I accuse you of not fixing it, though, I'll ask you this: Is the fix for this in the core of the program, or is it in the libraries and I need to get a full build? Or do ALL GFX, even the defaults, have to be PNGs?
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #11by Wohlstand » 5 Dec 2015, 15:09

Sambo wrote:I just tried it, and the custom PNGs still aren't showing. Before I accuse you of not fixing it, though, I'll ask you this: Is the fix for this in the core of the program, or is it in the libraries and I need to get a full build? Or do ALL GFX, even the defaults, have to be PNGs?
PGE supports PNG natively and everything works already. Are you got right update? (are you ran RIGHT version or you accidentally launched legacy build?)
And check out folder names: dot character in PGE can be used to make "shared" custom folders:

Code: Select all

meow
meow.house.lvlx
meow.street.lvlx

so, folder "meow.street" will be not detected

Anyway, are you can send me your level with all included CGFXs? (episode+custom) to let me check it myself

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 20
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #12by Sambo » 5 Dec 2015, 23:04

PGE supports PNG natively and everything works already. Are you got right update? (are you ran RIGHT version or you accidentally launched legacy build?)
I just updated my PGE-online dowloader and used it to get the new version less than a week ago, so unless it runs a legacy build automatically, it should be the newest.
Is it supposed to say something different here?
about.PNG

Anyway, are you can send me your level with all included CGFXs? (episode+custom) to let me check it myself
Ah, I switched it all back to GIFs and I don't have one with PNGs. I just have a small level for testing an API I'm working on where I tried to use PNGs for CGFX.
Here is a download:
https://dl.dropboxusercontent.com/u/37052080/apc%20test.zip

Also, the GIFs2PNG and PNG2GIFs programs don't work anymore. I tell them to start a conversion and they act like something happened, but I check the folder and the formats of the images did not change.
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #13by Wohlstand » 5 Dec 2015, 23:51

Sambo wrote:I just updated my PGE-online dowloader and used it to get the new version less than a week ago, so unless it runs a legacy build automatically, it should be the newest.
Is it supposed to say something different here?
Mayby you ranned shortcut on desktop which linked to legacy build, please find fresh in the Start menu -> Programs (or just walk through folders C:\Program files (x86)\PGE and make new shortcut yourself). By default installer installs into that folder if you not defined another install path.

I jsut tested your level - everything works fine with both Editor and Engine apps

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 20
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #14by Sambo » 7 Dec 2015, 5:30

I only have one installation. Maybe the online installer is broken or something. It has happened before. I'll just try to manually download PGE and see if that helps.
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #15by Wohlstand » 7 Dec 2015, 6:27

Sambo wrote:I only have one installation. Maybe the online installer is broken or something. It has happened before. I'll just try to manually download PGE and see if that helps.
I think, you had legacy installer and I long time ago updated it to fix some serious troubles which are was caused with it's bugs

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 20
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #16by Sambo » 23 Dec 2015, 2:51

You should make it so the installer can show a warning if it needs updated. Anyway, it is fixed now.
Image
Current Project:
Image

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 331
Posts: 1312
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #17by Wohlstand » 23 Dec 2015, 2:55

Sambo wrote:You should make it so the installer can show a warning if it needs updated. Anyway, it is fixed now.
That part is in works. So, later Editor will spawn notify about available updates (you even would find a greyed checkbox "check every startup" in the "help"->"Check for updates" menu)

Also note about imperfection at NPC.txt editor which still doesn't loading PNG's (I fixed that in 0.3.1.9 which you can take from laboratory http://wohlsoft.ru/docs/_laboratory/)


Return to “Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest