vrijdag 7 december 2012

The Fellowship of the Game

Two things can be concluded from the title of this post. One, we're starting to become a real strong team, and two: Our plans are getting more and more concrete. But it took us a long way to get to this point!

We started off with a meeting the other day. We all drew our vision of the game on a paper and compared the results. Turned out our ideas were quite far from each other. Everyone gave a little "presentation" of their individual games. We combined the best parts of every game into one game that will be our final product. (Unfortunately the rabbit didn't make it through the voting process)
Everyone had different perspectives of a Tower Defence, so first we had to get that straight. Some of us had a view of Tower Defence like Age of War (http://www.maxgames.com/play/age-of-war.html). Which is obviously wrong, shame on you!

After we have gotten rid of this little synchronization problem we started planning our structure. How will we set up our server? Are we going for a Team Fortress 2 style server setup (distributing the server software and letting people host for themselves) or are we going for a Dota 2 server setup (one master server that assigns you to a game-server). We have decided to go with the TF2 server architecture. Mainly because it's easier for us, and it doesn't require a master server to be online 24/7.

From that point things started rolling! At our next meeting we went through some minor (but necessary) things. We decided that we would use a library for the GUI/HUD, since a TD has plenty of HUD elements, and writing them all by ourselves would take hours. That same day we came across RuminateGUI and without any further doubts we implemented it. It took us some time to get it working, but that time will really be worth it, we can now make HUD elements within a matter of minutes!

Things didn't work out as expected though. The GUI library was designed to have only one GUI per game, but our game already has 3 different GUIs, one for each state (Main Menu, Multiplayer Menu, and the Game Lobby). This caused some strange behaviour that we needed to fix. We only found the source of the problem this Friday, three days after the first encounter with the bug!

Speaking of source... Let me show you what we've got already!
Since we're focussing on functionality rather than appearance we've already got quite some things to show you! (They're just not that pretty...) First on our list: The server! It's output might not be that exciting, but "behind the scenes" there's a LOT going on!

The server window showing one connected player. There's this strange error though...

Then there's the main menu (not really special, just a "Play" and a "Quit" button). Not worth screenshotting ;)
From the main menu players can get to the multiplayer menu, a screen where one can fill in his/her desired name, server IP-address, and press connect. The magic starts happening when that connect button is pressed, let me guide you through the wonderful world of handshaking...

The player presses connect and so asks permission to join the server. The server checks if he (yes, the server is very manly!) has free slots and if he does, he replies with a warm welcome. If not, the server tells the player that he/she's not welcome. Lets assume the player gets the welcome message. The game will now show a lobby screen, where players (will eventually be able to) chat, and wait for the lobby to be full. When all slots are occupied the game starts!
But wait! There's more! How do players in the lobby see each other? The welcome message isn't only a welcome message, it's also an introduction to everybody that's already in the lobby. (Just like a Christmas dinner over at your girlfriends parents place, with lots of people you don't know, where your girlfriend welcomes you and introduces you to her family. The only difference is probably that you're not as nervous when entering a lobby as you are for this Christmas scenario).
But how do all the people in the lobby know you're there?  Well, the server broadcasts a message to everyone informing them of your arrival (Imagine your girlfriend saying: "Hello everyone, this is <insert name here>"). Lucky for you, this lobby has a big shiny "Disconnect" button, so if you don't like the people in there you can get out of there within a matter of seconds. (A feature every real-life activity should have... ;) )

The game lobby as it is on Friday (07/12/12), Everything that's red was added later with paint. As you can see this is a lobby for 2 players. One slot is occupied.





Geen opmerkingen:

Een reactie posten