Game Programming

Beginning Directx 9 by Wendy Jones

By Wendy Jones

There exists a spot within the video game programming marketplace the place starting programmers are discovering themselves with out an introductory advisor. latest books specialise in the 3D element of DirectX basically, leaving readers with out a whole knowing of DirectX. in an effort to totally comprehend DirectX and the sport programming method, readers want examples that construct on earlier chapters to lead them via to the crowning glory of a playable video game. "Beginning DirectX nine" does simply that. Readers must have simple realizing of 3D math and C++. With this rudimentary event, "Beginning DirextX nine" permits readers to create a playable online game utilizing easy-to-understand examples.

Show description

Read or Download Beginning Directx 9 PDF

Best game programming books

Box2D for Flash Games

Physics video games have become an increasing number of renowned, and Box2D is the most suitable choice when you are trying to find a unfastened, reliable and powerful library to deal with physics. With Box2D you could create all kinds of 2nd physics video game, in basic terms coding isn't the enjoyable half, however the online game itself. «Box2D for Flash video games» will advisor you thru the method of constructing a Flash physics online game ranging from the naked bones and taking you by means of hand via advanced good points akin to forces, joints and cars.

The Tetris Effect: The Game that Hypnotized the World

The definitive tale of a online game so nice, even the chilly warfare couldn’t cease itTetris might be the main immediately recognizable, renowned game ever made. yet how did an vague Soviet programmer, engaged on frail, antiquated pcs, create a product which has now earned approximately $1 billion in revenues?

Successful ScrumButt: Learn to Modify Scrum Project Management for Student and Virtual Teams

Have you obvious a promising venture get deserted correct while it gave the impression of it was once on the point of release, or a venture that usually gave the impression of it used to be going to release "next month," yet took many months or maybe years earlier than it truly introduced? Scrum could be the strategy to such woes. it's a undertaking administration technique that, while utilized faithfully, increases the speed at which your undertaking is done, the joy your workforce has whereas engaged on it, and its advertisement luck.

GameMaker: Studio 100 Programming Challenges

Push your GameMaker programming abilities to the sting with a hundred programming demanding situations utilizing the preferred GameMaker: Studio and GML. every one problem comprises an overview of the problem, a scoring and time advisor, precious GML code, and a case in point supplied in GMZ structure. For extra complex programmers, every one problem comes with an extra activity to accomplish.

Additional info for Beginning Directx 9

Example text

HResult = CreateOffscreenPlainSurface( 640, // the width of the surface to create 480, // the height of the surface to create D3DFMT_X8R8G8B8, // the surface format D3DPOOL_DEFAULT, // the memory pool to use &surface, // holds the resulting surface NULL); // reserved; should be NULL // Check the return value to make sure that this function call was successful if (FAILED(hResult)) return NULL; Loading a Bitmap to a Surface Because bitmaps are commonly used for graphics within Windows, I’ll be using this format exclusively in the examples.

Create the Direct3D device. 3. Draw to the device. The Direct3D Object The Direct3D object provides an interface for functions used to enumerate and determine the capabilities of a Direct3D device. For example, the Direct3D object gives you the ability to query the number of video devices installed in a system and to check the capabilities of each one. The Direct3D object is created using the following call: IDirect3D9 *Direct3DCreate9( D3D_SDK_VERSION ); note D3D_SDK_VERSION is the only valid parameter that can be sent to the Direct3DCreate9 function.

This code sample shows the exact steps and calls needed to display a dialog box listing the display modes available for a particular D3DFORMAT. I took the initDirect3D function from previous examples and changed it to gather the needed information from the video adapter. bool initDirect3D() { pD3D = NULL; // Create the DirectX object if( NULL == ( pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) ) { return false; } First you create the Direct3D object. You’ll use this to access the needed functions.

Download PDF sample

Rated 4.29 of 5 – based on 47 votes