Skip to content

Canvas rendering (generally) doesn't work in Chrome/Safari #92

@benekastah

Description

@benekastah

Possibly related: #90, #23

I'm using Chrome Version 27.0.1453.110 and Safari Version 6.0.5 (8536.30.1) on OSX 10.8.4. I'm using tiled to build my game levels and I can only get reliable rendering if I use dom rendering (which is too slow). My character sprite nearly always shows up in canvas rendering mode, but my tiled maps rarely do.

When the game renders in canvas mode, I can verify that there are canvases that appear to be the proper size and position, but they are blank. #23 documented that I can call layer.setDirty(255), but that doesn't seem to have any affect. The one thing that will get the canvases to render reliably is if I set a breakpoint in my code and then hit the play button. For whatever reason, that fixes it. I thought it was maybe a timing issue, so I experimented with initializing the game late with setTimeout, but none of the various experiments I tried with that method worked.

The easiest way to reproduce the problem is through lime/demos/tiled1.js. When I ran that file in chrome, I saw that there were canvases, but that they were blank.

I noticed I have some failing unit tests which may have something to do with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions