GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

Create DrawGrid.json

Open TheGemDev opened this issue 1 year ago • 6 comments

draw a virtual grid.

image image image

TheGemDev avatar Feb 18 '24 15:02 TheGemDev

Can you provide the extension please ? (edit) and an example project

Oxey405 avatar Feb 18 '24 16:02 Oxey405

Project - Draw Grid.zip

Extension - Draw Grid Extension.zip

TheGemDev avatar Feb 18 '24 16:02 TheGemDev

Project - Draw Grid.zip

Extension - Draw Grid Extension.zip

Thanks

Oxey405 avatar Feb 18 '24 16:02 Oxey405

Performance is really bad because of how you draw the cells (using a loop)

The issue is not the loop. It's the instance creation.

This example has events that draw a grid: https://gdevelop.io/game-example/free/snap-object-to-grid

D8H avatar Feb 18 '24 18:02 D8H

fixed the performance and added a way to change colors in the action. Also, if no instance of the shape painter object exists, the action creates one.

image

TheGemDev avatar Feb 18 '24 19:02 TheGemDev

What happens when the camera is moved? Can extension users use the grid to debug path finding of a game with scrolling? What do you think about making a behavior that updates the grid when needed?

D8H avatar Mar 12 '24 15:03 D8H