ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: Benxamix2 on May 23, 2014, 11:11:28 pm

Title: Weird sprite issue
Post by: Benxamix2 on May 23, 2014, 11:11:28 pm
This is my issue: I have this 144x24 spritesheet (heheh, quite simple).

(https://dl.dropboxusercontent.com/u/52212606/imagenes/player.gif)

If I try to load it as a normal sprite from PNG format, or as a strip from any format, next time I load my project it'll be a blank sprite within my resources.
It's not a critical issue, but it's very annoying, at least.
Title: Re: Weird sprite issue
Post by: Darkstar2 on May 23, 2014, 11:31:42 pm
I could not reproduce this. I followed exactly your steps.

I saved your png,

loaded it as png sprite
and loaded it as strip
it displays fine.

Saved the project and loaded it again
displays fine.

I've had similar issues when importing projects from GM/GMS, was this a new ENIGMA project or import from GM?
Try saving in EGM format instead of the default GM1.2 save. I always save in EGM as I don't intend to port them to GM/GMS.
Once you save to EGM and load back from EGM it should work fine.


Title: Re: Weird sprite issue
Post by: Benxamix2 on May 23, 2014, 11:57:21 pm
I use EGM already, that's not the problem.

It's a problem I've had since a good time ago, while making my game (from scratch).
Even making new projects don't help me, the sprites don't load.
Title: Re: Weird sprite issue
Post by: Goombert on May 24, 2014, 12:01:57 am
Ben, when is the last time you updated? I don't recommend you do right at this moment because their is a steaming shit pile of Win32 code I am redoing, but just curious.
Title: Re: Weird sprite issue
Post by: Benxamix2 on May 24, 2014, 12:05:44 am
Like a week ago. Maybe two. I don't really update often unless I really need to, so I don't keep my track on it :/
I also tried the current release just now (such coincidence) in another folder and it doesn't work any better there,either.
Title: Re: Weird sprite issue
Post by: Darkstar2 on May 24, 2014, 12:07:31 am
I use EGM already, that's not the problem.

It's a problem I've had since a good time ago, while making my game (from scratch).
Even making new projects don't help me, the sprites don't load.

I work with EGM on a daily basis, bug chasing and experimenting with things, opening cans of worms along the way (Robert likes those :D)! so far sprites display fine and I open/close many times.  You might have an old version.  What I do usually is clear the temp, close enigma, delete programdata/enigma and re-install from the latest portablezip. Try that, even if you have run the latest version.  I'm using the latest portablezip from 22nd may and I've loaded / closed the project containing your sprite many times here and it worked.

Does the sprite only disappear in the resource tree or also in the room ? Is it still visible in the room?

Title: Re: Weird sprite issue
Post by: Benxamix2 on May 24, 2014, 12:12:47 am
Does the sprite only disappear in the resource tree or also in the room ? Is it still visible in the room?

It becomes a blank sprite. Like when you make a new sprite without loading anything into it yet. That's what happens.


What I do usually is clear the temp, close enigma, delete programdata/enigma and re-install from the latest portablezip. Try that, even if you have run the latest version.  I'm using the latest portablezip from 22nd may and I've loaded / closed the project containing your sprite many times here and it worked.

I still get the issue after performing all those tasks... I'm amazed how it doesn't happen to you, but only to me ;/


Btw it throws an error (not a crashing one) if you try to load a sprite out of its boundaries (e.g. trying to make a 32px heigh strip off my 24px sheet).
Title: Re: Weird sprite issue
Post by: Darkstar2 on May 24, 2014, 12:29:07 am
Well I reproduced the error.
BTW, get used to that, there are tons of ways to force a crash in LGM :P Remember the tip I gave you, save your projects frequently. There is probably shite pile of stuff to be fixed / redone, more so than any remaining dev(s) will ever have time to fix :D

Is this what you see?
Quote
at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)


I still cannot reproduce your sprite problem.
Strange indeed.

Is this happening inside an existing project you are working in ?

Can you reproduce this with a new project, importing just this sprite, saving project and reloading ?

If so, attach a sample project.

Title: Re: Weird sprite issue
Post by: Benxamix2 on May 24, 2014, 01:22:50 am
Well I reproduced the error.
BTW, get used to that, there are tons of ways to force a crash in LGM :P Remember the tip I gave you, save your projects frequently. There is probably shite pile of stuff to be fixed / redone, more so than any remaining dev(s) will ever have time to fix :D

This is not even remotely the first time I've dealt with this kind of problem. I often backup everything I develope.


Can you reproduce this with a new project, importing just this sprite, saving project and reloading ?

That's EXACTLY what I tried.

I attach an example then. It only contains the sprites; spr_0 for the PNG source, spr_1 for the whole GIF strip, spr_2 for a single image from the GIF strip.
Title: Re: Weird sprite issue
Post by: Darkstar2 on May 24, 2014, 01:50:46 am
Before you saved that project and sent attachment were the sprites visible?

Try making a new project with the sprites,
save it once and attach it.

All 3 are blank.

However if I manually add the sprite example you used above and save / reopen it does not go blank.

Title: Re: Weird sprite issue
Post by: Goombert on May 24, 2014, 02:32:05 am
Ben, I am also unable to reproduce this issue. What format are you saving in?
Title: Re: Weird sprite issue
Post by: Benxamix2 on May 24, 2014, 10:11:32 am
Before you saved that project and sent attachment were the sprites visible?

Try making a new project with the sprites,
save it once and attach it.

Yes, and that's exactly what I did.

Ben, I am also unable to reproduce this issue. What format are you saving in?

The one I attached in my previous post; EGM.
Title: Re: Weird sprite issue
Post by: Goombert on May 24, 2014, 09:59:15 pm
Hmmm, use 7zip to extract the EGM, your images are saved as APNG. I don't have an APNG viewer.
Title: Re: Weird sprite issue
Post by: Darkstar2 on May 24, 2014, 10:07:54 pm
Very strange indeed.

Ok I extracted the spr_0.apng
I could view the sprite just fine.

I imported it inside a new project, it displays fine.
I saved the project (EGM) and closed, opened enigma again and load it, and it still displays fine.
I repeatedly saved and closed, open, and it's still there.

I could not reproduce this at all.

@Robert:  Could he be using an outdated version of JAVA or this has nothing to do ?

Title: Re: Weird sprite issue
Post by: Benxamix2 on May 24, 2014, 10:42:30 pm
APNGs can be viewed trough Firefox, Robert.

Very strange indeed.

Ok I extracted the spr_0.apng
I could view the sprite just fine.

How could you view a 169 bytes-sized sprite? It doesn't contain anything! Or at least that's what my Firefox tells me from my point of view here.
You mean you extracted the EGM file I attached, and viewed those APNG files?
Title: Re: Weird sprite issue
Post by: Darkstar2 on May 24, 2014, 10:51:06 pm
APNGs can be viewed trough Firefox, Robert.

Very strange indeed.

Ok I extracted the spr_0.apng
I could view the sprite just fine.

How could you view a 169 bytes-sized sprite? It doesn't contain anything! Or at least that's what my Firefox tells me from my point of view here.
You mean you extracted the EGM file I attached, and viewed those APNG files?

Yes I extracted it from your EGM into a folder, loaded that back into a blank project, the sprite displayed fine.

Had no problem importing APNG to LGM, after all if not mistaken that is is the format used internally.

BTW I noticed when I opened your EGM file in LGM, the enigma settings below extension displayed in spanish...... :)  How is this possible that LGM change language based on the EGM file, first time I see this :D
Title: Re: Weird sprite issue
Post by: Benxamix2 on May 24, 2014, 10:55:57 pm
Had no problem importing APNG to LGM, after all if not mistaken that is is the format used internally.

BTW I noticed when I opened your EGM file in LGM, the enigma settings below extension displayed in spanish...... :)  How is this possible that LGM change language based on the EGM file, first time I see this :D

Well I can't import them myself, APNG don't show because they're not a "SPI supported image" format (and if I use "All types" then it throws me an error, lol).

Another fact here: I haven't even set my ENIGMA installation to Spanish. But somehow it has always been like that, in spanish by itself.
Title: Re: Weird sprite issue
Post by: Darkstar2 on May 24, 2014, 11:04:54 pm
Well I can't import them myself, APNG don't show because they're not a "SPI compatible format".

On the file selector, manually enter *.apng
the file appears, click on it. That's how I did it,
and it worked. Beware doing this though, it will only read the first frame from the APNG, as it's stored as a normal PNG stream and probably ignore the rest or error.  LGM does not import directly from APNG.

If that was a non animated sprite, you could rename the APNG to PNG.  Any PNG reader will be able to read the first frame of the PNG.

I only did this for testing purposes.

Quote
Another fact here: I haven't even set my ENIGMA installation to Spanish. But somehow it has always been like that, in spanish by itself.

This is absolutely strange even paranormal :D

Is your windows version spanish ? Maybe somehow it is detecting some keyboard/language settings and saving info into the EGM ?

As strang as it may sound, maybe this has to do ? Some glitch/bug in LGM ?
Title: Re: Weird sprite issue
Post by: Goombert on May 25, 2014, 12:41:19 am
Hmm, that should be fixed, LGM has an APNG reader so it should be able to read the whole strip for you like it does GIF. I have found this to be of importance and filed a ticket.
https://github.com/IsmAvatar/LateralGM/issues/114

As Darkstar2 pointed out, it would also be helpful to know if other Java applications are exhibiting this translation bug. Also, please attempt to File->Preferences and change the translation.

For the record, LGM does not currently have a spanish translation.
https://github.com/IsmAvatar/LateralGM/tree/master/org/lateralgm/messages

Only the following:
English
French
Danish
Turkish
Title: Re: Weird sprite issue
Post by: edsquare on May 25, 2014, 12:46:17 am
Hmm, that should be fixed, LGM has an APNG reader so it should be able to read the whole strip for you like it does GIF. I have found this to be of importance and filed a ticket.
https://github.com/IsmAvatar/LateralGM/issues/114

As Darkstar2 pointed out, it would also be helpful to know if other Java applications are exhibiting this translation bug. Also, please attempt to File->Preferences and change the translation.

For the record, LGM does not currently have a spanish translation.
https://github.com/IsmAvatar/LateralGM/tree/master/org/lateralgm/messages

Only the following:
English
French
Danish
Turkish

I could help with the spanish translation, it is my mother tongue.
Title: Re: Weird sprite issue
Post by: Goombert on May 25, 2014, 12:47:18 am
Well that's simple, all you have to do is start with the English translation and replace it all. Then add yourself to the copyright and upload it somewhere and we will include it.
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/messages/messages.properties
Title: Re: Weird sprite issue
Post by: edsquare on May 25, 2014, 12:55:46 am
Well that's simple, all you have to do is start with the English translation and replace it all. Then add yourself to the copyright and upload it somewhere and we will include it.
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/messages/messages.properties

Downloaded and will start soon enough.
Title: Re: Weird sprite issue
Post by: Benxamix2 on May 25, 2014, 08:47:04 am
As Darkstar2 pointed out, it would also be helpful to know if other Java applications are exhibiting this translation bug. Also, please attempt to File->Preferences and change the translation.

The only Java application I've "installed" besides LGM would be the Runescape Launcher, though it works fine about this; displaying everything in english.
Switched to every other language, some labels do translate, but there are still some missing ones, like if they were never translated at all.
Also, the last selectable language (Turkish I think) causes LGM to crash while loading :/