Skip to main content
GameDev.net gamedev.net
🔒 Locked

Need C++ DX small environment program/code

Started by sysop1911 Dec 23, 2011 at 12:42 AM 6 replies 1.6k views
Original Post
sysop1911
sysop1911
Does anyone have or know of a program of a basic 3D environment (in C++ w/DirectX) of a 'room' with a few objects in it as well as a user-controlled object that can move through the room? The room could be very small relative to the size of the user-controlled object (UCO). The other objects in the room would be basic things like a ball and a box that the UCO could move. This should not be hard to program, like a very basic 'game'. The graphics quality is not important. Is there a program w/ source code out there for this? And 'no', this is not for a homework assignement. Thanks.
Tosh777
Tosh777
I am not quite sure of your knowledge of directx with c++, but in my opinion it is not an easy stuff. Do you want to fully learn directx with c++ or just to test something?
21st Century Moose
21st Century Moose
Look at some of the samples in the SDK; many of them are exactly what you want.
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 
sysop1911
sysop1911

I am not quite sure of your knowledge of directx with c++, but in my opinion it is not an easy stuff. Do you want to fully learn directx with c++ or just to test something?


Primarily to test something, although, as a secondary goal, I would learn from it. I know some C++ and have tried a couple directx programs, but could not get even a 3D object on the screen. I think it was the book I was using (Beginning DirectX 10 Game Programming). Even when I copied the program right from the CD that came with the book, the program did not work, even though the 2D object-creation exercise in the book just before the 3D object exercise worked fine.

For anyone who has a solid knowledge of C++ w/DirectX, the program I want should not be difficult at all, in fact, someone who has this knowledge probably already has this kind of program sitting around somewhere. Do you have the ability to do it? Really, it's just a simple, small 'room' that a user can navigate through (in 2 dimensions only, x and y) with a couple objects that can be moved by the user. But, of course, I could still be wrong about the simplicity of this, but it seems like this would be a basic learning step for someone programming C++/DX.
sysop1911
sysop1911

Look at some of the samples in the SDK; many of them are exactly what you want.


I'll look through the SDK. You (or anyone else reading this) wouldn't happen to know the sample number in the SDK with this program by chance, would you? Thanks.
Tosh777
Tosh777

well using directx with c++ is not an easy thing and i can point you out at http://d3dcoder.net/.
there you can find some free source code, starting with the basic things.(in the books menu select book and then source code part stuff)
Of course it will be nice to buy one of frank books, they are really amazing and i learned soo much from them, especially from the shader approach book.
Frank covered almost every aspect that one new learner would need in his game, so i think that with some dedication you will reach your goal.
But, if you need do to some game fast, just take one free engine or XNA and dont bother with directx with c++.

sysop1911
sysop1911
I checked out that website and will probably get one of those books and see if I can do this project on my own. Thanks.
Jason Z
Jason Z
You could give Hieroglyph 3 a shot - it is the framework that we used for our D3D11 book, and provides an "Entity" level manipulation. If you shoot me a PM, I could probably throw together a program to get you started...
Jason Zink :: DirectX MVP   Direct3D 11 engine on CodePlex: Hieroglyph 3 Direct3D Books: 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.