Skip to content

Implement chunk-like system for space #1

Description

@KennethGomez

What this system aims is to provide a performant way to iterate through stars for hovering animations;

The idea is the following:

  • Create a grid of chunks of 64 x 64 pixels.
  • Assign stars to a chunk depending on its position grid[(star.x / 64) | 0][(star.y / 64) | 0] .
  • For star finding algorithm look on the chunk on which the pointer is on grid[(p.x / 64) | 0][(p.y / 64) | 0] and look on nearby chunks depending on if the look-up distance is outside of the main chunk bounds.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions