ID:2142933
 
Resolved
Certain .gif animations didn't load correctly. (Note: This affected Dream Maker and Dream Daemon as well.)
BYOND Version:510
Operating System:Windows 10 Home
Web Browser:Chrome 52.0.2743.116
Applies to:Dream Seeker
Status: Resolved (511.1357)

This issue has been resolved.
Descriptive Problem Summary:
In battle, the Pokemon images are loaded from a list var/Front and var/Back
The Pokemon icons are .GIF whenever they show up now they don't show up properly in the battle window. Certain move animations also get stuck on the gif as well. For some reasons it only happen with certain Pokemon, not all of them. I made a little video since I cant really explain what it looks like; Notice how the Wurmble looks all weird when his icon appears and when I use an effect move on him, the effect remains? This doesn't happen with my battle with Sentret for some reasons:

Video:


This is what the list looks like (from which the Pokemon appear in battle):
var/FrontPokemon = list(
1 = 'Icons/Pokemon/Front/001.gif',
2 = 'Icons/Pokemon/Front/002.gif',
3 = 'Icons/Pokemon/Front/003.gif',

//In a battle the trainer's Pokemon would be generated like this:
icon(FrontPokemon[P.id]) // Where P.id is the ID of the Pokemon obviously.



Does the problem occur:
All the time with certain Pokemon

When does the problem NOT occur?
It doesn't happen with certain Pokemon... Maybe the icons are too big or the ressources don't load properly?

Did the problem NOT occur in any earlier versions?
To be honest, I'm really not sure as I've recently added Pokemon from new generations.


Link to the GIF files:

https://s22.postimg.org/ydxfz3l01/265.gif
https://s17.postimg.org/z2lop62mn/161.gif
What happens if you don't use the icon() proc? just assign icon = FrontPokemon[P.id])?

And can you upload samples of the gifs?
In response to Super Saiyan X
Super Saiyan X wrote:
What happens if you don't use the icon() proc? just assign icon = FrontPokemon[P.id])?

And can you upload samples of the gifs?

Just tried without the icon() proc...(cant even remember why I decided to use it instead of directly calling from the list) but yeah, still the Wurmble icon doesn't show up properly.

Here I uploaded both GIFs:

https://s22.postimg.org/ydxfz3l01/265.gif
https://s17.postimg.org/z2lop62mn/161.gif
BUMP :(
I wonder if this has anything to do when Lummox implemented icon block loading (loading big icons in chunks) if you look at how the sprite gets cut off, you can see squares randomly taking out of the sprite in the same spots. It could also be a layer thing, but I find that unlikely.
Taking another look at that video, that looks like some kind of layering problem, and not necessarily a bug. It's hard to tell with as zoomed-out as the video is, but I think you have individual tiles flipping back and forth. It would help to see the source in question. From where I'm sitting, it has all the hallmarks of the same layer having been used for two things that should have very distinct layers, and the engine getting confused as a result.

One thing I would highly recommend is that you take a look at what you're using for layers everywhere in the world. If the monster is being given a layer the same as that patch of grass it's standing on, that's very very wrong; change the layer up a little bit, so it's a bit higher, and that way any ambiguity will go away.
In response to Lummox JR
Lummox JR wrote:
Taking another look at that video, that looks like some kind of layering problem, and not necessarily a bug. It's hard to tell with as zoomed-out as the video is, but I think you have individual tiles flipping back and forth. It would help to see the source in question. From where I'm sitting, it has all the hallmarks of the same layer having been used for two things that should have very distinct layers, and the engine getting confused as a result.

One thing I would highly recommend is that you take a look at what you're using for layers everywhere in the world. If the monster is being given a layer the same as that patch of grass it's standing on, that's very very wrong; change the layer up a little bit, so it's a bit higher, and that way any ambiguity will go away.

Good points but sadly the grass patch doesn't exist actually, I'm simply creating a background HUD, and the Pokemon is created afterwards...with a higher layer. :/

Maybe, it has to do with the way large image are handled?cuz...I'm using a large dmi background image as a HUD? (285x143)
That doesn't seem likely. You're not using the old TILED_ICON_MAP mode, are you?
No, I'm not :/
TOPDOWN_MAP
I think I'm definitely gonna need source for this.
Alrighty, I was able to create a very small source and reproduce the bug x.x

So I'm gonna PM you with a link to that source. I also added more gifs, so you can test out different icons...

I was able to find the issue. The .gif loads weird even in Dream Maker, and it's because our frame disposal code wasn't completely correct. It didn't handle optimized .gifs correctly.
Lummox JR resolved issue with message:
Certain .gif animations didn't load correctly. (Note: This affected Dream Maker and Dream Daemon as well.)
WOHOOOOO!~

Thank youuu! :D
In response to Lummox JR
Lummox JR wrote:
I was able to find the issue. The .gif loads weird even in Dream Maker, and it's because our frame disposal code wasn't completely correct. It didn't handle optimized .gifs correctly.

hehe i told this to kidpaddle a few weeks ago that this was probably the issue