[WIP] Multiplayer card game in 3D

I am working on a card network Video Game: Preferans 3D.
I am working on it since February 2012.
My idea is to make it immersive as much as possible.

Preferans (Balkan rules)

I am developing it in 5 phases:

Phase I: One application instance with three players. To make and test the game logic and card rules.
( One user plays for three game players )

Phase II: One applications instances per player. Real multilayer game with LAN network settings.
( when three players are connected the game starts) To test network game play.

Phase III: One applications instances per player. Real multilayer game with WAN networking.
Idea is to use lobby and rooms for joining the game and master server to hold lobby.

Phase IV: Visual polishing, GUI

Phase V: Make game run on PC, OS X, Linux, Web,FB, Pads, Tablets.

Engine: Unity,Unity and Unity
Code: Antares Universe VIZIO
Network: LAN ( Unity Network ), WAN ( ExitGames - PHOTON )

I will use this tread to show my progress,and any comments and suggestion are more than welcome.

this is my first drawing about the game

Beginning:

In every real card game, you must shuffle your cards. Usually card computer games release you of that burden, and you get some random computer generated combinations. With that approach game doesn’t learn players importance of good card shuffling.
Lots of hands can be won with observing where cards goes when the deck is preparing for a shuffle.

As I need to make the game as realistic as I could, card shuffling is a must.

Card shuffle

Bidding in Preferans is a part of the game where players choose who will play and what game:
Beginning with the eldest hand, players bid for the privilege of declaring the contract and trump suit and playing as the soloist.
The bidding can last several rounds until all players but one pass.

Here is the script for bidding:

I like this idea, of a unity card game, much like the one wolfire did for the f this jam, in fact, the source code is available, on the wolfire git. You might check that out for some ideas. Oh and its multi player. Maybe some of that could benefit your project.

@MD_Reptile thanks for support

I found it very useful to put idea on the paper first and then to “materialize” it in video game:

Shuffle processes:

Game View with players and cards
*The cards are dealt following the scheme 5–talon–5. If several players bid hand, the highest contract takes precedence as for the non-hand bids.*In hand contracts, the talon is laid aside. Otherwise declarer exposes it to the defenders:

no problem kshaja, I like the new screenshots, looks nice! I tried once to make a similar project (not an actual game just a prototype of some cards and moving them around and stuff) and it can actually be more challenging than it looks, so it seems like your doing good! I’ll keep an eye out to see how this turns out

@MD_Reptile Thanks again for your kind words.

Here is an update,

I made more scripts for the flow of the game, as you can see, I made GUI buttons for every part of the game, so I can test them separately.Text is on Serbian and it goes like this:
New Hand - Shuffle - Deck cutting - Dealing - Bidding - Turn Talon Cards - Put back Talon - Declaration - Player Play - Game

1 Like

Idea for new GUI system:

New GUI implemented and a game flow indicator:

BIDDING

DECLARATION

PLAYING

Player script In Phase I, there are three scripts for each player

Game script

Scripts Gizmos I spent hours on net to find these icons, and I found it very relaxing :slight_smile: . They will be erased before production phase :wink:

New Look and new GUI. Added Camera zoom and pane

Added simple GUI for cutting the deck at specific point


Added talon cards random orientation and score sheet

Added markers for hands that are won

Coming along nicely. I assume the cutting of the deck is pretty arbitrary right? Like, If I cut the middle, or if I cut the top, I assume I have the same percent chance of getting the same card I would have got regardless where I cut. Hope that makes sense :slight_smile:

Thanks for comment!

As I mention on the first post, I am trying to make this card game looks and feels like a real game :wink:
As You can see there is a slider above the deck and it goes from 0 to 31. And when You move the slider the green square is also moving along the deck to show You where is Your cut at the moment. If You cut at position 12, that means that 12 cards from the top of the deck are going to the bottom of the deck, just like in real life.

Script for cutting the deck:

Same thing with shuffling the cards. There are two sliders for both decks.They are used to set to how many cards are going down when shuffling.

Script for shuffling:

Phase I FINISHED !
After some testing and some bugs found, phase I is finished. Game play is set and its operational.

Phase II ( LAN multiplayer game). Using Unity Networking.

Now the visual part of the game has to be changed:

First concept of the table and camera position, and how my LOGO was inspired :wink:

One table for each part of the game ( shuffle, cut the deck, talon picking, playing )

LAN networking - Three applications on one computer

Connection testing:

After testing connection, cameras positions are next :

Changing one standalone game with 3 players to a single network game with 3 players was not an easy task.
Lot of code had to be remade. And a lot of time that went into that code become void.
But as this is my first network game it was useful experience. Lot of that code was GUI code.

Network in LAN is little bit awkward for this type of game. The first player is a server and it see both Player2 and Player3.
Player2 sees only server, but not Player3 and vice verse. So if I need to send message from P2 to P3 I need to do it over P1 ( server ).

Also the script size become larger

Bidding script:

Having 2 monitors was a huge relief:

a 3d card game, this sincerely has a lot of money-making potential (so much gambling people out there, it never tickled me however)

-just a thought, i may be wrong:
i played some games where some hackers were able to modify camera positions by memory modification
if the cards on the enemy hands have already the right texture some hackers could just turn the camera and look at them, or more easily read the network stream if its not encoded. Therefore cards should only get their texture/numbers from the server as the card is shown.

but probably you had this in mind already

If those hackers could help me find where i put camera position variable, that would be a lot of help for me. I made a mess :wink:
I didn’t yet implemented any system for anti-hacking in the game. But Your suggestion is on the spot. When I finish the game I will for sure implement some anti cheat features. Now my main goal is to make it work…

Wow @Kshaja, that’s what i call a progress :slight_smile: You have done a great job, awesome.

@ sushanta1991 Thanks a lot! It will get only better!

Some taken cards,papers and photo and GUI testing:

I made some tests:

OS X

Ubuntu

working great :slight_smile: