28

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 need to make sure that the cards picked up by "take X" cards do not outweight the natural rate of losing cards. This is one aspect where trying to find a ...


17

Some suggestions to bring more cards into the game: When a player wins a match, reward them with two cards: One from the losers deck and one newly created one. You might also consider giving a generated card to the loser to compensate for the loss, otherwise they would progress backwards, which is a real motivation breaker. Reward players for playing by ...


16

In the case of UNO, I find it highly unlikely that there was any deep consideration of the underlying mathematics. Consider this image of the UNO deck of cards (taken from the Wikipedia page on UNO): It contains 108 cards. That's an interesting number. Why? Because it's twice the number of cards in a standard deck of playing cards - 54 (13 of each suit, ...


15

Phaser has support for two types of sprite sheet: "classic" ones, where every frame is the exact same size, and "texture atlases" which are created with the help of a third party app like Texture Packer, Shoebox or Flash CC and come with an associated json file. You load the "classic" ones with game.load.spritesheet where you must specify the width and ...


12

If you want the feature, implement it. If you don't want the feature don't implement it. If you're unsure if the player wants it, implement it and notify the user if the other player disconnects and give them an option to continue with the AI player.


10

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.


8

Depending on the complexity of your game, verifying if an action is legal or not might require to backtrack large parts of the game. An example: Player A says Player B can't play that card right now because he has no ResourceX. PlayerB says he has plenty ResourceX. Who is right? To find out you would simulate the whole game again from start to finish to ...


7

var sprite = game.add.sprite(x, y, 'spritesheet_name'); sprite.frame = 0; Spritesheets aren't limited to animations, that's just one way to use them. An animation is just a way to display different frames at different times. By manually setting the frame of a sprite, you can display a specific part of the spritesheet.


7

Hello visitors of Jindsay's Card Game Forum. Here is your friend xXx_GameH4x0rPhilipp_xXx with another cheat for you. Do you want to win every game? Here is a simple hack which works with every web browser: Press F12 Click on "Debugger" Select check_win.js There is now a window with lots of programming code. Don't worry, you don't need to understand any of ...


5

This is my experience from implementing a MTG AI. If the AI is not considered from the start, adding it later can be challenging. Your engine needs a way to copy the game state. It also needs a way to to quickly undo a move, so search tree can be generated efficiently. Every AI thread should operate on its own copy of the game. When computer makes a move ...


5

Doing basically anything on client-side apat from the inputs is a bad idea. And believe me, if the programmers could collect inputs on the server side, so the client couldn't fake them, then they would happily do so. Literally anyone can change the code to always register a winning condition. If they make it send it back to the server, than it's even worse. ...


4

"I want to prevent cheating as much as possible." - So say we all. :) Perhaps a more sensible approach is to not waste time doing anything above and beyond the reasonable and generally effective anti-cheating measures. Those are: double-testing for bugs that would allow players to perform any illegal actions, and sending only encrypted data (via https or ...


4

I would say you should absolutely generate your descriptions procedurally. This will allow you to tweak your abilities and definitions to your hearts content at a later time without having to manually adjust many many descriptions. Based on what you have shown, I would have somewhere where the Trait was defined not within a specific card, with a ...


4

You can do this by making the secret starting state verifiable and guesses difficult: Have all players generate a new private/public key pair, send the public keys Let them shuffle their own decks Choose and/or exchange salts (see below) Generate signatures for the information you want to check: Either a player's full deck if that can become known after ...


4

When you play a game online, you usually play it online because you want to play against a human opponent. So it doesn't make much sense to play when your opponent is computer-controlled. But when you have a multiplayer game which has more than two players and which becomes unplayable when one player drops out of the game (like Hearts), it would certainly ...


4

Why shuffle the deck in the first place? All clients know which cards were already played and which cards are still in the deck. What they don't know is the order in which they come. So instead of fixing the order at the beginning of the game, why not determine it during the game? Keep the deck as a sorted array and whenever a new card is needed, pick a ...


4

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 cases. Replacing the player with a bot is a good idea. It allows the other players to resolve the game in a satisfying manner.


4

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 connection dropping). The only exception is to not wait for them if they were to explicitly select a "concede" option (but otherwise treat this option the same). ...


3

When you have complex logic in the mechanics of individual cards, then it might be best to express that logic with a scripting language. But if you really want to go for a completely domain-driven approach, you might go for something in between: Markup which describes logic. Both of the effects mentioned in the question could be called an "adjacency effect"....


3

The relational-database-by-the-book solution would have a table players, a table cards_owned_by_players, a table decks a table cards_in_deck and a table cards. Here is an entity-relationship diagram of the whole schema. If you are wondering where cards_in_deck and cards_owned_by_players went: note that an N:M relationship needs to be represented with a ...


3

How does this look? (Green and red lines are only there for debugging) What I did to achieve this was to first separate the card into three columns and five rows; then I had the Cost, Life, Attack, and S field occupy the small 1st and 3rd column and the Image, Title, and Description occupy the large 2nd column. I then used a Stack (docs) to stack the table ...


2

I'd like to chime in and mention "format preserving encryption" as a method for shuffling cards in a game. Essentially what you'd have is an encryption algorithm that takes in a value 0 to 51, and a key (shuffle seed) and spits out a value 0 to 51. Since encryption is reversible by definition that means any 2 input numbers cannot encrypt to the same output ...


2

Every network application requires some system to act as a server. There are two ways to implement a multiplayer game: peer-to-peer - in every match, the machine of one player acts as a server, the others as clients. client-to-server - there is a dedicated server application all players connect to but which doesn't play itself. It is either hosted by you or ...


2

While the answer posted @dnk drone.vs.drones is technically exactly about what you asked for and a viable solution, here is another suggestion that goes a bit further, and is based on my comment on your question. I'm assuming: the card effects are quite small and generic, and act on either the player or the opponent the game is played against an opponent, ...


2

I 'll try this aproach: I'm lazy so I included the factory inside the class card. I suggest using delegates to forge the behaviour of each card type, and a big and maybe brute, swith case inside the factory method (createCard). public class card{ private int ID; private string cardName;//getters setters? private Texture2D cardImage;//...


2

A printer service probably don't want to print such cards. I am not a lawyer, but the way it has been explained to me is that from a legal perspective, they print the cards and sell them to you. If you have them print cards of your design you basically license them to print that design on a set of cards. The printer could be in legal trouble if they print ...


2

It seems you're using the Minimax algorithm, is that correct? If you already didn't, you should at least implement Alpha-Beta pruning in order to reduce the number of explored branches of your game tree. If it is not enough, the task at hand may be more suited to MCTS, which is used in Go due to the large branching factor, just like the one you describe.


2

You can use Unity's Physics. "Joints". Which allows you to move your object like attached to a rope or spring. Here is a video from Unity, about Physics Joint. Here is the docs from Unity. You need to make some adjustments to values in order to get the best effect you want. I don't know how much Unity's Physics use your resource but this should be the ...


2

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 player can be subscribed to the card with some functions X that executes the desired actions on the card. however delegates may not be the perfect solution as ...


2

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 work / what you have described (see assumptions at the end). Cards Given your description, I imagine the interface your cards use to look something like this: ...


Only top voted, non community-wiki answers of a minimum length are eligible