Card Game Battle Scripting

Hello everyone.

I’m trying to make a card battle game, i even bought CCG Template on assets store but thats way more complicated that i have in mind.

It’s not like a hearthstone, is much simplier, it’s a one x one battle, each one starts with a deck of 20 cards, it of this cards has 3 atributes, one selects an atribute, if your number is higher than your opponent you win his card and so on until one gets all your cards.

It’s pretty simple, but the thing is, i have little to none experience in coding or scripting, here are my problens so far:

If i make 100 cards, is there a easy way to put the atributes in each one of the cards?
At the begining how do i make the shuffle system?
How do i make the battle system and compare the number you select with the number on the other card?

I’ve made a small research about this kind of game and many people say it’s simple to make but every attempt to script i made end up in error.

You’d better address questions around specific asset to it’s author. It’s very likely nobody here ever tried it.

Although I personally think that having a specific project in mind is a great way to get immersed in learning how to use a tool like Unity, there’s a certain amount of basic fluency you need to develop with both Unity and C# before you can really start to do meaningful work. I’d highly recommend you take a couple of hours to work through some of Unity’s very nice tutorials. They teach you a lot of highly reusable skills that you’ll apply to almost any project:

https://unity3d.com/learn/tutorials

Seriously, the tutorials are awesome. Follow along for best results.

As for your specific questions:

  • 100 cards: This is a design choice. Some developers would want each card to be specifically hand-crafted in terms of its traits and visuals. Others would want to randomize the values.
  • Shuffle: Randomizing a list is a trivial C# operation. Google it.
  • Battle System: Again, this is a big question with a lot of design component to it. The simplest system would just be a function you call that takes two cards, and returns a boolean to say if you won. How you show that on the screen is up to you. (UI or 3D objects, etc).
2 Likes