2/11/08

Alpha Worries

In my previous entry, I discussed Brandon leaving the team. His replacement was Justin, who would be the main person in charge of AI movement. He joined our team at the end of the first week of school, and it is now the start of the sixth week. Our Alpha presentation is on Thursday and the deliverables are due on Friday.

We gave Justin a week to get familiar with our code base, but because we each have defined roles, he would have to look no further than the AI module and objects. The time needed to understand the structure of the code he would be working off of would be fairly quick. Mostly we were waiting until he was granted SVN access from IT. He utilized this time by preparing a path finding algorithm. I am not entirely sure what occurred during the second, third, or even forth week, but I do remember he adjusted the way the Kudos found their targets, making them more efficient killers in the process. We all cheered in glee on that Saturday meeting.

I wasn't cheering at all this last Saturday. I do agree that Brandon's AI movement wasn't the best. Following the main character and staying apart from each other in a fluid manner worked well, very well. Starting and stopping the Kudos was an issue, and this was the main issue that needed to be repaired. We also needed to take in consideration for obstacles, yet even at this point the massive amounts of obstacles we imagined in our heads 5 months ago are severely lacking in implementation. The use of path finding at this point in our map complexity is utterly useless. The terrible thing is that Justin's path finding makes the AI movement roughly 10 to 20 times worse.

The Kudos do not move in the right direction when you command them to move to a particular location. They get stuck dancing in some seemingly random location. If you click too many times the game crashes. Selecting Kudos created memory leaks for a long time (a week is a while in my book). The AI movement is absolutely terrible.

Rant (as usual): What in the world did Justin do for 4 weeks? How did it possibly get that bad? How could it get worse than Brandon's code? Didn't we all think that Brandon was the epitome of all evil code? No. His code is the shit (the good kind) compared to Justin's. Justin's code fails at multiple levels:
  • The code execution doesn't work well. The Kudos are supposed to travel to the right when you click there, not to the left then spaz out. Making code that works worse than shit should not have taken a month.
  • The code crashes. If you select Kudos too much (a couple of times), the game will crash. This has occurred with more than the last submission by him. Something this severe should be caught and fixed right away.
  • The code has extremely awkward tabbing and returns. Sometimes lines are indented twice or even thrice than they should be. He also puts about 2-4 returns in places where there should be none at all.
  • The code has some brackets misaligned, which creates a horrible reading environment for any programmer. It's a terrible thing to think a code block ends much sooner than expected.
  • The code mixes between spaces and tabs for indenting. Matt has some settings to display a faint dot for a space and a faint arrow for a tab. Justin's code is visually disgusting. The bad thing about tabs is that the code will not be the same on any IDE.
  • The code isn't consistent. There is no method to the madness for the random number of returns or awkward indents. In some areas he has a space after the ( in a function call but none before the ). He will name file Actors.xml with an Actors root and Actor children but name the C++ struct to load the information into CharacterInfo. Also, his function for loading the Actors/Characters is called LoadCharacters. So which is it supposed to be? (I know the one that makes logical sense)


If Justin's code does not make the Kudos move and walk better than before, then I will make the executive Technical Director decision to revert back to Brandon's code for Alpha. This gives him 3 days to fix it. He was also supposed to create a stats editor for editing and creating the characters. This is what the xml files were for. Bryan knew that the movement would be most important, so he told Justin to hold off on that until after Alpha.

Bryan has actually surprised me in the last week. Before I was frustrated with him not understanding some code that he had wrote with a huge help from his roommate Sean. I have no problem with helping someone out with a programming concept or problem, but Sean seemed to hold his hand through the entire ride and tell him exactly which key to press and when. A memory leak detector that I like to use was finding leaks in his object allocator. It was a problem with placement new. I didn't know what it was or the syntax but neither did Bryan. This made me uneasy. Yet Bryan came through when updating his physics to work well. In fact it works really well. There actually feels to be resistance when the player is moving through a horde of Kudos. I got him a source that wasn't Sean or a person that would try to help him set up better physics. Bryan also wanted to expand on my UI buttons to make some graphic pop up whenever the mouse was hovering over the button. I showed him a couple of things that are particular for graphics objects in the UI, but he did most of the work and it turned out well.

I'm not entirely sure what Matt has been doing in the past few weeks. He did revamped the parser, which is actually really useful now, particularly for loading in animations from an xml file with ease. He also set up map nodes that Justin uses with his path finding. But he has been doing some odd things with triggers, which I am sort of still unclear about the special attention to. I guess because we tend to focus on our own modules, there is a lack of strong communication for the current tasks and purposes for code that other members are doing. Maybe we should do weekly or bi-weekly code reviews. The one thing that I wished Matt spent a little more focus on is the map editor. Currently it is in the relatively same state as it was on the day of our presentation of the First-Playable Prototype in December. Although somehow switching to a different tile does not work, and when you place a new tile (only in the positive x direction), another tile is deleted. It would be nice if we were able to create a nice map for Alpha.

I am also weary of the overall state of the game. I've got my bases covered with graphics and UI, although I do have to create another animation editor (or edit values manually). But I am not in charge of anything that deals with gameplay. I only display the world, the UI, and all the animations to the player. I only handle the interactions between the UI and tell the gameplay components of certain types of input that occurred. Bryan is in charge of the main character and some AI attacking, Justin's got to nail down the movement and hopefully more, and Matt's got to create the interactive world. Those three are in charge of coding the fun factor of our game. Right now the game is nothing more than one simple hard-coded battle.

I will try to be at the school for extended periods of time during this week. I want to be there for my team and help them out with anything they need. I don't want our Alpha to look the same as it did when we presented the game during the second week of school. I want it to be a least one solid level. Even if we are missing a few Kudo types, it would be nice to start and finish our forest level like normal.

No comments: