Mega Hovertank Wars

designdevgames

We built a full 3-D multiplayer tank game as our final project at Texas Tech

This was my final project at Texas Tech for Senior Project Design. The point of the game was to test the limits of next-generation web-standards, notably WebGL, WebSockets and HTML5. You join a game and then shoot other tanks with large spinning cubes until only one person remains. The game is networked so you are playing against other players through your browser, though that browser seems to be only Firefox 3.7a (Minefield) at the moment. The team was Timothy Poon (Networking, PHP Guru-ing), Trevor McKeehan (Networking, QA Testing), Richard Mauldin (UI, QA Testing), and myself (Graphics, UI). Initially I wanted to get to Beta within a month and do extensive user testing to get the gameplay right, but the graphics side was plagued with troubles and I ended up having to port the Canvas-2D based engine to WebGL two weeks before the project was due. It ended well though, and testing it was a lot of fun.

Initial prototype of a cube

I did this as a proof-of-concept over the Christmas break. The hope was to make a 3D engine in Canvas2D, though that turned out to be more difficult than I had anticipated.

3D models, but with polygon ordering issues

This was an optimized version of the engine, I split off the math routines into a seperate file and while the first engine was array-based, I switched to objects to improve performance. Polygon-sorting issues plagued development, and everytime I thought I had the problem solved, two more errors would pop up to take its place. I eventually had to give up on Canvas2D due to the lack of a Z-Buffer.

3D Tank battle

This is the final build using WebGL, the code was initially ported over the course of about four days. I did an experimental engine after the port, to see how texturing would look, but I was left with a tradeoff of loading times versus quality, eventually I chose to go with quasi-procedural textures (gradients basically). The experimental engine (Build-X) did have better shader integration and object-orientation, so I took those parts from it and merged it with the original port. The code came out fairly clean and fast, and combined with the networking code without a hitch.