background preloader

Video Game Development

Facebook Twitter

Game Maker Resources. Game Design. Game Development. Beginning Game Development Part X –Direct Sound Part III. Audio audio = new Audio(); audio.Open("AudioFileName"); 2.

Beginning Game Development Part X –Direct Sound Part III

Call the Play method. 3. While playing an audio file you can pause it and then resume it by calling pause and then play. 4. 5. There is no looping built into the Audio class, but the class exposes an Ending Event that we can hook into the loop the audio. private void _audio_Ending(object sender, EventArgs e) audio.Play(); Another neat feature of the Audio class is the ability to open an audio file from an URI rather than a file name. Beginning Game Development Part IX –Direct Sound Part II. Previous Articles: New Game Loop In a number of post it was pointed out that the game was not running as fast as some of the DirectX samples.

Beginning Game Development Part IX –Direct Sound Part II

The reason behind this is that the game used an older and less efficient version of the game loop. Let's go ahead and change the code to use the new game loop based on this blog by Tom Miller. First create a new class called NativeMethods and paste the Message struct and extern method declaration into it. 1: using System; 2: using System.Runtime.InteropServices; 4: namespace BattleTank2005 6: class NativeMethods 8: [StructLayout ( LayoutKind.Sequential )] 9: public struct Message 11: public IntPtr hWnd; 12: public uint msg; 13: public IntPtr wParam; 14: public IntPtr lParam; 15: public uint time; 16: public System.Drawing.Point p; 19: [System.Security.SuppressUnmanagedCodeSecurity] // We won't use this maliciously 20: [DllImport ( "User32.dll", CharSet = CharSet.Auto )]

Beginning Game Development: Part VIII - DirectSound. Welcome to the eighth article on beginning game development.

Beginning Game Development: Part VIII - DirectSound

We have spent a lot of time working with the graphics capabilities of DirectX. We also covered how the DirectX API allows us to control input devices. Now we are going to look at another facet of DirectX, the ability to control sound devices. Beginning Game Development: Part VII –Terrain and Collision Detection. Welcome to the seventh article on beginning game development.

Beginning Game Development: Part VII –Terrain and Collision Detection

In the last article, we covered how lights and materials can add realism to a scene. We also discussed how to create a terrain from a heightmap, and finally added fonts to the application. Beginning Game Development: Part VI - Lights, Materials and Terrain. Introduction Welcome to the sixth article on beginning game development.

Beginning Game Development: Part VI - Lights, Materials and Terrain

Last time I promised we would discuss lighting, terrain building and collision detecting in this article, but there is enough information in terrain building alone to cover multiple articles and the same holds true for collision detection. So instead, I am going to cover Lights and Materials and give a very basic introduction to terrain building in this article, and go into more depth about terrain building and collision detection in the next article. Before we start, let's do the obligatory code cleanup, incorporating all the feedback I received. Beginning Game Development: Part V - Adding Units. Beginning Game Development Series Welcome to the fifth article on beginning game development.

Beginning Game Development: Part V - Adding Units

At this point we have a working 3D environment and can manipulate the camera direction and location using the keyboard and mouse. In this article we are going to add 3D objects to the game using predefined mesh files and implement some simple culling. Code cleanup The cleanup in this article consists mainly of fixing the navigation keys and removing some items we no longer need. Replaced the radian/degree conversion methods in the Camera class with the utility classes in the Geometry class.

IDispose You may have noticed that some of the classes, such as the Keyboard and Mouse classes, implement the IDisposable interface. The Dispose pattern in .NET is intended to be used when a program makes use of resources that are not managed by the .NET runtime. You can read the topic mentioned above to get more background information on this pattern and garbage collection for .NET. Units Generics Visual C# Mesh. Beginning Game Development: Part IV - DirectInput.

Beginning Game Development Series Welcome to the fourth article on beginning game development.

Beginning Game Development: Part IV - DirectInput

In this article we are going to cover the input device portion of DirectX, called DirectInput. Using DirectInput you can control joysticks, a mouse or the keyboard. Before we start I need to cover a couple of items that were brought to my attention via feedback from the readers (thank you everyone for taking the time to do this) and changes not directly related to the items covered in this article. Beginning Game Development: Part III - DirectX II. Introduction Welcome to the third article on beginning game development.

Beginning Game Development: Part III - DirectX II

In this article we are going to cover some of the more advanced DirectX principles such as transforms, matrices, culling and clipping. Before we start, I need to cover a couple of items that were brought to my attention via feedback from the readers (thank you everyone for taking the time to do this) and changes not directly related to the items covered in this article.

Code Cleanup These changes have already been integrated into the code for this article. I updated to the June 2005 version DirectX SDK. Visual C# // force the window to a standard size// the provides the correct aspect ratio of 1.33this.Size = new Size ( 800, 600 ); Visual Basic 'force the window to a standard size' the provides the correct aspect ratio of 1.33Me.Size = New Size(800, 600) Beginning Game Development: Part II - Introduction to DirectX. Introduction Welcome to the second article on beginning game development.

Beginning Game Development: Part II - Introduction to DirectX

In this article we are going to cover the basics of DirectX. DirectX is a multimedia API that provides a standard interface to interact with graphics and sound cards, input devices and more. Without this standard set of APIs you would have to write different code for each combination of graphics and sound cards and for each type of keyboard, mouse and joystick. DirectX abstracts us from the specific hardware and translates a common set of instructions into the hardware specific commands. Like all new tools, DirectX has a number of new terms and definitions that you need to understand. DirectX Overview. Beginning Game Development: Part I – Introduction. Part I – Introduction Welcome to the first article of an introductory series on game programming using the Microsoft .NET Framework and managed DirectX 9.0.

Beginning Game Development: Part I – Introduction

This series as aimed at beginning programmers who are interested in developing a game for their own use with the .NET Framework and DirectX.

Books & eBooks

Game Theory. Video Game Development. Video Game Development.