基于VC++和MFC框架开发的撞飞机游戏设计

目录

  1. C++游戏的现状分析 1
  2. 陨石撞飞机游戏总体设计 3
  3. 游戏实现的技术难点与关键算法说明 3
  4. 运行结果与测试 4
  5. 总结与体会 4
    CBitmap m_plane; // 飞机 5
    // CPlaneView printing 12

1.C++游戏的现状分析
中国C++程序员100%都是自学的。因为中国几乎没有象样的C++培训机构。大家都知道社会培训是赚钱为主要目的。能在那里成才是个大运气。也不象JAVA有SUN公司一手推行。中国大学教育里也根本没有C++教学。关于C/C++基础课的知识,只是让学生入门。但对于实际的C++软件工程应用,大学课本知识实践意义不大。最重要的是,大学里没有合格的C++老师。编程是门技术,叫手艺也行。而大学是搞科研的,多的是科学家,靠出PAPER教科凭职称为生。并不是技术员。没有10万行以上代码经验和成功软件项目经验的人,很难教出中高级C++程序员。
游戏制作业对C++程序员的要求是比较高的。比一般行业软件高很多。因为任何一个MMO都是个中大型软件项目。日使用人次达到几十万上百万,同时使用人数几十万在线的大型网络多人交互软件,集成了超过十几项专业领域编程技术的软件,想不大都不行。

// MainFrm.cpp : implementation of the CMainFrame class
//

#include "stdafx.h"
#include "plane.h"

#include "MainFrm.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/
// CMainFrame

IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)

BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
	//{
   
   {AFX_MSG_MAP(CMainFrame)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

static UINT indicators[] =
{
	ID_SEPARATOR,           // status line indicator
	ID_INDICATOR_CAPS,
	ID_INDICATOR_NUM,
	ID_INDICATOR_SCRL,
};

/
// CMainFrame construction/destruction

CMainFrame::CMainFrame()
{
	// TODO: add member initialization code here
	
}

CMainFrame::~CMainFrame()
{
}

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
		| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
		!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
	{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
	}

	if (!m_wndStatusBar.Create(this) ||
		!m_wndStatusBar.SetIndicators(indicators,
		  sizeof(indicators)/sizeof(UINT)))
	{
		TRACE0("Failed to create status bar\n");
		return -1;      // fail to create
	}

	// TODO: Delete these three lines if you don't want the toolbar to
	//  be dockable
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndToolBar);

	return 0;
}

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	if( !CMDIFrameWnd::PreCreateWindow(cs) )
		return FALSE;
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return TRUE;
}

/
// CMainFrame diagnostics

#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
	CMDIFrameWnd::AssertValid();
}

void CMainFrame::Dump(CDumpContext& dc) const
{
	CMDIFrameWnd::Dump(dc);
}

#endif //_DEBUG

/
// CMainFrame message handlers


在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/sheziqiong/article/details/130844537