27
votes
Accepted
How does UNO determine how often do +4,+2 & other special cards occur in a deck/game?
tl;dr: Math is useful, but it can not replace playtesting.
Card economy. You don't want the game to take forever, so you need to make sure that over time players will have a net loss of cards. So you ...
10
votes
How can I make a solitaire game that can be solved?
Backtracking.
Start with a solved game. Then perform random valid moves in reverse until the game is in the initial state.
This usually works with any puzzle game.
4
votes
Accepted
Is it ok to return a call to itself inside a method that has a return type?
Yes, this is OK (when done with care).
The technique of using code that calls itself is called "recursion," and a method that does this is called a "recursive" method.
Many of the ...
4
votes
Best strategy when player left the online multiplayer game
Intentionally and unintentionally leaving should be treated the same, as it's impossible to be sure which scenario happened in every case (e.g. a user plugging out their network cable versus the ...
4
votes
Best strategy when player left the online multiplayer game
It's just a matter of time until the players notice that they can avoid the rage-quit penalty by killing their web browser through the task manager. So you shouldn't try to differentiate between these ...
3
votes
Name for groups of cards in a card game
When I did this a couple years ago, I called them all "piles", and a hand (fan) was just a special subcategory of pile that could hover off-table and have private visibility to one player.
3
votes
How should I approach AI for Spades game?
The current state of the art AI for trick-taking games such as Spades is a search algorithm like MCTS/UCT combined with Supervised Learning [1].
My implementation of a Spade agent uses several ...
2
votes
How are Spot It cards generated?
Stand-Up Maths did a great video about this, explaining how you can create a "mono-match" set of cards as points in a finite projective plane.
You can arrange your cards into a square grid ...
2
votes
Modify the effect of a card being played
Delegates can be used to achieve what you're doing but the code here will most likely not 'just work' with what you already have. In addition, I've had to make several assumptions about how things ...
2
votes
Modify the effect of a card being played
As the comments have indicated, delegates may be your saviour, but let me add a little context and maybe a few extra pointers.
delegates are nice because you can form a subscriber system whereby the ...
2
votes
Adding JavaFX GUI to an MVC based terminal card game
if you want to implement a minimal M-VC you have to structure your application kind a like this:
(This is only an example Diagramm)
Model
The Game is your Model. It stores information about who's ...
2
votes
Accepted
Fanning cards in 2D leads to cards continuing to move forever
How do cards stop
You are using two curves to achieve that: spread_curve and height_curve.
Now, the ...
2
votes
Accepted
Name for groups of cards in a card game
In Magic the Gathering, the different places that cards or other objects can exist in are called zones. Your hand is a zone, your deck is a zone, your discard pile is a zone, etc. Zones have different ...
2
votes
Accepted
Idiomatic Way to Create Card Instances in Unity
Yes, this is a perfectly viable approach.
But another approach you could consider is to represent card types not as ScriptableObjects but as prefabs. The advantage is that prefab instances can be ...
1
vote
Manage game states of a card game with MVC
From what I've understood, you want to use the States pattern to convey/control the overall game flow of the card game. You have defined 3 logical game states, Pick a card(s1), Invoke Monster(s2), and ...
1
vote
Help Me Make Sense of the Canvas and Text-Based Non-UI Objects in Unity
everything that contains text also needs to be inside a canvas object to even be visible.
You actually can have text outside of the canvas by adding the TextMesh component or the (IMO superior) ...
1
vote
Help Me Make Sense of the Canvas and Text-Based Non-UI Objects in Unity
I don't understand how a canvas makes sense when I want to display non-UI game elements that contain text, such as damage counters or, as
in the case of the game I started working on, playing cards.
A:...
1
vote
Accepted
Attaching scripts which trigger on specified events to objects
First, I'd recommend making each card a GameObject. You'll likely want one anyway for the sake of having a visual object with a position/orientation in the scene ...
1
vote
Best strategy when player left the online multiplayer game
we have standards for this. for both conditions there are solutions.
for intended disconnect, you can make any scenario based on your theme or game-play. for example in head ball 2 when a opponent ...
1
vote
Accepted
Algorithm to solve a battle in a card game
Update 2:
Your second update was very helpful/informative.
You have shown that this is a very large search space (roughly 2^38.) This is probably too big, but let's look at possible solutions from ...
1
vote
Poker AI's designed for casual play
Strategically, poker is a very complex game, but there's also a very limited set of actions a player can take. Count 'em: fold, call, check, raise X. So really there's countless ways you can implement ...
1
vote
How to sort poker hands? c++
You need to determine the class of your hand first. I.e. if the hand is "two pair", "full house" etc.
The answer you linked is only meant to compare hands with identical class. It does this by ...
1
vote
Accepted
How to use CC photos from Wikimedia properly?
Commercial Use:
It depends. Some of the permit commercial use, some do not. Generally speaking, if the license type has NC in it, the answer is no. Even if it does ...
1
vote
Displaying text on a 3D plane
Cards in a collectible card game usually have a standardized layout with several images and text labels. That means they are pretty much a UI widget. So you can create each card as a separate UI ...
1
vote
Hand cards auto arrangement
I would comment on Daedrics answer but I don't have enough rep. His detailed explanation is great and is pretty much already handled by LibGdx's HorizontalGroup() ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
card-game × 98unity × 18
c# × 13
game-design × 12
java × 10
ai × 9
game-mechanics × 8
architecture × 7
multiplayer × 7
software-engineering × 6
algorithm × 5
networking × 5
javascript × 4
turn-based × 4
online × 4
poker × 4
c++ × 3
2d × 3
gui × 3
design-patterns × 3
text × 3
unity-ui × 3
databases × 3
effect-modifier × 3
libgdx × 2