首页 游戏2D技术 毕业论文外文文献翻译

游戏2D技术 毕业论文外文文献翻译

举报
开通vip

游戏2D技术 毕业论文外文文献翻译游戏2D技术 毕业论文外文文献翻译 毕业设计(论文)外文资料翻译 学院(系): 计算机科学与技术学院 专 业: 网络工程 姓 名: 学 号: 外文出处: AI for game developers 附 件: 1.外文原文;2.外文译文。 指导教师评语: 签名: 年 月 日 English text: Game 2 D technology To realize the quality of the games said animation, many people will be imm...

游戏2D技术  毕业论文外文文献翻译
游戏2D技术 毕业论文 毕业论文答辩ppt模板下载毕业论文ppt模板下载毕业论文ppt下载关于药学专业毕业论文临床本科毕业论文下载 外文文献翻译 毕业设计( 论文 政研论文下载论文大学下载论文大学下载关于长拳的论文浙大论文封面下载 )外文资料翻译 学院(系): 计算机科学与技术学院 专 业: 网络工程 姓 名: 学 号: 外文出处: AI for game developers 附 件: 1.外文原文;2.外文译文。 指导教师评语: 签名: 年 月 日 English text: Game 2 D technology To realize the quality of the games said animation, many people will be immediately thought DirectX, yes DirectDraw are very strong, but not have to use DirectDraw to just go. Behind the animation theory and techniques are all the same, this and end use what API not much (if the API is not too ~ ~ slow words). Is the author of the realization of the NewImage Lib testing results, internal all the pixel data storage and computation are pure software to realize, the last step output to screen use GDI performance than DirectDraw low less than 10%, in Window9X system to low 20% left and right sides, this for many software is absolutely acceptable. The application now interface more does more luxuriant, in addition to support the SKIN, a lot of people want to join in a program in some such as Sprite animation this originally used in game technology, for this reason introducing DirectX API, apparently was not worth (besides DX version to upgrade frequent, with DirectGraphic DX8 already replaced DirectDraw). In this paper the author use standard to realize commercial game GDI functions as an example, take you into the high quality 2 D animation programming domain, and ensure the equipment independence. In we have a proper time to execute the update operation, now let us try animation it. The following code will no longer provide Win32 version. In order to narrative is convenient, I need a play the animation window, it must be a derived class of CWnd, assuming this class is called CMyView, we will draw animation in the window. First we for the class add a member function "void CMyView: : RenderView ()", you can use the above mentioned method calls this function. Are now ready to work very well, our animation how to store? Don't mention animation GIF89a format (if you think only have animation GIF words, I advise you to do art good, don't do programs), if you just want a simple animation playback of course, but if you want to do complex point, interactive animation, I advise you still don't use that things. Assume we have a 4 frame of animation, how to store it? First thing I thought of was save four BMP file, and then read to a CBitmap object the array, but respected master Scott Meyers warned us not to use polymorphism arrays, because the compiler in some cases can't accurately calculate the size of the array object, so subscript operators will have dire effects. Then I thought of use CBitmap pointer arrays, this to is nice, but management up a little trouble. Now look at my final solution it Then use it to create a CImageList object, let us create a careful look at the method, and use BOOL CImageList: : Create (int cx, int cy, UINT nFlags, int nInitial, int nGrow); Function, the front two parameters used to specify the size of the animation to us. This created an empty ImageList, the advantage of this is extensible line is stronger. Next, we need to put the frames the document Load to a CBitmap object, you can be put into JPG or GIF files to save capacity ( If you truly achieve the above code words, you will find that screen flash, very uncomfortable. Many people will blame the GDI head, and they will be called MS, said GDI is too slow. In fact not also any write directly the operation of the screen will have flash, under the video memory write directly in DOS or use DirectDraw API to write directly Primary Surface will shine, because you each update the operation of the show will be users soon see (because the reason and vertical back, may have delay). Eliminate flash the simplest and most classical approach is Double buffer (Double buffer). The so-called double buffer in fact, the truth is very simple, that is to say we in other places (simple said is not aimed at the screen, and don't show place) to open up a storage space, we put all the animation will render to this place, not the direct rendering to screen (on the screen of the storage area). In the GDI, directly to the screen is window DC, "not visible place" general can use Memory DC. In the animation rendering all go to the backstage buffer, then a whole is copied to the buffer screen next time! In pure software 2 D graphics engine, the double buffer generally means that in memory open up a region used to store pixel data. And in the Back Surface DirectDraw can create, in all the animation rendering to Back Suface after on, and then use the Flip operation is visible, Flip operation because of just set the address of the visible Surface, so very fast 中文译文: 游戏2D技术 说到实现游戏品质的动画,很多人会立刻想到DirectX,没错DirectDraw很强大,但是并不是必须用DirectDraw才行。动画后面的理论和技巧都是一样的,这和末端使用什么API没有太大关系(如果那API不是太~~慢的话)。就笔者实现的NewImage Lib的测试结果,内部所有像素数据的存储和运算都纯软件实现,最后一步输出到屏幕使用GDI的性能比DirectDraw低不到10%,在Window9X系统上要低20%左右,这对很多软件来说是绝对可以接受的。 现在应用程序界面越做越华丽,除了支持SKIN外,很多人都想在程序中加入一些例如sprite动画这种原本用在游戏上的技术,因为这原因引入DirectX API,显然是不值得的(况且DX版本升级频繁,DX8中已经用DirectGraphic取代了DirectDraw)。本文将以笔者使用 标准 excel标准偏差excel标准偏差函数exl标准差函数国标检验抽样标准表免费下载红头文件格式标准下载 GDI函数实现的商业游戏为例,带你进入高品质2D动画编程领域,并且保证其设备无关性。 在我们有了一个适当的时机执行更新操作了,现在就让我们试试动画吧。下面的代码将不再提供Win32的版本。 为了叙述方便,我需要一个播放动画的窗口,它必须是一个CWnd的派生类,假设这个类叫做CMyView,我们将在这个窗口中绘制动画。首先我们为这个类添加一个成员函数”void CMyView::RenderView()”,你可以使用上面提到的方法调用这个函数。 现在准备工作都做好了,我们的动画该怎么存储呢?别提动画GIF89a格式(如果你觉得只有GIF才有动画的话,那我劝你去做美术好了,别干程序了),如果你只想要个简单的动画播放当然可以,但是如果你想要做复杂点的,交互式动画,我劝你还是别用那东西。假设我们有一个4帧的动画,怎么存储它呢?我首先想到的就是存4个BMP文件,然后读入到一个CBitmap对象数组中,但是尊敬的大师Scott Meyers警告我们不要使用多态数组,因为编译器在某些情况下不能准确计算数组中对象的大小,所以下标运算符会产生可怕的效果。然后我就想到了用CBitmap指针数组,这到是不错,不过管理起来稍嫌麻烦。现在看看我最终的解决方法吧 然后用它创建一个CImageList对象,让我们仔细看一下创建的方法,使用 BOOL CImageList::Create( int cx, int cy, UINT nFlags, int nInitial, int nGrow ); 函数,前面两个参数用来指定我们一帧动画的尺寸。这样就创建了一个空的ImageList,这样做的好处是可扩展行比较强。下面我们需要把那个帧序列文件Load到一个CBitmap对象中,你可以存成JPG或者GIF文件来节省容量( 如果你真正实现上面的代码的话,你会发现画面一闪一闪的,十分的不爽。很多人都会怪到GDI头上,他们又会骂MS,说GDI太慢了。其实非也任何直接写屏幕的操作都会产生闪烁,在DOS下直接写显存或者用DirectDraw API直接写Primary Surface都会闪烁,因为你每个更新显示的操作都会被用户马上看到(因为垂直回扫的原因, 或许会有延迟)。 消除闪烁最简单也是最经典的方法就是双缓冲(Double buffer)。所谓的双缓冲其实道理非常简单,就是说我们在其它地方(简单的说就是不针对屏幕,不显示出来的地方)开辟一个存储空间,我们把所有的动画都要渲染到这个地方,而不是直接渲染到屏幕上(针对屏幕的存储区域)。在GDI中,直接针对屏幕就是窗口DC,”不可见的地方”一般可以用Memory DC。在把所有动画渲染到后台缓冲之后,再一下次整体拷贝到屏幕缓冲区! 在纯软件2D图形引擎中,双缓冲一般意味着在内存中开辟一个区域用来存储像素数据。而在DirectDraw中可以创建Back Surface,在把所有动画渲染到Back Suface上之后,然后使用Flip操作使其可见,Flip操作因为只是设置可见surface的地址,所以非常快速
本文档为【游戏2D技术 毕业论文外文文献翻译】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_682974
暂无简介~
格式:doc
大小:23KB
软件:Word
页数:6
分类:生活休闲
上传时间:2017-10-17
浏览量:72