Transition to 2D Vehicles — Why and How

Tin­kerTech Derby is a pretty fan­tas­tic con­cept, but we ran into a snag. We encoun­tered severe per­for­mance issues because we were try­ing to use 3D physics engines writ­ten in Javascript for a real-time online mul­ti­player game. Not nearly enough com­put­ers are capa­ble of run­ning that game as it was with any latency present. We decided that, if we were to con­tinue with the orig­i­nal premise of the game—and we really want to, because it’s really cool!—we would have to drop the third dimen­sion to our physics sim­u­la­tion. For­tu­nately, the 2D game­play is still very fun, and the core idea remains strong.

And so co.llide rose from the ashes. With two-dimensional physics, we now had the option to expand our browser sup­port, and, want­ing to have as many peo­ple be able to play our game as pos­si­ble, we decided to go for it. This meant that our game could no longer have the 3D graph­ics that it once had, but we still wanted to keep that 3D feel even if we couldn’t use 3D tech.

After dis­cussing it with Eric, our graph­ics pro­gram­mer, he devel­oped a ‘trick’ ILLUSION that involves the use of nor­mals to give our 2D ships the appear­ance of depth, allow­ing for a sun-like light source. Con­sid­er­ing that the ships are built of dis­tinct pieces that fall off, we couldn’t very well go and use ren­ders of 3D ships fac­ing dif­fer­ent direc­tions on a spritesheet. That, and play­ers will even­tu­ally be build­ing their own. So, with Eric’s imple­men­ta­tion and my nor­mals maps, we’ve achieved a very con­vinc­ing effect.

The loss of the third dimen­sion also means that, unlike our 3 or 4 block high cars, our ships will be entirely on a sin­gle plane, requir­ing a redesign of how play­ers will be plac­ing pieces. I came up with four dis­tinct ship designs to test a vari­ety of ini­tial ideas for weapon types and thruster lay­outs. Since an edi­tor, even an inter­nal one, is a ways off, these were all assem­bled free­hand in JSON.

The 3D cars I devel­oped in Tin­kerTech Derby were approx­i­mately 5 wide by 6 long by 4 high. Even in just those 120 blocks, a lot of vari­ety was pos­si­ble. The 2D ships in co.llide have a max size of 24 x 24, or 576 cells, and, quite frankly, that’s a ton of space; per­haps even too much for allow­ing the indi­vid­ual place­ment of pieces. All that space has led me and my co-workers to the con­clu­sion that the 2D ships would be best con­structed out of pre-designed chunks, pro­vid­ing con­straints to the build process. After all, giv­ing too many options can over­whelm a player and hin­der creativity.

I will assem­ble both reg­u­lar and spe­cial­ized pieces (guns, thrusters, hull, etc) into chunks, and then make them avail­able in an edi­tor. There will most likely be a point cost asso­ci­ated with each chunk, allow­ing for a, hope­fully, bal­anced match between very dif­fer­ent ships! How this chunk sys­tem gets imple­mented is still very much on-the-drawing-board, so test­ing will be an inte­gral part of that bal­anc­ing process.

I hope this gave you a glimpse into what our next few steps toward bring­ing you an awe­some (and bal­anced!) com­pet­i­tive game are, so, despite all the tech­ni­cal dif­fi­cul­ties, look out for future demos show­ing off the com­pound chunk designs!

Mak Mendel­son

Mak is an artist at Gra­di­ent Stu­dios. He stud­ied fine arts and then elec­tronic arts, focus­ing in char­ac­ter design. He really enjoys think­ing about var­i­ous game mechan­ics and how they work together, mix­ing and match­ing to cre­ate new ones that might one day end up in an actual game. More PostsTwit­ter

Leave a comment