Example game in documentation refers to missing `:setCenter()` call

I noticed something odd when trying to run the Basic Playdate Game in Lua. Specifically, the comments in the example program say that we need to call :setCenter() in order for the playerImage to be anchored at its center. But then the example code never calls setCenter(). And it's anchored at the center anyway! :face_with_monocle:

Seems like maybe :setCenter() used to be necessary, but it's not now? When I call :getCenter() on playerImage, it says it's (0.5, 0.5), so it's definitely already anchored in the center.


I think that might be why it was taken out, because (0.5, 0.5) is already the default center. We've got the issue filed, will remove the mention of setCenter in a future update.

1 Like