Terrain

posted in Ubik
Published August 31, 2006
Advertisement
I Bought Introduction to 3D Game Programming with Direct X 9.0c: A Shader Approach by Frank Luna a couple weeks ago and have to say it's excellent. It's making my transition from OpenGL to D3D very pleasant.

I've only got a few complaints about the book, and they are rather minor.
1) The author uses C style casts rather than C++ style casts.
2) The level of const correctness could be higher, Luna largely only uses it when passing references to a function (while I tend to make any function parameters that won't change const - I like the "design by contract" philosophy).
3) The use of global variables in all the example programs. Though considering that this is an introductory book showing you how to use DirectX, not how to make an actual game - this is perfectly acceptable (and the examples would be a bit more complex without them).

Other than that, I have to repeat that it's a great book. I had previously been exclusively using the fixed function pipeline with OpenGL. I thought shaders were intimidating so I hadn't spent much time with them, but it turns out they're actually easy to write/use. The book introduces them at about page 200, then continues with them for the next 400 pages, with a lot of practical demos.

Anyways, now that i've finished reading the book i've started working on a simple game. I've got a basic framework set up, and here's one of the first scenes i've made.



Just a simple heightmap with a sky cube for the background. When you load the heightmap it's split into a number of cells, each with a bounding box for frustum culling. Probably will use some sort of spatial data structure at some point to make culling more efficient, but for the time being there aren't enough terrain cells to give it much of a speedup. You can also walk around the terrain and the camera's altitude follows the terrains. I also haven't implemented the triangle/vertex count yet (probably do that soon).
Previous Entry IRC
Next Entry max
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

XNA

1568 views

...

642 views

Physics demo

1292 views

Console launch...

1126 views

New project

1487 views

b day

1143 views

Source control

1316 views

More on Inform 7

1096 views

Logging

1244 views

Lines of code

1310 views
Advertisement