Based on. NET Platform Network programming introduction combat Series A sequence

Source: Internet
Author: User
Tags join socket

During the university, our college opened a course called C language, at that time the computer environment of the WINDOWXP, outside the net, can only on campus network, hard disk three stateless, no movies, no music, no games----except mine clearance. Is the so-called real potential hero, then the C language class to create a large number of minesweeper, APM (operation per minute, hit the war3 know) amazing. Cattle more people, nature to compete for a race, so the mine is also sporadic PK, but the PK rules are the cattle turn sweep, to see who used less time. At that time was pondering for that batch of cattle to create a network version of mine clearance, a competition, hey College students just like to think, do not want to do! Now step by step refactoring a network version of the socket based on sockets to miss the good friends of the university, and let the network programming confused novice or contact few friends to get started.

Because the focus is socket, in order to extract the core, so that the code more intuitive, so landing does not do, the game hall does not do (the garden has been done), the game table does not do, the integration system does not do, so the database is not used, the most original software------performance + logic May later have the time I will slowly join the landing, the hall or the integral system.

All technical points are listed below:

"1" mine clearance algorithm;

"2" server to build;

"3" multithreaded programming, involving the problem of accessing the UI across threads, multithreading debugging problem, thread synchronization problem;

"4" programme to generate landmines;

"5" to mine the client through the server communication;

Communication between the "6" server and the player watching the game.

The following is divided into more than one article, step-by-step completion.

"A" allows the click of the mine to run

"B" to build the world's most humble server

"C" lets the server and the client respond to each other

"D" allows the server to support millions of players

The generation scheme of "E" Thunder

"F" minesweeper online PK, done

"H" side of the game chat

"G" allows other players to watch the mine PK

"H" to join the login function

"I" Add the integration function

"J" Join the Game Hall

Interested in network programming friends can pay attention to my series, we can also be the network version of mine clearance to Gobang, chess, repeatedly see, poker and other online version!

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.