Today I set up the CVS for the Pool project.
-- JonathanSamples - 17 Apr 2004
Today I wrote up the design document and fine tuned the user interface for the pool game from
the left over interface from the Golf game. I am going to change the cue ball's starting position so that scratching will work.
-- JonathanSamples - 19 Apr 2004
The interface works now. I also got the pool cue working correctly including an animation so that the pool cue draws back as the power bar increases. I also put a sky box in today. we want to have a bar scene but I couldnt find any so I used a sunset for now. I am pretty happy with it, it looks good.
-- JonathanSamples - 25 Apr 2004
Didnt do much just figured out the arrangement for the balls in the rack. And put it in the constructor so when the room is created the balls will go to their default positions.
-- JonathanSamples - 27 Apr 2004
Had to debug the input code. For some reason we are using side effects in the input file so when joe decided to initialize the number of triangles to 10 before passing it to the function we ended up with a triangle count of 10 more than we actually had so we were getting null reference exceptions. Now, we set num to 0 at the begining of the input function so no more problems.
-- JonathanSamples - 29 Apr 2004
Today I tried to debug the ball collisions. I found the reason why only one ball would move at time, it was because we were doing a whole timestep for the first ball and then not reseting the timestep fot the next ball. So it had to wait until the ball did not need moving before the next ball could move again. kinda dumb. That is fixed. I am still not sure if our algorithm is correct. But at least we have something now. I found another problem: for some reason some collision has a 0 normal vector which causes an assert to fail. I dont understand why there is a 0 normal vector, there shouldnt be. In any case...
Woohoo, we have rolling! Here ye here ye, the balls no longer float across the felt, now they roll. It does not look perfect but it is certainly adaquate for the game.
-- JonathanSamples - 01 May 2004
Spent all morning trying to get lighting to work. It doesnt really work at all. It is in place, I believe, but it doesnt work in any shape or form. I am gonna try and get some help from Z. I added a couple key strokes for enabling and disabling lighting so that the other guys dont have to deal with the stupid lighting crap.
-- JonathanSamples - 02 May 2004
Went to talk to Z about lighting, and the weirdness with the balls shrinking when the balls rotate. Well she immidiately knew the problem with the shrinking balls, it was that I was trying to rotate the ball around a 0 vector, and that has undefined results so we got shrinkng. That was easily fixed. I went to talk to her about lighting. We got the basics working correctly, so we got normal shapes to light with diffuse and ambient but she was having a hard time getting textured objects to get any lighting. But Low and Behold adam puts in one line of code and now we have specular lighting on the balls which makes it look 100 times better.
-- JonathanSamples - 03 May 2004
Today, I enlarged the balls to go with the size of the table that we are using. I noticed some weirdness with the lighting. Whenever we use the play table, meaning the one without textures of pockets the balls have a nice spec, but when we use the other one they have a very bland spec or maybe its no spec. I dont know whats up with that. I also fixed the ball positioning function so that it is more easily changable. Now its based on the radius so that if we feel like changing it we can without screwing up the ball's positioning. I am looking at doing some text and shadows tonight.
-- JonathanSamples - 04 May 2004
implemented pockets. For the time being, the pockets are just limits on the table where if the ball gets beyond that it considers them sunk, so if for some reason a ball goes through a wall or over a wall then it will think that it has been sunk. I also tryed to debug the walls stickyness. At first I looked at the normals that were being returned from the collisions with the walls and sometimes they were normals that pointed into the walls themselves, so I tried to hack it by checking which wall it was and then adjusting the normal accordingly, but this didnt fix it. Adam had to go in and do something else, I am not sure exactly what he did. We think the stickiness is caused by the doubling of the triangles in the table model.
I also implemented a reset function that resets all of the balls positions for the current game. Also, made a 9-Ball rack so you can play nine ball if you want. When a ball is sunk it is then replaced outside the table at the front end so you can see what has been sunk. I also implemented two new camera modes: one for an overhead view that is not locked onto any ball and one that is for the intro that is just way zoomed out and looks at the backface of one of the skybox rectangles. And I put an intro screen texture on that face. When it is the intro screen all other controls are locked until the player presses the spacebar and then the camera changes to the hitting view. Going along with pockets I implented a scratch function for the cue ball that places it back in its starting point unless there is another ball in the way in which case it searches for an appropriate point to place it. Unfortunately you do not get to pick where the ball is place like in normal pool but...
-- JonathanSamples - 06 May 2004