Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export player as a trading card image #407

Open
dumbmatter opened this issue Feb 3, 2022 · 10 comments
Open

Export player as a trading card image #407

dumbmatter opened this issue Feb 3, 2022 · 10 comments

Comments

@dumbmatter
Copy link
Member

See https://old.reddit.com/r/BasketballGM/comments/rt7szv/monthly_suggestions_thread/hty3yug/ - if you have some legendary player, his player profile page is huge. It'd be cool to be able to condense it into a small summary, maybe similar to a trading card, and let that be downloaded as an image.

Figuring out the design is the hard part. Both making it look nice, and figuring out how to best condense player stats/awards/etc.

The actual implementation, either you could do it or I could do it. But really the problem is a design problem. If I knew what I was trying to make, I could do it pretty easily.

@ItamarTati
Copy link

Hey dude I'm a fan of the game, can you check out this design I created:

https://codepen.io/itamartati/pen/MWPebRV

@dumbmatter
Copy link
Member Author

@ItamarTati it looks nice!

@ItamarTati
Copy link

ItamarTati commented Apr 17, 2023

Nice, can I try to implement it? @dumbmatter.

So I'll create a pr.

@dumbmatter
Copy link
Member Author

Sure. Ideally it'd download that as an image, I'm not sure how easy that is to do. The built-in screenshot functionality uses html2canvas which you could use here too, but it's not perfect, some stuff gets lost.

@radholm
Copy link

radholm commented Apr 19, 2023

Average PER or GameScore might be nice?

@ItamarTati
Copy link

Yes will add, sounds great

@radholm
Copy link

radholm commented Apr 19, 2023

I like the design! I can share an alternative. The interesting thing is that it needs to work with generated player images and real player images. I believe they both have transparent backgrounds though which will make it easier.

@ItamarTati
Copy link

Will do, sorry it's taking me some time, just sorting out some things IRL and also going through the code. I do have one question about implementation. Do we want this trading card to be somewhere on the player page (if so where?) or do we want this be somewhere else on it's own. Sorry if the answer is somewhere, I can't find it :(

@dumbmatter
Copy link
Member Author

Ideally it would link to an image, which could be generated directly (like using HTML Canvas) or similar to the built-in screenshot functionality (html2canvas). Honestly either way it's a little tricky...

@ItamarTati
Copy link

ItamarTati commented May 14, 2023

@dumbmatter sorry it took a while, had so many IRL things to do
Here is the PR:
#447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants