Coderzh's first online Python combat game-nancytetris1.0 (1)

Source: Internet
Author: User

The first time I wrote a game and the first time I wrote a game in Python, I decided to write a game in Russia and supported online combat!

The data structure andAlgorithmExperience in design is insufficient. At the same time, some simple TCP/IP data transmission mechanisms are used in the online combat process. Therefore, there must be many improvements.

SpecificCodeThe implementation and algorithm analysis process will be completed later (Python source code download is available below). Here we will accept bricks and eggs, and I hope to give more comments and suggestions!

The game is as follows:

 

 

=========== Nancy RIS documentation ================================

1. SRCSource codeInstall the pygame library.
2. The nancyterisdirectory is the compiled exe and you can run tetris.exe directly.

Nancy RIS description
---------------------------------------------------
1. standalone game-run tetris.exe directly
2. Online combat (only two players are supported)
2.1 run the command line parameters on the host:
Tetris.exe Server
2.2 run the command line parameters of adding the IP address of the host to another machine:
Tetris.exe 192.168.xx.xx
Operation instructions
--------------------------------------
----- Begin deformation ------
----- Rotate left ------
----- → Shift right ------
----- Begin acceleration ------
----- Space directly drops ------
----- Enter start again ------

--------------------------------------

Download the game source code and binary version:

Http://files.cnblogs.com/coderzh/NancyTetris.rar

The game UI library uses the famous pygame, and nancytetris has been established at pygame.org. Please stay tuned for version updates:

Http://www.pygame.org/project/825? Amp; release_id = 1421

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.