Another feature I usually end up rolling from scratch in each game is editor beh...

@Alexjgriffith@mastodon.gamedev.place

Another feature I usually end up rolling from scratch in each game is editor behaviour, i.e. utilities like brush and flood fill.

I've been playing around with a few ways to generalise these tools.

I've settled on providing an interface that simply tracks indices and lets you iterate through potential changes before they are committed.

A callback is called when the changes are ready to be committed, which has implementation specific details (like replacing tiles).

#pixelart #gamedev