wizzomafizzo / tapto

Launch games using physical objects
GNU General Public License v3.0
64 stars 9 forks source link

Enhancement Proposal: Implementing Amiibo Integration for Launching ROM Files with Flexible Path Handling #48

Open sigboe opened 2 months ago

sigboe commented 2 months ago

Overview:

This proposal suggests enhancing the current functionality to enable the scanning of type (example Toon Link) of Amiibo figure to initiate the launch of ROM files without requiring the full file path.

Current Functionality:

Scanning an Amiibo provides the option to match it using the UID/Serial number, which is unique to each Amiibo. For example, two Toon Link Amiibo figures will each possess their own distinct UID and appear as separate tokens in Tapto.

Current Functionality:

you have to supply the full path of a game, not give a partial match to a game path.

Proposed Change:

Allowing the user to either "match" on the UID like now, or "match" using a kind of Amiibo, if possible match any character from a franchise, or any Amiibo that is the same character (example any Link character), or any character from a specific game (example any Amiibo from a Zelda game).

Proposed Change:

Allow supplying partial file path.

Needed Changes:

Optional Changes:

Notes:

asturur commented 2 months ago

Would this enable something like: "launch a random zelda game when i put a zelda franchise amibo"? or things like that?

sigboe commented 2 months ago

@asturur launching random game from a list is something we have talked about before, this would not inherently do that, but I will add it to the list of optional changes.

Including launching a menu to pick from a set list of games, like a multigamecart

sigboe commented 2 months ago

Here is the output of the command jq -r '.amiibo | group_by(.head)[] | select(length > 1) | .[] | .name + " has the same page 21: " + .head' < <(!!) jq -r '.amiibo | group_by(.head)[] | select(length > 1) | .[] | .name + " has the same page 21: " + .head' < <(curl -s "https://www.amiiboapi.com/api/amiibo/") This shows example that you can match multiple mario figurines to a mario game, if you match the first 8 hex bits.

Mario has the same page 21: 00000000
8-Bit Mario Modern Color has the same page 21: 00000000
Mario - Wedding has the same page 21: 00000000
Mario has the same page 21: 00000000
Mario - Gold Edition has the same page 21: 00000000
Mario - Silver Edition has the same page 21: 00000000
8-Bit Mario Classic Color has the same page 21: 00000000
Golden - Power Up Band has the same page 21: 00000003
Mario - Power Up Band has the same page 21: 00000003
Luigi has the same page 21: 00010000
Luigi has the same page 21: 00010000
Peach - Wedding has the same page 21: 00020000
Peach has the same page 21: 00020000
Peach has the same page 21: 00020000
Yoshi has the same page 21: 00030000
Yoshi has the same page 21: 00030000
Mega Yarn Yoshi has the same page 21: 00030102
Light Blue Yarn Yoshi has the same page 21: 00030102
Pink Yarn Yoshi has the same page 21: 00030102
Green Yarn Yoshi has the same page 21: 00030102
Bowser - Wedding has the same page 21: 00050000
Bowser has the same page 21: 00050000
Bowser has the same page 21: 00050000
Wario has the same page 21: 00070000
Wario has the same page 21: 00070000
Donkey Kong has the same page 21: 00080000
Donkey Kong has the same page 21: 00080000
Diddy Kong has the same page 21: 00090000
Diddy Kong has the same page 21: 00090000
Daisy has the same page 21: 00130000
Daisy has the same page 21: 00130000
Link has the same page 21: 01000000
Link - Archer has the same page 21: 01000000
8-Bit Link has the same page 21: 01000000
Link - Rider has the same page 21: 01000000
Young Link has the same page 21: 01000000
Link - Twilight Princess has the same page 21: 01000000
Link - Ocarina of Time has the same page 21: 01000000
Link - Majora's Mask has the same page 21: 01000000
Link - Link's Awakening has the same page 21: 01000000
Link - Tears of the Kingdom has the same page 21: 01000000
Link - Skyward Sword has the same page 21: 01000000
Toon Link - The Wind Waker has the same page 21: 01000100
Toon Link has the same page 21: 01000100
Zelda has the same page 21: 01010000
Toon Zelda - The Wind Waker has the same page 21: 01010000
Zelda - Tears of the Kingdom has the same page 21: 01010000
Zelda has the same page 21: 01010000
Ganondorf - Tears of the Kingdom has the same page 21: 01020100
Ganondorf has the same page 21: 01020100
Isabelle - Summer Outfit has the same page 21: 01810000
Isabelle has the same page 21: 01810000
Isabelle has the same page 21: 01810001
Isabelle - Character Parfait has the same page 21: 01810001
K. K. Slider - Pikopuri has the same page 21: 01820001
K.K. Slider has the same page 21: 01820001
K.K. Slider has the same page 21: 01820001
Sable has the same page 21: 01870001
Sable has the same page 21: 01870001
Mabel has the same page 21: 01880001
Mabel has the same page 21: 01880001
Blathers has the same page 21: 01920001
Blathers has the same page 21: 01920001
Celeste has the same page 21: 01930001
Celeste has the same page 21: 01930001
Kicks has the same page 21: 01940001
Kicks has the same page 21: 01940001
Gulliver has the same page 21: 01a20001
Gulliver has the same page 21: 01a20001
Saharah has the same page 21: 01a60001
Saharah has the same page 21: 01a60001
Rosie - Amiibo Festival has the same page 21: 025f0001
Rosie has the same page 21: 025f0001
Stitches has the same page 21: 02820001
Stitches - Amiibo Festival has the same page 21: 02820001
Goldie - Amiibo Festival has the same page 21: 02ea0001
Goldie has the same page 21: 02ea0001
Samus has the same page 21: 05c00000
Samus - Metroid Dread has the same page 21: 05c00000
Samus Aran has the same page 21: 05c00000
R.O.B. - Famicom has the same page 21: 07810000
R.O.B. - NES has the same page 21: 07810000
Inkling - Yellow has the same page 21: 08000100
Inkling has the same page 21: 08000100
Inkling Girl has the same page 21: 08000100
Inkling Girl - Neon Pink has the same page 21: 08000100
Inkling Girl - Lime Green has the same page 21: 08000100
Inkling Boy has the same page 21: 08000200
Inkling Boy - Purple has the same page 21: 08000200
Inkling Boy - Neon Green has the same page 21: 08000200
Inkling Squid has the same page 21: 08000300
Inkling Squid - Orange has the same page 21: 08000300
Inkling Squid - Neon Purple has the same page 21: 08000300
Octoling Boy has the same page 21: 08050200
Octoling - Blue has the same page 21: 08050200
Kirby has the same page 21: 1f000000
Kirby has the same page 21: 1f000000
Meta Knight has the same page 21: 1f010000
Meta Knight has the same page 21: 1f010000
King Dedede has the same page 21: 1f020000
King Dedede has the same page 21: 1f020000
Chrom has the same page 21: 21080000
Chrom has the same page 21: 21080000
Mega Man has the same page 21: 34800000
Mega Man - Gold Edition has the same page 21: 34800000
Mega Man has the same page 21: 34800000
Shovel Knight - Gold Edition has the same page 21: 35c00000
Shovel Knight has the same page 21: 35c00000
sigboe commented 2 months ago

PR #51 now has is usable, but I do not recommend trying it now if you are a regular user. Currently test binaries are not provided, one can compile it them selves, or if you are an Amiibo enthusiast and is okay with possible breaking updates in the branch, I can provide binaries on request.

That being said, it's quite fun browsing the amiibo's by Game Series and stuff when picking an amiibo to add to the mappings database

wizzomafizzo commented 2 months ago

Here are my thoughts about finalising this.

I've said a lot about this but really these changes are quite small, it won't take long the update the types and shuffle things around. The main problem is how taptui interfaces with tapto.. I feel it's outgrown this simple socket connection and needs something more robust. How much effort would it be to convert it over to using the new rest api? I think it would be ok with curl/wget and jq right?

sigboe commented 2 months ago

@wizzomafizzo

The main problem is how taptui interfaces with tapto.. I feel it's outgrown this simple socket connection and needs something more robust. How much effort would it be to convert it over to using the new rest api? I think it would be ok with curl/wget and jq right?

Specifically, deprecating the use of socket in TAPTUI and switch over to curl and jq is a minimal effort task.

Today the socket gives a comma separated list, and the comma separated list gives values with unesacped commas. Using json will make things less complex