.NET Game Programming with DirectX 9.0 P2

Chia sẻ: A Ly | Ngày: | Loại File: PDF | Số trang:20

0
185
lượt xem
44

.NET Game Programming with DirectX 9.0 P2

Mô tả tài liệu
Download Vui lòng tải xuống để xem tài liệu đầy đủ

The authors of this text show how easy it can be to produce interesting multimedia games using Managed DirectX 9.0 and programming with Visual Basic .NET on Everett, the latest version of Microsoft's Visual Studio. Table of Contents .NET Game Programming with DirectX 9.0 Foreword Preface Introduction Chapter 1 Chapter 3 Chapter 4 - .Nettrix: GDI+ and Collision Detection Figure .Netterpillars: a screen into 64 zones Chapter 2 - 1-17: DividingArtificial Intelligence and Sprites

Chủ đề:

Bình luận(0)

Lưu

Nội dung Text: .NET Game Programming with DirectX 9.0 P2

4. Extending the Game Programming with DirectX 9.0 Dimension .NET Algorithms to Add a Third by Alexandre Santos Lobão and Ellen ISBN:1590590511 Hatton There are many advanced algorithms for 3-D collisions described on game-related sites all over the Apress 2003 (696 pages) Internet. We'll not stress©the many implications on including a z axis in the collision detection algorithms; instead we'll just The authors of thisextensionshow easy it can bealgorithms. add some simple text show to the preceding to produce interesting multimedia games using Managed DirectX 9.0 and programming with Visual Basic .NET on Everett, the latest Extending the bounding box algorithm is very straightforward, as shown here: version of Microsoft's Visual Studio. If object1.x The spheres don't collide!!! end if The last proximity test is used for 3-D diamond-shaped objects: Distance = math.abs(Object1.CenterX - Object2.CenterX) + _ math.abs(Object1.CenterY - Object2.CenterY) + _ math.abs(Object1.CenterZ - Object2.CenterZ)
5. If Distance < Object1.width + Object2.width then .NET Game Programming with DirectX 9.0 => The 3-D diamond objects are overlapping by Alexandre Santos Lobão and Ellen ISBN:1590590511 Else Hatton => The 3-D ©diamonds don't collide!!! Apress 2003 (696 pages) end if The authors of this text show how easy it can be to produce interesting multimedia games using Managed DirectX 9.0 and programming with Visual Basic .NET on Everett, the latest In the next sections we'll of Microsoft's Visual Studio. version see how to apply these theoretical ideas in a real game project. Table of Contents .NET Game Programming with DirectX 9.0 Foreword Preface Introduction Chapter 1 - .Nettrix: GDI+ and Collision Detection Chapter 2 - .Netterpillars: Artificial Intelligence and Sprites Chapter 3 - Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+ Chapter 4 - River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio Chapter 5 - River Pla.Net II: DirectInput and Writing Text to Screen Chapter 6 - Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow Chapter 7 - Magic KindergarteN. II: Animation Techniques and Speech API Chapter 8 - .Netterpillars II: Multiplayer Games and Directplay D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to Chapter 9 - Nonmanaged Code Bonus Chapter Porting .Nettrix to Pocket PC Appendix A - The State of PC Gaming Appendix B - Motivations in Games Appendix C - How Do I Make Games? Appendix D - Guidelines for Developing Successful Games Index List of Figures List of Tables
8. TYPE NAME Game Programming with DirectX 9.0 .NET DESCRIPTION by Alexandre Santos Lobão and Ellen ISBN:1590590511 Method Down Hatton Makes the block go down on the screen Method Apress © 2003 (696 pages) Right Moves the block right The authors of this text show how easy it can be to produce Method interesting multimediathe block left Managed DirectX 9.0 and Left Moves games using programming with Visual Basic .NET on Everett, the latest Method Rotates the block clockwise Rotate of Microsoft's Visual Studio. version Property Square 1 One of the squares that compose the block Table of Contents Property Square 2 One of the squares that compose the block .NET Game Programming with DirectX 9.0 Property Foreword Square 3 One of the squares that compose the block Preface Property Square 4 One of the squares that compose the block Introduction Chapterblock is composed of fours objects from the Square class, described in Table 1-2. Each 1 - .Nettrix: GDI+ and Collision Detection Chapter 2 - .Netterpillars: Artificial Intelligence and Sprites Chapter 1-2: The Square Class Members Table 3 - Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+ Chapter 4 - River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio TYPE Chapter 5 NAME DESCRIPTION - River Pla.Net II: DirectInput and Writing Text to Screen Chapter 6 - Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow Method Show Draws the square on the screen at its coordinates (Location Chapter 7 - Magic KindergarteN. II: Animation Techniques(Size property), colored with a specific property) and with its size and Speech API Chapter 8 - .Netterpillars II: Multiplayer Games andproperty) and filled with BackColor color (ForeColor Directplay D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to Chapter 9 - Hide Method Nonmanaged CodeErases the square from the screen Bonus Chapter Porting .Nettrix to Pocket PC border color Property ForeColor The square Appendix A - The State of PC Gaming Appendix B - Motivations in Games square inside color (fill color) Property BackColor The Appendix C - How Do I Make Games?x,y position of the square on the screen Property Location The Appendix D - Guidelines for Developing Successful Games Property Index Size The height and width of the square List of Figures Comparing the two tables, we can see that there are methods to show and hide the square. Because the List of Tables squares will be drawn from the Block object, we must have corresponding methods in the Block class, and the corresponding properties too. We can adjust the first diagram accordingly to produce Figure 1-21. Figure 1-21: The class diagram-second draft We use SquareSize as the size property for the block, since it's not important to know the block size, but the block must know the size of the squares so that it can create them.