用Delphi开发DirectX控件

用Delphi开发DirectX控件
整理编辑:China ASP

  Microsoft推出的DirectX使我们在Windows9x下开发游戏软件便利了许多。一般在介绍DirectX 的资料里都讲的是如何用VC++来开发,其实inprise公司的语言也可以用来开发基于DirectX的游戏软件。我们这里用的是DirectX控件,它有Delphi3和Delphi4不同的版本。在
http://www.ingjapan.ne.jp/hori/ 处你可以download,是由一个日本人写的,而且,这套控件是完全免费的,你可以自由使用。在这套控件里有DirectX的各种范例程序,我们今天来讨论一下其中基于DirectX的网络通信程序如何开发。

  想必大家都看到过那些硝烟纷飞的即时战略游戏,这些游戏中一个很诱人的买点就是可以几个人同时加入战斗,各自扮演一方高手,杀它个你死我活。那么这些即时战略游戏中的网络对战部分是怎么写的呢?其实在Microsoft的DirectX中专门有一类API就是负责网络通信的,不管是基于IPX,还是TCP/IP,或者是Modem,它都可以圆满解决。而作为程序设计的我们一般来说不用操心这些连接方式不同而带来的代码的不同,我们可以一视同仁,只要写一套统一的代码就可以了,各种连接方式的细节问题我们就交给DirectX去处理了。

  下面我们具体分析一下一个chat聊天程序的构造。运行samples/network/chat.dpr,我们就看到了一个最简单的聊天程序了。首先程序会让你选择连接的方式:IPX连接、Internet TCP/IP连接、调制解调器连接和串行连接;选择好连接方式后(下面假设你是选择用TCP/IP方式连接),你可以选择是创建一个新游戏还是进入一个已经存在的游戏࿰
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
================================== ==注意:一共2个压缩包,这是第2个== ================================== *提示:无自动安装程序,包含所有源码、例子、帮助,请按照安装顺序安装!!! DevExpress VCL v2012 vol 2.6 包含所有源码、例子、帮助 如果你安装过其它版本的DevExpressVCL,安装前请完全卸载老版本的Dev件,并执行“清理Dev残余文件”,清理System32下的DevExpress的BPL文件。 What's New in DevExpress VCL 12.2.6 Release Notes Feature Highlights To learn about feature highlights in this version, please refer to the following page: New Features - DevExpress VCL 12.2.6 Known Issues To learn about known issues in this version, please refer to the following page: Known Issues - DevExpress VCL 12.2.6 The following sections list all minor and major changes in DevExpress VCL 12.2.6. Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ExpressQuantumTreeList Suite Q484199 - Documentation - Provide an example of how to use the TcxCustomTreeList.Find function Resolved Issues VCL Subscription B232998 - Documentation - The OnValidateDrawValue event is not described ExpressBars Suite Q492229 - Activating an MDI child window always repaints it, regardless of the bar manager's AlwaysMerge property value Q490246 - Changing a bar item's Visible property when a form is being destroyed results in an AV Q489146 - Ribbon - A Ribbon tab group's Caption property does not apply to the group caption if this group is displayed in a popup window Q489457 - Ribbon - TdxRibbonBackstageView - In RAD Studio XE or later, an AV occurs when changing the parent of a currently hidden form with the BackstageView after the form Position property has been set to poDesigned and the toolbar on this form made visible Q486834 - Ribbon - TdxRibbonBackstageView - Invoking the BackstageView does not move focus to it from the currently focused control that resides on a form with this BackstageView B233045 - Ribbon - TdxRibbonBackstageView - Right-clicking an empty space within the left panel invokes the customizing popup menu Q493950 - Ribbon Form - In Windows XP, switching between skinned MDI child windows using Ctrl+Tab displays background windows if merging is enabled and the SupportNonClientDrawing property of the Ribbon control residing on the MDI child windows is set to False Q373762 - Ribbon Form - Restoring down a minimized application incorrectly resizes the Windows Aero Glass frame after the Ribbon form was programmatically hidden when minimizing the application B232887 - Shadows for drop-down windows are painted twice B234839 - TcxBarEditItem - ColorEdit - White color cannot be selected within the editor drop-down window ExpressDocking Library B233009 - An AV occurs when debugging a docking operation with TdxDockPanel in Delphi 7 if a breakpoint is set within the dock panel OnDock event handler ExpressNavBar B234038 - Customization Form - Item names cannot be edited if the 'uses' clause includes the dxNavBarAdvancedCustomization unit ExpressPageControl Q488278 - TcxPageControl - The Properties.TabSheetClass property setting is ignored in a page control docked to a control using its ManualDock method ExpressPivotGrid Suite Q495313 - Clicking OK within a filter drop-down window using the mouse results in an AV in certain cases B232801 - Documentation - The TcxPivotGridOLAPField.SortMode property is not described Q487923 - OLAP mode - Empty data cells are displayed when a dimension includes a large number of grouping values Q487520 - OLAP mode - The "List index out of bounds" exception when expanding a grouping value of an inner column/row field after an outer field has been hidden in the same area Q485882 - TcxPivotGridChartConnection - Row totals are included to the sdAllShown source data if the pivot grid's OptionsView.RowTotalsLocation property is set to rtlTree ExpressQuantumGrid Suite Q479920 - An AV occurs when the View navigator's information panel is resized in response to changing the panel text if the View is not currently locked for updates Q490851 - Banded Table View - The text specified via the View's FilterRow.InfoText or NewItemRow.InfoText property is not centered in the View with fixed bands Q495393 - Card View - Moving a row within a card using drag and drop scrolls the card content up to the first visible row and hides this row under the card bottom edge in certain cases Q487880 - Changing certain properties of the embedded navigator produces painting artifacts Q490502 - Chart View - Stacked column/bar diagrams incorrectly visualize negative values if the diagram AxisValue.MinMaxValues property is set to mmvAuto Q487902 - Documentation - The TcxCustomGridTableOptionsBehavior.CopyRecordsToClipboard property is not described B233429 - Server Mode - Changing the group order and then moving focus from the currently focused group row may result in an exception when debugging an application in the IDE Q488926 - Table and Banded Table Views - In-place cxCurrencyEdit - Auto sizing can be erroneously enabled via EditAutoHeight property settings Q486905 - Table and Banded Table Views - Possible vertical scrollbar issues if View includes preview sections Q491534 - The "<No data to display>" text shown in an empty grid blends with the background if certain skins are applied ExpressQuantumTreeList Suite B234886 - An expanded node displaces its vertical tree line displayed below the node image if this image is narrower than the default indent cell (the image width is less than the tree list's DefaultIndentSize.cx property value) Q492957 - The TcxTreeListSummary.Recalculate method does not recalculate the summary ExpressScheduler Suite Q486537 - The skinned Scheduler does not paint selected or dragged events that are not adjacent to the timeline bar ExpressSkins Library B234764 - Alert windows - Window corners are rounded using the Common.AlertWindow.CornerRadius additional property setting if the skin controller's UseImageSet property is set to imsAlternate Q485324 - ExpressVerticalGrid - Row header text is unreadable when exporting grid content if certain skins are applied ExpressSpreadSheet Q489485 - An AV occurs when saving an Excel document with a workbook containing more than 170 sheets ExpressTile Control Q490110 - The Back button and the title glyph have an incorrect vertical alignment within the Tile control's title if the glyph is taller than the title text Q488443 - The 'Control has no parent window' exception is raised when clicking the Back button on a tile detail page if the tile control is located on a form whose FormStyle property is set to fsMDIForm B233640 - When dropping a tile item to a new tile group, the tile item is immediately displayed in this group before transition animation B233675 - With certain Tile control's OptionsView.IndentVert settings, a detail page control overlaps the Tile control's title if the title glyph and text are not specified Common Libraries ExpressEditors Library B217390 - All drop-down editors - If the native painting style is applied, the first click on the down arrow button does not open the drop-down window that was closed using the keyboard B231657 - All TcxCustomDropDownEdit descendants - A drop-down window may appear detached from its editor to prohibit this window from crossing monitor edges on a desktop that spans across multiple monitors Q488933 - cxDateEdit - The variant value conversion exception is raised when posting a valid editing value if the Properties.EditFormat property is set to "mm.yyyy" and the Properties.MinDate/Properties.MaxDate range is specified Q490912 - cxMaskEdit - The editor does not accept non-Latin characters if the Properties.MaskKind property is set to emkStandard and the mask contains the 'L' character S171163 - cxTrackBar and dxZoomTrackBar - The change buttons remain enabled in a disabled editor Q493102 - Documentation - Incorrect default values of the TcxShellOptions.ShowToolTip and TcxDlgShellOptions.ShowToolTip properties B233815 - In-place cxProgressBar - The Font style applied via the OnGetContentStyle event only to specific records is erroneously applied to all records B234191 - Linking shell controls does not synchronize their root settings Q372947 - TcxEditRepositorySpinItem - The Properties.ValueType property is initialized with vtFloat rather than vtInt that is used in cxSpinEdit controls Q488183 - TcxShellListView - The OnDblClick event does not fire if the Options.AutoNavigate property is set to False Q493416 - TcxShellTreeView - Changing the Options.FileMask property value collapses tree view nodes Q493642 - TdxShellBreadcrumbEdit control allows entering a path of the existing folder that is not a part of the currently selected Root folder when running on Windows XP Q491045 - The TcxBrowseFolder.bfNetHood enumeration value erroneously corresponds to Network Neighborhood rather than to My Network Places ExpressLibrary Q492107 - A JPEG image loaded from a stream and then cloned by the TdxSmartImage.Clone method is incompletely painted by TdxSmartImage draw routines Q488736 - An AV occurs when closing an application with a statically linked DLL file that contains one or more DevExpress controls if the native painting style is applied Q489278 - Changing the dxFormatSettings.ThousandSeparator property modifies the dxFormatSettings.TimeSeparator property in error Q487518 - Export - Exporting special characters (&, ", <, or >) in the Korean(Korea) locale makes the resulting XLSX file unreadable

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值