tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Expand tutorials of writing array blocks

Open TibbersHao opened this issue 1 year ago • 2 comments

With some of my recent work, I have extensively utilized the functionality of tiled.client.array.ArrayClient.write_block to write back single slices of 2d arrays to client during the result generation phase.

If needed, I am happy to tailor my codes and contribute a paragraph or two under the tutorial of writing arrays, as it might be beneficial for future developers to leverage on.

What I am thinking about to cover:

  • Create Array structure using ArrayStructure.from_array
  • Divide structure into desired chunks
  • Pre-allocate space as a container in Tiled client
  • Write blocks according to index

Does that sound like a good idea?

TibbersHao avatar Mar 18 '24 19:03 TibbersHao

That would be very welcome. Thanks!

danielballan avatar Mar 19 '24 00:03 danielballan

Great, @danielballan a small PR #696 just submitted, feel free to make changes!

TibbersHao avatar Mar 22 '24 00:03 TibbersHao