资源简介

该程序为基于Socket的2人对打游戏,图片为.bmp文件,非MFC模式,是一个相当简单的局域网网络游戏的代码.<br>程序内运用Win32 API,包括:socket系列的API,多线程的API,BitBlt等.<br>参考文献:《Visual C++游戏编程基础》,荣钦科技 著<br>欢迎各位对该代码参考与点评,请多多指教.

资源截图

代码片段和文件信息

// NetGame2.cpp : Defines the entry point for the application.
//

#include “stdafx.h“
#include 
#include     /* _beginthread _endthread */

/*角色类..
*/

#define FULLHP 100
#define FULLSP 80
#define LEFTPlayer1_START_X 70
#define LEFTPlayer1_START_Y 180

#define RIGHTPlayer1_START_X 500
#define RIGHTPlayer1_START_Y 180

#define MESSAGE_START_X 23
#define MESSAGE_START_Y 320
#define MESSAGE_LENGTH 562
#define MESSAGE_HEIGHT 127

#define BUTTON1_START_X 32
#define BUTTON2_START_X 126
#define BUTTON3_START_X 220
#define BUTTON4_START_X 314
#define BUTTON5_START_X 408

#define BUTTON_START_Y 404
#define BUTTON_LENGTH 90
#define BUTTON_HEIGHT 37

#define PINKPlayer_ACT_TIMER 10
#define GREENPlayer_ACT_TIMER 9

#define GENER

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      30549  2007-12-10 16:02  NetGame2.cpp

     文件       4198  2007-12-09 23:19  NetGame2.dsp

     文件        541  2007-11-11 23:15  NetGame2.dsw

     文件      66560  2007-12-10 16:02  NetGame2.ncb

     文件      53760  2007-12-10 16:02  NetGame2.opt

     文件       1418  2007-12-10 16:02  NetGame2.plg

     文件       1221  2007-11-11 23:15  ReadMe.txt

     文件        297  2007-12-07 21:53  StdAfx.cpp

     文件        966  2007-12-09 21:21  StdAfx.h

     文件      95310  2003-09-19 03:02  Pic\slash.bmp

     文件     921654  2003-09-19 02:14  Pic\bg.bmp

     文件     236856  2007-12-03 13:55  Pic\recuse.bmp

     文件     338696  2007-12-02 21:54  Pic\pinkplayer.bmp

     文件     285552  2007-12-05 09:32  Pic\message.bmp

     文件      66656  2007-12-05 10:03  Pic\button.bmp

     文件     404552  2007-12-06 08:09  Pic\greenplayer.bmp

     文件     480056  2007-12-07 19:16  Pic\greenmagic1.bmp

     文件     480056  2007-12-07 19:20  Pic\greenmagic2.bmp

     文件     360056  2007-12-07 19:20  Pic\pinkmagic1.bmp

     文件     640056  2007-12-07 19:21  Pic\pinkmagic2.bmp

     文件     168004  2007-12-10 16:02  NetGame2.exe

     目录          0  2007-12-02 21:42  Pic

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

              4637014                    22


评论

共有 条评论