A Simple 3D Room made with DirectX and C++

Today, while messing around with an old backup disk, I found a DirectX 9 project I made back in 2005. It is an application that renders a 3D room and allows the user to navigate inside it in first person camera. I developed this application to test a 3D engine I was developing at the time. The video below shows the 3D application in action.

I will just share the main file module of the project. To get the rest of the 3D engine files, consider following me on twitter or facebook, or ask in the contact page. Don’t hesitate to leave a comment if you a have a doubt or suggestion.

How it works

You navigate in the room using the arrow keys. The possible moviments are:

Move forward/backward

Move left/right

Strafe left/right

Look down/up

I developed the application using C++ and DirectX 9. The application is based on a 3D engine I was developing at the time. The main aim of the engine was to facilitate the creation of windows applications and at the same time make easy the creation of cool 3D games. The engine facilitated setting up DirectX, playing sounds and music, loading 3D models, creating worlds, and making navigations in first person as well as in third person (just to name a few).

The Code

The main module is divided in two files: main.cpp and main.h. Below is the code for the main.h file.

16 Comments.

wow… you do know a lot of languages o.o…
despite the fact that it looks like another screensaver… and that im afraid of direct X xD… well… its a pretty nice work >w<
you know?, i whink you could make great things if you focus on a single project and, why not? some money too xd

Hello Fabyola. Thank you!
The main purpose of this site is to give back to the community from where I have learnt a lot (and I am still learning).
I do have other projects that are more inclined to $$$. Anyway, if you have any idea or want to partner me with I am open.

Dude!!!
Its just awsome!
I am a beginner in game programming.
And I use python & pygame for that(Sorry, no c++ % directx & stuff).
So if you have some spair time, please please convert this (cool) 3d room project to python.

Very very nice room, and the code is easy to understand. I hope I am as near as good as you. By the way, do you still have the full engine. I would like to compile and play with until I can learn a lot of things in directx and also learn other people’s style of programming.

Hello,
I Am a begginer in both C++ and 3D world. I am amazed after looking into this project(3D room). I am so excited to create a simple 3D room with objects in it. Could you please guide me in doing this.