Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bug: Large or Infinite Tilemaps have poor pointer performance #3522

@eonarheim

Description

@eonarheim

Steps to Reproduce

Create a large Tilemap (100x200), this is relatively easy to do with the infinite tilemap feature in the Tiled plugin. See https://github.com/BreadBox64/RoscoTheRoswellRacerTwo

It seems that the PointerEventToObjectDispatcher.processPointerToObject is the main source, this could be improved likely with some spatial data structures and refactoring.

See discord thread for more detail https://discord.com/channels/1195771303215513671/1420699867851915344/1420699867851915344

Image Image

Expected Result

Pointer dispatch should be fast < 1-2ms at most

Actual Result

Huge performance hitch 200ms+ during dispatch code

Environment

  • browsers and versions: Chrome
  • operating system: NA
  • Excalibur versions: 0.30.3 (and latest main)

Current Workaround

Remove pointer events from Tilemap

const tilemap: TileMap = ...;
tilemap.pointer.useColliderShape = false;
tilemap.pointer.userGraphicsBounds = false;

// or

tilemap.removeComponent(PointerComponent);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue describes undesirable, incorrect, or unexpected behaviorsystem:pointers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions