ID:1956108
 
Resolved
Applying an image to an object didn't force its icons to update. Additionally, applying animation to an existing image or changing its appearance did not force the image's loc to update its icons either.
BYOND Version:509.1302
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 45.0.2454.101
Applies to:Webclient
Status: Resolved (509.1304)

This issue has been resolved.
Descriptive Problem Summary: Images don't seem to animate in the webclient, while working fine in DS.

Numbered Steps to Reproduce Problem:
1. Create an image and show it to the client.
2. Animate the image.

Code Snippet (if applicable) to Reproduce Problem:
proc/enter_melee_mode_maptext(turf/effect_loc, character/ref, fade_time = 15)
if(!ref || !istype(ref) || !ref.client) return
usr = null

var obj/maptext = shadowed_maptext(span("combat_maptext", "Entered Melee Mode"), "#f00")
var image/maptext_img = new(loc = ref.loc, pixel_x = -4 + ref.step_x, pixel_y = 16 + ref.step_y, layer = MOB_LAYER + 1)
maptext_img.overlays += maptext.appearance

ref << maptext_img

animate(maptext_img, pixel_y = maptext_img.pixel_y + tiles(1), alpha = 0, time = fade_time)

// make sure these timers can be removed upon Logout()
var event/timed_event/timer = new/event/timed_event(fade_time, "dispose_image", list(ref, maptext_img))
ref.add_timer(timer)


Expected Results: For animations to play on image objects as they do in DS.

Actual Results: Animations do not play on image objects, or at least not the animation as seen above.

Does the problem occur:
Every time? Or how often? Every time.
In other games? N/A
In other user accounts? N/A
On other computers? N/A

When does the problem NOT occur? When I don't use the webclient.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
509.1301. The problem begins occurring in 509.1302.

Workarounds: None in this case since the use of images is required.
Hm, are you sure it is the use of images? If so, is there any specific case you can boil it down to? I work with nothing but images for players, reticles, etc. They are working well for me, besides one minor thing that has to do with remaining inactive for too long. Which reminds me that the map stops updating in Dream Seeker as well if you are inactive for too long (12+ hours, though)... I must get to making those bug reports eventually... Anyway, I'm rambling now. Point is, works for me.

EDIT: Oh wow, that was quick. Nice. No case needed, I guess. Anything good done to images is great for me!
Lummox JR resolved issue with message:
Applying an image to an object didn't force its icons to update. Additionally, applying animation to an existing image or changing its appearance did not force the image's loc to update its icons either.
In response to Kamuna
When I use an object, it works fine. Images do not; they do not move or fade out as the animation declares.

Perhaps you could show what exactly you're doing so differences in approach, if any, can be recognized.

Edit: Lummox beat me.
Well, one of the things I do with images is just simply rotating the image constantly in a loop with animate(). Just tested again, that works fine in the webclient.
There were specific circumstances where this showed up; in other cases it didn't appear. A lot depended on the main atom.

The trick is, in 1302 I introduced an "inert" flag for atoms that could avoid applying a lot of unnecessary logic, thereby reducing the load and increasing potential FPS. Images did not impact the inert flag on their parent atom, which was the cause of this bug. An atom that was not inert (moving, already animating, using an animated icon) would not have had the issue.