Giter Site home page Giter Site logo

r0adkll / deckbox Goto Github PK

View Code? Open in Web Editor NEW
110.0 7.0 17.0 17.72 MB

DeckBox for Pokémon TCG: https://play.google.com/store/apps/details?id=com.r0adkll.deckbuilder

License: GNU General Public License v3.0

Kotlin 99.76% Swift 0.18% Shell 0.06%
android kotlin kotlin-android pokemon pokemon-tcg firebase firebase-firestore firebase-remote-config deckbox pokemontcg

deckbox's Introduction

Hello, I'm Drew 👋🏻 🧑🏻‍💻

I'm currently a Staff Software Engineer @ reddit working to improve their Android app. I am passionate about building high quality Android and mobile applications as well as contributing to the world of open-source.

Some of my favorite topics in Android right now are:

  • Compose (Ui/Compiler/UiState)
  • Kotlin Multiplaform
  • Dependency Injection
  • Anvil

Here are a few of my projects

DeckBox

DeckBox is an unofficial deck building app for creating and managing your Pokémon TCG decklists. Whether you are building and tweaking the top decks in the meta or just experimenting with some spicy rogue decks, search through a large collection of Pokémon cards that span from the latest expansion all the way back to the base set.


Chipper

Archived Chipper is a keygen jukebox with over 1400 chiptunes sourced from key generators to play from.


See more of my work below   ⬇️

deckbox's People

Contributors

r0adkll avatar renovate[bot] avatar youssefhachicha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

deckbox's Issues

Add Card Detail Gallery Viewer

When clicking a card to view it's detail and larger image, create a swipeable gallery like setup (think Sync for Reddit image galleries) so that the user can swipe between cards in the context of which they are clicked,

i.e.
IF the user clicks a card in the deck builder interface, let them swipe between the cards of the deck
IF the user clicks a card in the collection/browser interface, let them swipe between the cards of the expansion set

and so on...

Optimize

Iterate and improve code base by improving the style and quality:

  • Add ktlint
  • Add detekt
  • Add Danger
    • Analyze lint, ktlint, detekt output
    • Validate format of PR
    • Validate that whatsnew & changelog has been updated
    • Warn when certain files are touched
  • Implement Proguard
  • Update GIT versioner to gradle plugin
  • Fully migrate away from Fabric (waiting on new crashlytics sdk)
  • Increase testing coverage and tooling

Full Offline Capability

Expand the caching features in the application.

There is already a subsystem in place to download and cache the card data from pokemontcg.io which you can find here: DefaultCardManager and here CacheService

This now works when searching for cards, but image cache still needs to be implemented for a truly offline experience. My intention was to leverage [Glide's built in caching mechanism].(https://bumptech.github.io/glide/doc/configuration.html#disk-cache) to cache card images one set at a time (as caching EVERY SINGLE CARD would be too expensive) so that they will automatically work without too much effort

Tasks

  • Replace Requery with Room
  • Improve Firestore Deck format to pull from local card cache or network instead of storing card data.
  • Create Room Deck entity to enable support for complete offline mode
  • Add UI to allow users to cache data/images on a per set basis
  • Add improved Cache management UI in the settings (until further notice)

[FEATURE] Add RC support for special legality rules

Add support to update remote configurations that can override a card's format legality such in the case of:

  • Sun & Moon Black Star Promos that are still legal (SMP94+)
  • Shiny Vault cards from Hidden Fates that need to respect their original legality
    • This could also be automated using a script that scans through the existing cards and prints out legality mappings for the SV## pokemon.
    • Blocked until Shiny Vault cards are added to API

Improve format validation and UI/UX

Improve how the format (standard/expanded/unlimited) is displayed and presented to the user throughout the application (list of decks, expansions, deck builder, search) to provide a clearer understanding of the cards in the deck. An example of what I mean is that if a deck has only cards that are in Standard (Reprints are another story, and should be ignored for now) then only display the deck as Standard because realistically no one is going to play a Standard deck in the Expanded format and Expanded decks can't play in Standard.

Bonus Goal

Add ability to account for reprints. This will probably entail pre-processing the card database and building a map or database that identifies all the reprints for a given card (i.e. so if you are using a XY era Ultra Ball or Double Colorless Energy, the app won't flag your deck as "Expanded" since those cards have been reprinted in the S&M era).

The problem with this approach is that it will need to be re-run everytime a new set comes out to account for new/existing re-print maps. Now, this is probably unavoidable.

Another approach could be to do this on the fly in the application when calculating a deck's legality. The obvious downside to this approach is the data usage and delay of network requests.

Improve the deck import interface

  • Add example import text that shows users the required format for importing decks/cards into the application.
  • Add support for the clipboard by automatically recognizing when the user has a compatible format in their clipboard and offering an action/button to let them auto-paste it and import

Deck Importer is sometimes not responding or just returning empty

From the user:

Lately, I've been unable to use the import function when making new decks.
I paste the deck list from somewhere and click Import. The app appears to
be processing, but it just goes back to the screen with my deck list.
Nothing is updated.

I was able to import a week or two ago, but I was unable to do so the day
after that. I don't remember if it the issue started happening after
downloading the latest update, but it was around that time.

Device: Samsung Galaxy S5, 6.0.1

Sample Decks:
Deck_-_Battle_Arena__Keldeo.txt
Deck_-Battle_Arena__Rayquaza_3.txt
Deck_-_Espeon_GX.txt

Bridge gap of Stage 2 evolution lines where the middle evolution is missing

i.e.
Charmander => Charizard

Currently, the api only returns the evolvesFrom field on cards so we can only match previous evolutions. Either the API needs to some how mold to provide the adequate data to bridge this gap.

or

build a 'registry' so-to-speak of stage 2 evolutions that can be referenced when building evolution chains.

Add 'Device' configurations to enable Push notifications

Have devices register their device information and push tokens to enable push notifications for things like:

  • #26 Playtest Simulator
  • Notifying user of season rotations
  • Notifying users of a new expansion releases
  • Notifying users of new features

[BUG] Sort promos by number

Describe the bug
Black star promos appear to be sorting incorrectly and not handle the SM### format correctly

To Reproduce
Steps to reproduce the behavior:

  1. Go to browse
  2. Open any Black Star Promos set

Expected behavior
Sorting should ignore the SM, XY, etc prefix on promo numbers

Win/Lose/Tie Records

Add a means for players to keep track of their wins, losses, and ties with a deck. Potentially "versioning" this when they make changes (i.e. if they add/remove cards it will change the accuracy of there W.L.T ratios

[BUG] DeckList importing appears to be broken

Describe the bug
Users are having trouble importing decklists into the app

To Reproduce
Steps to reproduce the behavior:

  1. Export any decklist from https://limitlesstcg.com
  2. Open Deckbox
  3. Create a new deck
  4. Select import from the menu
  5. Paste limitless decklist
  6. Click import

Expected behavior
All the cards should have been imported into the deck builder interface

Smartphone (please complete the following information):

  • Device: Google Pixel 3XL
  • OS: Android 10
  • Version 1.9.1

Additional context
The import function seems to work when you operate it from the main decks view

Standard section and Expanded section

Have a way of organizing your decks by the format that they in, like Standard, Expanded and Unlimited, so your decks are not merged with others from different formats. This can allow for the app to look clean, and help find decks faster in other formats.

Exporting deck as image

Something minor to ask but might take a bit too much to code
Can decks be exported as a single image like this?
index

Japanese deck builder https://pokemoncard151.com/deckmake.html exports as an image which makes it (in my opinion) much more convenient to share, because you can see all the cards and the amounts clearly, without any extra stuff like the PTCGO interface

Collection Tracking

add a feature to let users keep track of cards in their collection so that they can build decks with the cards they own or see a list of cards they need to complete a deck. This feature could also tie into pricing data so they can see how much it would cost to complete a deck

Status

  • Design
  • Planning
  • Data/Storage Layer
  • UI
  • Deploy
    • Beta
    • Production

Pre-release Expansion Preview

Add ability to mix translated card data for expansions (i.e. Lost Thunder, etc) with the API/offline implementation so that users can start theorycrafting decks before the new sets get released. This will require some way of scraping the translation data from sources like Pokebeach.com, formatting it to the existing card data format, and storing it on Firebase for access.

This will also require some clever mixing of the Expansion cache/data to seamlessly mix the data and provide a seamless transition when the new sets get rolled out on the pokemontcg.io API

Tasks

  • Build script to collect preview card data
  • Build microservice that exposes the data in a way that can be consumed by the existing pokemontcg.io sdk's
  • Build network and caching layer that can look for and download this preview card data when the user enables a 'preview' mode option
  • Build mechanism to invalidate the preview data when the actual set releases on the API
  • Build mechanism to convert decks built with preview cards to the actual card data
  • Add Remote Config field to help notify the app that a new preview set is available

Prepare for Forbidden Light Expansion

Prepare for the Forbidden Light expansion

TODO:

  • Bump version in Firebase Remote Config
  • Implement better expansion/set cache invalidation mechanism

[BUG] Crash on some devices where they are setting an invalid timestamp for Firebase

Describe the bug
A crash is occuring on some devices (Crashlytics is reporting Samsung devices) where the timestamp(millis-long) set on the deck (or some other entity) is too long (i.e. it might be nanos).

To Reproduce
n/a

Expected behavior
It should NOT crash

Smartphone (please complete the following information):

  • Device: Galaxy S7, Galaxy S8+
  • OS: Android 5.1.1 (?)
  • Version: 1.9.1

Additional context
Stacktrace

Caused by java.lang.IllegalArgumentException: Timestamp seconds out of range: 6645627461566071543
       at com.google.common.base.Preconditions.checkArgument + 202(Preconditions.java:202)
       at com.google.firebase.Timestamp.validateRange + 168(com.google.firebase:firebase-firestore@@20.2.0:168)
       at com.google.firebase.Timestamp.<init> + 66(com.google.firebase:firebase-firestore@@20.2.0:66)
       at com.google.firebase.firestore.remote.RemoteSerializer.decodeTimestamp + 127(com.google.firebase:firebase-firestore@@20.2.0:127)
       at com.google.firebase.firestore.remote.RemoteSerializer.decodeVersion + 138(com.google.firebase:firebase-firestore@@20.2.0:138)
       at com.google.firebase.firestore.remote.RemoteSerializer.decodeWatchChange + 1051(com.google.firebase:firebase-firestore@@20.2.0:1051)
       at com.google.firebase.firestore.remote.WatchStream.onNext + 106(com.google.firebase:firebase-firestore@@20.2.0:106)
       at com.google.firebase.firestore.remote.WatchStream.onNext + 38(com.google.firebase:firebase-firestore@@20.2.0:38)
       at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.lambda$onNext$1 + 119(com.google.firebase:firebase-firestore@@20.2.0:119)
       at com.google.firebase.firestore.remote.AbstractStream$StreamObserver$$Lambda$2.run(com.google.firebase:firebase-firestore@@20.2.0)
       at com.google.firebase.firestore.remote.AbstractStream$CloseGuardedRunner.run + 67(com.google.firebase:firebase-firestore@@20.2.0:67)
       at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.onNext + 110(com.google.firebase:firebase-firestore@@20.2.0:110)
       at com.google.firebase.firestore.remote.FirestoreChannel$1.onMessage + 120(com.google.firebase:firebase-firestore@@20.2.0:120)
       at io.grpc.ForwardingClientCallListener.onMessage + 33(ForwardingClientCallListener.java:33)
       at io.grpc.ForwardingClientCallListener.onMessage + 33(ForwardingClientCallListener.java:33)
       at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext + 563(ClientCallImpl.java:563)
       at io.grpc.internal.ContextRunnable.run + 37(ContextRunnable.java:37)
       at io.grpc.internal.SerializingExecutor.run + 123(SerializingExecutor.java:123)
       at java.util.concurrent.Executors$RunnableAdapter.call + 422(Executors.java:422)
       at java.util.concurrent.FutureTask.run + 237(FutureTask.java:237)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 + 152(ScheduledThreadPoolExecutor.java:152)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run + 265(ScheduledThreadPoolExecutor.java:265)
       at java.util.concurrent.ThreadPoolExecutor.runWorker + 1112(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run + 587(ThreadPoolExecutor.java:587)
       at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run + 205(com.google.firebase:firebase-firestore@@20.2.0:205)
       at java.lang.Thread.run + 818(Thread.java:818)

[FEATURE] Add RC support for Ban Lists

Add support for checking the banned list of cards when performing deck validations. Use Firebase Remote Config to provide a JSON object that specifies, by id, the card that is banned by format.

Fix the expansions update mechanism

The mechanism by which the app invalidates its expansion cache needs to be updated to be more dynamic and reliable than the current implementation.

The new expansion card on the deck screen should also be updated to be entirely remote configurable so that we don't have to submit an app update to change/update it.

Integrate Pricing Data

Integrate live card price data from multiple sources:

  • TCGPlayer (I already have API access for this)

These services don't have official API's to consistently pull pricing data, so they are backlogged until a solution can be made

  • Ebay
  • Amazon
  • TrollAndToad

This feature should be abstracted so that the source of the pricing data is unknown to the part of the app requesting it.

Update expansion preview panel to be remotely configurable

When new sets are released the app shows a card on top of all your decks displaying the new set, what cards are in it, and actions to dismiss or browse the set.

This is a bit tedious having to manually create/update this card everytime a set has come out and to submit an app update to the store.

So I move to have a Remote Config based JSON structure that can populate this view remotely without having to submit an app update:

{
  "version": 1,
  "expiresAt": "2018-10-01T12:00Z",
  "code": "sm75",
  "preview": {
    "logoUrl": "https://images.pokemontcg.io/sm75/logo.png",
    "title": "Dragon Majesty is finally here!",
    "description": "Over 70 cards! \n20+ Dragon-type Pokémon\n6 Pokémon GX \n2 Prism Star cards \n6 full-art cards",
    "textColor": "#000000",
    "background": [
      {
        "type": "color",
        "data": "#E9BB3F"
      },
      {
        "type": "tile",
        "data": "iVBORw0KGgoAA...(base64 image data)"
      }
    ],
    "foreground": {
      "type": "base64",
      "data": "iVBORw0KGgoAAAANSUh...(base64 image data)"
    }
  }
}
  • version - The version of the preview that needs to be shown. The client application will use this value to mark previews that the user has seen once they dismiss the card.
  • expires_at - ISO 8601 Date that the preview expires at, so if new users or existing update / pull the config AFTER that date the preview should no longer show.
  • code - The expansion set code to use when the user clicks the 'Browse' action to open the set browser
  • preview - This contains the UI information necessary to render the preview card
    • logo_url - The url for the expansion logo
    • title - The title of the card
    • description - The description text of the card
    • textColor - The color of the title, description, and actions of the card
    • background - A list of bitmap/image specs for composing the background drawable of the card
      • type - The type of drawable for this item (tileing of an image, solid color, image url, etc)
      • data - The data of the drawable, this can be base64 image data, url, color hex code, etc.
    • foreground - The drawable spec for the foreground upper banner image, null if none, otherwise follows the same spec from background

Add Deck Testing Feature

Finish deck testing screen that runs your valid deck through several shuffles and deals to get an idea of what your first hand will be like and the mulligan %

Remove 'Format' symbols from card detail screen

In the spirit of simplicity and the changes previously made to the deck building interface the "Format" symbols should be replaced with the plain word of the format the card is valid in such as "Standard", "Expanded", or "Unlimited" with Standard Implying all formats, and so on.

No second page PDF suppprt

Hello, love your app, it's really great. Thanks for making it.

However I've experienced one issue. Maybe it's my fault, so please tell me if I'm doing something wrong so I can correct it for the future. If not, I hope you can fix this in your app.

When you do the export decklist feature, it gives you the very handy PDF which you can easily share and then print. This is great and I love this. However, there is only support for a 1 page PDF. My decklist was spilling over into a second page, but the given PDF was only one page long, so some of the cards on my decklist were cut off and not visible.

As I'm typing this, I now realize that the error may only occur with the exact number of cards that I have in my decklist, which may explain why it's a small overlooked code error. If an email address is provided, I could send over the PDF for reference. You would see that only the very last card is cut off and not fully visible at the bottom. So maybe your app does allow for 2 page PDF's, but just not when it's this close to the cutoff point. Maybe it's a margins issue?

Anyway, hoping you can help me with this problem or provide any info. Again, thanks for the great app and thanks in advance for any help.

Add deck building helpers

Add helpers/tips in the deck-building interface that provide convenience to experienced players and guidance for new players.

Energy

See #121 For discussion on this feature

Trainers

This feature should be aware of or updated frequently for the meta to suggest stable trainer cards such as Cynthia, etc. This could be sourced manually, or done via analysis on our Deck database.

Pokemon

This feature could suggest some staple pokemon that are commonly found in decks, such as Tapu Lele- GX or Dedenne-GX. It would also be nice to expand this feature to do some kind of analysis on existing decks to suggest pokemon that they might want to add.

Add an Overview Mode to DeckBuilder

An an "overview' mode to the builder interface that mimics the idea of the PTCGO expand/fullscreen feature that let's you see/edit ALL the cards in your deck. Must work for both phone and tablets.

[BUG] some queries aren't returning results when they should

See:

Phenomenal app with championship deck profiles, complete set browser and tons upon tons of crucial playtesting options all wrapped in a fast and clean UI. It's almost perfect. Other deck building apps should take note. But it doesn't seem to like certain letter combinations. For instance, searching "arc" won't find Arcanine in the deck builder even though Arcanine cards are easily found while browsing sets. Fix this issue and it's an easy 5-star

Enhance new user onboarding experience

Add some onboarding elements to improve the first launch experience:

  • "Get Started" guided tool tips
  • Starter/Example Decks to view and play with
  • Deck building tips and guides

My thoughts on this were adding a card on the home screen that presents some sort of first launch introduction followed by some example/starter decks beneath it to get the user started.

Tasks

  • Remove quick-tip bubble that pops up for new users
  • Add QuickStart card to main screen that gives the users a list of deck templates (Tournament winners, Theme Decks, etc) so that they can jump write into deck building
  • Remove onboarding flow that the user encounters while opening the app for the first time

Community

Build an interface to view/share decks with other users of the platform. Include curated content such as current/popular decks in the meta, Decks from recent tournaments (such as the top 10 decks with a breakout to view all decks, their users, and their placement in that tournament). Let users vote/favorite, comment and share decks that they find. Copy other's decks into your collection for modification or bookmarking.

Bonus Features

  • A web interface to view user's decks if clicking on an app link external to the application
  • The ability to collaborate on a deck with a friend by inviting them or adding them to the deck

[FEATURE] Allow specifying card variant when adding to collection

Is your feature request related to a problem? Please describe.
I would like more granularity within the collection tracking feature. I'd like to be able to track cards based on their variant. This includes rarity like Holo and Reverse Holo version of a card, but also special cards like Prerelease Promos with the set logo overlaying the card art, Alternate art, and Pokemon League promos. AFAIK, these variants usually do not have different numbers than the standard version within their sets, and thus cannot be currently tracked.

Describe the solution you'd like
When adding a card to my collection, I would like the ability to select a variant for that card's instance in my collection. I would then like to be able to see which and how many variants I own for a specific card.

Describe alternatives you've considered
None.

Additional context
I doubt the data for these variants are being tracked anywhere accessible via an API. There likely is no way to show the user WHICH variants exist per card in all of the TCG. All variant options would have to be available for each card when adding to the collection, and so this level of granularity would probably have to be up to the user's discretion. I understand presenting these options to the user may not be in line with DeckBox's current very clean and simple UI/UX. Another TCG app I have used is Pokecardex (Android), which allows this granularity in its collection tracking feature, though that app presents a modal with options to the user when adding a card to the collection.

Improve UI of cards who's image fails to load.

Sometimes the API is missing image data for certain cards or if the user has cached the card data but not the images and is offline. In these cases, we need to improve how the card is rendered to the user by manually drawing the card data on a matte color background (of that card's type) so that way the user has some clue as to what card it is.

Playtest Simulator

Idea

Create a "dumb" simulator that allows the user to play out a game by giving them all the possible actions and letting them handle all the enforcement and rules. Such as letting them place cards from hands, choose attacks, apply abilities and damage, tools, supporters.

This feature should at least govern the basic rules of a turn, such as:

  • Dealing / Prizes
  • Turn draw
  • Status effects (burn/poison/confusion/paralyze)
  • Only allowing one supporter
  • Only allowing one stadium
  • Win conditions (deck out/prizes)

Stretch Goals

Enable multiplayer support via an invite code/link that you can send your friends and play out turn by turn simulator game to play test.

  • Uses Firebase Firestore to coordinate the game
  • Push notifications when the user finishes there turn, potentially with metadata about what happened ("r0adkll knocked out your X card, now it's your turn!")

Status

  1. Pre-planning
  2. Design
  3. Architecting
  4. Implementation (In Progress)
    1. Build Core Data Structure
    2. Build UI components
    3. Build Animation components
    4. Build Gameplay Engine
    5. Build Persistance Management
    6. Build Playtest Analyzer
  5. Beta Testing
  6. Release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.