This is a 3D Engine written in C++ using DirectX 9. It can be used as a base for those learning about DirectX or extended to make a game. It is distributed as a 3D chess game but can easily be altered to fit different purposes. NOT A COMPLETE GAME!!!
Be the first to post a text review of 3D Chess. Rate and review a project by clicking thumbs up or thumbs down in the right column.
Right now the code won't do much other than display the board. The mouse cursor will let you select pieces by left clicking.. and if you hold down the right mouse button, you can move the white queen with W,A,S,D. Moving right moves faster than moving left... I will fix that in the next release.
I realized after I posted the code that there was some important information missing. I put a lot of this in this news section but realized it really should be in the readme. This file release is the exact same code... only the readme file has changed. It now includes the copyright information as well as information about changing the screen resolution and the fact that the chess logic is incomplete and not tied to the engine at the moment.
I forgot to mention.. and will add to the readme in the future.. that you need to change the main.cpp file to fit your screen. I generally ran it on a widescreen monitor at 1440x900. If your monitor doesn't support that resolution.. I don't know what will happen.. maybe crash? Anyway.. just change "deviceWidth" and "deviceHeight" in Main.cpp
I forgot to mention.. right now the chess logic is not actually tied to the graphics logic. I wrote this a long time ago when I was just a budding programmer so please don't be upset by the chess logic code. My long term goal would be to get the whole thing working one day... but I am not sure what kind of timeline exists for that. Right now.. if you start the program.. it will simply show the board and I believe you can move closer or further from the board if you hold the right mouse button down and hit "W" or "S". I will probably add all of this to the readme and show how to use the input code to do what you want. But for now.. I just wanted to get the code on up here.
So I worked with this code a number of years ago. It is not perfectly clean and I am not sure if it will run on all platforms. As mentioned before.. the shadow map code requires 2.0 shaders. I changed the code to check if they are present and if not, they shouldn't be used. I do not however have a computer that does not have at least 2.0 shaders so I have not tested this. A second note is the copyright. I was heavily influenced by the code from the book "The Zen of Direct3D Game Programming" by Peter Walsh. In fact, this was my introduction to DirectX programming. It is no longer in print, but if you are interested in the design choices in the code, this book would be invaluable. Since so much of the engine code was influenced by Peter Walsh's code, I have put all of the engine code files under his copyright. The only problem was that the copyright notice in his code is very tricky to quantify... here was the copyright from his code: // Author: Peter Walsh //Copyright(C) 2001 Peter Walsh and Prima Communications // Use this code as you see fit but give me some credit if you use loads of it in your own projects:) So... I went ahead and released the code with the same copyright but under a BSD license. All I am requiring is that others list him as the author so that he gets credit. I am not sure how kosher this is.. but his copyright message seems to give me full rights to do with it as I please and he wants me to give him credit if a large amount of it is used. So... I am simply trying to enforce his name being attached to it. Anyway.. if someone out there is planning on releasing this code as a commercial item and you don't want to get sued.. you might want to check with him. It seems that you are fine no matter what according to his copyright.. but you should consult your own legal resources. So with all of that aside.. I think that this engine is pretty nice to start learning about DirectX programming and play around with the API. Enjoy!
I worked on this project a number of years ago. I have never distributed it before so it will be interesting to get feedback. I wrote it on a computer that had DirectX 9 with 2.0 shaders. I put some code it to use the shaders if available to put the shadows in the scene using a shadow map technique. I believe that it won't use the shadow map if your card does not support 2.0 shaders. I have however never tested it on any other computer so I am not really sure what will happen. Currently, the source code is a little jagged on the edges so I am going to clean it up a bit over the next week before I post the code. The engine is meant to be pretty simple to use and to be used as a stepping stone from basic tutorials to a full blown engine. It does not do many things that other engines out there do. It is meant to aid a beginning directx tinkerer learn about a 3D engine. I will post more over the next week : )
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?