Archived

This topic is now archived and is closed to further replies.

Checkers with DirectX!! (noob)

This topic is 5231 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I just finshed programming Bbattleship with the console, and previously, I did Tic-Tac-Toe and a Scrabble-like word game on it too. I have stuck my toe into Windows programming and have been looking at a couple of the DX8 SDK tutorials. My question is, which DirectX tutorials do I need to do to make this game? They seem focused on 3D, and Checkers is gonna be 2D, even if it is done with textures, vertices, whatever. I''m eager to get started on this project and I don''t want to waste my time or get bogged down in the wrong area of the SDK. Thanks.

Share this post


Link to post
Share on other sites
Hey! DirectX 8.0 is hard for a beginner to understand, and it gets harder when you try to use it to render in 2D! I suggest you go with a easy-to-use cross-platform library such as SDL - I haven''t used it, but its evidently very popular for 2D games programming. I suggest you look into it: www.libsdl.org.

Share this post


Link to post
Share on other sites
quote:
Original post by Cipher3D
Hey! DirectX 8.0 is hard for a beginner to understand, and it gets harder when you try to use it to render in 2D! I suggest you go with a easy-to-use cross-platform library such as SDL - I haven't used it, but its evidently very popular for 2D games programming. I suggest you look into it: www.libsdl.org.


I was hoping to write a fairly simple game that would allow me to learn the basics of Direct3D, and to run it in a window like solataire for example. If 2D games are going to be too hard, does anyone have a suggestion for a simpler game to learn the SDK with? Thanks



[edited by - hawflakes on August 13, 2003 7:50:24 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually, it''s 2D isn''t that hard in Direct3D 8.0; the hardest thing is getting textures to work right.

Basically, each rectangle is a 4-vertex object. If you send transformed, lit vertices to the renderer, set z = 0, turn lighting off, and turn of z-buffering.

The great thing about using Direct3D instead of DirectDraw is that you can access accelerated features on the graphics hardware.

Share this post


Link to post
Share on other sites
You could start with DirectDraw 7.0 (witch is available in 8.0). This is where I'm at right now. It makes it easier to learn Direct3D later on cause you know how everything is put together already. It would be better to make a checkers game in DirectDraw than Direct3D.

Edit: You can access hardware accelerated function with DirectDraw also. Mostly blitting, but thats what you need.

[edited by - brain21 on August 13, 2003 8:05:53 PM]

Share this post


Link to post
Share on other sites
even thought directx is hard to learn, ive basically learned c++ and directx 9 in a few months, like all the basic 3d lighting, meshes, vertexes etc. It is really pain staking, but if you stick with it long enough, it all comes together.

Just try learn one thing at a time, and after a bit of mixing the different elements of it, you will master many of the trivial things.

By the way skip dx8 go to 9

Share this post


Link to post
Share on other sites
I agree with JonnyBravo that you should skip DirectX8 and go to DirectX9. Also, don''t be afraid to learn this API. DirectX9 is not hard to learn if you keep an open mind.

Also, checkers should be a 3D game! You can create a couple of cylinders that sit on a flat board with the camera oriented in such a way to get the prospective viewing of the game.

I recomend going step by step through the tutorials in the DirectX9 SDK documentation. Skip down to the DirectX Graphics\Programming Guide\Tutorials Samples .. \Tutorials\ and go in order. Then anything you don''t understand, then go though the documentation and learn it. Microsoft did a good job with these tutorials! Good luck!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

A simple(graphically anyway) game like checkers could be done with nothing more then the Clear method on the IDirect3DDevice interface.

There is no need to look any farther than how to get a window open, how to create a direct3d object, and how to setup the direct3d device.

Once you get the basic gameplay working you could start looking at how to expand the graphics to 2d textured quads or even move to 3d as was suggested above.

Share this post


Link to post
Share on other sites
I created a checkers game in 3D. It isn''t *quite* finished but it''s pretty much all there. It could have been easier but I was using some overly complicated methods because it was a testbed for something else I am planning to do.

To make a checkers game, you are going to want to learn how to program the different parts before you put them all together into a working whole.

http://www.gametutorials.com/Tutorials/DirectX/DirectX_Pg1.htm is a good place to start for basic tutorials. You can also learn alot from the SDK documents and the examples that come with the SDK.

I''d start with rendering the board. You can render the board as one big quad with a checkerboard texture or you can render 64 quads (8x8), with alternating black and red (or whatever) textures. I used the latter method because I am moving toward a terrain implementation but it is unncecessarily complicated for a checkerboard. Rendering a quad is easy.

Keeping your view stationary and looking straight down at the map is the easiest implementation and is pretty much the default view you will get from the tutorials. For mine, I made it so the camera is free-floating above the board and always aimed at the center of the board.

Then I would get the checker pieces rendering. Your pieces can either be billboarded (small textured quads with some transparency) or 3d objects. I opted for 3d objects and used a .x mesh of a little robot guy.

Next I''d work on a hotseat game engine. The toughest part of your whole checkers game with be the rules and move verification system. That is where I got bogged down.

After that, I would put together the network game.

Share this post


Link to post
Share on other sites
quote:
Original post by Cipher3D
Hey! DirectX 8.0 is hard for a beginner to understand, and it gets harder when you try to use it to render in 2D! I suggest you go with a easy-to-use cross-platform library such as SDL - I haven''t used it, but its evidently very popular for 2D games programming. I suggest you look into it: www.libsdl.org.


No.

You should be able to learn the basics of DirectX from tutorialsites, (e-)books, and the DirectX SDK docs.

.lick

Share this post


Link to post
Share on other sites