Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] CCG Kit: create your own collectible card game with Unity

Discussion in 'Assets and Asset Store' started by gamevanilla, Jan 23, 2016.

Thread Status:
Not open for further replies.
  1. RadioactiveXP

    RadioactiveXP

    Joined:
    Nov 6, 2013
    Posts:
    69
    OK, I think I understand.

    Removing the defined value corrected it. You might want to update/augment the documentation with this info; I would have never figured that aspect out. (Thanks for the help!)
     
    gamevanilla likes this.
  2. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Happy to hear that, and you are welcome!

    Basically, there are two "modes" of operation in the kit now. The default one, which uses Unity Services, and a second one that integrates Master Server Kit. The Master Server Kit mode uses a different set of scenes (the ones starting with the MSK prefix) instead of the default one to keep things clean and separate. You should only enable the USING_MASTER_SERVER_KIT preprocessor define if you use the second mode. Typically, you will use the menu option for building all the binaries needed with Master Server Kit, but if you are interested in playing from the editor you can also do that as long as you run the MSK_MainMenu scene instead of MainMenu.

    I will update the documentation with this information, thank you for your feedback. :)
     
  3. RadioactiveXP

    RadioactiveXP

    Joined:
    Nov 6, 2013
    Posts:
    69
    Have you given and thought to how to keep both types of functionality available in a single set of menus? meaning if I am using the master server, can I still start a single server kit?
     
  4. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    I wanted to keep the Master Server Kit integration as simple and understandable as possible, focusing on the matchmaking functionality. Adding the single-player mode should be pretty easy and you can take the default lobby implementation as a reference: the AI is just a second local player that is added to the game (see the hooks on the GameNetworkManager class) and leverages the existing networking architecture.
     
  5. eddyfosman

    eddyfosman

    Joined:
    Jan 18, 2016
    Posts:
    19
    I need a slot in the editor for particle effect of each card, please add this feature, at the moment the demo is reallly ugly.
    Thank you!
    Ps: Today I bought the CCG kit for UDK, and it looks awesome :( I don't want to use UDK just becasue your kit doesn't have a nice UX.
     
    Last edited: Jan 11, 2017
  6. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    There is nothing preventing you from adding a 'particle effect' attribute to your card definitions, just like the demo game does with the card pictures. I am staying away from hardcoding card attributes, in general, for two reasons:

    - Flexibility: I do not want to force users to have a particle effect on their cards. When should that effect be played? What if they do not need one at all in their game? What if they need three and not just one? The current system allows you to define exactly the attributes you need for your game.

    - Performance: Being able to specify a visual attribute (like a particle effect) from an editor inspector is very convenient, but not very wise with regards to performance. Because it means all that visual data (for all the cards) will be loaded when you load the game configuration. It is simply a better practice, even if a little bit less convenient, to specify resource names and load them dynamically at runtime when they are really needed.

    CCG Kit is a kit, not a template. This means it is intended to work for a wide variety of games, with different mechanics and styles. It would be much easier to just hardcode the card attributes (all cards have a mana cost, attack and defense attributes and that is it) and provide a visual inspector for specifying a card picture and a particle effect. It would also be much harder to change things when you need an additional attribute on your cards or two pictures instead of one or do not have a need for particle effects on your cards.

    Having said that, I definitely plan to improve the visuals of the demo game in the future (adding animations, effects, etc.). It is just that the focus so far has been on adding new core features and improving the existing ones, because that is what a majority of the community has requested. At the end of the day, the demo is just that, a demo. It is a good way of showcasing the features of the kit, but users are creating their own unique art and effects for their games.

    Also, I am always happy to receive feedback, suggestions and criticism for future improvements to the kit. But maybe you should consider that doing so in a respectful way is always going to work better than just saying "the demo is really ugly". :)
     
  7. eddyfosman

    eddyfosman

    Joined:
    Jan 18, 2016
    Posts:
    19
    Oh, I got it, sorry for the comment.
    I could edit your kit by myself, but I'm just afraid that it would not be compatible with the next version of this kit.
     
  8. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    No worries at all!

    I understand, there are always compromises to be made. You do not want to stop progress and, unfortunately, sometimes adding new features or improving the existing ones will break compatibility with older versions. But you also want to avoid breaking compatibility with every new update.

    This is something I am becoming more aware of as the kit grows in the number and complexity of features included and my current work is precisely related to this. Exciting times ahead. :)
     
  9. eddyfosman

    eddyfosman

    Joined:
    Jan 18, 2016
    Posts:
    19
    If you don't want to add particle slot to the card editor, would you define a simple hook system to trigger something by C# script? Our hook scripts will be in a separated folder, so it would be fine when update the kit.
    At the moment I only need a trigger when a card is played, attacking, being destroyed. And of course, we need the Card ID for switching.
     
  10. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    This sounds like an interesting idea. I will research it after the work on the next update is finished.
     
  11. eddyfosman

    eddyfosman

    Joined:
    Jan 18, 2016
    Posts:
    19
    Thank you, at the moment, the gameplay is already enough for a mini card game in my offline RPG, I just need some FXs like swinging sword, fire storm, ice spear... and sound effects of course. I even don't need drag and drop effect.
    Would you pass the positions of the original card and targeting card? so I could adjust the particle objects correctly.
     
  12. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    That makes sense, noted! :)
     
  13. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    MSK_LoginDialog is missing from the project, it is required by MSK_MainMenu, in the .cs code

    Hope you fix this, thanks!
     
  14. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    I just re-checked and MSK_LoginDialog (both the scene and the script) are in the project.
     
  15. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Ill try a fresh import but I had to re-label the PlayerLoginDialog and RegisterDialog to the MSK_ versions
     
  16. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    That is probably it, because only the MSK_ classes exist in the latest version.
     
    carsenk likes this.
  17. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Clicking Play with all servers running including Gameserver.exe which was built separately from the Masterserver and Authserver

    I am not seeing any errors and it loads up the folder that I have the gameserver.exe binary config located, but it does nothing else?

    I guess im not seeing much information on how to build the gameserver properly with the master server kit, I would assume its just the MSK_Gameserver scene and just build that, does it need some kind of configuration outside of the normal defaults to work with the MSK?

    EDIT: Opps I feel stupid for asking now, my configuration file was only linking to the folder and not the actual binary. lol
     
    Last edited: Jan 16, 2017
  18. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Have you followed the steps outlined in the official documentation? There is a menu option that will build everything automatically for you.

    After building all the server binaries, you just need to launch the authentication server and the master server. The game server instances will be spawned and destroyed automatically as new matches are created and destroyed (just make sure that your configuration contains the path where the game server binary is located). In order to test everything, you can run the game client binary or alternatively play from the editor (in that case, remember to use the MSK_MainMenu scene).

    The game server binary actually uses both the MSK_GameServer and MSK_Game scenes (due to the way UNET's Network Manager component works, there is always an offline and an online scene). You can also see this in the Builder script, that adds the aforementioned menu option for building.

    I hope this helps!
     
    carsenk likes this.
  19. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Oh, I see! No worries at all and happy to know you got it working. :)
     
  20. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Unfortunately I havent got it working :(

    I tried importing everything in a fresh install, ensured all config files are set properly, auth server and logging in seem to be working fine, but when I click Create Online game or Play now to actually play it just gets stuck on

    http://puu.sh/toJsn/f8ca713cc2.jpg

    And never proceeds and nothing opens up at all as far as the gameserver binary, the location is setup properly and the gameserver built properly via the MSK Builder (also upon import you have to rename the Builder.cs to MSKBuilder.cs and change the global namespace to MSKBuilder as Builder is already taken)..

    Console log has no errors, Auth server is connecting etc.

    Any ideas at all?
     
    Last edited: Jan 16, 2017
  21. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    It looks to me that you are not building the servers properly because you are importing the entire contents of Master Server Kit into CCG Kit (there is no need to rename the builder script at all because you should not be importing the Master Server Kit's builder script in the first place). As explained in the documentation, you only need to import the the Core folder and the Demo/Scenes/AuthServer and Demo/Scenes/MasterServer folders. Everything else is just used in the Master Server Kit's demo, so it should not be imported for CCG Kit.
     
    carsenk likes this.
  22. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    All good now :) just didn't configure things properly :p....I do hope you add back rankings and the shop soon!
     
    Last edited: Jan 17, 2017
    gamevanilla likes this.
  23. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Awesome! :)
     
  24. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Oh PS ChatDialog should be added to Lobby for CCG Kit so players can chat in a Lobby room like the MSK example
     
  25. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    I want to keep the integration with Master Server Kit as simple as possible. You can always extend it by taking the demo included in Master Server Kit as a reference.
     
  26. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Fair enough, I am starting to understand more of how it's integrated, I appreciate your help...I will try porting some features over, another one missing from ccg is the secondary password confirmation when registering..
     
    gamevanilla likes this.
  27. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    That sounds great! Please do not hesitate to let me know if you have any questions and I will be happy to help. :)

    I will also add the password confirmation to the registration dialog in the demo game.
     
  28. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    So I got chat working in the lobby, but now it is non working in the game aspect of things

    The main function I had to work around was/is SubmitText, I essentially have two different chatdialog.cs files one for lobby and one for game, lobby works (modified SubmitText to be like the old OnSendButtonPressed and it works, but leaving it how it was for the game scene script or vise Vera's doesn't seem to work, chat dialog box functions how it should but after typing message and submitting no errors in console and nothing shows up on either client, the lobby however works flawlessly....I can post code if needed

    EDIT: Got it working, had to initiate the chatdialogprefab in Start() first :p and add the openchatdialog function
     
    Last edited: Jan 18, 2017
  29. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    There is a working in-game chat in the demo game already, so you should not really change anything in that regard as far as I can tell.
     
    carsenk likes this.
  30. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Everything works great, do you potentionally do side work at all? I'd like to hire you or someone to integrate the rankings and card pack feature back in. I am just having trouble understanding how to set it up with the new MSK integration, it looks like PlayerServer.cs handled most of the player attributes before like numWins and numLosses, could you give me more information on what files should be changed or edited to have these features again or even just rankings? I had waited so long for you to develop these and would love to get them working asap.
     
  31. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Do not worry! Both features are coming back, but in a way that makes more sense and is more understandable to users. I really like the current separation between the default option of using Unity Services (and being able to hit the 'play' button after downloading the kit, without having to install anything else first) and the more advanced option of integrating with Master Server Kit for dedicated server setups.

    I am currently working on the next update of Master Server Kit, which among other things will include rankings. :)
     
    carsenk likes this.
  32. xKaliban

    xKaliban

    Joined:
    Aug 2, 2015
    Posts:
    5
    Hello all!

    Is there anyone who can help me in defining different card costs? I have created a bunch of player attributes, but I don't know how to specify which one I want to use when creating a card. I assume I will need to modify the Kit Editor UI to provide a drop down list or something in the cost section.

    Thanks in advance.
     
    peca92sk likes this.
  33. peca92sk

    peca92sk

    Joined:
    Feb 24, 2016
    Posts:
    29
    A drop down list with all the integer player attributes for cost would be awesome :D
     
    gamevanilla likes this.
  34. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    That is right; you will need to extend the visual editor and core library to enable custom card costs. I know several users have done this, so it is doable. It is on my roadmap to research this in the future, but there are some other features coming first.
     
    peca92sk likes this.
  35. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Hey sent you a message, hoping to get version 0.7 or 0.6 of CCG Kit from you.
     
  36. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Answered! :)
     
    carsenk likes this.
  37. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    Any idea why I would get a 401 code on the nodejs server while opening the Rankings scene? I believe it would mean unauthorized, it's not saying any errors on the client though and just not showing any player names or scores
     
  38. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    I am not sure what to suggest other than checking your local changes one by one and debugging the server code (console.log is very useful in that regard); the 401 error code does not appear in the rankings function so it must be something else.
     
    carsenk likes this.
  39. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    I think it has to do with the way the responses are coded like the token/numCurrency etc. it was implemented in the msg.token = token; in the LoginPlayerResponse, but I'm not sure how to implement it as I have all the iEnumerators added in the database configuration files like you can access StartCoroutine(DatabaseService.Ranking etc.

    I'll try to post some snippets of code here later when I'm off work, really want to get this working I know I'm super close it's just the set of code below with the msg.token = response.token; but response.token can't be called because of the way the Login responses were changed, it's probably something simple I'm just bad at explaining, I'll try to get some snippets for you...it seems like the responses arent getting passed over and that's why it's getting a 401 because no token so unauthorized?
     
    Last edited: Jan 24, 2017
  40. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    It is very hard to say at a glance, because the two pieces of code you mention really have nothing to do with each other and there is no clear "upgrade" path from one to the other. You may want to wait for the next update of the kit, which will add the rankings functionality, because it just will be easier than trying to adapt the old code to the new one (which will also make it harder and harder to keep up with future updates because of the number of differences).
     
    carsenk likes this.
  41. carsenk

    carsenk

    Joined:
    Jan 13, 2016
    Posts:
    85
    How long out is the update?
     
  42. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    It is coming very soon now; I hope to have it finished sometime next week. I will let you know as soon as it is ready so you do not need to wait for the Asset Store approval. :)
     
    Dziemian, peca92sk and carsenk like this.
  43. thiagomelo

    thiagomelo

    Joined:
    Feb 10, 2015
    Posts:
    8
    In currently in development[0.9] : What does activated abilities mean? Example?

    When will the new version come out?
     
  44. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Activated abilities are abilities that can be activated by paying a cost. For example:

    Pay 2 mana: Deal 1 damage to enemy player.

    The focus of 0.9 is on further improving the easiness of use and customization of the kit. In that regard, I am researching several features that may work out or not in the end, so it is harder than usual to give an ETA. I can tell you it is still a few weeks away. I will release minor updates in between (0.8.1, 0.8.2, etc.) as features are completed and when it makes sense to do so. I am currently finishing 0.8.1, which will include an update of the integration with Master Server Kit.
     
    SwiftIllusion likes this.
  45. nc3

    nc3

    Joined:
    Jan 15, 2017
    Posts:
    2
    Just picked this up and loving it!

    I am though having a tough time getting around two roadblocks.

    Question #1
    It seems that the card ids are set relative to each card set and are not unique across them, but the deck editor ignores the current card set when saving and loading decks. How do you save and load decks with cards from different sets?

    Question #2
    I noticed the built-in saving of the collection not wanting to update the resident CardCollection ids, only the JSON on disk. Means I'm currently unable to get any "verify as I go" test scripts working. Is there a way to get the collection data to update immediately when changed/saved?

    Any insight or suggestions appreciated. Thanks!

    Edit: I just noticed the support e-mail address. Condensed my post and sent the details of my question by e-mail.
     
    Last edited: Feb 5, 2017
  46. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you for your purchase and your kind words, nc3! I have just answered your email. :)
     
  47. nc3

    nc3

    Joined:
    Jan 15, 2017
    Posts:
    2
    Yep I was doing it wrong,

    I decided to make it tough on myself and add cards in a random order (ones I wanted to test first) and to random sets instead of just using the nicely ordered card sets I already had to determine the start IDs for each.

    In case anyone else misunderstands the start ID function, it isn't for the entire collection (do I want a zero or one indexed collection) but intended to tell the each set where to pick up from the last set, basically.

    Far better to have predetermined card set sizes than card sets that will change size over time (what I tried to do). That's not only more sensible for managing card IDs within the tool but just makes good game design sense. Setting limits early.

    In the excitement over how easy this kit is to use, let my design discipline fly out the window. : )

    Thanks for the world class support and keep doing what you're doing!
    Off to write my review
     
    Last edited: Feb 5, 2017
    gamevanilla likes this.
  48. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you again for your kind words! :)

    And thank you for your detailed answer; I am sure it will be very helpful to future users. I will also extend the official documentation on this area.
     
  49. Dziemian

    Dziemian

    Joined:
    Jan 25, 2017
    Posts:
    9
    Hi Spelltwine, thank you for this amazing asset, made my dream come true. Keep up the good work!
    Is there a simple way to choose a diffrent deck for AI when plaing singleplayer?
    How long are you going to support ccg kit?
    Thanks in advance :)
     
    gamevanilla likes this.
  50. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Thank you for your kind words! :)

    The code for handling the deck with which you play is located in the RegisterWithServer() method of the Player class (located in the Core/Scripts/Networking folder), so you can modify it as needed for dealing a different deck depending on different conditions. For example, depending on whether the player is human or AI.

    I am not stopping supporting the kit anytime soon. I really enjoy working on it and there are several updates planned to continue improving and extending the functionality it provides.
     
    SwiftIllusion likes this.
Thread Status:
Not open for further replies.