Sunday, April 8, 2007

Networking Part 4

I've decided to implement what I have so far into the engine, and make the GUI the actual start up place of the program. That way I can not only test to see if the networking socket code works but also keep this ball rolling with solid development. I also want to be able to start a game at the press of a button, just like it would if was starting the game with other opponents, but in that case the host might press the start button and it sends out a message to all clients that starts their selected game (thats a good idea, ill probably implement that... I know just how to do it too :D). Below is a picture of how the GUI looks right now.


If the player hits the "Start Game" button I want it to start a new GLDisplay, but if I close that one I want to be able to run a new one straight after it with out any problems. I think with the current setup and utilities I implemented this shouldn't be a problem.

I did a bit of extra coding in the networking part, just to check out what was going on when I triggered an event. Everything seems to working as expected. I will have to update it later so it doesn't send a trigger event back to client, but that is basic stuff at the moment and can wait.

I also put this diagram together, its a mix of a data flow diagram and a decision tree? I made it up just to help explain what occurs in the networking side of the engine.



I should probably dive deeper into some of those processes so that it makes more sense. Maybe I'll do that later, for now I'll go back into sorting the structure of this engine so it is more modular and extensible. Pete started making a few changes and moving a couple of functions around, he suggested that we make the Engine an abstract class and have the actual game class/object extend off it, which makes sense (I'll post more on that in the next blog).

No comments: