Bag edition online game hall + bridge system order

Source: Internet
Author: User

Returned directory

 

I left my house two years ago and wrote a set of source code for one and a half months. After writing the code, I published all the code, with nearly 8 K of code. At that time, it was based on. NET 1.1. For details, see this article: Introduction to the chess and card game hall.
Source code: http://files.cnblogs.com/Jax/PlayCard.rar

Today, I leave my job at home again, read the previous design documents, and feel a lot of emotion. The two years of Technological accumulation have led me to have a lot of new ideas on this source code.

Also, I recently saw a hot topic about "online game hall" on the homepage of the blog Park. However, after carefully reading a number of articles, I found many problems, such as not involving key technologies, it includes real materials such as architecture, asynchronous communication, and game logic, and attracts everyone's attention through stimulating speech + multiple games. Such an article will mislead many new people and lead to the development of the blog garden in the "fake big empty" direction. In this regard, I have a resistance attitude. Technical articles should be rigorous and humorous, but excessive YY will inevitably attract public favor.

Therefore, it is necessary to explain in detail the design ideas of the "online game hall" and temporarily stop some of the things at hand.

Some of my feelings are that it is not cost-effective to use C # to develop online games. At most, the logic architecture of the Code is clear, but the efficiency is greatly reduced. Therefore, do not be too keen on development in this area. If there is no future, it is the best practice. In the next series, I will introduce my design ideas and development experiences, including some of the design failures.

The following are some main logics of my source code:
1 multi-thread Development Based on C # TCP socket Asynchronous Communication
2. Nearly 60 custom communication protocols use serialization technology to transmit byte streams
3. After the second-level proxy technology starts playing cards, specify one of them as the proxyserver, open the socket, and assume the logic judgment of playing cards with the other three. After playing cards, it notifies the main server of load balancing, significantly reduce server load
4. Store the connection party in the hash table on the server side, so that the server can send messages to anyone who wants to send messages point-to-point.
5. Master and edge settings are verified on the client and server respectively.
6. Draw cards in flyweight Mode
7. The observer mode is used for communication between forms.
8. Because it is developed on a machine, players with different IP addresses are simulated using different ports of the same IP address. Therefore, players with different IP addresses can enter the hall only after slight modification.

And unfinished parts
1. card display: if data is ready
2. display of scores: The data is displayed only when the data is ready.
3. UI beautification is caused by typographical layout.
4. Use strategy to implement different gameplay methods of gongshu/bridge/80, or even different gameplay of chess and cards
5. Force exit from the game
6. Flash of cardcontrol

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.