Here is a simple video game implemented in Haskell, using gloss and shine: https://gitlab.com/juliendehos/haskell-invaders . The web version can be played online: https://juliendehos.gitlab.io/haskell-invaders .
Good job! I really like that you can have two implementation (gloss / shine) simply by replacing a few events and display functions.
Unfortunately in the web versioin it looks like there are sections where the display pauses for a second or so while the game continues which can cause the player to lose the game in that instant.
Thank you! Gloss and Shine are nice to use and the functional approach makes it very easy to separate game logic from rendering / input handling.
Thanks for reporting the display pauses. I tried the web version on Linux, with Firefox and Chromium, but I didn’t notice that. Which browser / OS do you use ?
firefox 67 / ubuntu 18.04
note that this doesn’t always happen, i had a few runs where it only stutter a little bit (as is common for web games ime)
Ok thanks. I have a similar config at my work, I’ll try it tomorrow, when I have time.
I tried on another machine and it was quite slow with Firefox, indeed (Chromium was ok). I rebuilt the game using other optimization options but I don’t know if it’s really better.