Thursday, February 16, 2006

Milestone 10: Reached

So I know it's a bit out of order but I just wanted to be able to select a group of units. It currently tests every unit on the map which can obviously be optimized but it doesn't seem to be draining much right now. It's a simple min/max test on each object so there's nothing complicated. It only happens when the user is dragging a selection region.

I am going to actually base it on which side of the 2D plane the unit is on since the rectangle you see on screen maps to a warped quad in 3D and some units are being selected that the user wouldn't expect. That's also a very simple change to make which is just testing the distance of the x of the unit in comparison to the plane definining the two sides of the selection rectangle. This will give the exact results that I want and is a very easy feature to implement which I will do sometime.

As you can see, each unit that is selected has it's bounding box turned on. I also add it to a list of currently selected objects which I can use later if need be. It'll be used in things like navigation for when the user right clicks to move a group somewhere, etc. I think I may start work on getting a unit to navigate around the terrain which will be a very important feature.

Progress has slowed a lot due to midterms but once they are over, I plan on getting 100% back into development. It's been steady progress when I've had time. I'm still on track with my goals as well so that's always a morale booster.

Screenshot: 1280x768x32 - No AA - Default ATI Settings

Thursday, February 02, 2006

Scene Query

So I now have my units performing a scene query to determine where they should stand on the terrain. It works pretty well so far. I haven't bounded the edges of the map yet so the units could fall off (I haven't let them run that far yet) once they hit the edges but this is a simple bounds check that I can place in later. Also, the path finding should prevent units from moving off the edges of the map once it's in place.

I am not sure which method is going to be faster of keeping the units at the right terrain height. I am currently using the SceneQuery but I may just need to grab the terrain information, cache it, and then use interpolation along the triangles u and v directions which may end up being faster. If it becomes a problem, or if I have time, this will get implemented. As for now, it works so that's what I'm working with for now.

Screenshot: 1280x768x32 - No AA - Default ATI Settings