gopxl / pixel

A hand-crafted 2D game library in Go.
MIT License
242 stars 10 forks source link

Text behaviour has regressed #84

Open xenomote opened 7 months ago

xenomote commented 7 months ago

When running the typewriter example I noticed that the behaviour of the ext/text/Text type has regressed from the original pixel repository. It from looking at the git blame it seems most that this introduced by the changes @roipoussiere made here: https://github.com/gopxl/pixel/blob/2298e16d4b77704193c2704a98678e4081a63cc3/ext/text/text.go#L261-L262

Because of this regression it is no longer possible to accurately position text by setting the txt.Dot vector to the desired position

bhperry commented 2 months ago

Thank you for the report. I do see the issue you're describing, the typewriter seems to slowly drift away from the text the more you type.

Reverting this change does seem to fix the typewriter, but it's not yet clear to me what that was addressing in the first place.

bhperry commented 2 months ago

Original PR for reference: https://github.com/faiface/pixel/pull/252