Demo : new card database and generation tool

Anything related to dev. & that doesn't fit in below categories.
ngoeminne
Posts:324
Joined:Mon Feb 29, 2016 15:34
Demo : new card database and generation tool

Post by ngoeminne » Tue Apr 05, 2016 16:10

Hi all, I say

- We're in need of an card creating tool, something that helps us create the cards,
and avoids the pain of copy pasting svg templates and then doing tedious hand work.

- We're in need of an online search able card database since (cardscape is no longer alive).

- We're in need of an online deck building tool.

So, I can say all I want, talk is cheap :-)

So, with no further delay, a first beta demo is up at http://13.95.150.43/
Featuring:
- card search, deck creation and card creation (for registered users)
- support for gaian/dark legion (shadowguild) factions
- support for creature/magic/event/enchantment/equipment/player/city cards
- card-layout text using some predefined xml-tags
- should work in svg-enabled browsers IE, FF, Chrome

- don't expect the data to be preserved
- don't expect it to be bug free

When it's a little more mature, it will be migrated to a wtactics server.

Kind regards,
Nico
User avatar
xarn
Posts:101
Joined:Thu Oct 13, 2011 11:50

Re: Demo : new card database and generation tool

Post by xarn » Tue Apr 05, 2016 18:43

First off, great tool! :D :D :D :D

...I think it's exactly what we need!

As a humble tester, I'm pleased to see it, and have lots of suggestions out of the bat! ;)
But these are only improvement suggestions, it's already very nice to have such a tool at all.

- make it available on github, so it's easier for us to contribute!
- make a gallery as overview!
- an auto-preview triggered on every change!
- only show fields which are relevant (i.e. Attack/Defense only if it's a creature, etc.)
- could we use a "\n" to make two line instead of filling name line 1&2?
- I don't know if "loyalty" is planned to be kept, but that's another discussion
- I'd rename "type name" into "subtypes", otherwise it's confusing with "Type"
- since "rule text" and "flavor text" aren't used, I'd only leave "layout text" and rename it into "description"
- I'd remove info and place the artist's name there, or a standard text
- would it be possible to use markdown as layout text instead?
- rename "Login out" into "logout" ;)

Great job so far! :mrgreen:
User avatar
Ravenchild
developer
Posts:131
Joined:Sat Sep 04, 2010 19:21
Location:Germany

Re: Demo : new card database and generation tool

Post by Ravenchild » Tue Apr 05, 2016 19:07

That's really cool! Nice work!

I'm kinda confused with the "preview card" button. Does this also automatically save the card?

This tool is similar to what I had in mind with Cardscape so long ago... But with more features like card derivation, tree-based discussions and many more features that made the project too complicated in the end.
ngoeminne
Posts:324
Joined:Mon Feb 29, 2016 15:34

Re: Demo : new card database and generation tool

Post by ngoeminne » Tue Apr 05, 2016 22:22

Hey xarn,
xarn wrote:First off, great tool! :D :D :D :D
...I think it's exactly what we need!
Thanks, I agree, we need something to create and list cards.
I first started looking at cardscape, but could only get the cardscape legacy up and running,
and it didn't have the card creation part.
xarn wrote: As a humble tester, I'm pleased to see it, and have lots of suggestions out of the bat! ;)
But these are only improvement suggestions, it's already very nice to have such a tool at all.
Any suggestion is welcome :-)
xarn wrote: - make it available on github, so it's easier for us to contribute!
That's the plan, I'll make it available on github.
xarn wrote: - make a gallery as overview!
That could be done, currently the focus is on functional stuff.
xarn wrote: - an auto-preview triggered on every change!
The tool used to generate the png file on save, and that's costly.
I tried Inkscape, Rsvg (both using cairo as renderer) and a .Net svg renderer.
On a headless vm with no gpu, it's really really slow. (they render it single threaded, with no hardware acceleration). So the tool can still generate the png's, but it is disabled for now.
Instead it only changes the svg (overlay) and the full blown downloadable svg, which is fast.
xarn wrote: - only show fields which are relevant (i.e. Attack/Defense only if it's a creature, etc.)
Yep that's possible, each type has a corresponding template info, and there it's set what should be drawn on the card. So that could be used to hide non relevant stuff
xarn wrote: - could we use a "\n" to make two line instead of filling name line 1&2?
I taught about it, but I didn't want a different breaking mechanism as the layout text.
maybe I should foresee <br/>.
xarn wrote: - I don't know if "loyalty" is planned to be kept, but that's another discussion
Yep, I'm currently rethinking the mutlifaction/multicurrency problem, and it could have its use there. (showing some marks on the card)
xarn wrote: - I'd rename "type name" into "subtypes", otherwise it's confusing with "Type"
Agreed.
xarn wrote: - since "rule text" and "flavor text" aren't used, I'd only leave "layout text" and rename it into "description"
I'd prefer to keep them separated.
- The Rule text is 'the official' ruling, and could be text search-able in the db.
- The Flavor text is just something optional
- The Layout Text is for lay-outing purposes, and is actually not part of the card's info.
It's input for the card generation, and should be considered as such.
xarn wrote: - I'd remove info and place the artist's name there, or a standard text
Yes I also feel that the artist's name should be on the card. Actually I'd also like the 'sponsor/creator'
on the card. "Art by Kitty, sponsored by Snowdrop". For now we can place anything there.
xarn wrote: - would it be possible to use markdown as layout text instead?
I'm not familiar with markdown, as long as I can parse it easily that could be done.
xarn wrote: - rename "Login out" into "logout" ;)
Oh, no I want you to "login out" ;-)

Kind regards
Last edited by ngoeminne on Tue Apr 05, 2016 22:57, edited 2 times in total.
ngoeminne
Posts:324
Joined:Mon Feb 29, 2016 15:34

Re: Demo : new card database and generation tool

Post by ngoeminne » Tue Apr 05, 2016 22:29

Ravenchild wrote:That's really cool! Nice work!
Thanks.
Ravenchild wrote: I'm kinda confused with the "preview card" button. Does this also automatically save the card?
Yes it does save the card, and creates both a fast svg overlay on a png background (dep on faction/type), as it creates the full blown svg. It used to create the 600 dpi png as well, but
due to performance reasons I disabled it.
Ravenchild wrote: This tool is similar to what I had in mind with Cardscape so long ago... But with more features like card derivation, tree-based discussions and many more features that made the project too complicated in the end.
Feature creep is always difficult to manage. We've learned to just go with the basics, and go from there. I taught about comments/discussions but that's not for now.

Kind regards,
Nico
ngoeminne
Posts:324
Joined:Mon Feb 29, 2016 15:34

Re: Demo : new card database and generation tool

Post by ngoeminne » Tue Apr 05, 2016 22:54

For all who's interested, some more technical information.

It's a three tier software architecture based on the .NET stack.
- The data access layer is implemented with SQL Server + Entity Framework
- The service layer is HTTP REST/JSON implemented with Web API 2.0
- The website is a single-page Angular App

Basically anyone could write a client for the service layer.

Functionally, the idea is that cards and decks are freely searchable/readable by anyone.
Decks are only editable by the deck's creator. For card's editing there are some more constraints.
There are three roles:
- Administrator, can create and edit all cards, as well as domain data (new series, new factions,...)
- Developer, can create and edit all cards, and can mark cards as 'final'
- Contributer, can create and edit his own cards (if the card is not yet final)

I the current feature set is enough to get us going, but the end goal for me was to generate a downloadable 600dpi pdf for a certain deck.
(I already have an offline tool that can do that, but it's kind of heavy). For those who have access to the dropbox, there's a generated demo pdf there.

So, all and all quite happy for a weeks work (easter holliday).

But again, as said before, the tools are nice, but we need to focus on the rule set and the cards of the two first decks. I hope to have some skype chats with all of you, it's much better than discussing idea's on the forum, certainly when it's more brainstorm like.

Kind regards,
Nico
User avatar
Peter
Posts:96
Joined:Thu Oct 16, 2014 20:13
Location:Germany

Re: Demo : new card database and generation tool

Post by Peter » Tue Apr 05, 2016 23:05

Great thing so far, Nico! :)

I added four Empire cards just for fun. That doesn't mean that I expect them to be finally taken. Feel free to delete or change them. I didn't enter the cards with more special/complicated abilities.

Now the next issues (besides improving this database and generation tool) are:
1.) Snowdrop making the rules.
2.) Someone (Snowdrop?) unifying the Wiki pages about rules.
3.) Software for playing a duel. Could be (a) Untap.in and/or (b) this tool.

[EDIT: 4.) I just found out that Untap.in doesn't work without pictures for the cards :(
I didn't succeed in uploading a picture. I tried SVG and JPG. Anyone knows a solution for this?]
Last edited by Peter on Tue Apr 05, 2016 23:39, edited 1 time in total.
Kind regards and happy coding :)
User avatar
Peter
Posts:96
Joined:Thu Oct 16, 2014 20:13
Location:Germany

Re: Demo : new card database and generation tool

Post by Peter » Tue Apr 05, 2016 23:07

ngoeminne wrote: - Contributer, can create and edit his own cards (if the card is not yet final)
I would like to have that role.
Kind regards and happy coding :)
ngoeminne
Posts:324
Joined:Mon Feb 29, 2016 15:34

Re: Demo : new card database and generation tool

Post by ngoeminne » Wed Apr 06, 2016 09:22

Peter wrote:Great thing so far, Nico! :)

I added four Empire cards just for fun. That doesn't mean that I expect them to be finally taken. Feel free to delete or change them. I didn't enter the cards with more special/complicated abilities.
Thanks for giving it a try. For now only Gaian and Dark Legion faction have templates.
Peter wrote: [EDIT: 4.) I just found out that Untap.in doesn't work without pictures for the cards :(
I didn't succeed in uploading a picture. I tried SVG and JPG. Anyone knows a solution for this?]
Where did you try to upload the picture? In our generation tool or in Untap.in?
Our generation tool expects transparent png on a certain resolution (see the info popup).
It used to generate the full blown card png, but that's to resource consuming on the server.
Instead, you can download the inkscape-compatible svg and export it to png using inkscape, if you want the card in png format.

Kind regards,
Nico
User avatar
Peter
Posts:96
Joined:Thu Oct 16, 2014 20:13
Location:Germany

Re: Demo : new card database and generation tool

Post by Peter » Wed Apr 06, 2016 11:09

ngoeminne wrote:
Peter wrote: [EDIT: 4.) I just found out that Untap.in doesn't work without pictures for the cards :(
I didn't succeed in uploading a picture. I tried SVG and JPG. Anyone knows a solution for this?]
Where did you try to upload the picture? In our generation tool or in Untap.in?
Our generation tool expects transparent png on a certain resolution (see the info popup).
It used to generate the full blown card png, but that's to resource consuming on the server.
Instead, you can download the inkscape-compatible svg and export it to png using inkscape, if you want the card in png format.
I tried to upload it to Untap.in. And I tried PNG, too. Maybe it was the wrong size.
Kind regards and happy coding :)
Post Reply