Even if I'm not really a gamer (and much less into blockchain gaming), I think the question whether LN is suited for NFT handling is very interesting.
For tokens in general, there's a framework called
OmniBOLT to transact with Bitcoin-based tokens (For example, Tether started as a Omni token, and should also be compatible with OmniBOLT). I didn't know RGB, that looks interesting too
However, I see one big limitation in the usability of Lightning for NFTs, and that's rooted in the whole purpose of Lightning.
Lightning is basically a mechanism where you can bundle a big number of transactions into one (or two, if you close the channel eventually) on-chain transaction, the "channel opening" transaction. This however means that it makes sense principally if you do lots of transactions with that asset - be it Bitcoin or a fungible OmniBOLT token.
Now for a NFT, the problem is that it is not fungible, so you would have to open a LN channel for each NFT, because each NFT has a distinct value and market, so you (probably) can't bundle various NFTs into one channel. In most cases each account holder won't interact that much with a single NFT, maybe a handful of times as a maximum, so the benefits for Lightning are limited.
However, a type of game I could imagine where LN makes fully sense, would be one with the following characteristics:
- there are only a few NFTs circulating
- the game participants will be interacting in high frequency with every single NFT.
Imagine for example a game where there are only 5 NFTs circulating, and the score depends from trading movements between these 5 NFTs and Bitcoin. Opening 5 LN channels for the NFTs and one regular BTC channel wouldn't be a big problem for participants, and if everybody trades the NFT a lot of times while the game lasts, LN saves a lot of fees/transactions.
What, if a LN channel closes? What happens to the 'NFT data'?
Afaik this isn't the problem - if you close a NFT LN channel, then this NFT can "continue to live" in on-chain transactions. If you're the owner of it in the moment the channel was closed, it's you who will have the right to transfer it again, be it via on- or off-chain methods. Only a system has to be coded to "transfer the hash" smoothly from LN to on-chain and vice versa.
I did not test it by now, but it should be possible to use the "Memo" of an LN tx to store a Hash of what ever I want. I guess this alone should be enough to send NFT Data via LN. What concerns me is the part of opening a Channel. The question is: To whom?
To another game participant, of course; they could communicate via a web platform, LN itself or alternatively via some decentralized messaging system like Retroshare or Tox to request the opening of channels.
The best thing actually would be shared LN channels for NFTs between a group of players who have minimal trust between themselves. There are concepts like "account management" for Lightning which allow that; however, in these, one of the participants is the main holder of the keys and so the others must trust him.
There are concepts like trustless multi-party LN channels (also called "channel factories"), but as far as I know the maximum number of participants is currently ~10 and there are still no mature tools for it, so it's still a theoretical concept without actual practical usage. It may also depend on the Eltoo mechanism which needs
SIGHASH_ANYPREVOUT.