warning: Creating default object from empty value in /home/buckman/public_html/neo/modules/taxonomy/taxonomy.pages.inc on line 33.
Matt Barton's picture

Dev Diary 024: Two Player Dog Fight

Two Player!Two Player!This has been a rough day for me! I finally got my space duel game working with two players. That is, it worked fine in the EDITOR. However, when I made a build of it, the fire buttons wouldn't work! I spent hours looking into the input functions to no avail. Finally, I discovered the problem had something to do with the update speed of the editor vs. the build. I'm still not exactly sure what the problem was, but it had something to do with the way I instantiated and positioned the bullets. I figured I'd check to see which fire button was pressed, then check to see where the corresponding ship was located. The big complication here is that I need to impart an initial velocity (set by each player) to their bullets. But how to get the right variable to the bullet? I'll spare you the details, which I don't really understand, but the short of it I managed to kludge through it.

At any rate, I think there's enough here for you to finally see my vision for the gameplay. You've got a two-player dog fight, ships orbiting the planets. Each time you fire, there's a cooldown period before you can fire again. You have to hit the enemy ship head-on to blow it up, and, yes, you can blow yourself up if you're not careful.

The keys are below:

Syndicate content