Thursday, December 9, 2010

Fight!

I put together a simple system for the enemy fighting/chasing AI. They constantly try to align their direction vectors with the players position, but they only have a certain turn speed. Once they are within a reasonable range of setting their sights on the player, they start shooting. It still has a couple of glitches, but it's a good start I think. For example, the enemy doesn't stop firing just because one of it's friends gets in the way!

I also fixed the shield problem we were having last weekend. It was actually a larger problem than I thought because it wasn't just affecting the shields. Things were being drawn in a weird order, regardless of what order they were set up to draw in. It turns out that there were problems with the Depth buffer because it was getting set to a value in one object that was throwing off everything that was being drawn after it.

Tuesday, December 7, 2010

Slow progress

Unfortunately, due to finals in other classes, I haven't been able to do too much work on the game. On Saturday, I worked on a weird glitch that popped up with the shields. For some reason, the enemy's shields are being drawn much more opaque than they should be, but the player's shields are drawn normally. I worked on that for a while, but then decided it was more important to start working on AI, so Felix and I talked about how to implement each AI state.

Thursday, December 2, 2010

The end is near!

We're about to start on the next and final sprint for the semester. We have 10 days to get our game feature complete, and then next semester we'll clean it up and polish it. We had to cut a few features in order to meet the deadline, but I think it's for the best. We decided to make the game more Arcade like than mission oriented, and I think it's going to really benefit from lightening it up.

Since Tuesday, I've been working on getting the radar to work correctly with no success. I even talked with my linear algebra professor to see if he had any ideas. He told me that I was on the right track, but since he didn't know how the game engine worked, he couldn't tell me how to solve a game engine specific problem.

I can project a point from 3D to a 2D plane just fine, but when the ship turns, the world orientation changes too. For example, if an enemy ship starts off in the -X direction from the player ship, turning the player ship toward it puts it in the -Z direction for the player ship, but in the world coordinates, its still in the -X direction. When the 3D coordinates are transferred to 2D, it still shows up to the left of the player ship on the radar (-X). If I try to transform the coordinates of the enemy ship by the player ship's rotation, this works until the player ship rotates in 2 or 3 directions.

For now, I'm just going to have to leave it as it is and try to figure it out after we get some AI and other important elements of the game working. I saw a radar for another game that works a little differently, and that may be the way to go if we can't get this one working.