Quint Card online--Client Design

Source: Internet
Author: User

OpenSceneGraph Introduction:

OpenSceneGraph (hereinafter referred to as OSG) is an open-source three-dimensional engine, is widely used in visual simulation, gaming, virtual reality, scientific computing, three-dimensional reconstruction, geographical information, space exploration, oil and minerals and other fields. OSG is written in standard C + + and OpenGL and runs on all Windows platforms, OSX, Gnu/linux, IRIX, Solaris, HP-UX, AIX, Android and FreeBSD operating systems.

More information about OSG: http://www.openscenegraph.org/

Game General rules:

Quint Card is a Nordic style for the background of the turn-based card game. Each game by two players to play, the outcome of the decision method is 3 innings 2 wins, first win 2 innings of the player wins. The player starts by randomly extracting 10 cards from the card group. Different from the general card game is not only rely on a few effect cards and group effects outside the player is not able to extract new cards, that is, all the 2-3 small game players only 10 cards can be used, the card used in the next small bureau can not be used again and no new card supplement.

Unit cards are divided into 3 categories, melee, ranged and siege. Each class occupies a horizontal. At the end of a small game, the total attack strength is added, and the big side wins. In a small game, the two sides take turns out of cards, one at a time, until one party does not have a card or actively press the space bar to end the card when the end of a small innings and start clearing power points. Weather cards can affect the same kind of units on both sides.

For detailed rules see:

Http://witcher.wikia.com/wiki/Gwent

Design of the class:

Director is responsible for controlling game logic and behavior, with two player objects

The player is responsible for controlling the behavior of a player in a game, and the player input is detected by the Pickhandler and given the corresponding signal to the other player response

P2callback is a response object whose operator method is called once per frame for animation effects and network messaging.

Datarecieverthread is a thread that is used to receive network messages.

Deck, GARABGE, hand are three cardstack sub-classes, Cardstack is a card stack.

Field subordinate four Cardstack:weather, Meele, Archer, siege.

These several cardstack are distributed in the game as follows:

The control flow of the game is as follows:

Interface design:

The client login must enter the server IP address, the login interface is as follows:

After entering the correct server IP, you can connect and select the room, if the room is full will be prompted by the "fully", if forced entry will be kicked out of the server:

After entering the room, wait for all two players to enter and then start the game:

Quint Card online--Client Design

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.