Reply to comment

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:

Player 1: A,D, - rotate. W,S - adjust power. Space - fire.
Player 2: Arrow keys for rotation and power, right ctrl for fire.
Mouse - move camera, zoom. (hold down middle mouse button)

The game automatically restarts if a player dies. Just re-select your starting planets if you want to play again.

Give it a spin, preferably with a friend or loved one, and let me know if this project is worth taking further.

Unity Web Player | WebPlayer

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Images can be added to this post.
  • You may quote other posts using [quote] tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.