HalfTanks

HalfTanks, a game for the Networking assignment by grp (gregory Pitts) Some code pilfered from nest and the examples of socket code given out in class.

Goal

My game is called HalfTanks because it is a tank like shooter game, except there is a catch. You only control half of the tank and your opponent controls the other hald. What I mean by this is that when you control the cannon, your opponent controls the vecicle movement and vice versa. use the arrow keys to move around or move your cannon. if you are a red ball, then you are the moving player. if you are green you own the cannon. your opponent can control where you move, but you need to try to shoot the blue bricks on the far wall. the small line is the aim. the aim turns purple when it is on target. make sure both clients are connected before you press any keys or else the game will freeze up. also, the server program needs to be restarted before you can rejoin, so if you accidently press a key before the second client is in then restart. also, the server address needs to be hardcoded in. it is in the last function in Play.cpp.

Method

There are only two clients allowed. each client has a player number. when it is someones turn, then they will be either allowed to move the cannon or the vehicle. the same keys will move both devices. basically, i had to have a whole lot of checks to see if you were the current player or not. both players were given the same view. i experimented with a arching shot into another players tank, but it was far too difficult. not enough viewing and when the other player could move your view around it was difficult.

Novelty

I have played tanks before, but I have never played where your opponent could move your tank around. Although it isn't exactly tanks (you are shooting the blocks on the wall) it is close enough to have know what the game is modeled after.

Results

Overall, the game turned out alright. it is probably my most fun game although it lags pretty bad. I really wanted to create a real time game as opposed to a turned based game but with all tjhe key presses it tends to get backed up. I was toying with the idea of making it a real time tanks game where your opponent moves and you try to hit an arch shot but like i said before, too difficult. I also wanted to make powerups to collect. this would add an interesting factor, especially if the powerups were close to the wall you were shooting at. this would make the moving player want to go closer to the wall, even though it may give the opponent an easier shot. the networking could be vastly improved because of the lag time, but i am far from a expert on the topic (havent taken any networks classes). i