Tuesday, May 22, 2007

GUI Tweaks

Its getting pretty close to the Beta test and I haven't heard a word from Pete since last Wednesday. I'm getting a little worried he's not going to show up or help me try and get the game to a beta test stage by this Wednesday. Ahhhhhhhhhhhhhhhhhhhhh.

I updated all of the asteroid textures today, I found that they had a black border around the edge of them because when they were being loaded into memory OpenGL is using a linear filter (Anti aliasing) and causing the alpha channel and edges of the asteroids to blend slightly. I think the problem could of been solved by increasing the alpha testing, but I'm not sure what other side effects that might cause, so I just did it by hand in Photoshop.

I also updated the GUI so that it started a count down timer when the host player begins the game. Earlier when we were testing the engine, we found that having the game pop up instantly would catch people off guard or they could be in the middle of typing a chat message and the game would take the focus. So to help with the problem I got the GUI to create a new thread and count down 5 seconds, whilst having the server distribute the message out to the rest of the players.

Another little detail I discovered was that it was impossible to know when or if a player had closed his window and was ready to play again. With all the testing we have done so far, I discovered that having more than one window/instance open at the same time can cause some problems with textures and different modules. On the contrary though the game can be run multiple times giving the player several game windows, its just that the engine doesn't like having two instances of the same game on the 1 client (GUI). To fix this dilemma I modified the networking code so that when a player closes the window the engine fires a trigger off to the server notifying the server that the player has closed the window. The server than makes a count of how many players have closed their window, if all the players have closed their window then the GUI will allow another game to commence, otherwise it will inform the host player that not everyone has closed their window yet. I guess its important to make the engine/game as stable as possible and take every precaution available, just in case these things do happen.

I'll leave you with this picture of the GUI, I'm not certain if I have posted it before or not, but it demonstrates the count down timer very well.

No comments: