hi everyone this is my first post to bbs
im working on a roguelike on the pico 8 and running into some issues
it seems like im hitting a limit on the -y axis
my player keeps moving like normal since the camera is centered on him but then suddenly its like i hit a wall and then
the player start shifting from the center going up
adding the cartridge since i feel like i wasnt able to describe it properly
try to keep going up
can i get an explanation on what i am doing wrong ?
It has to do with these print commands at line 390:
print(player.x) print(player.y) |
print() has weird behavior when you try to print outside the camera. It tries to push the rest of the screen up to fit the text. You can fix this by either removing it or printing it at the camera position:
print(player.x,cx,cy) print(player.y,cx,cy+6) |
thanks a lot. this helps out a ton. i didnt know print behaved this way
Or simply, since you want your HUD (at the moment just the two prints or whatever it'll be, like lives, energy etc..) reset camera offsets after you've called all your draws, after draw_particles() you can call camera()
to reset offset and your prints yes they should have x and y parameters (but after camera reset you can use screen coordinates regardless of your map/camera position).
[Please log in to post a comment]