danilolc / pk2

Pekka Kana 2, a platformer game
http://pistegamez.net/game_pk2.html
MIT License
83 stars 24 forks source link

Add support for more languages via pixel fonts (GNU Unifont), DON'T remove extra language locales #17

Open sahwar opened 2 years ago

sahwar commented 2 years ago

Add support for more languages via pixel fonts (GNU Unifont), DON'T remove extra language locales.

The GNU Unifont .bmp/.gif/.png full-charset image supports a wide variety of writing systems (it supports a lot of Unicode 5 charset!) which can, if included in pk2sdl, can add support for more language locales to the game. Just download that image file from the GNU Unifont website (converting that .bmp to .gif or .png will greatly reduce its filesize for inclusion in pk2sdl, especially because it is a monochrome image file!).

One can also make more pixel fonts via http://fontstruct.com (& use the free apps Transparent Windows 2.2, PeekThrough app, or similar, to retrace-copy .ttf fonts' glyphs (e.g. via BabelMap) via semi-transparency applied to your charmap app and web-browser, to copy glyphs into your own pixel font) and http://pentacom.jp bitmap font maker 2, but only monochrome-color pixel fonts... One can possibly write a Python3 or Perl script to apply color-font-glyphs parts via an algorithm to these monochrome fonts.

But the above may require you to convert the lang locale files of PK2 to utf-8 and to tweak the game's code to read those utf-8 files, and to increase the hardcoded limits of the image dimensions for reading the .bmp files with the PK2 image font-glyphs, so as to accommodate for the increased image dimensions of newly added images with the pixel-font glyphs for many languages added into them (and the .txt files that describe the glyph-to-image mappings, see e.g. the Cyrillic extra metadata info in one of the Russian.txt locales for ideas on how to do that).

Also, I think that most people won't mind having more language locale translations files bundled in pk2sdl, instead of removing those and having only 1 translation file per language... (this is against the proposed 'remove repeated languages' in the FIXMEs!). And the game should also support importing more such .txt files supplied by the enduser.

P.S. Maybe having 2-3 more options for the placement of the pk2sdl gameplay buttons on Google Android devices - is a good idea, especially about the location of the buttons for doodle & eggs-laying & ducking & inventory & pause/main-menu, etc.... šŸ¤” E.g. a WASD ( w\asd) keyboard-like keys like those placed on a keyboard and on the other side - in the same way - the rest of the key buttons for the pk2sdl gameplay.

Cheers! And thanks a lot for pk2sdl!!! šŸ™ P.P.S. Please add hyperlinks to the other pekka kana 2 projects on github.com, these can be very useful to people who make new episodes&maps for pk2sdl! http://lospec.com & my http://github.com/sahwar/Bulogos 'Best free drawing apps' file list free apps for doing pixel-art for pk2sdl! Also please add the pk2lib mediafire.com links and the PisteGamez webforum link and the PisteGamez discord.com chat-channel - to the 'More episodes' section of the README.md in the pk2sdl http://github.com repository, as it contains many new episodes for pk2 (though you may need to convert some of the image files into image filetypes compatible with pk2sdl!).

Again, THANKS A LOT FOR pk2sdl and its Google Android port, the MS Windows port and the (GNU/)Linux port, and the macOS port!

sahwar commented 2 years ago

unifont-8_0_01 Open the file in a new web-browser tab to zoom in and explore the full GNU Unifont charset image file and its support for Unicode 5...