内在精灵引擎(译文)
By robot-v1.0
本文链接 https://www.kyfws.com/games/endogine-sprite-engine-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 24 分钟阅读 - 11963 个词 阅读量 0内在精灵引擎(译文)
原文地址:https://www.codeproject.com/Articles/10768/Endogine-sprite-engine
原文作者:Jonas Beckeman
译文由本站 robot-v1.0 翻译
前言
Sprite engine for D3D and GDI+ (with several game examples).
用于D3D和GDI +的Sprite引擎(带有几个游戏示例).
- 下载演示项目-927 Kb(Download demo project - 927 Kb)
- 下载引擎源代码和测试项目-1.78 MB(Download engine source and test project - 1.78 MB) (请阅读((please read)README.txt(README.txt)!)(!))
- 下载BASS音响系统,共享软件许可证-249 Kb(感谢un4seen.com的支持)(Download BASS sound system, shareware license - 249 Kb (thanks to the guys at un4seen.com))
- 下载简单的汽车物理应用程序源-11.9 Kb(Download simple car physics app source - 11.9 Kb)
- 下载基于MIDI的游戏测试源-27.1 Kb(Download MIDI-based game test source - 27.1 Kb)
源中包含一些示例.(Some of the examples are included in the source.)
介绍(Introduction)
Endogine是Sprite和游戏引擎,最初是由Macromedia Director编写的,旨在克服其默认Sprite引擎的许多限制.大约一年前,我开始业余时间从事该项目的C#版本,现在它具有比原始功能更多的功能-实际上,我已经对架构进行了多次重新设计,因此与Director ++几乎没有共同之处我试图实现的范例.摆脱这些模式使项目变得更好.但是,在将其称为Beta之前,还有很多事情要实现.(Endogine is a sprite and game engine, originally written in Macromedia Director to overcome the many limitations of its default sprite engine. I started working in my spare time on a C# version of the project about a year ago, and now it has far more features than the original - in fact, I’ve redesigned the architecture many times so it has little in common with the Director++ paradigm I tried to achieve. Moving away from those patterns has made the project much better. However, there are still a lot of things I want to implement before I can even call it a beta.) 一些功能是:(Some of the features are:)
- 轻松的媒体管理.(Easy media management.)
- 子画面层次结构(父/子关系,其中子项的Rotation,LOC等是从父项继承的).(Sprite hierarchy (parent/child relations, where children’s Rotation, LOC etc. are inherited from the parent).)
- 行为.(Behaviors.)
- 碰撞检测.(Collision detection.)
- 基于插件的渲染(接下来是Direct3D,GDI +,Irrlicht).(Plugin-based rendering (Direct3D, GDI+, Irrlicht is next).)
- 自定义栅格操作.(Custom raster operations.)
- 程序纹理(Perlin/Wood/Marble/Plasma/others).(Procedural textures (Perlin/Wood/Marble/Plasma/others).)
- 粒子系统.(Particle systems.)
- Flash,Photoshop和Director导入(不是脚本).注意:仅原型功能.(Flash, Photoshop, and Director import (not scripts). NB: Only prototype functionality.)
- 精灵事件(输入/离开/上/下等事件).(Mouse events by sprite (enter/leave/up/down etc. events).)
- 小部件(按钮,框架,窗口,滚动条等).所有这些都是基于Sprite的,因此混合/缩放/旋转也适用于小部件元素.(Widgets (button, frame, window, scrollbar etc.). All are sprite-based, so blending/scaling/rotating works on widget elements as well.)
- Animator对象(可以为Sprite的几乎所有属性设置动画).(Animator object (can animate almost any property of a sprite).)
- 插值器(用于生成平滑的动画,颜色渐变等).(Interpolators (for generating smooth animations, color gradients etc.).)
- Sprite文本(每个字符都是可以动画的Sprite,支持自定义多色位图字体和字距调整).(Sprite texts (each character is a sprite which can be animated, supports custom multicolor bitmap fonts and kerning).)
- 示例游戏原型(拼图泡泡,视差小行星,斯诺克/迷你高尔夫,洞穴猎人).(Example game prototypes (Puzzle Bobble, Parallax Asteroids, Snooker/Minigolf, Cave Hunter).)
- 具有场景图,子画面/行为编辑,资源管理和调试工具的IDE.(IDE with scene graph, sprite/behavior editing, resource management, and debugging tools.)
- 简单的脚本语言FlowScript,用于动画和声音控制.(Simple scripting language, FlowScript, for animation and sound control.)
- 插入式音响系统(当前为BASS或DirectSound).(Plug-in sound system (currently BASS or DirectSound).)
- 新增功能-色彩编辑器工具集:渐变,画家风格的HSB选择器,色样(支持(New - Color editor toolset: Gradient, Painter-style HSB picker, Color swatches (supports).aco(.aco*)*,(*,*)*.法案(*.act*)*,(*,*)*Painter.txt(*Painter.txt*)*).(*).*)
- 新增功能-RGB,HSB,HSL,HWB,Lab,XYZ颜色空间的类(具有插件功能).处理任何3维色彩空间的选择器.(New - Classes for RGB, HSB, HSL, HWB, Lab, XYZ color spaces (with plug-in functionality). Picker that handles any 3-dimensional color space.)
当前的一些GUI工具(编辑器,管理器等).(Some of the current GUI tools (editors, managers etc.).)
背景(Background)
我从事Macromedia Director的专业游戏开发已有10年了,最近5年对该产品的开发感到非常失望.为了弥补这一点,我编写了一些图形子系统,其中一些子系统非常特定于项目,但最终我设计了一个子系统,该子系统满足了2D游戏创建图形API所具有的更通用的标准.从2004年秋季到2005年春季,已经使用Director的脚本语言Lingo开发了它,从那时起,它就是一个C#项目.(I had been developing games professionally in Macromedia Director for 10 years, and was very disappointed with the development of the product the last 5 years. To make up for this, I wrote several graphical sub-systems, some very project-specific, but finally I designed one that fulfilled the more generic criteria I had for a 2D game creation graphics API. It was being developed in Director’s scripting language Lingo from autumn 2004 to spring 2005, and since then it’s a C# project..)
这是一个原型(It’s a prototype)
当前的引擎设计并不是一成不变的,我已经在其开发过程中进行了几项重大更改,并且还计划了更多.(The current engine design is not carved in stone, and I have already made several major changes during its development, and even more are planned.) 优化必须等到所有功能都实现后才能进行. GDI +模式非常慢,因为我还没有移植脏的rect系统. D3D全屏模式具有最佳性能.(Optimizations will have to wait until all functionality is implemented. The GDI+ mode is extremely slow, because I haven’t ported my dirty rect system yet. The D3D full-screen mode has the best performance.) 在此阶段,该代码的注释不佳,因为仍然有可能我将重写许多部分.如果需要文档,我将在出现问题时创建它.现在,您可以通过研究Tests项目来了解如何使用它.(The code is poorly commented at this stage, as it is still possible I’ll rewrite many parts. If there is a demand for documentation, I will create it as questions appear. For now, you can get a feel for how to use it, by investigating the Tests project.)
示例项目(Example projects)
下载中有两种解决方案.一个是实际的引擎,包括一个名为Tests的项目,其中包含大多数示例和代码.我选择将其包含在解决方案中,因为如果测试是其中的一部分,则开发/调试引擎会更容易一些,但这不是您自己的项目的设置方式. MusicGame项目更接近应如何完成.(There are two solutions in the download. One is the actual engine, including a project called Tests which contains most of the examples and code. I choose to include it in the solution since it’s a little bit easier to develop/debug the engine if the test is part of it, but that’s not the way your own projects should be set up. The MusicGame project is closer to how it should be done.) 还有一个关于如何设置自己的项目的简单教程文本.(There’s also a simple tutorial text on how to set up your own project.) 我想拥有一个简单但真实的测试平台,因此我正在创建一些游戏原型.目前,它们是拼图泡泡游戏,滚动小行星游戏,高尔夫/斯诺克游戏,CaveHunter和"太空侵略者".该项目中还提供了其他非游戏测试.通过将主窗口置于焦点上来打开和关闭它们,并从"引擎测试"菜单中选择项目.(I wanted to have a simple, but real-life testbed, so I’m creating a few game prototypes. Currently, they are Puzzle Bobble, a scrolling asteroid game, a golf/snooker game, CaveHunter, and Space Invaders. Other non-game tests are also available in the project. Turn them on and off by bringing the main window into focus and select items from the “Engine tests” menu.)
演练示例(Example walkthrough)
注意:要使用对话框/编辑器,(Note: For using dialogs / editors, the)Endogine.Editors.dll(Endogine.Editors.dll)必须存在于(has to be present in the).可执行程序(.exe*)*夹.对于声音,包括(*folder. For sound, include*)*Endogine.Audio.Bass.dll(*Endogine.Audio.Bass.dll*)*和中的文件(*and the files in*) BASS.zip(BASS.zip) (共享软件许可证).(*(shareware license).*) 要尝试"测试"项目中的一些示例,请运行"测试"解决方案并按照以下步骤操作:(*To try out some of the examples in the Tests project, run the Tests solution and follow these steps:*)
- 以3D/MDI模式启动(默认).(Start in 3D/MDI mode (default).)
- 将焦点放在"主"窗口上,以便"引擎测试"菜单出现在MDI父级中.(Set focus on the Main window, so the Engine Tests menu appears in the MDI parent.)
- 从菜单中选择"粒子系统".绿色的"对话框"控制粒子系统的几个方面.顶部滑块是(Select Particle System from the menu. The green “dialog” controls a few aspects of the particle system. The top slider is)
numParticles
,底部的大小.按钮可在颜色和尺寸方案之间切换.玩完之后,再次从菜单中选择"粒子系统"将其关闭.(, the bottom the size. The buttons switch between color and size schemes. After playing around with it, turn it off by selecting Particle System again from the menu.) - 选择GDI +随机程序,然后从菜单中选择字体.这演示了几种创建过程纹理和操作位图的方法,以及对位图字体的支持.每个字母精灵也具有使其摆动的行为.(Select GDI+ random procedural, and also Font from the menu. This demonstrates a few ways to create procedural textures and manipulate bitmaps, as well as the support for bitmap fonts. Each letter sprite also has a behavior that makes it swing.)**注意(Note)**两者都非常慢-他们正在使用我的旧系统.我将尽快对其进行升级,这将使它们快100倍.(that both are extremely slow - they’re using my old systems. I’ll upgrade them soon which will make them a hundred times faster.)
- 转到SceneGraphViewer,然后展开节点,直到到达Label Sprite.右键单击它,然后选择"定位/缩放/旋转"控件.尝试更改属性的不同模式.注意鼠标环绕功能.(Go to the SceneGraphViewer, and expand the nodes until you get to the Label sprite. Right-click it and select the Loc/Scale/Rot control. Try the different modes of changing the properties. Notice the mouse wrap-around feature.)
- 关闭Loc/Scale/Rot控件,返回SceneGraphViewer,展开Label节点.右键单击字母sprite之一,然后选择"属性"(" LocY"和" Rotation"属性在程序控制下,因此在此处很难更改).(Close the Loc/Scale/Rot control, go back to the SceneGraphViewer, expand the Label node. Right-click one of the letter sprites and select Properties (the LocY and Rotation properties are under the program control so they are hard to change here).)
- 单击"行为"按钮以查看该精灵具有哪些行为.标记ThisMovie.BhSwing,然后单击"删除"使其停止摆动. (尚未实现添加…和属性…).(Click the Behaviors button to see which behaviors the sprite has. Mark ThisMovie.BhSwing, and click Remove to make it stop swinging. (Add… and Properties… aren’t implemented yet).)
- 停止该程序,然后再次启动它,但是现在取消选择MDI模式(由于MDI模式下.NET的键盘问题).(Stop the program, and start it again, but now deselect MDI mode (because of .NET’s keyboard problems in MDI mode).)
- 将焦点设置到主窗口,然后从菜单中选择" Puzzle Bobble".播放器1使用箭头键进行操纵(向下射击,向上居中),播放器2使用AWSD.再次选择将其关闭.(Set focus to the Main window and select Puzzle Bobble from the menu. Player 1 uses the arrow keys to steer (Down to shoot, Up to center), player 2 uses AWSD. Select it again to turn it off.)注意(Note):由于变化(: due to changes in the)
ERectangle(F)
课堂上,目前存在一个错误,该错误会使球粘在错误的地方.稍后再调查. (可能是固定的.)(classes, there’s currently a bug which makes the ball stick in the wrong places. Will look into that later. (May be fixed.)) - 从菜单中选择"斯诺克",然后在白球上单击并拖动以进行射击.打开拓扑精灵对象的"属性"检查器,更改"深度"和"功能"以查看如何生成新图像,使用"定位/缩放/旋转"控件拖动图像,以及观察球的反应(有时是越野车!).(Select Snooker from the menu and click-drag on the white ball to shoot it. Open the Property Inspector for the topology sprite object, change Depth and Function to see how a new image is generated, use the Loc/Scale/Rot control to drag it around, and see how the balls react (buggy, sometimes!).)
- 从菜单中选择"视差滚动",然后尝试类似Asteroids的游戏.方向键可引导,空间可射击.注意:“相机"控件的LOC现在将无法使用,因为相机是由播放器管理的,因此每次更新帧时,相机会在飞船上居中.这就是视差的工作原理-只需移动相机,视差图层将自动创建深度效果.(Select Parallax Scroll from the menu and try the Asteroids-like game. Arrow keys to steer, Space to shoot. Note: the Camera control’s LOC won’t work now, because the camera is managed by the player, centering the camera over the ship for each frame update. That’s how the parallax works - just move the camera, and the parallax layers will automatically create the depth effect.)
- (在06年2月的版本中中断)进入主菜单,编辑,检查屏幕上的精灵编辑,然后右键单击屏幕上的精灵,您将在鼠标LOC下获得一个带有精灵的菜单.选择其中一个精灵,它应该在SceneGraph中显示为选定的样子.现在无法正确更新,因此您必须单击SceneGraph的工具栏才能查看选择.((Broken in the Feb ‘06 version) Go to the main menu, Edit, check Onscreen sprite edit, and right-click on a sprite on the screen, and you’ll get a menu with the sprites under the mouse LOC. Select one of the sprites, and it should appear as selected in the SceneGraph. It doesn’t update properly now, so you’ll have to click the SceneGraph’s toolbar to see the selection.)
使用代码(Using the code)
先决条件:.NET 2.0和具有托管扩展的DirectX 9.0c(2月6日)用于演示可执行文件,DirectX SDK 2月6日用于编译源代码.如果需要C#开发人员IDE,则可以免费下载SharpDevelop 2.0或Microsoft的Visual Studio Express C#.阅读(Prerequisites: .NET 2.0 and DirectX 9.0c with Managed Extensions (Feb 06) for the demo executable, and DirectX SDK Feb 06 for compiling the source. You can download SharpDevelop 2.0 or Microsoft’s Visual Studio Express C# for free, if you need a C# developer IDE. Read the)*README.txt(README.txt)*包括在源中以获取进一步的说明.(included in the source for further instructions.) 请注意,托管DirectX版本既不兼容也不兼容.我认为,如果您重新编译项目,则更高版本将可用,但是演示可执行文件需要MDX Feb 06.(Note that Managed DirectX versions aren’t backwards nor forwards compatible. I think later versions will work if you recompile the project, but the demo executable needs MDX Feb 06.) 我目前正在重新设计工作流程,您将需要相当长的说明列表才能设置使用Endogine的新解决方案,而我尚未编写.最简单的入门方法是查看"测试"项目.您还可以看一下MusicGame解决方案,它更像是一个真实项目的组织方式.(I’m currently redesigning the workflow, and you would need a fairly long list of instructions in order to set up a new solution which uses Endogine, which I haven’t written. The easiest way to get started is by looking at the Tests project. You can also have a look at the MusicGame solution, which is more like how a real project would be organized.) 大多数术语是从总监那里借来的.精灵创建的一些示例:(Most of the terminology is borrowed from Director. Some examples of sprite creation:)
Sprite sp1 = new Sprite();
//Loads the first bitmap file named
//Ball.* from the default directory
sp1.MemberName = "Ball";
sp1.Loc = new Point(30,30); //moves the sprite
Sprite sp2 = new Sprite();
//If it's an animated gif,
//the sprite will automatically animate
sp2.MemberName = "GifAnim";
sp2.Animator.StepSize = 0.1; //set the animation speed
sp2.Rect = new RectangleF(50,50,200,200); //stretches and moves the sprite
Sprite sp2Child = new Sprite();
//same texture/bitmap as sp1's will be used
//- no duplicate memory areas
sp2Child.MemberName = "Ball";
//now, sp2Child will follow sp2's location,
//rotation, and stretching
sp2Child.Parent = sp2;
路线图(Road map)
我今年将在一些商业项目中使用该引擎.这意味着我将集中精力处理那些游戏所需的所有功能,而且我可能不太会完善"常见"功能集.(I’ll be using the engine for some commercial projects this year. This means I’ll concentrate all features that are necessary for those games, and that I probably won’t work on polishing the “common” feature set a lot.) 一年中会有很多更新,但我将1.0 ETA修订为06年秋末.我希望这些项目会对引擎产生不断发展的压力,迫使其进行重构和采用新的使用模式,但会带来更好的体系结构.另一个副作用是文档.我将至少为其他团队成员写一些教程.(There will be a number of updates during the year, but I’ve revised my 1.0 ETA to late autumn ‘06. I expect the projects to put an evolutionary pressure on the engine, forcing refactoring and new usage patterns, but resulting in a much better architecture. Another side effect is documentation; I’ll have to write at least a few tutorials for the other team members.) 目前,我将大部分业余时间投入(Currently, I put most of my spare time into) 绘画实验室(PaintLab) ,图像编辑器,基于(, an image editor, which is based on) OpenBlackBox(OpenBlackBox) ,一个开源的模块化信号处理框架.他们都使用Endogine作为其图形核心,并且许多GUI元素都是Endogine编辑器,因此,在使用它们时,通常需要在Endogine中进行改进/添加.(, an open source modular signal processing framework. They both use Endogine as their graphics core, and many GUI elements are Endogine editors, so it’s common that I need to improve/add stuff in Endogine while working on them.)
下次更新的目标(不变)(Goals for next update (unchanged))
我已经开始使用Subversion进行源代码控制,这将使组装新版本以便发布变得更加容易,因此带有新教程和错误修复的更新应该更频繁地出现.接下来几个月的一些可能的任务:(I’ve started using Subversion for source control, which will make it easier to assemble new versions for posting, so updates with new tutorials and bug-fixes should appear more often. Some probable tasks for the next few months:)
- 在运行时在IDE/MDI模式和"清除"模式之间切换.(Switch between IDE/MDI mode and “clean” mode in runtime.)
- 清理术语,复制系统,继续过渡到.NET 2.0.(Clean up terminology, duplicate systems, continue transition to .NET 2.0.)
- 寻找支持XAML的方法,使其与术语和模式保持一致.(Look into supporting XAML, harmonize with its terminology and patterns.)
- 修复IDE GUI,在其他一些编辑器上工作.(Fix IDE GUI, work on some more editors.)
历史(History)
更新2006-07-06(Update 2006-07-06)
再说一次,其他项目花费了我大部分时间-目前基于OpenBlackBox/Endogine(Again, other projects have taken most of my time - currently it’s the OpenBlackBox/Endogine-based) 绘画实验室(PaintLab) 绘画程序.内分泌的副作用:(paint program. Side effects for Endogine:)
- 颜色管理工具:编辑器,颜色空间转换器,调色板文件过滤器等.(Color management tools: editors, color space converters, color palette file filters etc.)
- 重构:WinForms元素将从主项目移出到单独的DLL中.简化了单声道或WPF的移植,并使核心DLL缩小了50%.(Refactoring: WinForms elements are being moved out of the main project into a separate DLL. Simplifies porting to mono or WPF, and makes the core DLL 50% smaller.)
- 已改善(Improved)
Canvas
,(,)Vector3
,(,)Vector4
和(, and)Matrix4
类.(classes.) - 改进的PSD解析器.(Improved PSD parser.)
- 更多碰撞/相交检测算法.(More collision/intersection detection algorithms.)
- 几个新的或更新的用户控件.(Several new or updated user controls.)
更新2006-03-15(Update 2006-03-15)
我专注于发布第一个版本的(I’ve focused on releasing the first version of) OpenBlackBox(OpenBlackBox) ,因此已进行了大多数修改,以提供互操作功能(OBB高度依赖于Endogine).(, so most of the modifications have been made in order to provide interop functionality (OBB highly dependent on Endogine).)
- 优化(当涉及许多顶点时可能快很多倍).(Optimizations (can be many times faster when lots of vertices are involved).)
- 继续过渡到.NET 2.0.(Continued transition to .NET 2.0.)
- 需要DirectX SDK ‘06年2月.(Requires DirectX SDK Feb ‘06.)
- 简单支持HLSL着色器和(Simple support for HLSL shaders and)
RenderToTexture
.(.) - 更好的像素操纵代理-(Better proxies for pixel manipulation -)
Canvas
和(and)PixelDataProvider
类而不是旧的(classes instead of the old)PixelManipulator
.(.) - 扩展到Endogine渲染部分的接口.项目(例如OpenBlackBox)可以利用抽象的渲染API,而不必启动整个Endogine Sprite系统.(Extended interfaces to the rendering parts of Endogine. Projects (such as OpenBlackBox) can take advantage of the abstracted rendering API without necessarily firing up the whole Endogine sprite system.)
- 上次忘了提及它,但是自上次更新以来,其中包含一个小型教程.(Forgot to mention it last time, but there’s a small tutorial included since the last update.) 就是这样.但是不要错过(That’s pretty much it. But don’t miss) OpenBlackBox(OpenBlackBox) ,它将很快成为使用Endogine开发应用程序的非常有用的组件!(, in time it will become a very useful component for developing applications with Endogine!)
更新2006-02-01(Update 2006-02-01)
此版本中的一些主要体系结构更改,尤其是纹理/位图/动画系统.转换尚未完成,因此几种使用模式可以共存并引起混乱.需要一些实用程序来使动画系统更易于使用.(Some major architectural changes in this version, especially in the textures/bitmap/animation system. The transition isn’t complete yet, so several usage patterns can co-exist and cause some confusion. Some utilities will be needed to make the animation system easier to use.)
- 移至.NET 2.0.注意:重构仍在进行中(例如,泛型尚未在所有地方使用).(Moved to .NET 2.0. Note: refactoring is still in progress (e.g., generics isn’t used everywhere yet).)
- 等轴测图示例已删除.我将继续作为一个单独的项目进行开发,如果可能的话,我将在稍后提供.(The Isometric example has been removed. I’ve continued to work on it as a separate project, which I’ll make available later if possible.)
- 渲染器现在是插件,可简化开发/部署. (也从基于Tao的OpenGL渲染器开始,但对它的API感到不满意.)(Renderers are now plug-ins, allowing for easier development/deployment. (Also started on a Tao- based OpenGL renderer, but lost my temper with its API.))
PixelManipulator
-不管源是位图还是纹理表面,都易于访问像素.(- easy access to pixels regardless of if the source is a bitmap or texture surface.)- 如何使用示例(Examples of how to use the)
PixelManipulator
(来自processing.org的适应的Smoke和Cellular Automata3-感谢Mike Davis和Glen Murphy让我使用它们).((adapted Smoke and Cellular Automata3 from processing.org - thanks Mike Davis and Glen Murphy for letting me use them).) - Carlos J. Quintero的VB.NET的C#版本(C# version of Carlos J. Quintero’s VB.NET)
TriStateTreeView
-谢谢卡洛斯.添加了一个(- thanks Carlos. Added a)TriStateTreeNode
类.(class.) - 从基于插件的声音系统开始.目前,我已经实现了两个声音子系统:BASS和一个简单的DirectX播放器.可以完成OpenAL,但是BASS足够跨平台,并且具有更好的功能集.稍后,我将添加DirectShow支持.(Started on a plugin-based sound system. Currently, I’ve implemented two sound sub-systems: BASS and a simple DirectX player. OpenAL can be done, but BASS is cross-platform enough, and it has a better feature set. Later, I’ll add DirectShow support.)
- 包括Leslie Sanford的MidiToolKit的修改版(支持多种播放,并且消息传递系统略有不同).谢谢!(Included a modified version of Leslie Sanford’s MidiToolKit (supports multiple playbacks and has a slightly different messaging system). Thanks!)
- Flash解析器/渲染器已经过重组和改进.可以渲染基本形状和动画.(Flash parser/renderer has been restructured and improved. Can render basic shapes and animations.)
- 用于管理文件系统和不同配置设置的系统(有点像(System for managing file system and settings for different configurations (a bit like)*app.config(app.config)*但更易于使用,并且更适合我的目的).(but easier to use and better for my purposes).)
- 基于RegEx的文件查找器(扩展的搜索机制,因此您可以使用非正则表达式计数器,例如[39-80]和[1-130pad:3]-后者将找到字符串001到130).(RegEx-based file finder (extended search mechanism so you can use non-regex counters like [39-80] and [1-130pad:3] - the latter will find the string 001 to 130).)
- 用于创建打包纹理(树图打包)的助手.(Helper for creating packed textures (tree map packing).)
- 用于纹理用途的抽象层-用户不必关心Sprite的图像是否来自压缩的纹理.(Abstraction layer for texture usage - the user doesn’t have to care if a sprite’s image comes from a packed texture or not.)
- 会员的概念正在消失,由PicRef取代.从现在开始,Macromedia Director的术语通常会逐渐消失.(The concept of Members is on its way out, replaced by PicRefs. Macromedia Director terminology in general will disappear over time from now on.)
- 新的,更抽象的动画系统.尚未完全实施.(New, more abstracted animation system. Not fully implemented.)
- 具有代码注入功能的.NET脚本系统.目前仅适用于Boo,但将支持其他语言.稍后将使用针对不同语言的策略模式进行重组.(.NET scripting system with code injection. Currently only implemented for Boo, but will support other languages. Will be restructured later, with a strategy pattern for the different languages.)
- 新的经过极大改进的位图字体系统,用于呈现和创建字体.实时字距调整而不是预先计算的字距调整表.(New vastly improved bitmap font system, both for rendering and creating fonts. Real-time kerning instead of precalculated kerning tables.)
- 本地化/翻译帮助器(用于多语言产品).(Localization/translation helper (for multi-language products).)
- 许多辅助程序类,例如(A number of helper classes such as the)
IntervalString
类(将” -1-3,5-7"与数组[-1,0,1,2,3,5,6,7]相互转换).(class (translates “-1-3,5-7” to and from the array [-1,0,1,2,3,5,6,7]).) - 错误修复和优化数量未知.(Unknown number of bug fixes and optimizations.)
更新2005-10-10(Update 2005-10-10)
由于上次更新对游戏POV的影响并不那么令人激动,因此我决定投放一个带有等距原型游戏的新版本.完全是R.A.D.(Since the last update wasn’t that exciting from a gaming POV, I decided to throw in a new version with a prototype isometric game. Totally R.A.D.)
- 等轴测渲染,基于David Skoglund的游戏CrunchTime,包括(Isometric rendering, based on David Skoglund’s game CrunchTime, including) 他的图形(his graphics) (看到((see)_readme.txt(_readme.txt*)*在里面(*in the*)*等轴测图(*Isometric*)*夹).谢谢,朋友!(*folder). Thanks, pal!*)
- 改编自(A Star pathfinding algorithm adapted from) John Kennedy的实现(an implementation by John Kenedy) .谢谢!(. Thank you!)
- 删除了对LiveInterface的引用.(Removed references to LiveInterface.)
- 为位图文件添加了"资源分叉"-一个带有其他信息(例如动画帧数和偏移点)的XML文件.(Added “resource fork” for bitmap files - an XML file with additional info such as number of animation frames and offset point.)
更新2005-10-04(Update 2005-10-04)
好的,已经晚了一个月,而且其中不包含您可能一直在等待的东西,而我一直在努力的工作-主要是创建两种脚本语言-在当前状态下没有什么用处(尤其是在没有很好的使用示例).我认为值得花一些时间,因为我确信FlowScript稍后将成为一个很好的工具.这是该版本的内容:(OK, it’s over a month late, and it doesn’t include stuff you might have been waiting for, and the things I’ve been working on - mainly creating two script languages - aren’t that useful in their current state (especially with no good examples of their use). I think it was worth putting some time into, as I’m certain FlowScript will become a great tool later on. Here’s what I’ve got for this version:)
- 使用2005年8月版SDK进行编译.(Compiled using the August 2005 SDK.)
- 添加了"太空侵略者"原型.(Added Space Invaders prototype.)
- 将曲线渲染添加到(Added curves rendering to).swf(.swf*)*导入(它仍然呈现奇怪的图像).(*import (it still renders strange images).*)
- 将引擎重组为(Reorganized the engine into a).dll(.dll*)*.(*.*)
- 修复了鼠标锁定<->屏幕LOC错误.(Fixed mouse LOC <-> screen LOC error.)
- 修复了透明度/alpha/颜色键问题.(Fixed transparency / alpha / color-key issues.)
Map
(可能是一个不好的名字)类-如((probably a bad name) class - like a)SortedList
,但接受多个相同的"键".(, but accepts multiple identical “keys”.)Node
类,像(class, like)XmlNode
,但适用于非文本数据.(, but for non-text data.)- 开始准备将3D矩阵用于比例尺/LOC/旋转.(Started preparing the use of 3D matrices for scale/LOC/rotation.)
- 删除了DirectDraw支持.(Removed DirectDraw support.)
- 基本的声音支持.(Basic sound support.)
- 鼓机同步不良的示例.(A badly sync’ed drum machine example.)
- FlowScript是一种基于时间的脚本语言,针对基于动画和声音控制的非程序员,它基于:(FlowScript, a time-based scripting language, aimed at non-programmers for animation and sound control, based on:)
- EScript,基于反射的简单脚本语言(无字节码).(EScript, simple scripting language based on reflection (no bytecode).)
- 简单的CheckBox小部件.(Simple CheckBox widget.)
更新2005-08-01(Update 2005-08-01)
- 使用2005年6月版SDK进行编译.(Compiled using the June 2005 SDK.)
Sprite.Cursor
属性(例如(property (works like)Control.Cursor
).().)- 简单的XML编辑器.(Simple XML editor.)
- .NET标准化序列化.(.NET standardized serializing.)
PropertyGrid
而不是自定义属性编辑器.(instead of custom property editors.)VersatileDataGrid
用户控制(新(User Control (a new)DataGrid
控件,该控件实现.NET标准中缺少的功能(control which implements functionality missing in .NET’s standard)DataGrid
).().)TreeGrid
用户控制-有点像资源管理器,但右侧窗格是(User Control - a bit like Explorer, but the right-hand pane is a)VersatileDataGrid
锁定到树视图.(locked to the treeview.)- 两个新的游戏原型:CaveHunter和Snooker/MiniGolf.(Two new game prototypes: CaveHunter and Snooker/MiniGolf.)
- 资源管理器编辑器,带有"/“拖放到场景(和SceneGraph查看器).(ResourceManager editor w/ drag ‘n’ drop to scene (and to SceneGraph viewer).)
- 更好的结构.(Better structure.)
- 变压器行为-用于移动/缩放/旋转的Photoshop样式的精灵叠加层.(Transformer behavior - Photoshop-style sprite overlay for moving/scaling/rotating.)
- 场景XML导入/导出.(Scene XML import/export.)
- Director Xtra,用于将电影导出为Endogine XML场景格式.(Director Xtra for exporting movies to Endogine XML scene format.)
- 导入Photoshop文档-每个图层变成一个精灵,图层效果变成行为.图层位图的解码不完整.(Import Photoshop documents - each layer becomes a sprite, layer effects become behaviors. Decoding of layer bitmaps incomplete.)
- 汇入Flash(Import Flash)*瑞士法郎(swf)*文件(渲染代码不完整).(files (rendering code incomplete).)
BinaryReverseReader
以相反的顺序读取字节(对于(which reads bytes in reverse order (for).psd(.psd*)*),以及(*), and*)BinaryFlashReader
它以亚字节精度读取数据(用于(*which reads data with sub-byte precision (for*)*.swf(*.swf*)*).(*).*)- 扩展的(Extended)
EPoint(F)
和(and)ERectangle(F)
类.(classes.)**注意(Note)**在最新更改之后,Puzzle Bobble无法正常工作,我稍后会解决.(that Puzzle Bobble doesn’t work properly after the latest changes, I’ll take care of that later.)
更新2005-07-07(Update 2005-07-07)
- 相机节点.(Camera node.)
- 视差层.(Parallax layers.)
- LOC/比例控制工具箱.(LOC/Scale control toolbox.)
- 用户控件:(User Controls:)
ValueEdit
(箭头键更改一个((arrow keys to change a)Point
),(),)JogShuttle
(鼠标拖动以更改((mouse drag to change a)Point
通过点动或穿梭方法的值).(value by jog or shuttle method).) - 解决了MDI模式崩溃的问题(感谢adrian cirstei)-但是密钥在MDI模式下仍然不起作用.(MDI mode crash fixed (thanks to adrian cirstei) - but keys still don’t work in MDI mode.)
- 多个场景图窗口.(Multiple Scene Graph windows.)
- 直接在场景中选择精灵.(Select sprites directly in scene.)
- 具有视差层的小行星型游戏.(Asteroids-type game with parallax layers.)
- 扩展的(Extended)
EPoint(F)
和(and)ERectangle(F)
类.(classes.)
更新2005-06-27(Update 2005-06-27)
- 可选的MDI界面:编辑器和游戏窗口为MDI窗口. (问题:尝试在MDI窗口中创建3D设备时收到错误消息.)(Optional MDI interface: editors and game window as MDI windows. (Problem: I get an error when trying to create the 3D device in a MDI window.))
- 场景图:所有子画面的树状视图.(Scene Graph: treeview of all sprites.)
- 精灵标记:在场景图中选定的精灵周围创建一个标记.(Sprite marker: creates a marker around the sprite which is selected in the scene graph.)
- Property Inspector:用于查看和编辑Sprite属性的界面.(Property Inspector: interface for viewing and editing sprite properties.)
- 精灵行为:向精灵添加功能的简便方法.摆动字母动画是通过行为完成的.(Sprite Behaviors: easy way to add functionality to sprites. The swinging letters animation is done with a behavior.)
- 行为检查器:在运行时添加/删除/编辑行为.(Behavior Inspector: add/remove/edit behaviors in runtime.)
- 墨水使用枚举而不是(Inks use an enumeration instead of an)
int
((()ROPs.Multiply
而不是103).(instead of 103).) - 从MS转换太简单了(Switched from MS’ too simplistic)
Point(F)
/(/)Rectangle(F)
我自己的课(classes to my own)EPoint(F)
/(/)ERectangle(F)
,其中包含运算符重载和更多方法.请注意,我选择将它们编写为类,而不是(, which have operator overloading and many more methods. Note that I’ve chosen to write them as classes, not)struct
s-即,它们作为引用而不是值传递.(s - i.e., they’re passed as references, not values.) - 更容易的键盘处理(将名称分配给按键-允许用户更轻松地定义按键或在一个键盘上拥有多个演奏器).(Easier keyboard handling (assigns names to keys - makes it easier to let the user define keys, or to have multiple players on one keyboard).)
- Puzzle Bobble在每个区域允许多个玩家.(Puzzle Bobble allows multiple players in each area.) 您可以阅读有关我对Endogine概念的早期想法,未来计划,以及一些Shockwave/Lingo演示(You can read about my early thoughts about the Endogine concept, future plans, and see some Shockwave/Lingo demos) 这里(here) .(.) 我添加了Endogine C#特定页面(I have added a Endogine C# specific page) 这里(here) ,但可能落后于此页面.(, but it probably lags behind this page.)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C# Windows .NET .NET1.1 Visual-Studio GDI+ DirectX VS.NET2003 Dev 新闻 翻译