官术网_书友最值得收藏!

'Tis volley

What kind of game are we going to make? Well, let's pretend that you are totally pumped up about volleyball (work with me here). All you can think about night and day is volleyball. You dream about it at bedtime. You play it every chance you get. So, when it comes to making your first game in Unity, there's no question: you have to make a volleyball game.

Let's back away from that idea a little and, using what we learned in Chapter 2, Let's Start with the Sky, evaluate the difficulty level of a volleyball game. Volleyball features two teams of six players on either side of a net. A server hits a ball with his hands over the net, and the teams compete to keep the ball in the air, hitting it back and forth over the net. The rally ends when:

  • One team lets the ball hit the floor
  • The ball goes out of bounds
  • An angry puma bursts onto the court and starts chewing on the star player

The first team to score 25 points wins the set. A match is best-of-five. Then there are a number of rules that govern how often and in what way a player may hit the ball (hint: no grabsies).

Hopefully, it's clear that volleyball is a BIG game with lots of rules and a heaping helping of complexity. Multiple teams mean that you have four options:

  • Two-player, same computer, both players share the keyboard and mouse to compete against each other
  • One-player, same computer, so, you'd have to program AI—artificial intelligence—to enable the computer to play against a human
  • Two-player, different computers
  • Multiple players, multiple computers, where every human player controls a team volleyball team member

We saw in the last chapter that these multiplayer options can add significant layers of complexity to a simple game. Right out of the gate, the challenge is daunting. In addition to providing for two teams, having multiple players on each team means that you have to program a way for the player to switch between different characters. And who knows how you're ever gonna animate that puma?

主站蜘蛛池模板: 玉山县| 井冈山市| 大渡口区| 修文县| 文山县| 得荣县| 宁波市| 安乡县| 辽中县| 泾阳县| 苍梧县| 宝清县| 兰州市| 利川市| 方山县| 达日县| 黑龙江省| 柳州市| 略阳县| 延安市| 永昌县| 句容市| 巨野县| 荣成市| 佛山市| 盈江县| 平安县| 徐州市| 新化县| 宁远县| 长汀县| 镇赉县| 巴彦淖尔市| 哈密市| 舒城县| 华安县| 上虞市| 迁安市| 墨竹工卡县| 黄大仙区| 云龙县|