Coding night 22 - internalization and some new animations
With its dictionaries, Python is easy to create language versions with few lines of code. I set en_EN as default, and any translation can be added at any time. I added pl_PL, of course.
I’ve also redesigned animations on the game start and level finished (in 2 variants). No soundtracks yet, besides the sample one I created yesterday in about 5 minutes.
The avbin library, necessary to play compressed sound (music tracks will be in ogg!) may not be present on each machine / OS. Arch Linux needs an AUR package.
avbin crashes for me,
avbin7 plays well with pyglet. Void Linux has no avbin support yet. For the game to work, even with no music (just sound FX in .wav), I added a workaround. When started, the game attempts to play the initial sound from the .ogg file. If the
try clause catches an exception, the
avbin variable is being set
False. No more compressed file will be loaded.