Add Grid Rendering #7

Closed
opened 2018-07-07 20:17:34 +00:00 by marty-oehme · 2 comments
marty-oehme commented 2018-07-07 20:17:34 +00:00 (Migrated from gitlab.com)

Add a rendered grid to the simulation, which can be turned on or off.

Perhaps find a way in which it does not need to be re-rendered every frame/update.

Add a rendered grid to the simulation, which can be turned on or off. Perhaps find a way in which it does not need to be re-rendered every frame/update.
marty-oehme commented 2018-07-07 20:19:41 +00:00 (Migrated from gitlab.com)

One way would fundamentally change the rendering logic.

By not updating the whole canvas every frame (through adding a bg colored box) and instead only re-rendering the little squares that need it, we could save a lot of re-rendering work.

An idea would be to keep a list of all squares changed in the last update and re-render them and their neighbors by adding boxes of the background color or cell color respectively. All other boxes are not affected, the overall grid does not need to be redrawn.

One way would fundamentally change the rendering logic. By not updating the *whole* canvas every frame (through adding a bg colored box) and instead only re-rendering the little squares that need it, we could save a lot of re-rendering work. An idea would be to keep a list of all squares changed in the last update and re-render them and their neighbors by adding boxes of the background color or cell color respectively. All other boxes are not affected, the overall grid does not need to be redrawn.
marty-oehme commented 2018-07-08 16:58:32 +00:00 (Migrated from gitlab.com)

closed

closed
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: experiments/cellular-automata#7
No description provided.