sionleroux / cr1ckt

There is more than 1 bug in this game and some of them are intentional! 🦗 Entry for the 2021 Game Off jam.
https://sinisterstuf.itch.io/cr1ckt
MIT License
4 stars 1 forks source link

Game crashes on web #22

Closed sionleroux closed 2 years ago

sionleroux commented 2 years ago

https://github.com/scarycoffee/ebiten-camera uses ebiten.WindowSize to create the image but WindowsSize only works on desktop, so it returns nil (i.e. 0, 0), which when passed to EbitenNewImage causes a panic because it needs the image size to be greater than zero. Ebiten-camera was apparently not intended for mobile or web, I don't feel like continuing my previous camera attempt, i'll probably have to copy and adapt ebiten-camera.