Author Topic: [SUG][PLAYER] Support for unicode in level titles / etc  (Read 1516 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
[SUG][PLAYER] Support for unicode in level titles / etc
« on: July 25, 2019, 05:39:16 AM »
Basically - as discussed on Discord, I'm happy to implement this, if someone else is happy to make the character graphics. It should be fairly easy to implement this on the code side of things.

I'll look into doing it in a way that's fairly easy to add new characters to, so we don't have to modify an entire image or manually merge the images together, every time someone submits additional characters to it.

Further down the track, this could also be used to provide translations of NeoLemmix into other languages - but for now, let's just focus on (a) getting the support in and of itself, and (b) have it working in level title / author fields.

(Of course, I won't work on this right away - I'll probably come and take a look at what needs to be done with NeoLemmix, once I'm finished my Lemmings 3D levelpack.)
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [SUG][PLAYER] Support for unicode in level titles / etc
« Reply #1 on: July 26, 2019, 01:39:33 AM »
Based on my understanding of Unicode, it sounds to me like it would be difficult to have a complete set of characters drawn. How would missing characters be rendered? Would they be disallowed, skipped, replaced with boxes, drawn with fonts from the system, etc.?

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [SUG][PLAYER] Support for unicode in level titles / etc
« Reply #2 on: July 26, 2019, 01:52:54 AM »
Anything not supported is currently just skipped altogether. I'd think replacing with a placeholder character would be a preferred behaviour.

I don't see it as hugely important to support every character. Someone mentioned on IRC that they'd like to be able to use it in level titles; it wouldn't be too much work to implement this, so I figured that as long as I'm not having to make the character graphics, I'm happy to add the engine support.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: [SUG][PLAYER] Support for unicode in level titles / etc
« Reply #3 on: July 26, 2019, 02:09:20 AM »
https://utf8everywhere.org :thumbsup:

Ideally, your program already loads and writes UTF-8 without any assumptions about the encoding. I.e., store everything as bytes, don't store text as WideChar/WideString that is 2 bytes in Delphi, the only use for WideChar is for filename arguments passed to Windows API, see utf8everywhere.

No need to render all of unicode, most fonts offer only a subset. Paint glyphs for the most common characters, and accept submissions for more. Did people tell you what characters they want the most?

-- Simon
« Last Edit: July 26, 2019, 02:44:16 AM by Simon »