Closed lesleyrs closed 1 year ago
On top of that I'm not sure why the 2nd sprite on the spritesheet is being drawn 3 times on the map, it's supposed to be just the latter half of the spritesheet?
Can you provide a fully reproducible example?
Btw what is
append_camera
for?
It's a convenience function I use in the editor, it adds a camera offset to the current one. https://github.com/jjant/runty8/blob/cbb1d15a497afffe3930512b183b38cc4cf980ce/src/runty8-core/src/draw_data.rs#L39-L41
https://github.com/lesleyrs/runty8-game-template
This is just the template game with following camera added to center the "character". If you move left/north of the 0, 0 coordinates it won't redraw correctly.
I guess the only way to fix this is to increase the screen buffer size? Having the render area be relative to the camera alone doesn't fix it because the camera doesn't need to be centered in a game.
Thank you! Your repro helped me find the issue, this will be fixed by #66 😄
Was just trying to do
pico8.camera(self.x - 56, self.y - 56);
which works in pico8 but here it stops clearing screen when you're outside of the 128x128 coordinates.Btw what is
append_camera
for?