JP5420954B2 - GAME DEVICE AND GAME PROGRAM - Google Patents

GAME DEVICE AND GAME PROGRAM Download PDF

Info

Publication number
JP5420954B2
JP5420954B2 JP2009087214A JP2009087214A JP5420954B2 JP 5420954 B2 JP5420954 B2 JP 5420954B2 JP 2009087214 A JP2009087214 A JP 2009087214A JP 2009087214 A JP2009087214 A JP 2009087214A JP 5420954 B2 JP5420954 B2 JP 5420954B2
Authority
JP
Japan
Prior art keywords
acceleration
angular velocity
data
game
input device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009087214A
Other languages
Japanese (ja)
Other versions
JP2010233929A (en
Inventor
祐一郎 岡村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nintendo Co Ltd
Original Assignee
Nintendo Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nintendo Co Ltd filed Critical Nintendo Co Ltd
Priority to JP2009087214A priority Critical patent/JP5420954B2/en
Priority to US12/491,622 priority patent/US8303412B2/en
Publication of JP2010233929A publication Critical patent/JP2010233929A/en
Priority to US13/331,297 priority patent/US8353769B2/en
Application granted granted Critical
Publication of JP5420954B2 publication Critical patent/JP5420954B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ゲーム装置及びゲームプログラムに関し、より特定的には、入力装置を動かしてゲームを行うゲーム装置において、より直感的な操作を可能とするゲーム装置及びゲームプログラムに関する。   The present invention relates to a game device and a game program, and more particularly to a game device and a game program that enable a more intuitive operation in a game device that plays a game by moving an input device.

従来、加速度センサを備えた入力装置をプレイヤが操作することによって入力を行うゲーム装置が存在する。例えば、特許文献1には、プレイヤが入力装置を振ることによって検出される加速度に応じてゲーム処理を実行するゲーム装置が開示されている。特許文献1に記載のゲーム装置は、プレイヤの投球動作によって生じる加速度を検出し、検出した加速度に応じて、ゲームキャラクタの投球動作を再現する。具体的には、プレイヤが実際のボウリングの投球動作のように、バックスイングからフォワードスイングをしてボールをリリースするまでの動作を行うと、ゲームキャラクタはプレイヤの動作に応じてリリースまでの投球動作を再現する。次に、実際の投球動作においてボウリングのボールをリリースするタイミングで、プレイヤが入力装置のボタンを離すと、ゲームキャラクタはボールをリリースする。そして、ゲーム装置は、ボールをリリースするまでに検出された加速度に基づいて、ボールの軌道及び速度を算出し、算出結果に応じてボールを移動させる。   2. Description of the Related Art Conventionally, there are game devices that perform input by a player operating an input device having an acceleration sensor. For example, Patent Literature 1 discloses a game device that executes game processing in accordance with acceleration detected by a player shaking an input device. The game device described in Patent Literature 1 detects acceleration generated by a player's pitching motion, and reproduces the game character's pitching motion according to the detected acceleration. Specifically, when the player performs an action from the back swing to the forward swing to release the ball as in the actual bowling throwing action, the game character throws until the release according to the player's action. To reproduce. Next, when the player releases the button of the input device at the timing of releasing the bowling ball in the actual pitching operation, the game character releases the ball. Then, the game device calculates the trajectory and speed of the ball based on the acceleration detected until the ball is released, and moves the ball according to the calculation result.

特開2008−67876号公報JP 2008-67876 A

しかしながら、上記特許文献1に記載のゲーム装置では、投球のタイミングで入力装置のボタンを操作する必要があり、実際の投球動作とは必ずしも一致しない場合がある。従って、プレイヤが直感的な操作でゲームを行うという点では不十分であった。   However, in the game device described in Patent Document 1, it is necessary to operate the button of the input device at the timing of pitching, and the actual pitching operation may not always match. Therefore, it is insufficient in that the player plays the game with an intuitive operation.

それ故、本発明の目的は、入力装置を動かしてゲームを行うゲーム装置において、より直感的な操作に基づいたゲームを実現可能なゲーム装置及びゲームプログラムを提供することである。   SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a game device and a game program capable of realizing a game based on a more intuitive operation in a game device that plays a game by moving an input device.

本発明は、上記の課題を解決するために、以下の構成を採用した。なお、本欄における括弧内の参照符号及び補足説明等は、本発明の理解を助けるために後述する実施形態との対応関係を示したものであって、本発明を何ら限定するものではない。   The present invention employs the following configuration in order to solve the above problems. In addition, the reference numerals in parentheses and supplementary explanations in this column show the correspondence with the embodiments described later in order to help understanding of the present invention, and do not limit the present invention.

本発明は、角速度センサ(55、56)と加速度センサ(37)とを備えた入力装置(8)から角速度データと加速度データとを含む操作データを取得して、当該操作データに基づいてゲーム処理を行うゲーム装置である。ゲーム装置は、判定手段(ステップS62を実行するCPU10。以下、単にステップ番号のみを記載する。)と、移動制御手段(S64)と、表示制御手段(S5)とを備える。判定手段は、角速度データが所定の条件(S71、S74、S75)を満たしたか否かを判定する。移動制御手段は、角速度データが上記所定の条件を満たした時点を基準にして定められる所定期間に取得された加速度データに基づいて、ゲーム空間内の所定のオブジェクト(ボール)の移動を制御する。表示制御手段は、移動制御手段によって移動制御される所定のオブジェクトを画面に表示する。   The present invention acquires operation data including angular velocity data and acceleration data from an input device (8) including an angular velocity sensor (55, 56) and an acceleration sensor (37), and performs game processing based on the operation data. It is the game device which performs. The game apparatus includes determination means (CPU 10 that executes step S62; hereinafter, only the step number is described), movement control means (S64), and display control means (S5). The determination means determines whether or not the angular velocity data satisfies a predetermined condition (S71, S74, S75). The movement control means controls the movement of a predetermined object (ball) in the game space based on acceleration data acquired during a predetermined period determined with reference to the time point when the angular velocity data satisfies the predetermined condition. The display control means displays a predetermined object whose movement is controlled by the movement control means on the screen.

上記によれば、角速度データが所定の条件を満たした時点に応じて定められる所定期間に検出された加速度に基づいて、オブジェクトの移動を制御することができる。これにより、プレイヤが入力装置を操作する際の動作に応じて、ゲーム空間のオブジェクトを動作させることができる。   Based on the above, it is possible to control the movement of the object based on the acceleration detected during the predetermined period determined according to the time point when the angular velocity data satisfies the predetermined condition. Thereby, the object in the game space can be operated according to the operation when the player operates the input device.

また、移動制御手段は、加速度データに基づいて、オブジェクトの移動速度を制御してもよい。   The movement control means may control the moving speed of the object based on the acceleration data.

上記によれば、加速度センサによって検出される加速度データに基づいて、オブジェクトが移動する速度を制御することができる。これにより、プレイヤが入力装置に加えた力の大きさをゲーム空間のオブジェクトの移動速度に反映させることができる。   Based on the above, it is possible to control the speed at which the object moves based on the acceleration data detected by the acceleration sensor. Thereby, the magnitude of the force applied by the player to the input device can be reflected in the moving speed of the object in the game space.

また、移動制御手段は、加速度データが示す加速度の大きさに基づいて、オブジェクトに力を加えることによって、オブジェクトの移動速度を制御してもよい。   Further, the movement control means may control the moving speed of the object by applying a force to the object based on the magnitude of the acceleration indicated by the acceleration data.

上記によれば、加速度センサによって検出される加速度データに基づいて、オブジェクトに加える力を制御することができる。これにより、プレイヤが入力装置に加えた力の大きさをゲーム空間のオブジェクトに加える力に反映させることができる。   Based on the above, the force applied to the object can be controlled based on the acceleration data detected by the acceleration sensor. Thereby, the magnitude of the force applied by the player to the input device can be reflected in the force applied to the object in the game space.

また、ゲーム装置は、位置決定手段(S41)をさらに備えてもよい。位置決定手段は、判定手段によって角速度データが上記所定の条件を満たしたと判定されるまでの期間、角速度データに基づいて、オブジェクトの位置を決定する。この場合において、移動制御手段は、判定手段によって前記角速度データが前記所定の条件を満たしたと判定された場合に、位置決定手段において決定された位置から所定の方向へオブジェクトを移動開始させる。   The game device may further include position determining means (S41). The position determination unit determines the position of the object based on the angular velocity data for a period until the determination unit determines that the angular velocity data satisfies the predetermined condition. In this case, the movement control means starts moving the object in the predetermined direction from the position determined by the position determination means when the determination means determines that the angular velocity data satisfies the predetermined condition.

上記によれば、判定手段によって角速度データが上記所定の条件を満たしたと判定されるまでの期間に、角速度データに基づいて、オブジェクトの位置を移動させることができる。これにより、上記所定の条件が満たされるまでの間の入力装置の動作をゲーム処理に反映させることができる。   According to the above, the position of the object can be moved based on the angular velocity data during a period until the angular velocity data is determined to satisfy the predetermined condition by the determining means. Accordingly, the operation of the input device until the predetermined condition is satisfied can be reflected in the game process.

また、ゲーム装置は、角速度記憶手段(メインメモリ、S3)をさらに備えてもよい。角速度記憶手段は、角速度データを逐次記憶する。そして、判定手段は、角速度記憶手段に記憶された角速度データに基づいて、角速度データが示す角速度の大きさが極大値を示し、かつ所定の閾値より大きい場合、角速度データが上記所定の条件を満たしたと判定する。   The game device may further include angular velocity storage means (main memory, S3). The angular velocity storage means sequentially stores angular velocity data. Based on the angular velocity data stored in the angular velocity storage means, the determining means indicates that the angular velocity data indicated by the angular velocity data has a maximum value and is greater than a predetermined threshold, and the angular velocity data satisfies the predetermined condition. It is determined that

上記によれば、過去に検出された角速度に基づいて、上記所定の条件を満たしたか否かを判定することができる。すなわち、角速度の履歴を参照することによって、角速度の時間変化を求めることができる。そして、角速度の大きさが極大値を示す場合において、その極大値が所定の閾値よりも大きい場合に、角速度データが上記所定の条件を満たしたと判定することができる。   According to the above, it is possible to determine whether or not the predetermined condition is satisfied based on the angular velocity detected in the past. That is, by referring to the history of angular velocities, the temporal change in angular velocities can be obtained. And when the magnitude | size of angular velocity shows a maximum value, when the maximum value is larger than a predetermined threshold value, it can be determined that the angular velocity data satisfies the predetermined condition.

また、移動制御手段は、加速度データに基づいて、オブジェクトの移動方向をさらに制御(S70)してもよい。   The movement control means may further control the moving direction of the object based on the acceleration data (S70).

上記によれば、加速度センサによって検出される加速度データに基づいて、オブジェクトが移動する方向を制御することができる。これにより、入力装置に加わった加速度に応じて、オブジェクトの移動方向を変化させることができる。   Based on the above, the direction in which the object moves can be controlled based on the acceleration data detected by the acceleration sensor. Thereby, the moving direction of the object can be changed according to the acceleration applied to the input device.

また、ゲーム装置は、加速度記憶手段(メインメモリ、S3)をさらに備えてもよい。加速度記憶手段は、加速度データを逐次記憶する。この場合において、移動制御手段は、判定手段によって角速度データが上記所定の条件を満たしたと判定された時点を判定時として、当該判定時以前の所定長さの期間を上記所定期間とする。そして、移動制御手段は、当該所定期間に含まれる加速度記憶手段に記憶された加速度データに基づいて、オブジェクトの移動速度を制御する。   The game apparatus may further include acceleration storage means (main memory, S3). The acceleration storage means sequentially stores acceleration data. In this case, the movement control means sets the time when the determination means determines that the angular velocity data satisfies the predetermined condition as the determination time, and sets the predetermined length period before the determination time as the predetermined period. The movement control means controls the moving speed of the object based on the acceleration data stored in the acceleration storage means included in the predetermined period.

上記によれば、判定手段による判定時以前の所定期間に検出された加速度に基づいて、オブジェクトの移動速度を決定することができる。例えば、判定手段による判定時から過去所定期間に検出された加速度の大きさに応じて、オブジェクトの移動速度を決定することができる。   Based on the above, it is possible to determine the moving speed of the object based on the acceleration detected during the predetermined period before the determination by the determination means. For example, the moving speed of the object can be determined according to the magnitude of acceleration detected in the past predetermined period from the time of determination by the determination means.

また、移動制御手段は、上記所定期間に含まれる加速度データのうち、最大となる加速度の大きさに基づいて、オブジェクトの移動速度を制御してもよい。   Further, the movement control means may control the moving speed of the object based on a maximum acceleration magnitude among the acceleration data included in the predetermined period.

上記によれば、判定手段による判定時から過去所定期間の最大の加速度を、オブジェクトの移動速度に反映させることができる。これにより、プレイヤが入力装置に加えた力に応じて、オブジェクトの移動速度を制御することができる。   According to the above, the maximum acceleration in the past predetermined period from the time of determination by the determination means can be reflected in the moving speed of the object. Thereby, the moving speed of the object can be controlled in accordance with the force applied by the player to the input device.

また、移動制御手段は、角速度データに基づいて算出される判定時における入力装置の姿勢に応じて、オブジェクトの移動速度をさらに制御(S66)してもよい。   Further, the movement control means may further control the movement speed of the object according to the attitude of the input device at the time of determination calculated based on the angular velocity data (S66).

上記によれば、判定時の入力装置の姿勢をも考慮して、オブジェクトの移動速度を制御することができる。   Based on the above, the moving speed of the object can be controlled in consideration of the attitude of the input device at the time of determination.

また、移動制御手段は、判定時以降に取得した加速度データに基づいて、オブジェクトの移動速度をさらに変化(S82)させてもよい。   Further, the movement control means may further change the moving speed of the object based on the acceleration data acquired after the determination (S82).

上記によれば、判定手段による判定後においても、判定後に取得した加速度に基づいて、追加的にオブジェクトの移動速度を変化させることができる。   According to the above, even after the determination by the determination means, the moving speed of the object can be additionally changed based on the acceleration acquired after the determination.

また、移動制御手段は、判定時以降に取得した加速度データが示す加速度の大きさが、上記所定期間の加速度の最大値よりも大きい場合に、当該判定時以降に取得した前記加速度データが示す加速度の大きさに基づいて、オブジェクトの移動速度をさらに変化させてもよい。   In addition, when the magnitude of the acceleration indicated by the acceleration data acquired after the determination is larger than the maximum value of the acceleration during the predetermined period, the movement control means determines the acceleration indicated by the acceleration data acquired after the determination. The moving speed of the object may be further changed based on the size of.

上記によれば、判定手段による判定後においても、判定後に取得した加速度が判定前に取得した加速度よりも大きい場合に、その判定後に取得した加速度に応じて、オブジェクトの移動速度を変化させることができる。これにより、プレイヤが入力装置に加えた力をより正確にオブジェクトの移動速度に反映させることができる。   According to the above, even after the determination by the determination unit, when the acceleration acquired after the determination is larger than the acceleration acquired before the determination, the moving speed of the object can be changed according to the acceleration acquired after the determination. it can. Thereby, the force applied by the player to the input device can be more accurately reflected in the moving speed of the object.

また、移動制御手段は、角速度データが上記所定の条件を満たしたときにゲーム空間内のオブジェクトを所定方向に射出し、当該オブジェクトの射出時点もしくはそれ以前に取得された加速度データに基づいて射出直後の当該オブジェクトの移動速度を決定してもよい。そして、移動制御手段は、当該オブジェクトの射出直後の一定期間に新たに取得された加速度データに基づいて、射出直後の当該オブジェクトの移動速度を補正してもよい。   Further, the movement control means ejects an object in the game space in a predetermined direction when the angular velocity data satisfies the predetermined condition, and immediately after the injection based on acceleration data acquired at or before the injection of the object. The moving speed of the object may be determined. Then, the movement control means may correct the moving speed of the object immediately after the injection based on acceleration data newly acquired in a certain period immediately after the injection of the object.

上記によれば、移動制御手段は、角速度データが上記所定の条件を満たしたタイミングで、加速度データに基づいてオブジェクトを射出させ、射出後に新たに取得された加速度データに基づいて、射出後のオブジェクトの移動速度を補正することができる。これにより、プレイヤによる入力装置の振りの強さに応じた速度でゲーム空間内のオブジェクトを移動させることができる。   According to the above, the movement control means causes the object to be ejected based on the acceleration data at a timing when the angular velocity data satisfies the predetermined condition, and based on the acceleration data newly obtained after the ejection, the object after the ejection The moving speed of can be corrected. Accordingly, the object in the game space can be moved at a speed corresponding to the swing strength of the input device by the player.

また、本発明は、ゲーム装置のコンピュータを上記各手段として機能させるゲームプログラムの形態で実施されてもよい。   The present invention may also be implemented in the form of a game program that causes a computer of a game device to function as each of the above means.

本発明によれば、入力装置の角速度データが所定の条件を満たした場合において、入力装置の加速度に基づいて、オブジェクトの移動を制御することができる。これにより、プレイヤが入力装置を操作する際の動作に応じて、ゲーム空間のオブジェクトを動作させることができ、プレイヤの入力装置に対する直感的な動作をオブジェクトに対する操作としてゲーム処理に反映させることができる。   According to the present invention, when the angular velocity data of the input device satisfies a predetermined condition, the movement of the object can be controlled based on the acceleration of the input device. Accordingly, an object in the game space can be operated according to an operation when the player operates the input device, and an intuitive operation of the player with respect to the input device can be reflected in the game process as an operation on the object. .

ゲームシステムの外観図External view of game system ゲーム装置の機能ブロック図Functional block diagram of game device 入力装置の外観構成を示す斜視図The perspective view which shows the external appearance structure of an input device コントローラの外観構成を示す斜視図Perspective view showing the external configuration of the controller コントローラの内部構造を示す図Diagram showing the internal structure of the controller コントローラの内部構造を示す図Diagram showing the internal structure of the controller 入力装置の構成を示すブロック図Block diagram showing the configuration of the input device 入力装置8を用いてゲーム操作するときの状態を概説する図The figure which outlines the state when operating a game using the input device 8 プレイヤが投球前の動作の姿勢で入力装置8を把持する様子を示した図The figure which showed a mode that a player hold | grips the input device 8 with the attitude | position of the motion before pitching プレイヤがバックスイングをしている様子を示した図A figure showing the player performing a backswing プレイヤがフォワードスイングをしている様子を示した図A figure showing the player swinging forward プレイヤがボールを投球する瞬間の様子を示した図A diagram showing the moment when a player throws a ball プレイヤがボールを投球した後の様子を示した図The figure after the player throws the ball フィニッシュの状態において、入力装置8を後面から見た図The figure which looked at the input device 8 from the rear in the state of the finish フィニッシュの状態において、入力装置8の姿勢を投球方向に対して横から見た図The figure which looked at the posture of input device 8 from the side to the pitching direction in the finish state フィニッシュの状態において、ストレート補正を行わない場合の入力装置8の姿勢を投球方向に対して真後ろから見た図The figure which looked at the posture of input device 8 when not performing straight correction in the finish state from the back in the pitching direction ゲーム装置3のメインメモリ(外部メインメモリ12又は内部メインメモリ11e)に記憶される主なデータを示す図The figure which shows the main data memorize | stored in the main memory (the external main memory 12 or the internal main memory 11e) of the game device 3 ゲーム装置3において実行されるゲーム処理の流れを示すメインフローチャートMain flowchart showing a flow of game processing executed in the game apparatus 3 図17における投球処理(ステップS4)の詳細を示すフローチャートThe flowchart which shows the detail of the pitching process (step S4) in FIG. Yawリセット前ピッチ姿勢算出処理(ステップS11)の詳細を示すフローチャートThe flowchart which shows the detail of the pitch attitude | position calculation process (step S11) before Yaw reset. 投球前ステート処理(ステップS12)の詳細を示したフローチャートFlow chart showing details of state process before pitching (step S12) Yawリセット後ピッチ姿勢算出処理(ステップS15)の詳細を示すフローチャートThe flowchart which shows the detail of the pitch attitude | position calculation process (step S15) after Yaw reset. 投球中ステート処理(ステップS17)の詳細を示したフローチャートFlow chart showing details of state process during pitching (step S17) 自動投球判定処理(ステップS62)の詳細を示したフローチャートThe flowchart which showed the detail of the automatic pitching determination process (step S62) 投球後ステート処理(ステップS20)の詳細を示したフローチャートFlow chart showing details of post-throwing state processing (step S20) パワー更新処理(ステップS82)の詳細を示したフローチャートFlow chart showing details of power update process (step S82) カーブ計算処理(ステップS84)の詳細を示したフローチャートFlowchart showing details of curve calculation processing (step S84) ストレート補正処理(ステップS87)の詳細を示したフローチャートFlow chart showing details of straight correction process (step S87) ステップS31で算出されるピッチ方向の姿勢を表した図The figure showing the attitude | position of the pitch direction calculated by step S31 ピッチ方向の姿勢及びヨー方向の姿勢を説明するための説明図Explanatory drawing for explaining the posture in the pitch direction and the posture in the yaw direction

[ゲームシステムの全体構成]
図1を参照して、本発明の一実施形態に係るゲーム装置を含むゲームシステム1について説明する。図1は、ゲームシステム1の外観図である。以下、据置型のゲーム装置を一例にして、本実施形態のゲーム装置及びゲームプログラムについて説明する。図1において、ゲームシステム1は、テレビジョン受像器(以下、単に「テレビ」と記載する)2、ゲーム装置3、光ディスク4、入力装置8、及びマーカ部6を含む。本システムは、入力装置8を用いたゲーム操作に基づいてゲーム装置3でゲーム処理を実行するものである。
[Overall configuration of game system]
A game system 1 including a game device according to an embodiment of the present invention will be described with reference to FIG. FIG. 1 is an external view of the game system 1. Hereinafter, the game apparatus and the game program of the present embodiment will be described using a stationary game apparatus as an example. In FIG. 1, the game system 1 includes a television receiver (hereinafter simply referred to as “TV”) 2, a game device 3, an optical disk 4, an input device 8, and a marker unit 6. In the present system, game processing is executed by the game device 3 based on a game operation using the input device 8.

ゲーム装置3には、当該ゲーム装置3に対して交換可能に用いられる情報記憶媒体の一例である光ディスク4が脱着可能に挿入される。光ディスク4には、ゲーム装置3において実行されるためのゲームプログラムが記憶されている。ゲーム装置3の前面には光ディスク4の挿入口が設けられている。ゲーム装置3は、挿入口に挿入された光ディスク4に記憶されているゲームプログラムを読み出して実行することによってゲーム処理を実行する。   An optical disk 4 that is an example of an information storage medium that can be used interchangeably with the game apparatus 3 is detachably inserted into the game apparatus 3. The optical disc 4 stores a game program to be executed on the game apparatus 3. An insertion slot for the optical disk 4 is provided on the front surface of the game apparatus 3. The game apparatus 3 executes a game process by reading and executing a game program stored in the optical disc 4 inserted into the insertion slot.

ゲーム装置3には、表示装置の一例であるテレビ2が接続コードを介して接続される。テレビ2は、ゲーム装置3において実行されるゲーム処理の結果得られるゲーム画像を表示する。また、テレビ2の画面の周辺(図1では画面の上側)には、マーカ部6が設置される。マーカ部6は、その両端に2つのマーカ6R及び6Lを備えている。マーカ6R(マーカ6Lも同様)は、具体的には1以上の赤外LEDであり、テレビ2の前方に向かって赤外光を出力する。マーカ部6はゲーム装置3に接続されており、ゲーム装置3はマーカ部6が備える各赤外LEDの点灯を制御することが可能である。   A television 2 which is an example of a display device is connected to the game apparatus 3 via a connection cord. The television 2 displays a game image obtained as a result of the game process executed in the game device 3. In addition, a marker unit 6 is installed around the screen of the television 2 (upper side of the screen in FIG. 1). The marker unit 6 includes two markers 6R and 6L at both ends thereof. The marker 6R (same for the marker 6L) is specifically one or more infrared LEDs, and outputs infrared light toward the front of the television 2. The marker unit 6 is connected to the game apparatus 3, and the game apparatus 3 can control lighting of each infrared LED included in the marker unit 6.

入力装置8は、自機に対して行われた操作の内容を示す操作データをゲーム装置3に与えるものである。本実施形態では、入力装置8はコントローラ5とジャイロセンサユニット7とを含む。詳細は後述するが、入力装置8は、コントローラ5に対してジャイロセンサユニット7が着脱可能に接続されている構成である。コントローラ5とゲーム装置3とは無線通信によって接続される。本実施形態では、コントローラ5とゲーム装置3との間の無線通信には例えばBluetooth(ブルートゥース)(登録商標)の技術が用いられる。なお、他の実施形態においてはコントローラ5とゲーム装置3とは有線で接続されてもよい。   The input device 8 gives operation data indicating the content of the operation performed on the own device to the game device 3. In the present embodiment, the input device 8 includes a controller 5 and a gyro sensor unit 7. Although details will be described later, the input device 8 has a configuration in which a gyro sensor unit 7 is detachably connected to the controller 5. The controller 5 and the game apparatus 3 are connected by wireless communication. In the present embodiment, for example, Bluetooth (registered trademark) technology is used for wireless communication between the controller 5 and the game apparatus 3. In other embodiments, the controller 5 and the game apparatus 3 may be connected by wire.

[ゲーム装置3の内部構成]
次に、図2を参照して、ゲーム装置3の内部構成について説明する。図2は、ゲーム装置3の構成を示すブロック図である。ゲーム装置3は、CPU10、システムLSI11、外部メインメモリ12、ROM/RTC13、ディスクドライブ14、及びAV−IC15等を有する。
[Internal configuration of game device 3]
Next, the internal configuration of the game apparatus 3 will be described with reference to FIG. FIG. 2 is a block diagram showing a configuration of the game apparatus 3. The game apparatus 3 includes a CPU 10, a system LSI 11, an external main memory 12, a ROM / RTC 13, a disk drive 14, an AV-IC 15 and the like.

CPU10は、光ディスク4に記憶されたゲームプログラムを実行することによってゲーム処理を実行するものであり、ゲームプロセッサとして機能する。CPU10は、システムLSI11に接続される。システムLSI11には、CPU10の他、外部メインメモリ12、ROM/RTC13、ディスクドライブ14及びAV−IC15が接続される。システムLSI11は、それに接続される各構成要素間のデータ転送の制御、表示すべき画像の生成、外部装置からのデータの取得等の処理を行う。システムLSIの内部構成について後述する。揮発性の外部メインメモリ12は、光ディスク4から読み出されたゲームプログラムや、フラッシュメモリ17から読み出されたゲームプログラム等のプログラムを記憶したり、各種データを記憶したりするものであり、CPU10のワーク領域やバッファ領域として用いられる。ROM/RTC13は、ゲーム装置3の起動用のプログラムが組み込まれるROM(いわゆるブートROM)と、時間をカウントするクロック回路(RTC:Real Time Clock)とを有する。ディスクドライブ14は、光ディスク4からプログラムデータやテクスチャデータ等を読み出し、後述する内部メインメモリ11e又は外部メインメモリ12に読み出したデータを書き込む。   The CPU 10 executes a game process by executing a game program stored on the optical disc 4, and functions as a game processor. The CPU 10 is connected to the system LSI 11. In addition to the CPU 10, an external main memory 12, a ROM / RTC 13, a disk drive 14, and an AV-IC 15 are connected to the system LSI 11. The system LSI 11 performs processing such as control of data transfer between components connected thereto, generation of an image to be displayed, and acquisition of data from an external device. The internal configuration of the system LSI will be described later. The volatile external main memory 12 stores a program such as a game program read from the optical disc 4 or a game program read from the flash memory 17, or stores various data. Used as a work area and buffer area. The ROM / RTC 13 includes a ROM (so-called boot ROM) in which a program for starting the game apparatus 3 is incorporated, and a clock circuit (RTC: Real Time Clock) that counts time. The disk drive 14 reads program data, texture data, and the like from the optical disk 4 and writes the read data to an internal main memory 11e or an external main memory 12 described later.

また、システムLSI11には、入出力プロセッサ(I/Oプロセッサ)11a、GPU(Graphics Processor Unit)11b、DSP(Digital Signal Processor)11c、VRAM11d、及び内部メインメモリ11eが設けられる。図示は省略するが、これらの構成要素11a〜11eは内部バスによって互いに接続される。   Further, the system LSI 11 is provided with an input / output processor (I / O processor) 11a, a GPU (Graphics Processor Unit) 11b, a DSP (Digital Signal Processor) 11c, a VRAM 11d, and an internal main memory 11e. Although not shown, these components 11a to 11e are connected to each other by an internal bus.

GPU11bは、描画手段の一部を形成し、CPU10からのグラフィクスコマンド(作画命令)に従って画像を生成する。VRAM11dは、GPU11bがグラフィクスコマンドを実行するために必要なデータ(ポリゴンデータやテクスチャデータ等のデータ)を記憶する。画像が生成される際には、GPU11bは、VRAM11dに記憶されたデータを用いて画像データを作成する。   The GPU 11b forms part of a drawing unit and generates an image according to a graphics command (drawing command) from the CPU 10. The VRAM 11d stores data (data such as polygon data and texture data) necessary for the GPU 11b to execute the graphics command. When an image is generated, the GPU 11b creates image data using data stored in the VRAM 11d.

DSP11cは、オーディオプロセッサとして機能し、内部メインメモリ11eや外部メインメモリ12に記憶されるサウンドデータや音波形(音色)データを用いて、音声データを生成する。   The DSP 11c functions as an audio processor, and generates sound data using sound data and sound waveform (tone color) data stored in the internal main memory 11e and the external main memory 12.

上述のように生成された画像データ及び音声データは、AV−IC15によって読み出される。AV−IC15は、読み出した画像データをAVコネクタ16を介してテレビ2に出力するとともに、読み出した音声データを、テレビ2に内蔵されるスピーカ2aに出力する。これによって、画像がテレビ2に表示されるとともに音がスピーカ2aから出力される。   The image data and audio data generated as described above are read out by the AV-IC 15. The AV-IC 15 outputs the read image data to the television 2 via the AV connector 16, and outputs the read audio data to the speaker 2 a built in the television 2. As a result, an image is displayed on the television 2 and a sound is output from the speaker 2a.

入出力プロセッサ11aは、それに接続される構成要素との間でデータの送受信を実行したり、外部装置からのデータのダウンロードを実行したりする。入出力プロセッサ11aは、フラッシュメモリ17、無線通信モジュール18、無線コントローラモジュール19、拡張コネクタ20、及びメモリカード用コネクタ21に接続される。無線通信モジュール18にはアンテナ22が接続され、無線コントローラモジュール19にはアンテナ23が接続される。   The input / output processor 11a performs transmission / reception of data to / from components connected to the input / output processor 11a and downloads data from an external device. The input / output processor 11 a is connected to the flash memory 17, the wireless communication module 18, the wireless controller module 19, the expansion connector 20, and the memory card connector 21. An antenna 22 is connected to the wireless communication module 18, and an antenna 23 is connected to the wireless controller module 19.

入出力プロセッサ11aは、無線通信モジュール18及びアンテナ22を介してネットワークに接続し、ネットワークに接続される他のゲーム装置や各種サーバと通信することができる。入出力プロセッサ11aは、定期的にフラッシュメモリ17にアクセスし、ネットワークへ送信する必要があるデータの有無を検出し、当該データが有る場合には、無線通信モジュール18及びアンテナ22を介してネットワークに送信する。また、入出力プロセッサ11aは、他のゲーム装置から送信されてくるデータやダウンロードサーバからダウンロードしたデータを、ネットワーク、アンテナ22及び無線通信モジュール18を介して受信し、受信したデータをフラッシュメモリ17に記憶する。CPU10はゲームプログラムを実行することにより、フラッシュメモリ17に記憶されたデータを読み出してゲームプログラムで利用する。フラッシュメモリ17には、ゲーム装置3と他のゲーム装置や各種サーバとの間で送受信されるデータの他、ゲーム装置3を利用してプレイしたゲームのセーブデータ(ゲームの結果データ又は途中データ)が記憶されてもよい。   The input / output processor 11a is connected to the network via the wireless communication module 18 and the antenna 22, and can communicate with other game devices and various servers connected to the network. The input / output processor 11a periodically accesses the flash memory 17 to detect the presence / absence of data that needs to be transmitted to the network. If there is such data, the input / output processor 11a communicates with the network via the wireless communication module 18 and the antenna 22. Send. The input / output processor 11a receives data transmitted from other game devices and data downloaded from the download server via the network, the antenna 22 and the wireless communication module 18, and receives the received data in the flash memory 17. Remember. By executing the game program, the CPU 10 reads out the data stored in the flash memory 17 and uses it in the game program. In the flash memory 17, in addition to data transmitted and received between the game apparatus 3 and other game apparatuses and various servers, save data (game result data or intermediate data) of a game played using the game apparatus 3 May be stored.

また、入出力プロセッサ11aは、コントローラ5から送信される操作データをアンテナ23及び無線コントローラモジュール19を介して受信し、内部メインメモリ11e又は外部メインメモリ12のバッファ領域に記憶(一時記憶)する。   Further, the input / output processor 11 a receives operation data transmitted from the controller 5 via the antenna 23 and the wireless controller module 19 and stores (temporarily stores) it in the buffer area of the internal main memory 11 e or the external main memory 12.

さらに、入出力プロセッサ11aには、拡張コネクタ20及びメモリカード用コネクタ21が接続される。拡張コネクタ20は、USBやSCSIのようなインターフェースのためのコネクタであり、外部記憶媒体のようなメディアを接続したり、他のコントローラのような周辺機器を接続したり、有線の通信用コネクタを接続することによって無線通信モジュール18に替えてネットワークとの通信を行ったりすることができる。メモリカード用コネクタ21は、メモリカードのような外部記憶媒体を接続するためのコネクタである。例えば、入出力プロセッサ11aは、拡張コネクタ20やメモリカード用コネクタ21を介して外部記憶媒体にアクセスし、外部記憶媒体にデータを保存したり、外部記憶媒体からデータを読み出したりすることができる。   Furthermore, an expansion connector 20 and a memory card connector 21 are connected to the input / output processor 11a. The expansion connector 20 is a connector for an interface such as USB or SCSI, and connects a medium such as an external storage medium, a peripheral device such as another controller, or a wired communication connector. By connecting, communication with the network can be performed instead of the wireless communication module 18. The memory card connector 21 is a connector for connecting an external storage medium such as a memory card. For example, the input / output processor 11a can access an external storage medium via the expansion connector 20 or the memory card connector 21 to store data in the external storage medium or read data from the external storage medium.

ゲーム装置3には、電源ボタン24、リセットボタン25、及びイジェクトボタン26が設けられる。電源ボタン24及びリセットボタン25は、システムLSI11に接続される。電源ボタン24がオンされると、ゲーム装置3の各構成要素に対して、図示しないACアダプタを経て電源が供給される。リセットボタン25が押されると、システムLSI11は、ゲーム装置3の起動プログラムを再起動する。イジェクトボタン26は、ディスクドライブ14に接続される。イジェクトボタン26が押されると、ディスクドライブ14から光ディスク4が排出される。   The game apparatus 3 is provided with a power button 24, a reset button 25, and an eject button 26. The power button 24 and the reset button 25 are connected to the system LSI 11. When the power button 24 is turned on, power is supplied to each component of the game apparatus 3 via an AC adapter (not shown). When the reset button 25 is pressed, the system LSI 11 restarts the boot program for the game apparatus 3. The eject button 26 is connected to the disk drive 14. When the eject button 26 is pressed, the optical disk 4 is ejected from the disk drive 14.

[入力装置8の構成]
次に、図3〜図6を参照して、入力装置8について説明する。図3は、入力装置8の外観構成を示す斜視図である。図4は、コントローラ5の外観構成を示す斜視図である。図3は、コントローラ5の上側後方から見た斜視図であり、図4は、コントローラ5を下側前方から見た斜視図である。
[Configuration of Input Device 8]
Next, the input device 8 will be described with reference to FIGS. FIG. 3 is a perspective view showing an external configuration of the input device 8. FIG. 4 is a perspective view showing an external configuration of the controller 5. 3 is a perspective view of the controller 5 as seen from the upper rear side, and FIG. 4 is a perspective view of the controller 5 as seen from the lower front side.

図3及び図4において、コントローラ5は、例えばプラスチック成型によって形成されたハウジング31を有している。ハウジング31は、その前後方向(図3に示すZ軸方向)を長手方向とした略直方体形状を有しており、全体として大人や子供の片手で把持可能な大きさである。プレイヤは、コントローラ5に設けられたボタンを押下すること、及び、コントローラ5自体を動かしてその位置や姿勢を変えることによってゲーム操作を行うことができる。   3 and 4, the controller 5 has a housing 31 formed by plastic molding, for example. The housing 31 has a substantially rectangular parallelepiped shape whose longitudinal direction is the front-rear direction (the Z-axis direction shown in FIG. 3), and is a size that can be gripped with one hand of an adult or a child as a whole. The player can perform a game operation by pressing a button provided on the controller 5 and moving the controller 5 itself to change its position and posture.

ハウジング31には、複数の操作ボタンが設けられる。図3に示すように、ハウジング31の上面には、十字ボタン32a、1番ボタン32b、2番ボタン32c、Aボタン32d、マイナスボタン32e、ホームボタン32f、プラスボタン32g、及び電源ボタン32hが設けられる。本明細書では、これらのボタン32a〜32hが設けられるハウジング31の上面を「ボタン面」と呼ぶことがある。一方、図4に示すように、ハウジング31の下面には凹部が形成されており、当該凹部の後面側傾斜面にはBボタン32iが設けられる。これらの各操作ボタン32a〜32iには、ゲーム装置3が実行するゲームプログラムに応じた機能が適宜割り当てられる。また、電源ボタン32hは遠隔からゲーム装置3本体の電源をオン/オフするためのものである。ホームボタン32f及び電源ボタン32hは、その上面がハウジング31の上面に埋没している。これによって、プレイヤがホームボタン32f又は電源ボタン32hを誤って押下することを防止することができる。   The housing 31 is provided with a plurality of operation buttons. As shown in FIG. 3, a cross button 32a, a first button 32b, a second button 32c, an A button 32d, a minus button 32e, a home button 32f, a plus button 32g, and a power button 32h are provided on the upper surface of the housing 31. It is done. In the present specification, the upper surface of the housing 31 on which these buttons 32a to 32h are provided may be referred to as a “button surface”. On the other hand, as shown in FIG. 4, a recess is formed on the lower surface of the housing 31, and a B button 32i is provided on the rear inclined surface of the recess. A function corresponding to the game program executed by the game apparatus 3 is appropriately assigned to each of the operation buttons 32a to 32i. The power button 32h is for remotely turning on / off the main body of the game apparatus 3. The home button 32 f and the power button 32 h are embedded in the upper surface of the housing 31. This can prevent the player from pressing the home button 32f or the power button 32h by mistake.

ハウジング31の後面にはコネクタ33が設けられている。コネクタ33は、コントローラ5に他の機器(例えば、ジャイロセンサユニット7や他のコントローラ)を接続するために利用される。また、ハウジング31の後面におけるコネクタ33の両側には、上記他の機器が容易に離脱することを防止するために係止穴33aが設けられている。   A connector 33 is provided on the rear surface of the housing 31. The connector 33 is used to connect another device (for example, the gyro sensor unit 7 or another controller) to the controller 5. Further, locking holes 33a are provided on both sides of the connector 33 on the rear surface of the housing 31 in order to prevent the other devices from being easily detached.

ハウジング31上面の後方には複数(図3では4つ)のLED34a〜34dが設けられる。ここで、コントローラ5には、他のメインコントローラと区別するためにコントローラ種別(番号)が付与される。各LED34a〜34dは、コントローラ5に現在設定されている上記コントローラ種別をプレイヤに通知したり、コントローラ5の電池残量をプレイヤに通知したりする等の目的で用いられる。具体的には、コントローラ5を用いてゲーム操作が行われる際、上記コントローラ種別に応じて複数のLED34a〜34dのいずれか1つが点灯する。   A plurality (four in FIG. 3) of LEDs 34 a to 34 d are provided behind the upper surface of the housing 31. Here, the controller type (number) is assigned to the controller 5 to distinguish it from other main controllers. The LEDs 34a to 34d are used for the purpose of notifying the player of the controller type currently set in the controller 5 and notifying the player of the remaining battery level of the controller 5. Specifically, when a game operation is performed using the controller 5, any one of the plurality of LEDs 34a to 34d is turned on according to the controller type.

また、コントローラ5は撮像情報演算部35(図6)を有しており、図4に示すように、ハウジング31前面には撮像情報演算部35の光入射面35aが設けられる。光入射面35aは、マーカ6R及び6Lからの赤外光を少なくとも透過する材質で構成される。   Further, the controller 5 has an imaging information calculation unit 35 (FIG. 6), and a light incident surface 35a of the imaging information calculation unit 35 is provided on the front surface of the housing 31 as shown in FIG. The light incident surface 35a is made of a material that transmits at least infrared light from the markers 6R and 6L.

ハウジング31上面における1番ボタン32bとホームボタン32fとの間には、コントローラ5に内蔵されるスピーカ49(図5)からの音を外部に放出するための音抜き孔31aが形成されている。   Between the first button 32b and the home button 32f on the upper surface of the housing 31, a sound release hole 31a for releasing sound from the speaker 49 (FIG. 5) built in the controller 5 is formed.

次に、図5及び図6を参照して、コントローラ5の内部構造について説明する。図5及び図6は、コントローラ5の内部構造を示す図である。なお、図5は、コントローラ5の上筐体(ハウジング31の一部)を外した状態を示す斜視図である。図6は、コントローラ5の下筐体(ハウジング31の一部)を外した状態を示す斜視図である。図6に示す斜視図は、図5に示す基板30を裏面から見た斜視図となっている。   Next, the internal structure of the controller 5 will be described with reference to FIGS. 5 and 6 are diagrams showing the internal structure of the controller 5. FIG. FIG. 5 is a perspective view showing a state in which the upper housing (a part of the housing 31) of the controller 5 is removed. FIG. 6 is a perspective view showing a state in which the lower casing (a part of the housing 31) of the controller 5 is removed. The perspective view shown in FIG. 6 is a perspective view of the substrate 30 shown in FIG.

図5において、ハウジング31の内部には基板30が固設されており、当該基板30の上主面上に各操作ボタン32a〜32h、各LED34a〜34d、加速度センサ37、アンテナ45、及びスピーカ49等が設けられる。これらは、基板30等に形成された配線(図示せず)によってマイクロコンピュータ(Micro Computer:マイコン)42(図6参照)に接続される。本実施形態では、加速度センサ37は、X軸方向に関してコントローラ5の中心からずれた位置に配置されている。これによって、コントローラ5をZ軸回りに回転させたときのコントローラ5の動きが算出しやすくなる。また、加速度センサ37は、長手方向(Z軸方向)に関してコントローラ5の中心よりも前方に配置されている。また、無線モジュール44(図6)及びアンテナ45によって、コントローラ5がワイヤレスコントローラとして機能する。   In FIG. 5, a substrate 30 is fixed inside the housing 31, and operation buttons 32 a to 32 h, LEDs 34 a to 34 d, an acceleration sensor 37, an antenna 45, and a speaker 49 are provided on the upper main surface of the substrate 30. Etc. are provided. These are connected to a microcomputer (microcomputer) 42 (see FIG. 6) by wiring (not shown) formed on the substrate 30 and the like. In the present embodiment, the acceleration sensor 37 is disposed at a position shifted from the center of the controller 5 with respect to the X-axis direction. This makes it easier to calculate the movement of the controller 5 when the controller 5 is rotated about the Z axis. The acceleration sensor 37 is disposed in front of the center of the controller 5 in the longitudinal direction (Z-axis direction). Further, the controller 5 functions as a wireless controller by the wireless module 44 (FIG. 6) and the antenna 45.

一方、図6において、基板30の下主面上の前端縁に撮像情報演算部35が設けられる。撮像情報演算部35は、コントローラ5の前方から順に赤外線フィルタ38、レンズ39、撮像素子40、及び画像処理回路41を備えている。これらの部材38〜41はそれぞれ基板30の下主面に取り付けられる。   On the other hand, in FIG. 6, an imaging information calculation unit 35 is provided at the front edge on the lower main surface of the substrate 30. The imaging information calculation unit 35 includes an infrared filter 38, a lens 39, an imaging element 40, and an image processing circuit 41 in order from the front of the controller 5. These members 38 to 41 are respectively attached to the lower main surface of the substrate 30.

さらに、基板30の下主面上には、上記マイコン42及びバイブレータ48が設けられている。バイブレータ48は、例えば振動モータやソレノイドであり、基板30等に形成された配線によってマイコン42と接続される。マイコン42の指示によりバイブレータ48が作動することによってコントローラ5に振動が発生する。これによって、コントローラ5を把持しているプレイヤの手にその振動が伝達される、いわゆる振動対応ゲームを実現することができる。本実施形態では、バイブレータ48は、ハウジング31のやや前方寄りに配置される。つまり、バイブレータ48がコントローラ5の中心よりも端側に配置することによって、バイブレータ48の振動によりコントローラ5全体を大きく振動させることができる。また、コネクタ33は、基板30の下主面上の後端縁に取り付けられる。なお、図5及び図6に示す他、コントローラ5は、マイコン42の基本クロックを生成する水晶振動子、スピーカ49に音声信号を出力するアンプ等を備えている。   Further, the microcomputer 42 and the vibrator 48 are provided on the lower main surface of the substrate 30. The vibrator 48 is, for example, a vibration motor or a solenoid, and is connected to the microcomputer 42 by wiring formed on the substrate 30 or the like. The controller 48 is vibrated by the operation of the vibrator 48 according to the instruction of the microcomputer 42. As a result, a so-called vibration-compatible game in which the vibration is transmitted to the hand of the player holding the controller 5 can be realized. In the present embodiment, the vibrator 48 is disposed slightly forward of the housing 31. That is, by arranging the vibrator 48 on the end side of the center of the controller 5, the entire controller 5 can be vibrated greatly by the vibration of the vibrator 48. The connector 33 is attached to the rear edge on the lower main surface of the substrate 30. 5 and 6, the controller 5 includes a crystal resonator that generates a basic clock of the microcomputer 42, an amplifier that outputs an audio signal to the speaker 49, and the like.

また、ジャイロセンサユニット7は、3軸回りの角速度を検知するジャイロセンサ(図7に示すジャイロセンサ55及び56)を有する。ジャイロセンサユニット7は、コントローラ5のコネクタ33に着脱可能に装着される。ジャイロセンサユニット7の前端(図3に示すZ軸正方向側の端部)には、コネクタ33に接続可能なプラグ(図7に示すプラグ53)が設けられる。さらに、プラグ53の両側にはフック(図示せず)が設けられる。ジャイロセンサユニット7がコントローラ5に対して装着される状態では、プラグ53がコネクタ33に接続されるとともに、上記フックがコントローラ5の係止穴33aに係止する。これによって、コントローラ5とジャイロセンサユニット7とがしっかりと固定される。また、ジャイロセンサユニット7は側面(図3に示すX軸方向の面)にボタン51を有している。ボタン51は、それを押下すれば上記フックの係止穴33aに対する係止状態を解除することができるように構成されている。したがって、ボタン51を押下しながらプラグ53をコネクタ33から抜くことによって、ジャイロセンサユニット7をコントローラ5から離脱することができる。   The gyro sensor unit 7 includes gyro sensors (gyro sensors 55 and 56 shown in FIG. 7) that detect angular velocities around three axes. The gyro sensor unit 7 is detachably attached to the connector 33 of the controller 5. A plug (plug 53 shown in FIG. 7) that can be connected to the connector 33 is provided at the front end of the gyro sensor unit 7 (end on the Z-axis positive direction side shown in FIG. 3). Further, hooks (not shown) are provided on both sides of the plug 53. In a state where the gyro sensor unit 7 is attached to the controller 5, the plug 53 is connected to the connector 33 and the hook is locked in the locking hole 33 a of the controller 5. Thereby, the controller 5 and the gyro sensor unit 7 are firmly fixed. The gyro sensor unit 7 has a button 51 on a side surface (surface in the X-axis direction shown in FIG. 3). The button 51 is configured such that when the button 51 is pressed, the hook is released from the locked state with respect to the locking hole 33a. Therefore, the gyro sensor unit 7 can be detached from the controller 5 by removing the plug 53 from the connector 33 while pressing the button 51.

また、ジャイロセンサユニット7の後端には、上記コネクタ33と同形状のコネクタが設けられる。したがって、コントローラ5(のコネクタ33)に対して装着可能な他の機器は、ジャイロセンサユニット7のコネクタに対しても装着可能である。なお、図3においては、当該コネクタに対してカバー52が着脱可能に装着されている。   A connector having the same shape as the connector 33 is provided at the rear end of the gyro sensor unit 7. Therefore, other devices that can be attached to the controller 5 (connector 33 thereof) can also be attached to the connector of the gyro sensor unit 7. In FIG. 3, a cover 52 is detachably attached to the connector.

なお、図3〜図6に示したコントローラ5及びジャイロセンサユニット7の形状や、各操作ボタンの形状、加速度センサやバイブレータの数及び設置位置等は単なる一例に過ぎず、他の形状、数、及び設置位置であっても、本発明を実現することができる。また、本実施形態では、撮像手段による撮像方向はZ軸正方向であるが、撮像方向はいずれの方向であってもよい。すなわち、コントローラ5における撮像情報演算部35の位置(撮像情報演算部35の光入射面35a)は、ハウジング31の前面でなくてもよく、ハウジング31の外部から光を取り入れることができれば他の面に設けられてもかまわない。   The shapes of the controller 5 and the gyro sensor unit 7 shown in FIGS. 3 to 6, the shapes of the operation buttons, the number of acceleration sensors and vibrators, and the installation positions are merely examples, and other shapes, numbers, And even if it is an installation position, this invention is realizable. In the present embodiment, the imaging direction by the imaging unit is the positive Z-axis direction, but the imaging direction may be any direction. That is, the position of the imaging information calculation unit 35 in the controller 5 (the light incident surface 35a of the imaging information calculation unit 35) does not have to be the front surface of the housing 31, and other surfaces can be used as long as light can be taken in from the outside of the housing 31. May be provided.

図7は、入力装置8(コントローラ5及びジャイロセンサユニット7)の構成を示すブロック図である。コントローラ5は、操作部32(各操作ボタン32a〜32i)、コネクタ33、撮像情報演算部35、通信部36、及び加速度センサ37を備えている。コントローラ5は、自機に対して行われた操作内容を示すデータを操作データとしてゲーム装置3へ送信するものである。   FIG. 7 is a block diagram showing the configuration of the input device 8 (the controller 5 and the gyro sensor unit 7). The controller 5 includes an operation unit 32 (operation buttons 32 a to 32 i), a connector 33, an imaging information calculation unit 35, a communication unit 36, and an acceleration sensor 37. The controller 5 transmits data indicating the details of the operation performed on the own device to the game apparatus 3 as operation data.

操作部32は、上述した各操作ボタン32a〜32iを含み、各操作ボタン32a〜32iに対する入力状態(各操作ボタン32a〜32iが押下されたか否か)を示す操作ボタンデータを通信部36のマイコン42へ出力する。   The operation unit 32 includes the operation buttons 32a to 32i described above, and the operation button data indicating the input state (whether or not each operation button 32a to 32i is pressed) to each operation button 32a to 32i is transmitted to the microcomputer of the communication unit 36. Output to 42.

撮像情報演算部35は、撮像手段が撮像した画像データを解析してその中で輝度が高い領域を判別してその領域の重心位置やサイズなどを算出するためのシステムである。撮像情報演算部35は、例えば最大200フレーム/秒程度のサンプリング周期を有するので、比較的高速なコントローラ5の動きでも追跡して解析することができる。   The imaging information calculation unit 35 is a system for analyzing the image data captured by the imaging unit, discriminating a region having a high luminance in the image data, and calculating a center of gravity position, a size, and the like of the region. Since the imaging information calculation unit 35 has a sampling period of, for example, about 200 frames / second at the maximum, it can track and analyze even a relatively fast movement of the controller 5.

撮像情報演算部35は、赤外線フィルタ38、レンズ39、撮像素子40、及び画像処理回路41を含んでいる。赤外線フィルタ38は、コントローラ5の前方から入射する光から赤外線のみを通過させる。レンズ39は、赤外線フィルタ38を透過した赤外線を集光して撮像素子40へ入射させる。撮像素子40は、例えばCMOSセンサやあるいはCCDセンサのような固体撮像素子であり、レンズ39が集光した赤外線を受光して画像信号を出力する。ここで、テレビ2の表示画面近傍に配置されるマーカ部6のマーカ6R及び6Lは、テレビ2の前方に向かって赤外光を出力する赤外LEDで構成される。したがって、赤外線フィルタ38を設けることによって、撮像素子40は、赤外線フィルタ38を通過した赤外線だけを受光して画像データを生成するので、マーカ6R及び6Lの画像をより正確に撮像することができる。以下では、撮像素子40によって撮像された画像を撮像画像と呼ぶ。撮像素子40によって生成された画像データは、画像処理回路41で処理される。画像処理回路41は、撮像画像内における撮像対象(マーカ6R及び6L)の位置を算出する。画像処理回路41は、算出された位置を示す座標を通信部36のマイコン42へ出力する。この座標のデータは、マイコン42によって操作データとしてゲーム装置3に送信される。以下では、上記座標を「マーカ座標」と呼ぶ。マーカ座標はコントローラ5自体の向き(傾斜角度)や位置に対応して変化するので、ゲーム装置3はこのマーカ座標を用いてコントローラ5の向きや位置を算出することができる。   The imaging information calculation unit 35 includes an infrared filter 38, a lens 39, an imaging element 40, and an image processing circuit 41. The infrared filter 38 passes only infrared rays from the light incident from the front of the controller 5. The lens 39 collects the infrared light transmitted through the infrared filter 38 and makes it incident on the image sensor 40. The image sensor 40 is a solid-state image sensor such as a CMOS sensor or a CCD sensor, for example, and receives the infrared light collected by the lens 39 and outputs an image signal. Here, the markers 6 </ b> R and 6 </ b> L of the marker unit 6 disposed in the vicinity of the display screen of the television 2 are configured by infrared LEDs that output infrared light toward the front of the television 2. Therefore, by providing the infrared filter 38, the image sensor 40 receives only the infrared light that has passed through the infrared filter 38 and generates image data, so that the images of the markers 6R and 6L can be captured more accurately. Hereinafter, an image captured by the image sensor 40 is referred to as a captured image. Image data generated by the image sensor 40 is processed by the image processing circuit 41. The image processing circuit 41 calculates the position of the imaging target (markers 6R and 6L) in the captured image. The image processing circuit 41 outputs coordinates indicating the calculated position to the microcomputer 42 of the communication unit 36. The coordinate data is transmitted to the game apparatus 3 as operation data by the microcomputer 42. Hereinafter, the coordinates are referred to as “marker coordinates”. Since the marker coordinates change corresponding to the direction (tilt angle) and position of the controller 5 itself, the game apparatus 3 can calculate the direction and position of the controller 5 using the marker coordinates.

なお、他の実施形態においては、コントローラ5は画像処理回路41を備えていない構成であってもよく、撮像画像自体がコントローラ5からゲーム装置3へ送信されてもよい。このとき、ゲーム装置3は、画像処理回路41と同様の機能を有する回路あるいはプログラムを有しており、上記マーカ座標を算出するようにしてもよい。   In other embodiments, the controller 5 may not include the image processing circuit 41, and the captured image itself may be transmitted from the controller 5 to the game apparatus 3. At this time, the game apparatus 3 may have a circuit or a program having the same function as the image processing circuit 41, and may calculate the marker coordinates.

加速度センサ37は、コントローラ5の加速度(重力加速度を含む)を検出する、すなわち、コントローラ5に加わる力(重力を含む)を検出する。加速度センサ37は、当該加速度センサ37の検出部に加わっている加速度のうち、センシング軸方向に沿った直線方向の加速度(直線加速度)の値を検出する。例えば、2軸以上の多軸加速度センサの場合には、加速度センサの検出部に加わっている加速度として、各軸に沿った成分の加速度をそれぞれ検出する。例えば、3軸又は2軸の加速度センサは、アナログ・デバイセズ株式会社(Analog Devices, Inc.)又はSTマイクロエレクトロニクス社(STMicroelectronics N.V.)から入手可能である種類のものでもよい。なお、加速度センサ37は、例えば静電容量式の加速度センサであるとするが、他の方式の加速度センサを用いるようにしてもよい。   The acceleration sensor 37 detects the acceleration (including gravity acceleration) of the controller 5, that is, detects the force (including gravity) applied to the controller 5. The acceleration sensor 37 detects the value of the acceleration (linear acceleration) in the linear direction along the sensing axis direction among the accelerations applied to the detection unit of the acceleration sensor 37. For example, in the case of a multi-axis acceleration sensor having two or more axes, the component acceleration along each axis is detected as the acceleration applied to the detection unit of the acceleration sensor. For example, the triaxial or biaxial acceleration sensor may be of the type available from Analog Devices, Inc. or ST Microelectronics NV. The acceleration sensor 37 is, for example, a capacitance type acceleration sensor, but other types of acceleration sensors may be used.

本実施形態では、加速度センサ37は、コントローラ5を基準とした上下方向(図3に示すY軸方向)、左右方向(図3に示すX軸方向)及び前後方向(図3に示すZ軸方向)の3軸方向に関してそれぞれ直線加速度を検出する。加速度センサ37は、各軸に沿った直線方向に関する加速度を検出するものであるため、加速度センサ37からの出力は3軸それぞれの直線加速度の値を表すものとなる。すなわち、検出された加速度は、入力装置8(コントローラ5)を基準に設定されるXYZ座標系(コントローラ座標系(物体座標系))における3次元のベクトル(ax,ay,az)として表される。以下では、加速度センサ37によって検出される3軸に関する各加速度値を各成分とするベクトルを加速度ベクトルと呼ぶ。   In the present embodiment, the acceleration sensor 37 has a vertical direction (Y-axis direction shown in FIG. 3), a horizontal direction (X-axis direction shown in FIG. 3), and a front-back direction (Z-axis direction shown in FIG. 3) with reference to the controller 5. ) Linear acceleration is detected in each of the three axis directions. Since the acceleration sensor 37 detects acceleration in the linear direction along each axis, the output from the acceleration sensor 37 represents the linear acceleration value of each of the three axes. That is, the detected acceleration is represented as a three-dimensional vector (ax, ay, az) in an XYZ coordinate system (controller coordinate system (object coordinate system)) set with reference to the input device 8 (controller 5). . Hereinafter, a vector having the respective acceleration values related to the three axes detected by the acceleration sensor 37 as components is referred to as an acceleration vector.

加速度センサ37が検出した加速度を示すデータ(加速度データ)は、通信部36へ出力される。なお、加速度センサ37が検出した加速度は、コントローラ5自体の向き(傾斜角度)や動きに対応して変化するので、ゲーム装置3は加速度データを用いてコントローラ5の向きや動きを算出することができる。本実施形態では、ゲーム装置3は、加速度データ及び後述する角速度データに基づいてコントローラ5の姿勢を判断する。   Data indicating the acceleration detected by the acceleration sensor 37 (acceleration data) is output to the communication unit 36. The acceleration detected by the acceleration sensor 37 changes in accordance with the direction (tilt angle) and movement of the controller 5 itself, so that the game apparatus 3 can calculate the direction and movement of the controller 5 using the acceleration data. it can. In the present embodiment, the game apparatus 3 determines the attitude of the controller 5 based on acceleration data and angular velocity data described later.

加速度センサ37が検出した加速度(加速度ベクトル)を示すデータ(加速度データ)は、通信部36へ出力される。本実施形態において、加速度センサ37は、コントローラ5の傾斜角度を判断するためのデータを出力するセンサとして用いられる。   Data (acceleration data) indicating the acceleration (acceleration vector) detected by the acceleration sensor 37 is output to the communication unit 36. In the present embodiment, the acceleration sensor 37 is used as a sensor that outputs data for determining the tilt angle of the controller 5.

なお、加速度センサ37から出力される加速度の信号に基づいて、ゲーム装置3のプロセッサ(例えばCPU10)又はコントローラ5のプロセッサ(例えばマイコン42)等のコンピュータが処理を行うことによって、コントローラ5に関するさらなる情報を推測又は算出(判定)することができることは、当業者であれば本明細書の説明から容易に理解できるであろう。例えば、加速度センサ37を搭載するコントローラ5が静止状態であることを前提としてコンピュータ側の処理が実行される場合(すなわち、加速度センサによって検出される加速度が重力加速度のみであるとして処理が実行される場合)、コントローラ5が現実に静止状態であれば、検出された加速度に基づいてコントローラ5の姿勢が重力方向に対して傾いているか否か又はどの程度傾いているかを知ることができる。具体的には、加速度センサ37の検出軸が鉛直下方向を向いている状態を基準としたとき、1G(重力加速度)がかかっているか否かによって、コントローラ5が基準に対して傾いているか否かを知ることができるし、その大きさによって基準に対してどの程度傾いているかも知ることができる。また、多軸の加速度センサ37の場合には、さらに各軸の加速度の信号に対して処理を施すことによって、重力方向に対してコントローラ5がどの程度傾いているかをより詳細に知ることができる。この場合において、プロセッサは、加速度センサ37からの出力に基づいてコントローラ5の傾斜角度を算出してもよいし、当該傾斜角度を算出せずに、コントローラ5の傾斜方向を算出するようにしてもよい。このように、加速度センサ37をプロセッサと組み合わせて用いることによって、コントローラ5の傾斜角度又は姿勢を判定することができる。   In addition, based on the acceleration signal output from the acceleration sensor 37, a computer such as a processor (for example, the CPU 10) of the game apparatus 3 or a processor (for example, the microcomputer 42) of the controller 5 performs processing, whereby further information regarding the controller 5 is obtained. Those skilled in the art will be able to easily understand from the description of the present specification that can be estimated or calculated (determined). For example, when processing on the computer side is executed on the assumption that the controller 5 on which the acceleration sensor 37 is mounted is stationary (that is, the processing is executed assuming that the acceleration detected by the acceleration sensor is only gravitational acceleration). When the controller 5 is actually stationary, it can be determined whether or not the attitude of the controller 5 is inclined with respect to the direction of gravity based on the detected acceleration. Specifically, whether or not the controller 5 is inclined with respect to the reference depending on whether or not 1G (gravity acceleration) is applied, based on the state in which the detection axis of the acceleration sensor 37 is directed vertically downward. It is possible to know how much it is inclined with respect to the reference according to its size. Further, in the case of the multi-axis acceleration sensor 37, it is possible to know in detail how much the controller 5 is inclined with respect to the direction of gravity by further processing the acceleration signal of each axis. . In this case, the processor may calculate the tilt angle of the controller 5 based on the output from the acceleration sensor 37, or may calculate the tilt direction of the controller 5 without calculating the tilt angle. Good. Thus, by using the acceleration sensor 37 in combination with the processor, the tilt angle or posture of the controller 5 can be determined.

一方、コントローラ5が動的な状態(コントローラ5が動かされている状態)であることを前提とする場合には、加速度センサ37は重力加速度に加えてコントローラ5の動きに応じた加速度を検出するので、検出された加速度から重力加速度の成分を所定の処理により除去することによってコントローラ5の動き方向を知ることができる。また、コントローラ5が動的な状態であることを前提とする場合であっても、検出された加速度から、加速度センサの動きに応じた加速度の成分を所定の処理により除去することによって、重力方向に対するコントローラ5の傾きを知ることが可能である。なお、他の実施例では、加速度センサ37は、内蔵の加速度検出手段で検出された加速度信号をマイコン42に出力する前に当該加速度信号に対して所定の処理を行うための、組込み式の処理装置又は他の種類の専用の処理装置を備えていてもよい。組込み式又は専用の処理装置は、例えば、加速度センサ37が静的な加速度(例えば、重力加速度)を検出するために用いられる場合、加速度信号を傾斜角(あるいは、他の好ましいパラメータ)に変換するものであってもよい。   On the other hand, when it is assumed that the controller 5 is in a dynamic state (a state in which the controller 5 is moved), the acceleration sensor 37 detects an acceleration corresponding to the movement of the controller 5 in addition to the gravitational acceleration. Therefore, the movement direction of the controller 5 can be known by removing the gravitational acceleration component from the detected acceleration by a predetermined process. Even if it is assumed that the controller 5 is in a dynamic state, the direction of gravity is obtained by removing the acceleration component corresponding to the movement of the acceleration sensor from the detected acceleration by a predetermined process. It is possible to know the inclination of the controller 5 with respect to. In another embodiment, the acceleration sensor 37 is a built-in process for performing a predetermined process on the acceleration signal before outputting the acceleration signal detected by the built-in acceleration detection means to the microcomputer 42. An apparatus or other type of dedicated processing apparatus may be provided. A built-in or dedicated processing device converts the acceleration signal into a tilt angle (or other preferred parameter) if, for example, the acceleration sensor 37 is used to detect static acceleration (eg, gravitational acceleration). It may be a thing.

通信部36は、マイコン42、メモリ43、無線モジュール44、及びアンテナ45を含んでいる。マイコン42は、処理を行う際にメモリ43を記憶領域として用いながら、マイコン42が取得したデータをゲーム装置3へ無線送信する無線モジュール44を制御する。また、マイコン42はコネクタ33に接続されている。ジャイロセンサユニット7から送信されてくるデータは、コネクタ33を介してマイコン42に入力される。以下、ジャイロセンサユニット7の構成について説明する。   The communication unit 36 includes a microcomputer 42, a memory 43, a wireless module 44, and an antenna 45. The microcomputer 42 controls the wireless module 44 that wirelessly transmits data acquired by the microcomputer 42 to the game apparatus 3 while using the memory 43 as a storage area when performing processing. The microcomputer 42 is connected to the connector 33. Data transmitted from the gyro sensor unit 7 is input to the microcomputer 42 via the connector 33. Hereinafter, the configuration of the gyro sensor unit 7 will be described.

ジャイロセンサユニット7は、プラグ53、マイコン54、2軸ジャイロセンサ55、及び1軸ジャイロセンサ56を備えている。上述のように、ジャイロセンサユニット7は、3軸(本実施形態では、XYZ軸)周りの角速度を検出し、検出した角速度を示すデータ(角速度データ)をコントローラ5へ送信する。   The gyro sensor unit 7 includes a plug 53, a microcomputer 54, a 2-axis gyro sensor 55, and a 1-axis gyro sensor 56. As described above, the gyro sensor unit 7 detects angular velocities around the three axes (in this embodiment, the XYZ axes), and transmits data (angular velocity data) indicating the detected angular velocities to the controller 5.

2軸ジャイロセンサ55は、X軸周りの角速度及びY軸周りの(単位時間あたりの)角速度を検出する。また、1軸ジャイロセンサ56は、Z軸周りの(単位時間あたりの)角速度を検出する。なお、本明細書では、コントローラ5の撮像方向(Z軸正方向)を基準として、Z軸周り、X軸周り、Y軸周りの回転方向を、それぞれ、ロール方向、ピッチ方向、ヨー方向と呼ぶ。すなわち、2軸ジャイロセンサ55は、ピッチ方向(X軸周りの回転方向)及びヨー方向(Y軸周りの回転方向)の角速度を検出し、1軸ジャイロセンサ56は、ロール方向(Z軸周りの回転方向)の角速度を検出する。   The biaxial gyro sensor 55 detects an angular velocity around the X axis and an angular velocity (per unit time) around the Y axis. The single axis gyro sensor 56 detects an angular velocity (per unit time) around the Z axis. In this specification, the rotation directions around the Z axis, around the X axis, and around the Y axis are referred to as the roll direction, the pitch direction, and the yaw direction, respectively, based on the imaging direction (Z axis positive direction) of the controller 5. . That is, the biaxial gyro sensor 55 detects angular velocities in the pitch direction (rotation direction around the X axis) and the yaw direction (rotation direction around the Y axis), and the single axis gyro sensor 56 detects the roll direction (around the Z axis). Detect the angular velocity in the rotation direction.

なお、本実施形態では、3軸回りの角速度を検出するために、2軸ジャイロセンサ55と1軸ジャイロセンサ56とを用いる構成としたが、他の実施形態においては、3軸回りの角速度を検出することができればよく、用いるジャイロセンサの数及び組み合わせはどのようなものであってもよい。   In this embodiment, the 2-axis gyro sensor 55 and the 1-axis gyro sensor 56 are used to detect the angular velocity around the three axes. However, in other embodiments, the angular velocity around the three axes is Any number and combination of gyro sensors may be used as long as they can be detected.

また、本実施形態では、各ジャイロセンサ55及び56が角速度を検出する3つの軸は、加速度センサ37が加速度を検出する3つの軸(XYZ軸)と一致するように設定される。ただし、他の実施形態においては、各ジャイロセンサ55及び56が角速度を検出する3つの軸と、加速度センサ37が加速度を検出する3つの軸とは一致しなくてもよい。   In this embodiment, the three axes for detecting the angular velocities by the gyro sensors 55 and 56 are set so as to coincide with the three axes (XYZ axes) for detecting the acceleration by the acceleration sensor 37. However, in other embodiments, the three axes for detecting the angular velocity by the gyro sensors 55 and 56 and the three axes for detecting the acceleration by the acceleration sensor 37 do not have to coincide with each other.

ジャイロセンサ55及び56で検出された角速度を示すデータは、マイコン54に出力される。したがって、マイコン54には、XYZ軸の3軸回りの角度速度を示すデータが入力されることになる。マイコン54は、上記3軸回りの角速度を示すデータを角速度データとしてプラグ53を介してコントローラ5へ送信する。なお、マイコン54からコントローラ5への送信は所定の周期毎に逐次行われるが、ゲームの処理は1/60秒を単位として(1フレーム時間として)行われることが一般的であるので、この時間以下の周期で送信を行うことが好ましい。   Data indicating the angular velocity detected by the gyro sensors 55 and 56 is output to the microcomputer 54. Accordingly, the microcomputer 54 receives data indicating the angular velocity around the three axes of the XYZ axes. The microcomputer 54 transmits data indicating the angular velocities around the three axes as angular velocity data to the controller 5 via the plug 53. Although transmission from the microcomputer 54 to the controller 5 is sequentially performed every predetermined cycle, since the game processing is generally performed in units of 1/60 seconds (one frame time), this time Transmission is preferably performed in the following cycle.

コントローラ5の説明に戻り、操作部32、撮像情報演算部35、及び加速度センサ37からマイコン42へ出力されたデータ、ならびに、ジャイロセンサユニット7からマイコン42へ送信されてきたデータは、一時的にメモリ43に格納される。これらのデータは、上記操作データとしてゲーム装置3へ送信される。すなわち、マイコン42は、ゲーム装置3の無線コントローラモジュール19への送信タイミングが到来すると、メモリ43に格納されている操作データを無線モジュール44へ出力する。無線モジュール44は、例えばBluetooth(ブルートゥース)(登録商標)の技術を用いて、所定周波数の搬送波を操作データで変調し、その微弱電波信号をアンテナ45から放射する。つまり、操作データは、無線モジュール44で微弱電波信号に変調されてコントローラ5から送信される。微弱電波信号はゲーム装置3側の無線コントローラモジュール19で受信される。受信された微弱電波信号について復調や復号を行うことによって、ゲーム装置3は操作データを取得することができる。そして、ゲーム装置3のCPU10は、取得した操作データとゲームプログラムとに基づいて、ゲーム処理を行う。なお、通信部36から無線コントローラモジュール19への無線送信は所定の周期毎に逐次行われるが、ゲームの処理は1/60秒を単位として(1フレーム時間として)行われることが一般的であるので、この時間以下の周期で送信を行うことが好ましい。コントローラ5の通信部36は、例えば1/200秒に1回の割合で各操作データをゲーム装置3の無線コントローラモジュール19へ出力する。   Returning to the description of the controller 5, the data output from the operation unit 32, the imaging information calculation unit 35 and the acceleration sensor 37 to the microcomputer 42, and the data transmitted from the gyro sensor unit 7 to the microcomputer 42 are temporarily stored. Stored in the memory 43. These data are transmitted to the game apparatus 3 as the operation data. That is, the microcomputer 42 outputs the operation data stored in the memory 43 to the wireless module 44 when the transmission timing to the wireless controller module 19 of the game apparatus 3 arrives. The wireless module 44 modulates a carrier wave of a predetermined frequency with operation data using, for example, Bluetooth (registered trademark) technology, and radiates a weak radio signal from the antenna 45. That is, the operation data is modulated by the wireless module 44 into a weak radio signal and transmitted from the controller 5. The weak radio signal is received by the wireless controller module 19 on the game apparatus 3 side. By demodulating and decoding the received weak radio signal, the game apparatus 3 can acquire operation data. And CPU10 of the game device 3 performs a game process based on the acquired operation data and a game program. Note that the wireless transmission from the communication unit 36 to the wireless controller module 19 is sequentially performed at predetermined intervals, but the game processing is generally performed in units of 1/60 seconds (one frame time). Therefore, it is preferable to perform transmission at a period equal to or shorter than this time. The communication unit 36 of the controller 5 outputs each operation data to the wireless controller module 19 of the game apparatus 3 at a rate of once every 1/200 seconds, for example.

上記コントローラ5を用いることによって、プレイヤは、各操作ボタンを押下する従来の一般的なゲーム操作に加えて、コントローラ5を任意の傾斜角度に傾ける操作を行うことができる。その他、上記コントローラ5によれば、プレイヤは、コントローラ5によって画面上の任意の位置を指示する操作、及び、コントローラ5自体を動かす操作を行うこともできる。   By using the controller 5, the player can perform an operation of tilting the controller 5 to an arbitrary tilt angle in addition to the conventional general game operation of pressing each operation button. In addition, according to the controller 5, the player can also perform an operation of instructing an arbitrary position on the screen by the controller 5 and an operation of moving the controller 5 itself.

[ゲーム処理の概要]
次に、図8〜図15Bを参照して、本発明の一実施形態に係るゲーム処理の概要について説明する。本実施形態では、ボウリングゲームを行うこととする。図8は、入力装置8を用いてゲーム操作するときの状態を概説する図である。図9は、プレイヤが投球前の動作の姿勢で入力装置8を把持する様子を示した図である。図10は、プレイヤがバックスイングをしている様子を示した図である。図11は、プレイヤがフォワードスイングをしている様子を示した図である。図12は、プレイヤがボールを投球する瞬間の様子を示した図である。図13は、プレイヤがボールを投球した後の様子を示した図である。図8に示されるように、プレイヤPは、入力装置8を把持し、あたかもボウリングのボールを実際に投げるように、入力装置8を振る動作を行う。このようなプレイヤが入力装置8を振る動作に応じて、ゲーム装置3は、プレイヤキャラクタがボウリングのボールを投げる様子をテレビ2に表示する。
[Overview of game processing]
Next, an overview of game processing according to an embodiment of the present invention will be described with reference to FIGS. In the present embodiment, a bowling game is performed. FIG. 8 is a diagram outlining a state when a game operation is performed using the input device 8. FIG. 9 is a diagram illustrating a state where the player holds the input device 8 in the posture of the action before the pitching. FIG. 10 is a diagram illustrating a state where the player is performing a backswing. FIG. 11 is a diagram illustrating a state where the player is performing a forward swing. FIG. 12 is a diagram illustrating a situation in which a player throws a ball. FIG. 13 shows a state after the player has thrown the ball. As shown in FIG. 8, the player P holds the input device 8 and performs an operation of swinging the input device 8 as if to actually throw a bowling ball. In response to the movement of the player swinging the input device 8, the game device 3 displays on the television 2 a state in which the player character throws the bowling ball.

まず、プレイヤPは、ボウリングのアドレス(投球前の動作)のような姿勢で入力装置8を把持した状態(アドレス動作。図9)から、コントローラ5(入力装置8)のBボタン32iを押下し、バックスイング(図10)からフォワードスイング(図11)に移行する動作を行う。このプレイヤPの動作に応じて、テレビ2には、プレイヤキャラクタがアドレス動作からバックスイング動作を開始し、フォワードスイング動作に移行する様子が表示される。次に、プレイヤPがフォワードスイングに移行後、ボウリングのボールを実際に投げるようにして入力装置8を振る動作を行う(リリース動作。図12)。通常、人が実際にボウリングのボールを投げる場合、フォワードスイング中、ボールが最下点(レーンに最も近い位置)付近に達した時に、人はボールをリリースする。人はボールをリリースする際、ボールに力を加えるようにして投球する。本ゲームにおいてもプレイヤは、実際にボウリングのボールを投球する場合のように、フォワードスイング中、入力装置8が最下点付近に達した時に、ボールを投げるようにして入力装置8を振る動作を行う(図12)。このプレイヤPの投球動作に応じて、ゲーム装置3は、ボールが投球されたと判定(自動投球判定)し、テレビ2にプレイヤキャラクタがボールを投球した様子を表示する。その後、プレイヤPは、投球動作を終了する(フィニッシュ。図13)。このように、ボウリングの投球動作は、アドレス、バックスイング、フォワードスイング、リリース、及び、フィニッシュの動作に分けることができる。   First, the player P presses the B button 32i of the controller 5 (input device 8) from a state (address operation; FIG. 9) holding the input device 8 in a posture like a bowling address (motion before throwing). Then, an operation of shifting from the back swing (FIG. 10) to the forward swing (FIG. 11) is performed. In response to the action of the player P, the television 2 displays a state in which the player character starts the backswing action from the address action and shifts to the forward swing action. Next, after the player P shifts to the forward swing, the player swings the input device 8 so as to actually throw the bowling ball (release operation, FIG. 12). Normally, when a person actually throws a bowling ball, during the forward swing, the person releases the ball when it reaches near the lowest point (position closest to the lane). When a person releases a ball, he or she throws the ball with force applied. Also in this game, the player swings the input device 8 so as to throw the ball when the input device 8 reaches near the lowest point during the forward swing, as in the case of actually throwing a bowling ball. Perform (FIG. 12). In response to the pitching action of the player P, the game apparatus 3 determines that the ball has been pitched (automatic pitching determination), and displays a state in which the player character has pitched the ball on the television 2. Thereafter, the player P finishes the pitching operation (finish, FIG. 13). Thus, the bowling pitching operation can be divided into address, back swing, forward swing, release, and finish operations.

ここで、投球されたボールの速度及び軌道は、プレイヤが投球動作中に入力装置8に加えた力や方向(すなわち、コントローラ5を振る速さや方向)に応じて定められる。また、投球判定後にコントローラ5に加わった力やその方向も、投球されたボールの速度及び軌道に影響する。   Here, the speed and trajectory of the pitched ball are determined according to the force and direction applied to the input device 8 during the pitching operation by the player (that is, the speed and direction of swinging the controller 5). In addition, the force applied to the controller 5 after the pitch determination and its direction also affect the speed and trajectory of the pitched ball.

具体的には、ゲーム装置3は、2軸ジャイロセンサ55及び1軸ジャイロセンサ56で検出された角速度を用いて入力装置8の姿勢を検出することによって、バックスイングからフォワードスイングに移行したことを検出する。すなわち、ゲーム装置3は、2軸ジャイロセンサ55及び1軸ジャイロセンサ56から逐次出力される各軸周りの角速度を積分し、初期状態からの姿勢の変化量を積分結果から算出することによって、現在の入力装置8の姿勢を算出する。そして、算出された入力装置8の姿勢の変化に基づいて、ゲーム装置3は、プレイヤがバックスイングからフォワードスイングに移行したことを認識する。   Specifically, the game apparatus 3 detects that the posture of the input apparatus 8 has been changed using the angular velocities detected by the two-axis gyro sensor 55 and the one-axis gyro sensor 56, thereby indicating that the transition from the back swing to the forward swing has occurred. To detect. In other words, the game apparatus 3 integrates the angular velocities around the respective axes that are sequentially output from the 2-axis gyro sensor 55 and the 1-axis gyro sensor 56, and calculates the amount of change in posture from the initial state from the integration result. The attitude of the input device 8 is calculated. Then, based on the calculated change in the attitude of the input device 8, the game device 3 recognizes that the player has shifted from the back swing to the forward swing.

ここで、入力装置8の姿勢とは、入力装置8が存在する空間の所定位置を基準としたxyz座標系における姿勢である。ここでは、図1に示されるように、xyz座標系は、入力装置8がマーカ部6の正面に位置することを前提とし、入力装置8の位置からマーカ部6を向く方向をz軸正方向とし、鉛直上向き(重力方向の逆方向)をy軸正方向とし、入力装置8の位置からマーカ部6を向いた場合の左方向をx軸正方向とした座標系であるとする。また、ここでは、入力装置8を基準としたX軸、Y軸、Z軸が、それぞれx軸、y軸、z軸の向きと一致する姿勢を基準姿勢と呼ぶことにする。入力装置8の姿勢は、基準姿勢からZ軸方向を基準としてロール方向(Z軸周り)、ピッチ方向(X軸周り)、ヨー方向(Y軸周り)にそれぞれ入力装置8を回転させた場合のxyz座標系における姿勢である。当該姿勢は、後述する回転行列Mによって表現される。   Here, the attitude of the input device 8 is an attitude in the xyz coordinate system based on a predetermined position in a space where the input device 8 exists. Here, as shown in FIG. 1, the xyz coordinate system assumes that the input device 8 is located in front of the marker unit 6, and the direction from the position of the input device 8 toward the marker unit 6 is the positive z-axis direction. Suppose that the coordinate system is such that the vertically upward direction (reverse direction of the gravity direction) is the y-axis positive direction and the left direction when facing the marker unit 6 from the position of the input device 8 is the x-axis positive direction. Here, an attitude in which the X axis, the Y axis, and the Z axis with respect to the input device 8 coincide with the directions of the x axis, the y axis, and the z axis will be referred to as a reference attitude. The posture of the input device 8 is that when the input device 8 is rotated in the roll direction (around the Z axis), the pitch direction (around the X axis), and the yaw direction (around the Y axis) from the reference posture with the Z axis direction as a reference. It is an attitude in the xyz coordinate system. The posture is expressed by a rotation matrix M described later.

次に、ゲーム装置3は、フォワードスイング中、2軸ジャイロセンサ55で検出された角速度を用いて、ボールの自動投球判定を行う。具体的には、ゲーム装置3は、2軸ジャイロセンサ55で検出されたX軸周りの角速度及びY軸周りの角速度を各成分とする、角速度ベクトルの大きさ(この角速度ベクトルの大きさは、入力装置8の振りの速さに応じて変化する)が所定の閾値を超えた場合に、ボールが投球されたと判定する。より正確には、後述するように、上記角速度ベクトルの大きさが所定の閾値を超え、かつ極大となった場合に、ボールが投球されたと判定する。すなわち、ゲーム装置3は、プレイヤが入力装置8をX軸及びY軸周りに所定の速さ以上で振った場合、ボールが投球されたと判定する。   Next, the game apparatus 3 performs automatic ball pitching determination using the angular velocity detected by the two-axis gyro sensor 55 during the forward swing. Specifically, the game apparatus 3 uses the angular velocity vector around the X axis and the angular velocity around the Y axis detected by the two-axis gyro sensor 55 as components, and the magnitude of the angular velocity vector (the magnitude of this angular velocity vector is It is determined that the ball has been thrown when the input device 8 changes according to the swing speed of the input device 8) exceeds a predetermined threshold. More precisely, as will be described later, when the magnitude of the angular velocity vector exceeds a predetermined threshold and becomes a maximum, it is determined that the ball has been thrown. That is, the game device 3 determines that the ball has been thrown when the player swings the input device 8 around the X axis and the Y axis at a predetermined speed or higher.

次に、ゲーム装置3は、上記自動投球判定がなされた時点を基準に定められる所定の期間に加速度センサ37で検出された加速度に基づいて、投球されたボールの速度を決定する。すなわち、ゲーム装置3は、自動投球判定前の所定の期間中に加速度センサ37で検出した加速度の大きさに応じて、ボールの速度を決定する。さらに、ゲーム装置3は、自動投球判定後の所定の期間中に加速度センサ37で検出した加速度の大きさに応じて、ボールの速度を変化させる。このように、自動投球判定がなされた後における加速度の値に応じて、ボールの速度を変化させることにより、プレイヤの振り動作をより正確にゲーム処理に反映させることができる。すなわち、上述した自動投球判定では、入力装置8の振りの速さが所定値以上である場合にボールの投球がなされたと判断されるため、プレイヤがより速く入力装置8を振る場合、プレイヤの意図するリリースのタイミング前のフォワードスイング中に、ボールの投球がされたと判断される場合がある。つまり、自動投球判定では、プレイヤの意図するリリースのタイミングを正確に知ることは困難であるため、リリースのタイミング前にボールの投球がされたと判断される場合がある。このような場合、自動投球判定後において、入力装置8の振りの速さが最大になると考えられる。自動投球判定前にのみ検出された加速度に応じてボールの転がる速度が決定されると、プレイヤがより速くボールを転がせようと意図して入力装置8をより速く振った場合でも、ボールの転がる速度は所定の値(自動投球判定の閾値に応じたボールの速度)以上にはならない。従って、自動投球判定後の所定期間に検出される加速度の大きさに応じて、ボールの速度を補正することにより、プレイヤの振り動作をより正確にゲーム空間におけるボールの転がる速度に反映させることができる。   Next, the game apparatus 3 determines the speed of the pitched ball based on the acceleration detected by the acceleration sensor 37 during a predetermined period determined based on the time when the automatic pitching determination is made. That is, the game apparatus 3 determines the speed of the ball according to the magnitude of acceleration detected by the acceleration sensor 37 during a predetermined period before the automatic pitching determination. Furthermore, the game apparatus 3 changes the speed of the ball according to the magnitude of the acceleration detected by the acceleration sensor 37 during a predetermined period after the automatic pitching determination. In this way, by changing the speed of the ball according to the acceleration value after the automatic pitching determination is made, the player's swing motion can be more accurately reflected in the game process. That is, in the above-described automatic pitching determination, it is determined that the ball has been thrown when the swing speed of the input device 8 is equal to or higher than a predetermined value. Therefore, when the player swings the input device 8 faster, the player's intention It may be determined that the ball has been thrown during the forward swing before the release timing. That is, in the automatic pitching determination, it is difficult to accurately know the release timing intended by the player, so it may be determined that the ball has been thrown before the release timing. In such a case, it is considered that the swing speed of the input device 8 is maximized after the automatic pitching determination. When the ball rolling speed is determined according to the acceleration detected only before the automatic pitching determination, the ball rolling speed even when the player swings the input device 8 faster with the intention of rolling the ball faster. Does not exceed a predetermined value (the speed of the ball according to the threshold value for automatic pitching determination). Therefore, by correcting the speed of the ball according to the magnitude of the acceleration detected in the predetermined period after the automatic pitching determination, the player's swing motion can be more accurately reflected in the speed of the ball rolling in the game space. it can.

また、ゲーム装置3は、自動投球判定前後の所定期間中に加速度センサ37で検出した加速度の積算値と、1軸ジャイロセンサ56で検出したZ軸周りの角速度積算値とに基づいて、ボールの回転量及び回転方向を決定し、決定された回転量及び回転方向に基づいてボールをカーブ(軌道を変化)させる。すなわち、プレイヤが入力装置8を捻る動作に応じて、ボールにカーブをかける。上述した自動投球判定では、プレイヤの意図するリリースのタイミングを正確に知ることは困難であるため、自動投球判定前後に検出される上記加速度と、上記角速度とに基づいて、ボールの回転(回転量及び回転方向)を決定する。これにより、プレイヤがボールに加えようと意図する回転を、より正確にゲーム空間におけるボールの回転に反映させることができる。このようにして、自動投球判定前後におけるプレイヤによる入力装置8の実際の振り及び捻り動作が、ゲーム空間におけるボールの回転量及び回転方向に反映される。   In addition, the game apparatus 3 determines whether or not the ball is based on the integrated value of the acceleration detected by the acceleration sensor 37 and the integrated angular velocity around the Z axis detected by the uniaxial gyro sensor 56 during a predetermined period before and after the automatic pitching determination. A rotation amount and a rotation direction are determined, and the ball is curved (changes the trajectory) based on the determined rotation amount and rotation direction. In other words, the ball is curved according to the action of the player twisting the input device 8. In the above-mentioned automatic pitch determination, it is difficult to accurately know the release timing intended by the player. Therefore, based on the acceleration detected before and after the automatic pitch determination and the angular velocity, the rotation of the ball (the amount of rotation) And the direction of rotation). Thereby, the rotation that the player intends to add to the ball can be more accurately reflected in the rotation of the ball in the game space. In this way, the actual swinging and twisting motion of the input device 8 by the player before and after the automatic pitching determination is reflected in the amount and direction of rotation of the ball in the game space.

さらに、ゲーム装置3は、自動投球判定後、プレイヤが入力装置8を振り終わる際の入力装置8の姿勢が所定の姿勢である場合、ボールの軌道を修正する。具体的には、プレイヤが入力装置8を振った後であるフィニッシュの状態において、入力装置8の姿勢がロール方向(Z軸周り)に回転していない場合は、プレイヤはストレートの投球をしたとして、ストレート補正を行う。ストレート補正とは、ボールが転がる方向をストレートに補正することである。例えば、ゲーム装置3は、ボールの回転方向をピンに向かう方向に補正したり、回転量を抑えたりすることによって、ボールの転がる方向をストレートに補正する。図14は、フィニッシュの状態において、入力装置8を後面から見た図である。図14において、Z軸の方向は紙面手前から奥方向である。図14に示されるように、フィニッシュの状態において、入力装置8がZ軸周りに所定の角度以上回転している場合、ゲーム装置3は、プレイヤがボールに回転を加えたと判断して上記ストレート補正を行わない。   Furthermore, after the automatic pitching determination, the game apparatus 3 corrects the ball trajectory when the posture of the input device 8 when the player finishes swinging the input device 8 is a predetermined posture. Specifically, in a finish state after the player swings the input device 8, if the posture of the input device 8 is not rotating in the roll direction (around the Z axis), the player has assumed a straight pitch Perform straight correction. Straight correction is to straighten the direction in which the ball rolls. For example, the game apparatus 3 corrects the direction in which the ball rolls straight by correcting the direction of rotation of the ball toward the pin or suppressing the amount of rotation. FIG. 14 is a view of the input device 8 as seen from the rear surface in the finished state. In FIG. 14, the direction of the Z-axis is from the front to the back of the page. As shown in FIG. 14, in the finish state, when the input device 8 is rotated by a predetermined angle or more around the Z axis, the game device 3 determines that the player has rotated the ball and performs the straight correction. Do not do.

ただし、フィニッシュの状態において、入力装置8がZ軸周りに所定の角度以上回転していなくても、入力装置8の上面が地面の方向を向いており、かつ、Z軸正方向がプレイヤの真後ろ方向を向いていない場合には、ゲーム装置3は、ストレート補正を行わない。図15Aは、フィニッシュの状態において、入力装置8の姿勢を投球方向に対して横から見た図である。図15Bは、フィニッシュの状態において、ストレート補正を行わない場合の入力装置8の姿勢を投球方向に対して真後ろから見た図である。図15A及び図15Bに示されるように、プレイヤが入力装置8を振り終わった場合において、入力装置8の上面が地面の方向を向いており(すなわち、入力装置8の位置からY軸正方向に無限に伸びる半直線が地面と交わる場合)、かつ、Z軸がxyz座標系におけるx軸の正方向(図15Bの左側)又は負方向(図15Bの右側)に傾いている場合、ゲーム装置3は、プレイヤがボールに回転を加えたとしてストレート補正を行わない。   However, in the finish state, even if the input device 8 does not rotate more than a predetermined angle around the Z axis, the upper surface of the input device 8 faces the ground, and the positive direction of the Z axis is directly behind the player. If it is not facing the direction, the game apparatus 3 does not perform straight correction. FIG. 15A is a view of the posture of the input device 8 as viewed from the side with respect to the pitching direction in the finished state. FIG. 15B is a view of the posture of the input device 8 when the straight correction is not performed in the finish state as seen from the back with respect to the pitching direction. As shown in FIGS. 15A and 15B, when the player has finished swinging the input device 8, the upper surface of the input device 8 is directed toward the ground (that is, from the position of the input device 8 in the positive direction of the Y axis). When the half-line extending infinitely intersects the ground) and the Z-axis is inclined in the positive direction (left side of FIG. 15B) or negative direction (right side of FIG. 15B) of the x-axis in the xyz coordinate system, the game apparatus 3 Does not perform straight correction on the assumption that the player has rotated the ball.

上述のように、フィニッシュの状態における入力装置8の姿勢に応じてストレート補正を行うか否かを決定する理由を以下に説明する。すなわち、プレイヤがストレートのボールを投球する際、掌を上の方向に向けた状態から手首を捻ることなく真後ろにバックスイングを行い、そのまま手首を捻らずにフォワードスイングをすると考えられる。そして、プレイヤは、ボールをリリース後、手首を捻らずに掌が投球方向(あるいは大きなスイングをする場合は投球方向と反対方向)に向くようにしてボールの投球動作を終了する(フィニッシュの状態になる)と考えられる。つまり、プレイヤがストレートのボールを投球する際、投球中及び投球後において、プレイヤは投球方向にまっすぐに腕を振るものと考えられる。一方、プレイヤがボールに回転を加えようとする場合、ボールを捻るようにして投球しようとすると考えられるため、フィニッシュの状態では、手首を捻った状態になる。この場合、入力装置8はZ軸周りに回転した状態になる。従って、フィニッシュの状態における入力装置8のZ軸周りの回転を検出することにより、プレイやがボールにカーブをかけようとしたのか、ストレートのボールを投げようとしたのかを判定することができる。   The reason for determining whether or not to perform straight correction according to the attitude of the input device 8 in the finish state as described above will be described below. That is, when the player throws a straight ball, it is considered that the player performs a backswing from behind with the palm facing upward without twisting the wrist and performs a forward swing without twisting the wrist. Then, after releasing the ball, the player finishes the ball throwing motion so that the palm faces in the pitching direction (or the direction opposite to the pitching direction when making a large swing) without twisting the wrist (in the finish state). It is considered to be. That is, when the player throws a straight ball, it is considered that the player swings his arm straight in the pitching direction during and after the pitching. On the other hand, when the player tries to rotate the ball, it is considered that the player tries to throw the ball by twisting, so that the wrist is twisted in the finish state. In this case, the input device 8 is rotated around the Z axis. Therefore, by detecting the rotation of the input device 8 around the Z-axis in the finish state, it is possible to determine whether the player has tried to curve the ball or to throw a straight ball.

また、入力装置8を振った場合の腕の軌道が投球方向に対してまっすぐでない場合、フィニッシュの状態においては、入力装置8は、図15Bに示されるように、x軸の正方向又は負方向に傾くと考えられる。図15Bで示される腕の軌道を示す矢印pは、プレイヤの腕が後方(バックスイングからフォワードスイングに移行する瞬間の状態)から前方(フィニッシュの状態)に移動する様子を上から見た場合の腕の軌道を示している。このように、腕の軌道pが投球方向に対してまっすぐでない場合、プレイヤは、ボールに回転を加えようとしたと考えられる。プレイヤが投球方向に対してまっすぐに入力装置8を振らない場合、フィニッシュの状態における入力装置8は、図15Bに示されるようにy軸方向(重力方向と反対方向)に対してある程度傾いていると考えられる。   When the arm trajectory when the input device 8 is swung is not straight with respect to the pitching direction, the input device 8 is in the positive or negative direction of the x axis in the finish state, as shown in FIG. 15B. It seems that it is inclined to. The arrow p indicating the trajectory of the arm shown in FIG. 15B is when the player's arm moves from the back (the state at the moment of transition from the back swing to the forward swing) to the front (the finish state) when viewed from above. The arm trajectory is shown. As described above, when the arm trajectory p is not straight with respect to the pitching direction, it is considered that the player tried to rotate the ball. When the player does not swing the input device 8 straight with respect to the pitching direction, the input device 8 in the finished state is inclined to some extent with respect to the y-axis direction (the direction opposite to the gravity direction) as shown in FIG. 15B. it is conceivable that.

以上のように、フィニッシュの状態における入力装置8の姿勢から、プレイヤがボールに回転を加えようとしたか否かを判定することができる。従って、フィニッシュの状態における入力装置8の姿勢に基づいてストレート補正を行うか否かを判定することにより、プレイヤが意図したようにボールを投球することができる。   As described above, it is possible to determine whether or not the player has attempted to rotate the ball from the attitude of the input device 8 in the finished state. Therefore, by determining whether or not to perform straight correction based on the attitude of the input device 8 in the finish state, the ball can be thrown as intended by the player.

[ゲーム処理の詳細]
次に、図16〜図29を参照してゲーム装置3において実行される処理の詳細について説明する。まず、ゲーム装置3における処理において用いられる主なデータについて図16を用いて説明する。図16は、ゲーム装置3のメインメモリ(外部メインメモリ12又は内部メインメモリ11e)に記憶される主なデータを示す図である。図16に示されるように、ゲーム装置3のメインメモリには、ゲームプログラム61、操作データ62、及びゲーム処理用データ66が記憶される。なお、メインメモリには、図16に示すデータの他、ゲームに登場する各種オブジェクトの画像データや、オブジェクトの各種パラメータを示すデータ、各操作ボタン32a〜32iに対する入力状態を示すデータ等、ゲーム処理に必要なデータが記憶される。
[Details of game processing]
Next, details of processing executed in the game apparatus 3 will be described with reference to FIGS. First, main data used in the processing in the game apparatus 3 will be described with reference to FIG. FIG. 16 is a diagram showing main data stored in the main memory (the external main memory 12 or the internal main memory 11e) of the game apparatus 3. As shown in FIG. 16, a game program 61, operation data 62, and game processing data 66 are stored in the main memory of the game apparatus 3. In addition to the data shown in FIG. 16, the main memory stores game data such as image data of various objects appearing in the game, data indicating various parameters of the objects, and data indicating input states of the operation buttons 32a to 32i. Necessary data is stored.

ゲームプログラム61は、ゲーム装置3に電源が投入された後の適宜のタイミングで光ディスク4からその一部又は全部が読み込まれてメインメモリのプログラム領域に記憶される。   A part or all of the game program 61 is read from the optical disc 4 and stored in the program area of the main memory at an appropriate timing after the game apparatus 3 is powered on.

操作データ62は、コントローラ5からゲーム装置3へ送信されてくる操作データである。上述したように、コントローラ5からゲーム装置3へ1/200秒に1回の割合で操作データが送信されるので、メインメモリに記憶される操作データ62はこの割合で更新される。ここで、本実施形態においては、1/200秒に1回送信される操作データを1サンプルとして、メインメモリには、最新の(最後に送信された)操作データに加えて、過去に送信された所定数の操作データが記憶される。   The operation data 62 is operation data transmitted from the controller 5 to the game apparatus 3. As described above, since the operation data is transmitted from the controller 5 to the game apparatus 3 at a rate of once every 1/200 seconds, the operation data 62 stored in the main memory is updated at this rate. Here, in this embodiment, the operation data transmitted once every 1/200 second is taken as one sample, and in addition to the latest (last transmitted) operation data, it is transmitted to the main memory in the past. A predetermined number of operation data is stored.

操作データ62には、角速度データ63、加速度データ64、及びマーカ座標データ65が含まれる。また、各ボタンが押されたか否かを示すデータも含まれる。角速度データ63は、ジャイロセンサユニット7のジャイロセンサ55及び56によって検出された角速度を示すデータの集合である。すなわち、角速度データ63は、図3に示すXYZ座標系における各軸回りの角速度であり、現在及び過去に検出された各軸周りの角速度の集合である。また、加速度データ64は、現在及び過去に加速度センサ37によって検出された加速度(加速度ベクトル)を示すデータの集合である。   The operation data 62 includes angular velocity data 63, acceleration data 64, and marker coordinate data 65. Also included is data indicating whether or not each button has been pressed. The angular velocity data 63 is a set of data indicating the angular velocity detected by the gyro sensors 55 and 56 of the gyro sensor unit 7. That is, the angular velocity data 63 is an angular velocity around each axis in the XYZ coordinate system shown in FIG. 3, and is a set of angular velocities around each axis detected at present and in the past. The acceleration data 64 is a set of data indicating the acceleration (acceleration vector) detected by the acceleration sensor 37 at the present time and in the past.

マーカ座標データ65は、撮像情報演算部35の画像処理回路41によって算出される座標、すなわち上記マーカ座標を示すデータである。マーカ座標は、撮像画像に対応する平面上の位置を表すための2次元座標系で表現される。   The marker coordinate data 65 is data indicating coordinates calculated by the image processing circuit 41 of the imaging information calculation unit 35, that is, the marker coordinates. The marker coordinates are expressed in a two-dimensional coordinate system for representing a position on a plane corresponding to the captured image.

ゲーム処理用データ66は、後述するゲーム処理(図17)において用いられるデータである。ゲーム処理用データ66は、回転行列データ67、ロール成分回転データ68、ピッチ成分回転データ69、ヨー成分回転データ70、ピッチ姿勢データ71、及びヨー姿勢データ72を含む。   The game process data 66 is data used in a game process (FIG. 17) described later. The game processing data 66 includes rotation matrix data 67, roll component rotation data 68, pitch component rotation data 69, yaw component rotation data 70, pitch posture data 71, and yaw posture data 72.

回転行列データ67は、基準姿勢(上述したXYZ軸がxyz軸と一致する場合の姿勢)から現在の入力装置8(コントローラ5)の姿勢への回転を表すデータであり、当該回転は、回転行列Mで表される。また、詳細は後述するが、回転行列Mは、入力装置8のXYZ軸方向を示すそれぞれの単位ベクトルをxyz空間内の座標系で表して並べたものでもある。回転行列データ67は、操作データ62と同様、最新の回転行列Mに加えて、所定サンプルの回転行列Mを示すデータの集合である。回転行列Mは、以下の式(1)に示す3×3の行列で表現される。   The rotation matrix data 67 is data representing the rotation from the reference posture (the posture when the XYZ axes described above coincide with the xyz axis) to the current posture of the input device 8 (controller 5). Represented by M. As will be described in detail later, the rotation matrix M is also obtained by arranging the unit vectors indicating the XYZ axis directions of the input device 8 in a coordinate system in the xyz space. Like the operation data 62, the rotation matrix data 67 is a set of data indicating the rotation matrix M of a predetermined sample in addition to the latest rotation matrix M. The rotation matrix M is represented by a 3 × 3 matrix shown in the following formula (1).

Figure 0005420954
Figure 0005420954

また、ロール成分回転データ68は、Z軸周りの入力装置8の回転を表すデータであり、ロール成分回転行列Mrで表される。ピッチ成分回転データ69は、X軸周りの入力装置8の回転を表すデータであり、ピッチ成分回転行列Mpで表される。さらに、ヨー成分回転データ70は、Y軸周りの入力装置8の回転を表すデータであり、ヨー成分回転行列Myで表される。ロール成分回転行列Mr、ピッチ成分回転行列Mp、及びヨー成分回転行列Myは、それぞれ以下の式(2)〜式(4)に示す3×3の行列で表現される。   The roll component rotation data 68 is data representing the rotation of the input device 8 around the Z axis, and is represented by a roll component rotation matrix Mr. The pitch component rotation data 69 is data representing the rotation of the input device 8 around the X axis, and is represented by a pitch component rotation matrix Mp. Further, the yaw component rotation data 70 is data representing the rotation of the input device 8 around the Y axis, and is represented by a yaw component rotation matrix My. The roll component rotation matrix Mr, the pitch component rotation matrix Mp, and the yaw component rotation matrix My are each represented by a 3 × 3 matrix shown in the following equations (2) to (4).

Figure 0005420954
Figure 0005420954

ここで、ロール方向(Z軸周り)、ピッチ方向(X軸周り)、ヨー方向(Y軸周り)の回転角をそれぞれθr、θp、θyとした。角度θr、θp、θyは、角速度データ63に基づいて求められる。すなわち、角度θrは、基準姿勢からのZ軸周りの回転角であり、当該回転角は、上述したように、Z軸周りの角速度の積分を算出することにより求められる。角度θp及びθyも同様に、それぞれX軸周り、Y軸周りの角速度の積分を算出することにより、求められる。なお、ジャイロセンサの出力には一般的にドリフト等による誤差が含まれる可能性があるので、角速度を積分するだけでなく、加速度データ64に基づいて姿勢を補正することができる。具体的には、入力装置8が静止しているときや、等速運動をしているときは、加速度データ64が示す加速度が重力であるので、その方向から入力装置8の姿勢を算出し、角速度によって算出された姿勢を加速度から算出された姿勢に近づける補正を行う。その際、加速度の大きさが重力の大きさに近いほど補正の度合いを高くするようにすれば、動いている場合等、加速度から姿勢を算出できない場合の姿勢をあまり反映させないようにすることができる。さらに、マーカ座標データ65に基づいて補正を行うことも可能である。すなわち、2つのマーカ座標を結ぶ方向によって、入力装置のロール方向の姿勢を算出することが可能であるし、マーカ座標の位置をヨーおよび/またはピッチ方向の姿勢に関連付けることも可能であるので、角速度によって算出された姿勢や加速度によって補正された姿勢を、マーカ座標に基づいて算出された姿勢に所定割合で近づけることで補正を行うことが可能である。   Here, the rotation angles in the roll direction (around the Z axis), the pitch direction (around the X axis), and the yaw direction (around the Y axis) were θr, θp, and θy, respectively. The angles θr, θp, and θy are obtained based on the angular velocity data 63. That is, the angle θr is a rotation angle around the Z axis from the reference posture, and the rotation angle is obtained by calculating the integral of the angular velocity around the Z axis as described above. Similarly, the angles θp and θy are obtained by calculating the integrals of the angular velocities around the X axis and the Y axis, respectively. Since the output of the gyro sensor may generally include an error due to drift or the like, the attitude can be corrected based on the acceleration data 64 as well as integrating the angular velocity. Specifically, when the input device 8 is stationary or moving at a constant speed, the acceleration indicated by the acceleration data 64 is gravity, so the orientation of the input device 8 is calculated from that direction, Correction is performed so that the posture calculated by the angular velocity is close to the posture calculated from the acceleration. At that time, if the degree of correction is made higher as the magnitude of acceleration is closer to the magnitude of gravity, the attitude when the attitude cannot be calculated from the acceleration, such as when moving, will not be reflected much. it can. Further, correction can be performed based on the marker coordinate data 65. That is, the orientation of the input device in the roll direction can be calculated from the direction connecting the two marker coordinates, and the marker coordinate position can be associated with the orientation in the yaw and / or pitch direction. It is possible to perform correction by bringing the posture calculated by the angular velocity and the posture corrected by the acceleration closer to the posture calculated based on the marker coordinates at a predetermined ratio.

上記回転行列Mは、Z軸を基準としたロール方向、ピッチ方向、ヨー方向の回転を表す回転行列の積である。すなわち、回転行列Mは、上記式(2)〜式(4)で表される各成分の回転行列の積である。本実施形態では、角速度データ63が更新されるタイミング(1/200秒に1回の割合)で、回転行列M(回転行列データ67)が算出され、メインメモリに保存されるものとする。   The rotation matrix M is a product of rotation matrices representing rotations in the roll direction, pitch direction, and yaw direction with respect to the Z axis. That is, the rotation matrix M is a product of the rotation matrices of the respective components represented by the above formulas (2) to (4). In the present embodiment, it is assumed that the rotation matrix M (rotation matrix data 67) is calculated and stored in the main memory at a timing at which the angular velocity data 63 is updated (at a rate of once every 1/200 second).

ピッチ姿勢データ71は、入力装置8のxyz座標系におけるピッチ方向の姿勢を示すデータの集合であり、当該ピッチ方向の姿勢は、上記回転行列Mにより求められる。ここで、xyz座標系におけるピッチ方向の姿勢とは、物体座標系(XYZ座標系)で入力装置8を回転させた後の空間固定座標系(xyz座標系)から見たx軸周りの回転を表す姿勢である。   The pitch attitude data 71 is a set of data indicating the attitude in the pitch direction in the xyz coordinate system of the input device 8, and the attitude in the pitch direction is obtained from the rotation matrix M. Here, the attitude in the pitch direction in the xyz coordinate system is the rotation around the x axis as viewed from the space fixed coordinate system (xyz coordinate system) after the input device 8 is rotated in the object coordinate system (XYZ coordinate system). It is a posture to represent.

ヨー姿勢データ72は、入力装置8のxyz座標系におけるヨー方向の姿勢を示すデータの集合であり、当該ヨー方向の姿勢は、上記回転行列Mにより求められる。ここで、xyz座標系におけるヨー方向の姿勢とは、物体座標系(XYZ座標系)で入力装置8を回転させた後の空間固定座標系(xyz座標系)から見たy軸周りの回転を表す姿勢である。   The yaw attitude data 72 is a set of data indicating the attitude in the yaw direction in the xyz coordinate system of the input device 8, and the attitude in the yaw direction is obtained from the rotation matrix M. Here, the orientation in the yaw direction in the xyz coordinate system refers to the rotation around the y axis as viewed from the space fixed coordinate system (xyz coordinate system) after the input device 8 is rotated in the object coordinate system (XYZ coordinate system). It is a posture to represent.

図17は、ゲーム装置3において実行されるゲーム処理の流れを示すメインフローチャートである。ゲーム装置3の電源が投入されると、ゲーム装置3のCPU10は、図示しないブートROMに記憶されている起動プログラムを実行し、これによってメインメモリ等の各ユニットが初期化される。そして、光ディスク4に記憶されたゲームプログラムがメインメモリに読み込まれ、CPU10によって当該ゲームプログラム61の実行が開始される。図17に示すフローチャートは、以上の処理が完了した後に行われる処理を示すフローチャートである。   FIG. 17 is a main flowchart showing a flow of game processing executed in the game apparatus 3. When the power of the game apparatus 3 is turned on, the CPU 10 of the game apparatus 3 executes a startup program stored in a boot ROM (not shown), whereby each unit such as the main memory is initialized. Then, the game program stored in the optical disc 4 is read into the main memory, and the execution of the game program 61 is started by the CPU 10. The flowchart shown in FIG. 17 is a flowchart showing a process performed after the above process is completed.

まず、ステップS1において、CPU10は、現在のステートを投球前に設定する。具体的には、CPU10は、メインメモリに記憶された投球状態を表す変数(ステート変数)に、投球前の状態を表す値(例えば、1)を格納する。次に、CPU10は、ステップS2において、投球後経過時間を0にセットする。この投球後経過時間は、後述する自動投球判定がなされた後の経過時間である。次に、CPU10は、メインループの処理を実行する。   First, in step S1, the CPU 10 sets the current state before pitching. Specifically, the CPU 10 stores a value (for example, 1) indicating the state before the pitch in a variable (state variable) indicating the pitch state stored in the main memory. Next, the CPU 10 sets the elapsed time after pitching to 0 in step S2. The post-throwing elapsed time is an elapsed time after the automatic pitching determination described later is made. Next, the CPU 10 executes main loop processing.

メインループの処理は、1フレーム時間(1/60秒)に1回の割合で実行され、ゲームが終了するまで繰り返し実行される。メインループの処理では、さらにセンササンプルループの処理が実行される。センササンプルループでは、サンプリング周期(例えば200回/秒)でコントローラ5から送信される加速度センサ37、2軸ジャイロセンサ55、及び1軸ジャイロセンサ56で検出された各操作データ(各軸方向の加速度及び各軸周りの角速度)に基づく処理が、サンプリング周期に合わせて逐次実行される。センササンプルループでは、まず、ステップS3の処理が実行される。   The main loop process is executed at a rate of once per frame time (1/60 seconds), and is repeatedly executed until the game ends. In the main loop process, a sensor sample loop process is further executed. In the sensor sample loop, each operation data (acceleration in each axis direction) detected by the acceleration sensor 37, the 2-axis gyro sensor 55, and the 1-axis gyro sensor 56 transmitted from the controller 5 at a sampling cycle (for example, 200 times / second). And the angular velocity around each axis) are sequentially executed in accordance with the sampling period. In the sensor sample loop, first, the process of step S3 is executed.

ステップS3において、CPU10は、加速度センサ37、2軸ジャイロセンサ55、及び1軸ジャイロセンサ56で検出された値をメインメモリに保存する。具体的には、CPU10は、コントローラ5から送信された各軸周りの角速度を角速度データ63として、メインメモリに保存する。同様に、CPU10は、コントローラ5から送信された加速度を加速度データ64として、メインメモリに保存する。ここで、CPU10は、今回から所定サンプル前までに取得した加速度及び角速度を履歴としてメインメモリに保存する。次に、CPU10は、ステップS4の処理を実行する。   In step S3, the CPU 10 stores the values detected by the acceleration sensor 37, the 2-axis gyro sensor 55, and the 1-axis gyro sensor 56 in the main memory. Specifically, the CPU 10 stores the angular velocity around each axis transmitted from the controller 5 as angular velocity data 63 in the main memory. Similarly, the CPU 10 stores the acceleration transmitted from the controller 5 as acceleration data 64 in the main memory. Here, the CPU 10 stores the acceleration and angular velocity acquired from this time to a predetermined sample before as a history in the main memory. Next, the CPU 10 executes the process of step S4.

ステップS4において、CPU10は、取得した加速度及び角速度に基づいて投球処理を実行する。ステップS4における処理の詳細を図18を用いて説明する。図18は、図17における投球処理(ステップS4)の詳細を示すフローチャートである。   In step S4, the CPU 10 performs a pitching process based on the acquired acceleration and angular velocity. Details of the processing in step S4 will be described with reference to FIG. FIG. 18 is a flowchart showing details of the pitching process (step S4) in FIG.

まず、CPU10は、ステップS10の処理を実行する。ステップS10において、CPU10は、現在の状態が投球前であるか否かの判定を行う。具体的には、CPU10は、現在の状態を示すステート変数が投球前を示す値(例えば、1)か否かを判定する。本ゲーム処理においては、ステートは、投球前、投球中、投球後の3つの状態の何れかに設定される。ステップS10においては、これらの状態のうち、現在の状態が何れであるかが判定される。投球前の状態とは、プレイヤキャラクタがボールを把持して投球動作を行う前の状態である。投球中の状態とは、プレイヤキャラクタがボールを把持し、投球動作を行っている間の状態である。投球後の状態とは、プレイヤキャラクタがボールを投球した後の状態である。判定結果が肯定の場合、CPU10は、次にステップS11の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS15の処理を実行する。   First, the CPU 10 executes the process of step S10. In step S10, the CPU 10 determines whether or not the current state is before pitching. Specifically, the CPU 10 determines whether or not the state variable indicating the current state is a value (for example, 1) indicating before the pitching. In this game process, the state is set to one of three states before a pitch, during a pitch, or after a pitch. In step S10, it is determined which of these states is the current state. The state before throwing is a state before the player character holds the ball and performs a throwing motion. The state in which the player is throwing is a state in which the player character is holding the ball and performing a throwing motion. The state after throwing is a state after the player character has thrown the ball. When the determination result is affirmative, the CPU 10 next executes a process of step S11. If the determination result is negative, the CPU 10 next executes a process of step S15.

ステップS11において、CPU10は、Yawリセット前のピッチ姿勢を算出する。ステップS11では、後述するYaw方向のリセット処理が行われる前の入力装置8のピッチ姿勢を算出する処理である。ここで、ピッチ姿勢とは、入力装置8の空間固定座標系(xyz座標系)でのピッチ方向(x軸周り)に関する姿勢である。ステップS11における、Yawリセット前ピッチ姿勢算出処理の詳細を図19を用いて説明する。図19は、Yawリセット前ピッチ姿勢算出処理(ステップS11)の詳細を示すフローチャートである。   In step S11, the CPU 10 calculates the pitch posture before Yaw reset. Step S11 is a process of calculating the pitch attitude of the input device 8 before the Yaw direction reset process described later is performed. Here, the pitch posture is a posture in the pitch direction (around the x axis) in the space fixed coordinate system (xyz coordinate system) of the input device 8. Details of the pitch posture calculation process before Yaw reset in step S11 will be described with reference to FIG. FIG. 19 is a flowchart showing details of the pitch posture calculation process before Yaw reset (step S11).

まず、CPU10は、ステップS30の処理を実行する。ステップS30において、CPU10は、入力装置8の回転を示す回転行列Mを取得する。具体的には、CPU10は、メインメモリを参照して、回転行列データ67を取得する。回転行列データ67は、上述したように、式(1)で示される回転行列Mを表すデータである。回転行列Mは、ステップS3で取得された最新の角速度に基づいて算出される入力装置8の姿勢を表す。次に、CPU10は、ステップS31の処理を実行する。   First, the CPU 10 executes the process of step S30. In step S <b> 30, the CPU 10 acquires a rotation matrix M indicating the rotation of the input device 8. Specifically, the CPU 10 refers to the main memory and acquires the rotation matrix data 67. The rotation matrix data 67 is data representing the rotation matrix M represented by Expression (1) as described above. The rotation matrix M represents the attitude of the input device 8 calculated based on the latest angular velocity acquired in step S3. Next, the CPU 10 executes the process of step S31.

ステップS31において、CPU10は、ピッチ方向の姿勢を算出する。ここで、ピッチ方向の姿勢とは、入力装置8を回転行列Mによって回転させた場合において、回転された入力装置8のxyz座標系における姿勢のピッチ方向成分(x軸周りの回転)を示す。具体的には、CPU10は、以下の式(5)を用いて、ピッチ方向の姿勢を算出する。
ピッチ方向の姿勢=ArcSin(Zy) ・・・(5)
Zyは、ステップS30で取得した回転行列Mから得られる値であり、式(1)に示される回転行列Mの1つの要素である。ここで、物体座標系(XYZ座標系)のZ軸方向の単位ベクトルez(0,0,1)に回転行列Mをかける演算を行うと、当該演算後のベクトルez’は、ez’=(Zx,Zy,Zz)となる。すなわち、Zyは、Z軸方向の単位ベクトルを基準姿勢(すなわち、XYZ座標系とxyz座標系が一致する場合の姿勢)から回転行列Mを用いて回転させた場合において、当該回転後のベクトルのxyz座標系におけるy軸の座標値を示す。同様に、Zxは、Z軸方向の単位ベクトルを基準姿勢から回転行列Mを用いて回転させた場合において、当該回転後のベクトルのxyz座標系におけるx軸の座標値を示す。Zzも同様である。さらに、その他の要素についても同様である。例えば、Xz、Xy、及びXzは、X軸方向の単位ベクトルを基準姿勢から回転行列Mを用いて回転させた場合において、当該回転後のベクトルのxyz座標系におけるx軸、y軸、及びz軸の座標値を示す。また、Yz、Yy、及びYzは、Y軸方向の単位ベクトルを回転行列Mを用いて回転させた場合において、当該回転後のベクトルのxyz座標系におけるx軸、y軸、及びz軸の座標値を示す。
In step S31, the CPU 10 calculates an attitude in the pitch direction. Here, the attitude in the pitch direction indicates a pitch direction component (rotation around the x axis) of the attitude in the xyz coordinate system of the rotated input apparatus 8 when the input apparatus 8 is rotated by the rotation matrix M. Specifically, the CPU 10 calculates the posture in the pitch direction using the following equation (5).
Posture in the pitch direction = ArcSin (Zy) (5)
Zy is a value obtained from the rotation matrix M acquired in step S30, and is one element of the rotation matrix M shown in Expression (1). Here, when a calculation is performed by multiplying the unit vector ez (0, 0, 1) in the Z-axis direction of the object coordinate system (XYZ coordinate system) by the rotation matrix M, the vector ez ′ after the calculation is ez ′ = ( Zx, Zy, Zz). That is, when Zy rotates the unit vector in the Z-axis direction from the reference posture (that is, the posture when the XYZ coordinate system and the xyz coordinate system match) using the rotation matrix M, Zy The coordinate value of the y-axis in an xyz coordinate system is shown. Similarly, Zx indicates the coordinate value of the x-axis in the xyz coordinate system of the rotated vector when the unit vector in the Z-axis direction is rotated from the reference posture using the rotation matrix M. The same applies to Zz. The same applies to other elements. For example, when the unit vector in the X-axis direction is rotated from the reference posture using the rotation matrix M, Xz, Xy, and Xz are the x-axis, y-axis, and z in the xyz coordinate system of the rotated vector. Indicates the coordinate value of the axis. Yz, Yy, and Yz are the coordinates of the x-axis, y-axis, and z-axis in the xyz coordinate system of the rotated vector when the unit vector in the Y-axis direction is rotated using the rotation matrix M. Indicates the value.

図28は、ステップS31で算出されるピッチ方向の姿勢を表した図である。ステップS31の処理では、ピッチ方向の姿勢は、ヨー方向の姿勢を無視して算出される(つまり、Zx=0として算出される)。ヨー方向の姿勢とは、入力装置8を回転行列Mによって回転させた場合において、回転された入力装置8のxyz座標系における姿勢のヨー方向成分(y軸周りの回転)である。図28から明らかなように、式(5)で求められるピッチ方向の姿勢は、回転後のベクトルez’(0,Zy,Zz)とz軸とがなす角度である。   FIG. 28 is a diagram illustrating the posture in the pitch direction calculated in step S31. In the process of step S31, the posture in the pitch direction is calculated ignoring the posture in the yaw direction (that is, calculated as Zx = 0). The orientation in the yaw direction is a yaw direction component (rotation around the y axis) of the orientation in the xyz coordinate system of the rotated input device 8 when the input device 8 is rotated by the rotation matrix M. As is clear from FIG. 28, the posture in the pitch direction obtained by Expression (5) is an angle formed by the rotated vector ez ′ (0, Zy, Zz) and the z axis.

一方、回転後のZ軸がx軸方向にも傾いている場合(すなわち、Zxが0でない場合)がある。この場合におけるピッチ方向の姿勢及びヨー方向の姿勢について、図29を用いて説明する。図29は、ピッチ方向の姿勢及びヨー方向の姿勢を説明するための説明図である。図29において、ベクトルez’は、Z軸方向の単位ベクトルezをX軸(又はx軸)周り及びY軸(又はy軸)周りに回転させた後のベクトルである。図29に示されるように、ピッチ方向の姿勢は、回転後のZ軸方向単位ベクトルez’をzy平面上に投影させた場合のzy投影ベクトルとz軸とがなす角度であり、x軸周りの回転量を表す。具体的には、この場合のピッチ方向の姿勢は上記式(5)ではなく、以下の式(6)で求められる。
ピッチ方向の姿勢=ArcTan(Zy/Zz) ・・・(6)
また、ヨー方向の姿勢は、ベクトルez’がx軸方向にどれだけずれているかを示す姿勢である。具体的には、ヨー方向の姿勢は、ベクトルez’をxz平面上に投影した場合のxz投影ベクトルとz軸とがなす角度として表現することができる。すなわち、ヨー方向の姿勢は、y軸周りの回転量を表す。
On the other hand, there are cases where the Z-axis after rotation is also inclined in the x-axis direction (that is, when Zx is not 0). The posture in the pitch direction and the posture in the yaw direction in this case will be described with reference to FIG. FIG. 29 is an explanatory diagram for explaining the posture in the pitch direction and the posture in the yaw direction. In FIG. 29, a vector ez ′ is a vector after the unit vector ez in the Z-axis direction is rotated around the X axis (or x axis) and the Y axis (or y axis). As shown in FIG. 29, the posture in the pitch direction is an angle formed by the zy projection vector and the z axis when the Z-axis direction unit vector ez ′ after rotation is projected on the zy plane. Represents the amount of rotation. Specifically, the posture in the pitch direction in this case is obtained not by the above formula (5) but by the following formula (6).
Posture in the pitch direction = ArcTan (Zy / Zz) (6)
Further, the posture in the yaw direction is a posture indicating how much the vector ez ′ is shifted in the x-axis direction. Specifically, the orientation in the yaw direction can be expressed as an angle formed by the xz projection vector and the z axis when the vector ez ′ is projected on the xz plane. That is, the posture in the yaw direction represents the amount of rotation around the y-axis.

しかしながら、ステップS31においては、x軸方向の成分、すなわち、ヨー方向の姿勢(y軸周りの回転)を考慮せず、式(5)を用いてピッチ方向の姿勢を求めることとする。これは、以下に示す理由からである。   However, in step S31, the component in the x-axis direction, that is, the posture in the yaw direction (rotation around the y-axis) is not taken into consideration, and the posture in the pitch direction is obtained using Equation (5). This is because of the following reasons.

すなわち、入力装置8の姿勢(xyz座標系における姿勢)は、ロール方向の姿勢(z軸周りの回転)及びピッチ方向の姿勢(x軸周りの回転)については、常に正確に求めることができるが、ヨー方向の姿勢(y軸周りの回転)については、状況によっては正確に求めることが困難だからである。   That is, the posture of the input device 8 (posture in the xyz coordinate system) can always be accurately obtained with respect to the posture in the roll direction (rotation around the z axis) and the posture in the pitch direction (rotation around the x axis). This is because it is difficult to accurately obtain the posture in the yaw direction (rotation around the y-axis) depending on the situation.

具体的には、ジャイロセンサで検出された角速度から各軸周りの回転角を求めることにより入力装置8の姿勢を算出することができるが、角速度を用いた各軸周りの回転角は、角速度を時間で積分することによって求められるため、時間とともに誤差が蓄積する。また、求められる回転角は、ある姿勢からの回転角であるため、ある姿勢が上記基準姿勢とずれている場合は、正確なxyz座標系における姿勢を求めることができない。しかしながら、ロール方向の姿勢及びピッチ方向の姿勢については、このような誤差を加速度センサ37により検出された加速度データを用いて補正することができる。すなわち、例えば、入力装置8が静止状態等では、加速度センサ37により検出された加速度ベクトルの方向が重力方向と一致する。従って、加速度センサ37により検出された加速度ベクトルの方向に基づいて、入力装置8がロール方向(Z軸周り)及びピッチ方向(X軸周り)にどの程度回転しているかを正確に求めることができる。また、入力装置8が静止していない場合であっても、ある程度の期間内において加速度センサ37で検出される加速度ベクトルは、平均的には重力方向に近いものとなる。従って、例えば、検出される加速度ベクトルの平均的な向きが、Y軸負方向と略一致する場合、入力装置8は、ロール方向及びピッチ方向に回転していないことがわかる。従って、ロール方向及びピッチ方向の回転については、ある程度正確に求めることができる。しかしながら、加速度センサ37の検出結果からは、重力方向を軸とした回転(ヨー方向の姿勢)を検知することはできない。従って、ヨー方向の姿勢(y軸周りの回転)については、後述するYawリセット処理を行うまでは基本的に、正確に求めることができない(ただし、コントローラ5の撮像素子40によって生成される画像にマーカ6R及び6Lの画像が含まれている場合には、上述したマーカ座標に基づいて、入力装置8のヨー方向の姿勢(y軸周りの回転)も正確に求めることができる)。   Specifically, the attitude of the input device 8 can be calculated by obtaining the rotation angle around each axis from the angular velocity detected by the gyro sensor. However, the rotation angle around each axis using the angular velocity is determined by calculating the angular velocity. Since it is obtained by integrating with time, errors accumulate with time. Further, since the rotation angle to be obtained is a rotation angle from a certain posture, when a certain posture is deviated from the reference posture, an accurate posture in the xyz coordinate system cannot be obtained. However, for the posture in the roll direction and the posture in the pitch direction, such an error can be corrected using the acceleration data detected by the acceleration sensor 37. That is, for example, when the input device 8 is at rest or the like, the direction of the acceleration vector detected by the acceleration sensor 37 coincides with the direction of gravity. Therefore, based on the direction of the acceleration vector detected by the acceleration sensor 37, it is possible to accurately determine how much the input device 8 is rotating in the roll direction (around the Z axis) and the pitch direction (around the X axis). . Even if the input device 8 is not stationary, the acceleration vector detected by the acceleration sensor 37 within a certain period of time is close to the gravity direction on average. Therefore, for example, when the average direction of the detected acceleration vector substantially coincides with the Y-axis negative direction, it can be understood that the input device 8 is not rotating in the roll direction and the pitch direction. Therefore, the rotation in the roll direction and the pitch direction can be obtained with a certain degree of accuracy. However, from the detection result of the acceleration sensor 37, the rotation around the direction of gravity (the posture in the yaw direction) cannot be detected. Therefore, the posture in the yaw direction (rotation around the y-axis) cannot basically be accurately obtained until the Yaw reset process described later is performed (however, the image generated by the image sensor 40 of the controller 5 is not changed). When images of the markers 6R and 6L are included, the posture of the input device 8 in the yaw direction (rotation around the y-axis) can also be accurately obtained based on the marker coordinates described above).

以上のような理由から、ステップS31においては、ヨー方向の姿勢(y軸周りの回転)を考慮しない。従って、ステップS31においては、CPU10は、ヨー方向については回転していない(Z軸がx軸方向に傾いていない)として、ピッチ方向の姿勢を式(5)を用いて算出する。   For the reasons as described above, the posture in the yaw direction (rotation around the y-axis) is not considered in step S31. Therefore, in step S31, the CPU 10 calculates the attitude in the pitch direction using the equation (5), assuming that the yaw direction is not rotating (Z-axis is not inclined in the x-axis direction).

なお、入力装置8をロール方向(Z軸周り)、ピッチ方向(X軸周り)、ヨー方向(Y軸周り)にそれぞれ角度θr、θp、θyで回転させた場合、回転後のxzy座標系(空間座標系)における上記ピッチ方向の姿勢(x軸周りの回転)及びヨー方向の姿勢(y軸周りの回転)は、必ずしも角度θp及び角度θyと一致しない。例えば、入力装置8をロール方向(Z軸周り)に角度θrだけ回転させ、さらにピッチ方向(X軸周り)に角度θpだけ回転させた場合、入力装置8をヨー方向(Y軸周り)に回転させていないにも拘らず、xzy座標系では、上記ヨー方向(y軸周り)に回転したような姿勢となる。従って、本明細書では、物体座標系(XYZ座標系)における回転と回転後の空間座標系(xyz座標系)における姿勢とを区別するため、特に座標系を明示している場合を除いて、例えば、「ピッチ方向の姿勢」という場合は、xyz座標系におけるx軸周りの回転を意味し、「ピッチ方向の回転」という場合は、XYZ座標系におけるX軸周りの回転を意味することとする。   When the input device 8 is rotated in the roll direction (around the Z axis), the pitch direction (around the X axis), and the yaw direction (around the Y axis) at angles θr, θp, and θy, respectively, the rotated xzy coordinate system ( The attitude in the pitch direction (rotation around the x axis) and the attitude in the yaw direction (rotation around the y axis) in the spatial coordinate system do not necessarily match the angle θp and the angle θy. For example, when the input device 8 is rotated by the angle θr in the roll direction (around the Z axis) and further rotated by the angle θp in the pitch direction (around the X axis), the input device 8 is rotated in the yaw direction (around the Y axis). In spite of not being made, in the xzy coordinate system, the posture is rotated in the yaw direction (around the y axis). Therefore, in this specification, in order to distinguish between the rotation in the object coordinate system (XYZ coordinate system) and the posture in the spatial coordinate system after rotation (xyz coordinate system), except when the coordinate system is specified, For example, the “posture in the pitch direction” means rotation around the x axis in the xyz coordinate system, and the “rotation in the pitch direction” means rotation around the X axis in the XYZ coordinate system. .

図19に戻り、次に、CPU10は、ステップS32の処理を実行する。ステップS32において、CPU10は、ステップS31で算出したピッチ方向の姿勢を履歴として保存する。具体的には、CPU10は、算出したピッチ方向の姿勢をピッチ姿勢データ71として、メインメモリに保存する。その後、CPU10は、Yawリセット前のピッチ姿勢算出処理処理を終了し、図18に示されるステップS12の処理を実行する。   Returning to FIG. 19, next, the CPU 10 executes the process of step S32. In step S32, the CPU 10 stores the posture in the pitch direction calculated in step S31 as a history. Specifically, the CPU 10 stores the calculated attitude in the pitch direction as pitch attitude data 71 in the main memory. Thereafter, the CPU 10 ends the pitch attitude calculation process before the Yaw reset, and executes the process of step S12 shown in FIG.

図18に戻り、ステップS12において、CPU10は、投球前ステートの処理を実行する。ステップS12では、投球前の状態における処理である。ステップS12における投球前ステート処理の詳細を、図20を用いて説明する。図20は、投球前ステート処理(ステップS12)の詳細を示したフローチャートである。   Returning to FIG. 18, in step S12, the CPU 10 executes the pre-throwing state processing. In step S12, it is the process in the state before pitching. Details of the pre-throwing state process in step S12 will be described with reference to FIG. FIG. 20 is a flowchart showing details of the pre-throwing state process (step S12).

ステップS40において、CPU10は、ピッチ方向の姿勢に基づいて現在のモーションを設定する。具体的には、CPU10は、ステップS31で算出された最新のピッチ方向の姿勢をメインメモリのピッチ姿勢データ71から取得する。そして、CPU10は、ピッチ方向の姿勢に対応付けられたモーション画像を予めメインメモリに保存された複数のモーション画像の中から選択し、現在のモーションとして設定する。例えば、モーション画像は、数十のプレイヤキャラクタの画像から構成されており、ピッチ方向の姿勢に応じたモーション画像が選択されることにより、後述するステップS5において、プレイヤの動作に応じた動作を示すプレイヤキャラクタの画像がテレビ2に表示される。次に、CPU10は、ステップS41の処理を実行する。   In step S40, the CPU 10 sets the current motion based on the posture in the pitch direction. Specifically, the CPU 10 acquires the latest posture in the pitch direction calculated in step S31 from the pitch posture data 71 in the main memory. The CPU 10 selects a motion image associated with the posture in the pitch direction from a plurality of motion images stored in advance in the main memory, and sets it as the current motion. For example, the motion image is composed of images of several tens of player characters, and when a motion image corresponding to the posture in the pitch direction is selected, an action corresponding to the action of the player is shown in step S5 described later. An image of the player character is displayed on the television 2. Next, the CPU 10 executes the process of step S41.

ステップS41において、CPU10は、プレイヤキャラクタの手の位置及びボールの位置を補正する。ここでの処理は、入力装置8のヨー方向の姿勢(y軸周りの回転)に応じてプレイヤキャラクタの手首の位置を中心として、プレイヤキャラクタの手(手首から先の部分)の位置及びボールの位置を補正する処理である。より具体的には、回転行列Mの要素Zxの値に応じて、プレイヤキャラクタの手の位置を投球方向に対して左右方向に移動させる処理である。ここで、回転行列Mの要素Zxは、Z軸方向の単位ベクトルを回転行列Mを用いて回転させた場合において、当該回転後のベクトルのxyz座標系におけるx軸の座標値である。従って、例えば、プレイヤが画面に向かって右側に入力装置8を振ると、プレイヤの動きに応じてプレイヤキャラクタの手の位置及びボールの位置がレーンに対して右側に移動する。ステップS41において、具体的には、CPU10は、メインメモリを参照してステップS30で取得した最新の回転行列M(回転行列データ67)を取得し、当該回転行列Mの要素Zxの値に所定の係数をかけることによって、x軸方向の補正量を算出する。そして、CPU10は、ステップS40で設定された現在のモーションにおけるx軸方向の手の位置及びボールの位置に、算出したx軸方向の補正量を加え、新たな現在のモーションとして設定する。   In step S41, the CPU 10 corrects the position of the player character's hand and the position of the ball. The processing here is based on the position of the player character's wrist (portion from the wrist) and the position of the ball around the position of the player character's wrist according to the posture of the input device 8 in the yaw direction (rotation around the y-axis). This is a process of correcting the position. More specifically, this is a process of moving the position of the player character's hand in the left-right direction with respect to the pitching direction according to the value of the element Zx of the rotation matrix M. Here, the element Zx of the rotation matrix M is the x-axis coordinate value in the xyz coordinate system of the rotated vector when the unit vector in the Z-axis direction is rotated using the rotation matrix M. Therefore, for example, when the player swings the input device 8 to the right side toward the screen, the position of the player character's hand and the position of the ball move to the right side with respect to the lane in accordance with the movement of the player. In step S41, specifically, the CPU 10 refers to the main memory, acquires the latest rotation matrix M (rotation matrix data 67) acquired in step S30, and sets the value of the element Zx of the rotation matrix M to a predetermined value. The correction amount in the x-axis direction is calculated by applying a coefficient. Then, the CPU 10 adds the calculated correction amount in the x-axis direction to the position of the hand and the ball in the x-axis direction in the current motion set in step S40, and sets it as a new current motion.

ここで、ステップS41においては、ヨー方向の姿勢(y軸周りの回転)は、上述したように、正確に求めることは困難である。すなわち、入力装置8が基準姿勢からどの程度ヨー方向に回転しているか(コントローラ5の先端(光入射面35a)がどの程度x軸方向にずれているか)正確に求めることはできない。しかしながら、ボールの投球動作の前である投球前ステートにおいては、ボールを投球したときのボールの方向や強さ等には一切関係ないため、不正確なヨー方向の姿勢を用いても問題ない。ここでは、表示上の演出のためにプレイヤキャラクタの手の位置及びボールの位置を補正している。   Here, in step S41, it is difficult to accurately obtain the yaw orientation (rotation around the y-axis) as described above. That is, it cannot be accurately determined how much the input device 8 is rotating in the yaw direction from the reference posture (how much the tip of the controller 5 (light incident surface 35a) is displaced in the x-axis direction). However, in the pre-throwing state before the ball throwing operation, there is no problem even if an incorrect yaw orientation is used because it has nothing to do with the direction and strength of the ball when the ball is thrown. Here, the position of the hand of the player character and the position of the ball are corrected for presentation effects.

次に、CPU10は、ステップS42において、Bボタン32iが押されたか否かを判定する。CPU10は、Bボタン32iが押されたと判定した場合、次にステップS43の処理を実行する。CPU10は、Bボタン32iが押されていないと判定した場合、投球前ステート処理を終了し、処理を図18に示す投球処理に戻す。   Next, in step S42, the CPU 10 determines whether or not the B button 32i has been pressed. When determining that the B button 32i has been pressed, the CPU 10 next executes the process of step S43. When determining that the B button 32i has not been pressed, the CPU 10 ends the pre-throwing state process and returns the process to the pitching process shown in FIG.

ステップS43において、CPU10は、Yawリセット処理を実行する。具体的には、CPU10は、式(5)を用いてピッチ方向の姿勢を算出し、現在の姿勢として設定する。ここでの処理は、不正確なヨー方向の姿勢をリセットし、ピッチ方向の姿勢を現在の姿勢として設定する処理である。すなわち、ステップS43では、プレイヤによってBボタン32iが押された時点(この時点では、プレイヤは図9に示したような姿勢で入力装置8を構えている)で、ヨー方向の姿勢を0に設定する。上述したように、ヨー方向の姿勢は正確ではない可能性があるため、Bボタン32iが押された時点を基準として、当該基準からのヨー方向の回転を以降の投球処理に反映させる。その後、CPU10は、投球前ステート処理を終了し、処理を図18に示す投球処理に戻す。   In step S43, the CPU 10 executes a Yaw reset process. Specifically, the CPU 10 calculates the posture in the pitch direction using Expression (5) and sets it as the current posture. The process here is a process of resetting an incorrect yaw direction attitude and setting the pitch direction attitude as the current attitude. That is, in step S43, the posture in the yaw direction is set to 0 when the B button 32i is pressed by the player (at this time, the player holds the input device 8 in the posture shown in FIG. 9). To do. As described above, since the posture in the yaw direction may not be accurate, the rotation in the yaw direction from the reference is reflected in the subsequent pitching processes with the point in time when the B button 32i is pressed as a reference. Thereafter, the CPU 10 ends the pre-throwing state process, and returns the process to the pitching process shown in FIG.

図18に戻り、ステップS13において、CPU10は、Yawリセットをしたか否かを判定する。具体的には、CPU10は、ステップS12においてYawリセット処理(上述のステップS43の処理)を行った場合、Yawリセットをしたと判定する。判定結果が肯定の場合、CPU10は、次にステップS14の処理を実行する。判定結果が否定の場合、CPU10は、図18に示す投球処理を終了する。   Returning to FIG. 18, in step S <b> 13, the CPU 10 determines whether or not a Yaw reset has been performed. Specifically, when the Yaw reset process (the process in Step S43 described above) is performed in Step S12, the CPU 10 determines that the Yaw reset has been performed. If the determination result is affirmative, the CPU 10 next executes a process of step S14. If the determination result is negative, the CPU 10 ends the pitching process shown in FIG.

ステップS14において、CPU10は、現在のステートを投球中に設定する。具体的には、CPU10は、メインメモリに記憶されたステート変数に、投球中の状態を表す値(例えば、2)を格納する。したがって、Bボタン32iが押された場合にステートが投球中に設定されるので、押される前、すなわち投球を行う意思の無いときに入力装置8が動かされても誤って投球が行われることを防ぐことができる。また、Bボタン32iを押したまま投球を行うことができるので、人差指に力を加えることで入力装置8をしっかり把持することができる。次に、CPU10は、図18に示す投球処理を終了する。   In step S14, the CPU 10 sets the current state during pitching. Specifically, the CPU 10 stores a value (for example, 2) representing the state during the pitching in the state variable stored in the main memory. Therefore, since the state is set during pitching when the B button 32i is pressed, even if the input device 8 is moved before it is pressed, that is, when there is no intention to perform pitching, it is confirmed that pitching is performed erroneously. Can be prevented. In addition, since the player can throw while pressing the B button 32i, the input device 8 can be firmly held by applying force to the index finger. Next, the CPU 10 ends the pitching process shown in FIG.

一方、ステップS10において、現在の状態が投球前ではないと判定された場合、CPU10は、次に、ステップS15の処理を実行する。   On the other hand, if it is determined in step S10 that the current state is not before pitching, the CPU 10 next executes the process of step S15.

ステップS15において、CPU10は、Yawリセット後のピッチ姿勢を算出する。ステップS15では、上述したYawリセット処理が行われた後の入力装置8のピッチ方向の姿勢を算出する処理である。ステップS15における、Yawリセット後ピッチ姿勢算出処理の詳細を図21を用いて説明する。図21は、Yawリセット後ピッチ姿勢算出処理(ステップS15)の詳細を示すフローチャートである。   In step S15, the CPU 10 calculates the pitch posture after Yaw reset. In step S15, the pitch direction orientation of the input device 8 after the above-described Yaw reset process is performed is calculated. Details of the pitch posture calculation processing after Yaw reset in step S15 will be described with reference to FIG. FIG. 21 is a flowchart showing details of the pitch posture calculation processing after Yaw reset (step S15).

まず、CPU10は、ステップS50の処理を実行する。ステップS50において、上述したステップS30と同様の処理を実行する。すなわち、CPU10は、入力装置8の回転を示す回転行列Mを取得する。次に、CPU10は、ステップS51の処理を実行する。   First, the CPU 10 executes the process of step S50. In step S50, the same process as step S30 described above is executed. That is, the CPU 10 acquires a rotation matrix M indicating the rotation of the input device 8. Next, the CPU 10 executes the process of step S51.

ステップS51において、CPU10は、補正値に基づいたピッチ方向の姿勢を算出する。具体的には、CPU10は、以下の式(7)又は式(8)を用いて補正値を算出する。
補正値A=Zx×Zx ・・・(7)
補正値A=−Zx×Zx ・・・(8)
ここで、Zxが正の値である場合、式(7)を用いて補正値Aを算出し、Zxが負の値である場合は式(8)を用いて補正値Aを算出する。Zxが零である場合は、補正値Aは零となる。そして、CPU10は、ピッチ方向の姿勢を以下の式(9)を用いて算出する。
ピッチ方向の姿勢=ArcTan((Zy+補正値A)/Zz) ・・・(9)
式(9)では、上記式(6)に補正値Aが追加されている。以下、補正値Aを追加する理由を説明する。
In step S51, the CPU 10 calculates an attitude in the pitch direction based on the correction value. Specifically, the CPU 10 calculates the correction value using the following formula (7) or formula (8).
Correction value A = Zx × Zx (7)
Correction value A = −Zx × Zx (8)
Here, when Zx is a positive value, the correction value A is calculated using Equation (7), and when Zx is a negative value, the correction value A is calculated using Equation (8). When Zx is zero, the correction value A is zero. And CPU10 calculates the attitude | position of a pitch direction using the following formula | equation (9).
Posture in the pitch direction = ArcTan ((Zy + correction value A) / Zz) (9)
In the equation (9), the correction value A is added to the above equation (6). Hereinafter, the reason for adding the correction value A will be described.

入力装置8を基準姿勢から水平方向に振る間、Zyの値は0近辺になるため、上記式(6)を用いて算出されるピッチ方向の姿勢は、0近辺の値になる。すなわち、入力装置8を水平方向に所定の角度だけ振っても入力装置8は、xz平面上を回転するため、Zyの値は0のままである。しかしながら、プレイヤが入力装置8を水平方向に振る場合、実際には、入力装置8は上下方向(y軸方向)にもぶれるため、Zyの値は0を境にして正又は負の微小な値を示す。ここで、小さい角度の範囲で入力装置8を基準姿勢から水平方向に振る場合は、Zy/Zzの値は、0に近い値となり、式(6)を用いて算出されるピッチ方向の姿勢は、0度に近い値となる。しかしながら、基準姿勢に対して水平方向に90度に近い角度まで入力装置8を振る場合、Zzの値は0に近づく。すると、Zy/Zzの値は、分母が0に近くなるため、Zyが僅かに大きくなっただけでも急激に上昇し、非常に大きな正の値になる。この場合、式(6)を用いて算出されるピッチ方向の姿勢は、90度に近い値となる。一方、Zzの値が0に近い値の場合において、Zyが負の値を示す場合(すなわち、入力装置8の先端が僅かに下方向にぶれた場合)、Zy/Zzの値は、非常に大きな負の値を示す。すなわち、基準姿勢に対して水平方向に90度に近い角度まで入力装置8を振る場合において、入力装置8の先端が上下方向に僅かにぶれると、Zy/Zzの値は、無限大の値とマイナス無限大の値との間を往復する。従って、式(6)を用いて算出されるピッチ方向の姿勢は、90度の値と−90度の値とを往復することになる。そうすると、ピッチ方向の姿勢に基づいてモーション画像が設定されるため、画面上に表示されるプレイヤキャラクタは、ある姿勢から全く逆の別の姿勢に瞬時に移動することになる。従って、式(6)を用いてピッチ方向の姿勢を算出すると、プレイヤキャラクタは不自然な動きをする可能性がある。このような不自然なプレイヤキャラクタの動きを防止するため、ステップS51においては、式(9)を用いてピッチ方向の姿勢を算出する。   While the input device 8 is shaken in the horizontal direction from the reference posture, the value of Zy is in the vicinity of 0. Therefore, the posture in the pitch direction calculated using the above equation (6) is a value in the vicinity of 0. That is, even if the input device 8 is shaken by a predetermined angle in the horizontal direction, the input device 8 rotates on the xz plane, so the value of Zy remains zero. However, when the player swings the input device 8 in the horizontal direction, the input device 8 actually moves in the vertical direction (y-axis direction), so the value of Zy is a small positive or negative value with respect to 0 as a boundary. Indicates. Here, when the input device 8 is swung horizontally from the reference posture within a small angle range, the value of Zy / Zz is close to 0, and the posture in the pitch direction calculated using the equation (6) is The value is close to 0 degree. However, when the input device 8 is swung to an angle close to 90 degrees in the horizontal direction with respect to the reference posture, the value of Zz approaches zero. Then, since the value of Zy / Zz is close to 0, even if Zy is slightly increased, it rapidly increases and becomes a very large positive value. In this case, the posture in the pitch direction calculated using Expression (6) is a value close to 90 degrees. On the other hand, when the value of Zz is close to 0, when Zy shows a negative value (that is, when the tip of the input device 8 slightly moves downward), the value of Zy / Zz is very high. Indicates a large negative value. That is, when the input device 8 is swung to an angle close to 90 degrees in the horizontal direction with respect to the reference posture, if the tip of the input device 8 slightly moves up and down, the value of Zy / Zz becomes an infinite value. Return to and from minus infinity. Therefore, the posture in the pitch direction calculated using Expression (6) reciprocates between a value of 90 degrees and a value of -90 degrees. Then, since the motion image is set based on the posture in the pitch direction, the player character displayed on the screen instantaneously moves from one posture to another posture that is completely opposite. Therefore, if the posture in the pitch direction is calculated using Equation (6), the player character may move unnaturally. In order to prevent such an unnatural movement of the player character, in step S51, the posture in the pitch direction is calculated using Equation (9).

なお、上記補正値Aは、どのように求められてもよく、例えば、Yzの値に基づいて求められてもよい。   The correction value A may be obtained in any way, for example, based on the value of Yz.

次に、CPU10は、ステップS52の処理を実行する。ステップS52において、CPU10は、ステップS32の処理と同様、ステップS51で算出したピッチ方向の姿勢を履歴としてメインメモリに保存する。そして、CPU10は、Yawリセット後のピッチ姿勢算出処理を終了し、処理を図18で示す投球処理に戻す。   Next, the CPU 10 executes the process of step S52. In step S52, the CPU 10 stores the posture in the pitch direction calculated in step S51 as a history in the main memory, similarly to the process in step S32. And CPU10 complete | finishes the pitch attitude | position calculation process after Yaw reset, and returns a process to the pitching process shown in FIG.

図18に戻り、CPU10は、ステップS16の処理を実行する。ステップS16において、CPU10は、現在のステートが投球中か否かを判定する。具体的には、CPU10は、現在の状態を示すステート変数が投球前を示す値(例えば、2)か否かを判定する。判定結果が肯定の場合、CPU10は、次にステップS17の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS20の処理を実行する。   Returning to FIG. 18, the CPU 10 executes the process of step S16. In step S16, the CPU 10 determines whether or not the current state is pitching. Specifically, the CPU 10 determines whether or not the state variable indicating the current state is a value (for example, 2) indicating before the pitching. If the determination result is affirmative, the CPU 10 next executes a process of step S17. If the determination result is negative, the CPU 10 next executes a process of step S20.

ステップS17において、CPU10は、投球中ステート処理を実行する。ステップS17では、投球中の状態における処理である。ステップS17における投球中ステート処理の詳細を、図22を用いて説明する。図22は、投球中ステート処理(ステップS17)の詳細を示したフローチャートである。   In step S17, the CPU 10 executes a pitching state process. In step S17, it is the process in the state in which it is pitching. Details of the pitching state process in step S17 will be described with reference to FIG. FIG. 22 is a flowchart showing details of the pitching state process (step S17).

まず、ステップS60において、CPU10は、ピッチ方向の姿勢に基づいて現在のモーションを設定する。具体的には、CPU10は、上述したステップS40の処理と同様、ステップS51で算出したピッチ方向の姿勢をメインメモリから取得し、取得したピッチ方向の姿勢に応じたモーション画像を現在のモーションとして設定する。次に、CPU10は、ステップS61において、ステップS41の処理と同様、入力装置8のヨー方向の姿勢に応じて、プレイヤキャラクタの手の位置及びボールの位置を補正する。そして、次にCPU10は、ステップS62の処理を実行する。   First, in step S60, the CPU 10 sets the current motion based on the posture in the pitch direction. Specifically, the CPU 10 acquires the posture in the pitch direction calculated in step S51 from the main memory, and sets a motion image corresponding to the acquired posture in the pitch direction as the current motion, similarly to the processing in step S40 described above. To do. Next, in step S61, the CPU 10 corrects the position of the player character's hand and the position of the ball according to the posture of the input device 8 in the yaw direction, similarly to the process of step S41. Then, the CPU 10 executes the process of step S62.

ステップS62において、CPU10は、自動投球判定の処理を実行する。ステップS62においては、入力装置8の振りの速さ(強さ)が極大になった場合において、その極大値が所定の閾値より大きいとき、プレイヤによってボールが投球されたと判定される。プレイヤが、図10〜図12に示されるような投球動作を行う場合、ジャイロセンサ55及び56が検出する角速度は変化する。ステップS62における処理は、変化する角速度に基づいて、ボールが投球されたか否かを判定する処理である。ステップS62における自動投球判定の詳細な処理を、図23を用いて説明する。図23は、自動投球判定処理(ステップS62)の詳細を示したフローチャートである。   In step S62, the CPU 10 executes an automatic pitching determination process. In step S62, when the swing speed (strength) of the input device 8 becomes maximum, when the maximum value is larger than a predetermined threshold, it is determined that the player has thrown the ball. When the player performs a pitching operation as shown in FIGS. 10 to 12, the angular velocities detected by the gyro sensors 55 and 56 change. The process in step S62 is a process for determining whether or not the ball has been thrown based on the changing angular velocity. Detailed processing of the automatic pitching determination in step S62 will be described with reference to FIG. FIG. 23 is a flowchart showing details of the automatic pitching determination process (step S62).

まず、ステップS70において、CPU10は、現在のX軸及びY軸周りの角速度の長さ、1サンプル前のX軸及びY軸周りの角速度の長さ、及び、2サンプル前のX軸及びY軸周りの角速度の長さを、それぞれ算出し、それぞれ変数AV0、AV1、及び、AV2として設定する。具体的には、CPU10は、メインメモリの角速度データ63を参照して、最新のX軸周りの角速度とY軸周りの角速度とを取得し、XY方向の角速度の長さ(X軸周りの角速度とY軸周りの角速度とによって定められる角速度ベクトルの大きさ)を算出する。そして、算出したXY方向の角速度の長さを変数AV0に格納し、メインメモリに記憶する。同様に、CPU10は、メインメモリの角速度データ63を参照して、1サンプル前のX軸周りの角速度とY軸周りの角速度とを取得し、1サンプル前のXY方向の角速度の長さを変数AV1として、メインメモリに記憶する。さらに、同様に、CPU10は、2サンプル前のXY方向の角速度の長さを変数AV2として、メインメモリに記憶する。次に、CPU10は、ステップS71の処理を実行する。   First, in step S70, the CPU 10 determines the current angular velocity length around the X axis and Y axis, the angular velocity length around the X axis and Y axis before one sample, and the X axis and Y axis before two samples. The lengths of the surrounding angular velocities are calculated and set as variables AV0, AV1, and AV2, respectively. Specifically, the CPU 10 refers to the angular velocity data 63 in the main memory, obtains the latest angular velocity around the X axis and the angular velocity around the Y axis, and calculates the length of the angular velocity in the XY direction (angular velocity around the X axis). And the magnitude of the angular velocity vector determined by the angular velocity around the Y axis). Then, the calculated length of the angular velocity in the XY directions is stored in the variable AV0 and stored in the main memory. Similarly, the CPU 10 refers to the angular velocity data 63 in the main memory, obtains the angular velocity around the X axis and the angular velocity around the Y axis one sample before, and sets the length of the angular velocity in the XY direction one sample before as a variable. As AV1, it is stored in the main memory. Similarly, the CPU 10 stores the length of the angular velocity in the XY direction two samples before as a variable AV2 in the main memory. Next, the CPU 10 executes the process of step S71.

ステップS71において、CPU10は、AV1≧AV0、且つ、AV1>AV2が成り立つか否かを判定する。ステップS71での処理は、1サンプル前のXY方向の角速度の長さが極大値であるか否かを判定する処理である。すなわち、ここでは、入力装置8の振りの速さ(強さ)が極大か否かが判定される。プレイヤは、図12に示すボールを投球する瞬間、ボールに力を加えるようにして入力装置8を振ると考えられ、その瞬間において、XY方向の角速度の長さは極大になると考えられる。判定結果が肯定の場合、CPU10は、ボールの投球がなされた可能性があると考えられるため、次に、ステップS72の処理を実行する。一方、判定結果が否定の場合、CPU10は、自動投球判定の処理を終了し、処理を図22に示す投球中ステート処理に戻す。なお、角速度の長さが極大値か否かは、どのようにして判定されてもよい。   In step S71, the CPU 10 determines whether AV1 ≧ AV0 and AV1> AV2 are satisfied. The process in step S71 is a process for determining whether or not the length of the angular velocity in the XY direction one sample before is a maximum value. That is, here, it is determined whether or not the swing speed (strength) of the input device 8 is maximum. It is considered that the player swings the input device 8 so as to apply force to the ball at the moment of throwing the ball shown in FIG. 12, and at that moment, the length of the angular velocity in the XY directions is considered to be maximum. If the determination result is affirmative, it is considered that there is a possibility that the ball has been thrown, so the CPU 10 next executes the process of step S72. On the other hand, when the determination result is negative, the CPU 10 ends the automatic pitching determination process and returns the process to the in-throwing state process shown in FIG. Note that it may be determined in any way whether the length of the angular velocity is the maximum value.

ステップS72において、CPU10は、現在のピッチ方向の姿勢を変数Rot0に、1サンプル前のピッチ方向の姿勢を変数Rot1にそれぞれ設定する。具体的には、CPU10は、メインメモリのピッチ姿勢データ71を参照して、ステップS51で算出した最新のピッチ方向の姿勢を取得し、変数Rot0に格納して、メインメモリに記憶する。同様に、CPU10は、メインメモリのピッチ姿勢データ71を参照して、1サンプル前のピッチ方向の姿勢を取得し、変数Rot1に格納して、メインメモリに記憶する。次に、CPU10は、ステップS73の処理を実行する。   In step S72, the CPU 10 sets the current posture in the pitch direction to the variable Rot0 and the posture in the pitch direction one sample before to the variable Rot1. Specifically, the CPU 10 refers to the pitch attitude data 71 in the main memory, acquires the latest attitude in the pitch direction calculated in step S51, stores it in the variable Rot0, and stores it in the main memory. Similarly, the CPU 10 refers to the pitch attitude data 71 of the main memory, acquires the attitude in the pitch direction one sample before, stores it in the variable Rot1, and stores it in the main memory. Next, the CPU 10 executes the process of step S73.

ステップS73において、CPU10は、Rot0>Rot1か否かを判定する。ステップS73での処理は、現在のピッチ方向の姿勢が、1サンプル前のピッチ方向の姿勢よりも大きいか否かを判定する処理である。ここでの処理は、現在、バックスイング中かフォワードスイング中かを判定する処理である。プレイヤが図10に示すバックスイングを行っている場合、ピッチ方向の姿勢(図28及び図29参照)は、小さくなる方向に変化していると考えられる。一方、プレイヤが図11に示すフォワードスイングを行っている場合、ピッチ方向の姿勢は、大きくなる方向に変化していると考えられる。従って、判定結果が肯定の場合、CPU10は、ピッチ方向の姿勢は大きくなる方向に変化していると判定し、次に、ステップS74の処理を実行する。一方、判定結果が否定の場合、CPU10は、ピッチ方向の姿勢は小さくなる方向に変化していると判定し、次に、ステップS75の処理を実行する。   In step S73, the CPU 10 determines whether or not Rot0> Rot1. The processing in step S73 is processing for determining whether or not the current posture in the pitch direction is larger than the posture in the pitch direction one sample before. The process here is a process for determining whether a backswing or a forward swing is currently being performed. When the player is performing the backswing shown in FIG. 10, the posture in the pitch direction (see FIGS. 28 and 29) is considered to change in a decreasing direction. On the other hand, when the player is performing the forward swing shown in FIG. 11, it is considered that the posture in the pitch direction is changing in the increasing direction. Therefore, when the determination result is affirmative, the CPU 10 determines that the posture in the pitch direction is changing in the increasing direction, and then executes the process of step S74. On the other hand, if the determination result is negative, the CPU 10 determines that the posture in the pitch direction has changed in a direction that decreases, and then executes the process of step S75.

ステップS74において、CPU10は、AV1がフォワードスイングの閾値より大きいか否かを判定する。ステップS74での処理は、XY方向の角速度の長さが極大値を示しており、かつ時点でのXY方向の角速度の長さが、フォワードスイング時の閾値よりも大きいか否かを判定する処理である。XY方向の角速度の長さが極大値を示している場合においても、その時点でのXY方向の角速度の長さが所定の閾値以下である場合、CPU10はボールを投球したと判定しない。すなわち、XY方向の角速度の長さが極大値を示している場合でも、プレイヤが所定の速さよりも速く入力装置8を振っていない場合、CPU10は、ボールを投球したと判定しない。判定結果が肯定の場合、CPU10は、次に、ステップS76の処理を実行する。判定結果が否定の場合、CPU10は、自動投球判定の処理を終了し、処理を図22に示す投球中ステート処理に戻す。   In step S74, the CPU 10 determines whether AV1 is larger than the forward swing threshold. The process in step S74 is a process for determining whether or not the length of the angular velocity in the XY direction has a maximum value, and whether the length of the angular velocity in the XY direction at the time is greater than a threshold during forward swing. It is. Even when the length of the angular velocity in the XY direction shows a maximum value, if the length of the angular velocity in the XY direction at that time is equal to or less than a predetermined threshold, the CPU 10 does not determine that the ball has been thrown. That is, even if the length of the angular velocity in the XY directions shows a maximum value, if the player does not swing the input device 8 faster than the predetermined speed, the CPU 10 does not determine that the ball has been thrown. If the determination result is affirmative, the CPU 10 next executes a process of step S76. If the determination result is negative, the CPU 10 ends the automatic pitching determination process and returns the process to the in-throwing state process shown in FIG.

一方、ステップS73において、判定結果が否定の場合、プレイヤはバックスイングを行っていると判断されて、ステップS75の処理が実行される。ステップS75において、CPU10は、AV1がバックスイングの閾値より大きいか否かを判定する。ステップS75での処理は、ステップS74での処理と同様、XY方向の角速度の長さが極大値を示しており、かつその時点でのXY方向の角速度の長さが、バックスイング時の閾値よりも大きいか否かを判定する処理である。判定結果が肯定の場合、CPU10は、次に、ステップS76の処理を実行する。判定結果が否定の場合、CPU10は、自動投球判定の処理を終了し、処理を図22に示す投球中ステート処理に戻す。なお、バックスイング時の閾値は、ステップS74におけるフォワードスイング時の閾値よりも大きく設定される。これは、バックスイング時において自動投球判定がなされることによって、投球方向とは反対方向にボールが飛ぶことを極力避けるためである。なお、他の実施例では、フォワードスイング時にのみ投球判定が行われ、バックスイング時には投球判定が行われないようにしてもよい。   On the other hand, if the determination result is negative in step S73, it is determined that the player is performing a backswing, and the process of step S75 is executed. In step S75, the CPU 10 determines whether or not AV1 is larger than the backswing threshold. In the process in step S75, the length of the angular velocity in the XY direction shows the maximum value, and the length of the angular velocity in the XY direction at that time is greater than the threshold value at the time of backswing, as in the process in step S74. Is a process for determining whether or not the value is larger. If the determination result is affirmative, the CPU 10 next executes a process of step S76. If the determination result is negative, the CPU 10 ends the automatic pitching determination process and returns the process to the in-throwing state process shown in FIG. Note that the threshold value during the backswing is set to be larger than the threshold value during the forward swing in step S74. This is to prevent the ball from flying in the direction opposite to the pitching direction as much as possible by making the automatic pitching determination during the backswing. In another embodiment, the pitch determination may be performed only during the forward swing, and the pitch determination may not be performed during the backswing.

ステップS76において、CPU10は、ボールの投球が成立したとして、投球判定の成立を示す値をメインメモリに記憶する。上記ステップS74において、判定結果が肯定の場合、その後の処理においてボールは投球方向に転がる。一方、上記ステップS75において、判定結果が肯定の場合、その後の処理においてボールは投球方向と反対方向に転がる。従って、ステップS76においては、直前にステップS74又はステップS75の何れの処理が実行されたかが区別できるようにして、投球判定の成立を示す値がメインメモリに記憶される。その後、CPU10は、自動投球判定の処理を終了し、処理を図22に示す投球中ステート処理に戻す。   In step S76, the CPU 10 stores in the main memory a value indicating that the pitch determination has been established, assuming that the ball has been thrown. If the determination result is affirmative in step S74, the ball rolls in the throwing direction in the subsequent processing. On the other hand, if the determination result is affirmative in step S75, the ball rolls in a direction opposite to the throwing direction in the subsequent processing. Accordingly, in step S76, a value indicating whether the pitch determination is established is stored in the main memory so that it can be distinguished whether the process of step S74 or step S75 has been executed immediately before. Thereafter, the CPU 10 ends the automatic pitching determination process, and returns the process to the in-throwing state process shown in FIG.

図22に戻り、ステップS63において、CPU10は、自動投球が成立したか否かを判定する。具体的には、CPU10は、メインメモリを参照して投球判定が成立したことを示す値(ステップS76で記憶した値)が格納されているか否かを判定する。判定結果が肯定の場合、CPU10は、次に、ステップS64の処理を実行する。判定結果が否定の場合、CPU10は、投球中ステート処理を終了し、処理を図18に示す投球処理に戻す。   Returning to FIG. 22, in step S63, the CPU 10 determines whether or not automatic pitching has been established. Specifically, the CPU 10 refers to the main memory and determines whether or not a value indicating that the pitch determination has been established (the value stored in step S76) is stored. If the determination result is affirmative, the CPU 10 next executes a process of step S64. If the determination result is negative, the CPU 10 ends the pitching state process and returns the process to the pitching process shown in FIG.

ステップS64において、CPU10は、過去所定サンプルの加速度に基づいて「振りの強さ」を算出する。具体的には、CPU10は、メインメモリの加速度データ64を参照して、過去所定サンプル(例えば、過去24サンプル)のうち、各加速度ベクトル(3軸に関する各加速度値を各成分とするベクトル)の大きさを算出し、その最大値を算出する。そして、CPU10は、その最大値を振りの強さとしてメインメモリに記憶する。次に、CPU10は、ステップS65の処理を実行する。   In step S <b> 64, the CPU 10 calculates the “swing intensity” based on the acceleration of the past predetermined sample. Specifically, the CPU 10 refers to the acceleration data 64 of the main memory, and among the past predetermined samples (for example, the past 24 samples), each of the acceleration vectors (vectors having respective acceleration values for three axes as respective components). The size is calculated and the maximum value is calculated. Then, the CPU 10 stores the maximum value in the main memory as the swing strength. Next, the CPU 10 executes the process of step S65.

ステップS65において、CPU10は、上下方向の射出ベクトルを算出する。具体的には、CPU10は、ピッチ方向の姿勢に基づいて、仮想ゲーム空間における上下方向の射出角度を算出する。例えば、CPU10は、ピッチ方向の姿勢と射出角度との関係を予め定めたテーブルを参照して、射出角度を算出する。そして、CPU10は、算出した射出角度に基づいて、仮想ゲーム空間における射出ベクトル(0,sin(射出角度),cos(射出角度))を算出し、メインメモリに記憶する。次に、CPU10は、ステップS66の処理を実行する。   In step S65, the CPU 10 calculates the vertical injection vector. Specifically, the CPU 10 calculates the vertical ejection angle in the virtual game space based on the posture in the pitch direction. For example, the CPU 10 calculates the injection angle with reference to a table in which the relationship between the posture in the pitch direction and the injection angle is determined in advance. Then, the CPU 10 calculates an injection vector (0, sin (injection angle), cos (injection angle)) in the virtual game space based on the calculated injection angle, and stores it in the main memory. Next, the CPU 10 executes the process of step S66.

ステップS66において、CPU10は、ボールに力を加える。具体的には、CPU10は、ステップS65で算出した射出ベクトルにステップS64で算出した振りの強さをかけることによって、仮想ゲーム空間における投球方向(ピンの方向)及び上下方向の力を算出する。そして、CPU10は、算出した力をボールに加える処理を行う。次に、CPU10は、ステップS67の処理を実行する。   In step S66, the CPU 10 applies force to the ball. Specifically, the CPU 10 calculates the pitching direction (pin direction) and the vertical force in the virtual game space by applying the swing strength calculated in step S64 to the injection vector calculated in step S65. Then, the CPU 10 performs a process of applying the calculated force to the ball. Next, the CPU 10 executes the process of step S67.

ステップS67において、CPU10は、ステップS64で算出した振りの強さを、「ボールに加えた力」としてメインメモリに記憶する。次に、CPU10は、ステップS68の処理を実行する。   In step S <b> 67, the CPU 10 stores the swing strength calculated in step S <b> 64 in the main memory as “force applied to the ball”. Next, the CPU 10 executes the process of step S68.

ステップS68において、CPU10は、ボールに横方向の力を加える処理を行う。ここでの処理は、ボールにヨー方向の姿勢(y軸周りの回転量)に応じて仮想ゲーム空間において横方向に力を加える処理である。すなわち、プレイヤが前後方向(z軸方向)に対して平行ではなく斜め方向に入力装置8を振った場合、入力装置8は基準姿勢の状態からy軸周りに回転するため、CPU10は、そのヨー方向の回転に応じてボールに横方向の力を加える。具体的には、CPU10は、メインメモリの回転行列データ67を参照して、最新の回転行列Mの要素Zxから1サンプル前の回転行列Mの要素Zxを引いた値を「横方向の力」として算出する。そして、CPU10は、算出した横方向の力をボールに加える処理を行う。次に、CPU10は、投球中ステート処理を終了し、処理を図18に示す投球処理に戻す。   In step S68, the CPU 10 performs a process of applying a lateral force to the ball. The processing here is processing for applying a force in the horizontal direction in the virtual game space according to the posture in the yaw direction (the amount of rotation about the y-axis). That is, when the player swings the input device 8 in an oblique direction rather than parallel to the front-rear direction (z-axis direction), the input device 8 rotates around the y-axis from the standard posture state, so the CPU 10 A lateral force is applied to the ball as the direction rotates. Specifically, the CPU 10 refers to the rotation matrix data 67 of the main memory, and obtains a value obtained by subtracting the element Zx of the rotation matrix M one sample previous from the element Zx of the latest rotation matrix M as the “lateral force”. Calculate as Then, the CPU 10 performs a process of applying the calculated lateral force to the ball. Next, the CPU 10 ends the pitching state process, and returns the process to the pitching process shown in FIG.

図18に戻り、ステップS18において、CPU10は、自動投球したか否かを判定する。具体的には、CPU10は、メインメモリを参照して投球判定が成立したことを示す値(ステップS76で記憶した値)が格納されているか否かを判定する。判定結果が肯定の場合、CPU10は、次に、ステップS19の処理を実行する。判定結果が否定の場合、CPU10は、投球処理を終了する。   Returning to FIG. 18, in step S18, the CPU 10 determines whether or not automatic pitching has been performed. Specifically, the CPU 10 refers to the main memory and determines whether or not a value indicating that the pitch determination has been established (the value stored in step S76) is stored. If the determination result is affirmative, the CPU 10 next executes a process of step S19. If the determination result is negative, the CPU 10 ends the pitching process.

ステップS19において、CPU10は、現在のステートを投球後に設定する。具体的には、CPU10は、メインメモリに記憶されたステート変数に、投球後の状態を表す値(例えば、3)を格納する。次に、CPU10は、図18に示す投球処理を終了する。   In step S19, the CPU 10 sets the current state after the pitch. Specifically, the CPU 10 stores a value (for example, 3) indicating the state after the pitch in the state variable stored in the main memory. Next, the CPU 10 ends the pitching process shown in FIG.

一方、ステップS16において、判定結果が否定の場合、すなわち、現在のステートが投球中でない場合、現在のステートは投球前でも投球中でもないため、CPU10は、次にステップS20の処理を実行する。ステップS20では、投球後に検出される角速度又は/及び加速度に基づいて、ボールの軌道や速度等を補正する。ステップS20における投球後ステート処理の詳細を、図24を用いて説明する。図24は、投球後ステート処理(ステップS20)の詳細を示したフローチャートである。   On the other hand, if the determination result is negative in step S16, that is, if the current state is not pitching, the current state is not before or during the pitching, so the CPU 10 next executes the process of step S20. In step S20, the trajectory and speed of the ball are corrected based on the angular velocity and / or acceleration detected after the pitch. Details of the post-throwing state process in step S20 will be described with reference to FIG. FIG. 24 is a flowchart showing details of the post-throwing state process (step S20).

まず、ステップS80において、CPU10は、投球後経過時間をインクリメントする。次にCPU10は、ステップS81において、投球後経過時間が32より小さいか否かを判定する。判定結果が肯定の場合、CPU10は、次にステップS82の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS83の処理を実行する。   First, in step S80, the CPU 10 increments the post-throwing elapsed time. Next, in step S81, the CPU 10 determines whether or not the elapsed time after pitching is less than 32. If the determination result is affirmative, the CPU 10 next executes a process of step S82. If the determination result is negative, the CPU 10 next executes a process of step S83.

ステップS82において、CPU10は、パワー更新処理を実行する。ここでの処理は、投球後の所定期間に加速度センサ37によって検出された加速度の大きさに応じて、「ボールに加えた力」を補正する処理である。ステップS82におけるパワー更新処理の詳細を、図25を用いて説明する。図25は、パワー更新処理(ステップS82)の詳細を示したフローチャートである。   In step S82, the CPU 10 executes a power update process. The process here is a process of correcting the “force applied to the ball” according to the magnitude of the acceleration detected by the acceleration sensor 37 during a predetermined period after the pitch. Details of the power update process in step S82 will be described with reference to FIG. FIG. 25 is a flowchart showing details of the power update process (step S82).

まず、ステップS90において、CPU10は、現在の加速度ベクトルの大きさに基づいて「振りの強さ」を算出する。具体的には、CPU10は、メインメモリの加速度データ64を参照して、最新の加速度ベクトルの大きさを算出し、現在の振りの強さとしてメインメモリに記憶する。次に、CPU10は、ステップS91の処理を実行する。   First, in step S <b> 90, the CPU 10 calculates “swing strength” based on the current magnitude of the acceleration vector. Specifically, the CPU 10 refers to the acceleration data 64 in the main memory, calculates the latest acceleration vector magnitude, and stores it in the main memory as the current swing strength. Next, the CPU 10 executes the process of step S91.

ステップS91において、CPU10は、ボールに加えた力が振りの強さよりも小さいか否かを判定する。ここでの処理は、現在ボールに加わっている力が現在加速度センサ37によって検出された加速度ベクトルの大きさよりも小さいか否かを判定する処理である。具体的には、CPU10は、メインメモリを参照して「ボールに加えた力」がステップS90で算出した現在の「振りの強さ」より小さいか否かを判定する。判定結果が肯定の場合、CPU10は、次にステップS92の処理を実行する。判定結果が否定の場合、CPU10は、パワー更新処理を終了する。   In step S91, the CPU 10 determines whether or not the force applied to the ball is smaller than the swing strength. The processing here is processing for determining whether or not the force currently applied to the ball is smaller than the magnitude of the acceleration vector detected by the current acceleration sensor 37. Specifically, the CPU 10 refers to the main memory and determines whether or not the “force applied to the ball” is smaller than the current “strength of swing” calculated in step S90. If the determination result is affirmative, the CPU 10 next executes a process of step S92. If the determination result is negative, the CPU 10 ends the power update process.

ステップS92において、CPU10は、ステップS90で算出した「振りの強さ」から「ボールに加えた力」を引いた力をボールに加える。ここでの処理は、「振りの強さ」が「ボールに加えた力」よりも大きい場合、その差分をボールに追加的に加える処理である。そして、次に、CPU10は、ステップS93において、ステップS90で算出した「振りの強さ」を「ボールに加えた力」としてメインメモリに記憶し、パワー更新処理を終了する。   In step S92, the CPU 10 applies a force obtained by subtracting “the force applied to the ball” from the “strength of swing” calculated in step S90 to the ball. This process is a process of additionally adding the difference to the ball when the “strength of swing” is greater than the “force applied to the ball”. Next, in step S93, the CPU 10 stores the “strength of swing” calculated in step S90 as “force applied to the ball” in the main memory, and ends the power update process.

このように、ボールの投球後、パワー更新処理を実行することにより、投球後の所定期間に加速度センサ37によって検出された加速度に応じて、追加的にボールに力を加えることができる。   As described above, by executing the power update process after the ball is thrown, it is possible to additionally apply a force to the ball according to the acceleration detected by the acceleration sensor 37 in a predetermined period after the pitch.

図24に戻り、ステップS83において、CPU10は、投球後経過時間が24に等しいか否かの判定を行う。判定結果が肯定の場合、CPU10は、次にステップS84の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS85の処理を実行する。   Returning to FIG. 24, in step S83, the CPU 10 determines whether or not the post-throwing elapsed time is equal to 24. If the determination result is affirmative, the CPU 10 next executes a process of step S84. If the determination result is negative, the CPU 10 next executes a process of step S85.

ステップS84において、CPU10は、カーブ計算を行う。ここでの処理は、ボールに回転を加えることによってボールの軌道を変化させる処理である。ステップS84におけるカーブ計算の処理の詳細を、図26を用いて説明する。図26は、カーブ計算処理(ステップS84)の詳細を示したフローチャートである。   In step S84, the CPU 10 performs curve calculation. The process here is a process of changing the trajectory of the ball by applying rotation to the ball. Details of the curve calculation process in step S84 will be described with reference to FIG. FIG. 26 is a flowchart showing details of the curve calculation process (step S84).

まず、ステップS100において、CPU10は、X方向の加速度の積算値とロール方向の角速度の積算値とに基づいてカーブ量を算出する。具体的には、CPU10は、メインメモリの加速度データ64及び角速度データ63を参照して、過去所定サンプル(例えば、過去48サンプル)のX軸方向の加速度及びZ軸回り(ロール方向)の角速度を取得する。次に、CPU10は、取得したX軸方向の加速度の絶対値の和を加速度の積算値として算出する。同様に、CPU10は、取得したZ軸回りの角速度の和を角速度の積算値として算出する。そして、CPU10は、カーブ量を以下の式(10)に基づいて算出する。
カーブ量=加速度の積算値×α+角速度の積算値の絶対値×β ・・・(10)
ここで、α及びβは所定の係数である。次に、CPU10は、ステップS101の処理を実行する。
First, in step S100, the CPU 10 calculates a curve amount based on the integrated value of acceleration in the X direction and the integrated value of angular velocity in the roll direction. Specifically, the CPU 10 refers to the acceleration data 64 and the angular velocity data 63 in the main memory, and calculates the acceleration in the X-axis direction and the angular velocity around the Z-axis (roll direction) in the past predetermined samples (for example, the past 48 samples). get. Next, the CPU 10 calculates the sum of the absolute values of the acquired acceleration in the X-axis direction as an integrated value of acceleration. Similarly, the CPU 10 calculates the sum of the acquired angular velocities around the Z axis as an integrated value of angular velocities. Then, the CPU 10 calculates the curve amount based on the following equation (10).
Curve amount = accumulated integrated value × α + absolute angular velocity integrated value × β (10)
Here, α and β are predetermined coefficients. Next, the CPU 10 executes the process of step S101.

ステップS101において、CPU10は、角速度の積算値の絶対値が所定値よりも大きいか否かの判定を行う。ここでの処理は、過去所定サンプル内にプレイヤが入力装置8をZ軸周りに回転させたか否かを判定する処理である。すなわち、Z軸回りの角速度の積算値の絶対値が所定値より大きい場合、プレイヤが意図的に入力装置8をZ軸周りに回転させた(捻る動作をした)と考えられる。一方、Z軸回りの角速度の積算値の絶対値が所定値以下の場合、プレイヤは意図的に入力装置8をZ軸周りに回転させていない(捻る動作をしていない)と考えられる。判定結果が肯定の場合、CPU10は、次にステップS102の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS103の処理を実行する。   In step S101, the CPU 10 determines whether or not the absolute value of the angular velocity integrated value is greater than a predetermined value. This process is a process for determining whether or not the player has rotated the input device 8 around the Z axis within the past predetermined sample. That is, when the absolute value of the integrated value of angular velocities around the Z axis is larger than a predetermined value, it is considered that the player has intentionally rotated (twisted) the input device 8 around the Z axis. On the other hand, when the absolute value of the integrated value of angular velocities around the Z axis is equal to or smaller than a predetermined value, it is considered that the player has not intentionally rotated the input device 8 around the Z axis (does not perform a twisting action). When the determination result is affirmative, the CPU 10 next executes a process of step S102. If the determination result is negative, the CPU 10 next executes the process of step S103.

ステップS102において、CPU10は、角速度の積算値の符号に基づいてカーブ方向を決定する。ここで、カーブ方向とは、ボールが投球方向(ピンに向かう方向)に対してカーブする方向である。具体的には、CPU10は、ステップS100で算出した角速度の積算値の符号に基づいて、カーブ方向を決定する。例えば、角速度の積算値の符号がマイナスの場合、カーブ方向はマイナスに設定される。これにより、プレイヤが入力装置8をZ軸周りに回転させた方向と同じ方向にカーブ方向が設定される。次に、CPU10は、ステップS104の処理を実行する。   In step S102, the CPU 10 determines the curve direction based on the sign of the integrated value of the angular velocity. Here, the curve direction is a direction in which the ball curves with respect to the pitching direction (direction toward the pin). Specifically, the CPU 10 determines the curve direction based on the sign of the angular velocity integrated value calculated in step S100. For example, when the sign of the angular velocity integrated value is negative, the curve direction is set to negative. Thereby, the curve direction is set in the same direction as the direction in which the player rotates the input device 8 around the Z axis. Next, the CPU 10 executes the process of step S104.

一方、ステップS103において、CPU10は、入力装置8の姿勢に基づいてカーブ方向を決定する。ステップS103においては、直前のステップS102において、プレイヤは意図的に入力装置8をZ軸周りに回転させていないと判定されているため、Z軸周りの角速度に基づいてカーブ方向を決定せず、この時点での入力装置8の姿勢に基づいてカーブ方向を算出する。すなわち、実際のボウリングの投球動作では、ボールを捻る動作よりもボールのリリース時における掌の向きによってカーブをかける場合がある。例えば、実際に右手でボールを投球するプレイヤは、左方向にカーブをかける際、リリース直前からリリース直後においては、掌をピンの方向に向けるようにして投球するのではなく、掌をピンの方向に対して垂直な方向(ピンの方向に対して左方向)に向けるようにして投球する場合がある。従って、本ゲームにおいても、投球後における入力装置8の上面(ボタン面)が投球方向に対して左方向を向いている場合、プレイヤは左方向にカーブをかけているとして、カーブ方向を左方向に設定する。具体的には、ステップS103において、CPU10は、メインメモリを参照して現在の回転行列Mの要素Xyの符号に基づいて、カーブ方向を決定する。これにより、カーブ方向は、入力装置8の上面が向いている方向と同じ方向に設定され、その結果、ボールは入力装置8の上面が向いている方向にカーブする。次に、CPU10は、ステップS104の処理を実行する。   On the other hand, in step S <b> 103, the CPU 10 determines the curve direction based on the attitude of the input device 8. In step S103, since it is determined that the player has not intentionally rotated the input device 8 around the Z axis in the immediately preceding step S102, the curve direction is not determined based on the angular velocity around the Z axis. The curve direction is calculated based on the attitude of the input device 8 at this time. That is, in an actual bowling throwing operation, a curve may be applied depending on the direction of the palm when the ball is released, rather than the operation of twisting the ball. For example, a player who actually throws the ball with the right hand, when making a curve in the left direction, does not throw the palm in the direction of the pin but immediately before the release and immediately after the release. In some cases, the ball is thrown in a direction perpendicular to the direction (left direction with respect to the pin direction). Therefore, also in this game, when the upper surface (button surface) of the input device 8 after the pitching is facing the left direction with respect to the pitching direction, it is assumed that the player curves in the left direction and the curve direction is set to the left direction. Set to. Specifically, in step S103, the CPU 10 refers to the main memory and determines the curve direction based on the sign of the element Xy of the current rotation matrix M. As a result, the curve direction is set to the same direction as the direction in which the upper surface of the input device 8 faces, and as a result, the ball curves in the direction in which the upper surface of the input device 8 faces. Next, the CPU 10 executes the process of step S104.

ステップS104において、CPU10は、ステップS100で算出したカーブ量、及び、ステップS102又はステップS103で設定したカーブ方向に基づいて、ボールに回転をかける。すなわち、CPU10は、ボールに対して「カーブ方向」に「カーブ量」の回転を加える処理を行う。そして、CPU10は、カーブ計算の処理を終了する。   In step S104, the CPU 10 rotates the ball based on the curve amount calculated in step S100 and the curve direction set in step S102 or step S103. That is, the CPU 10 performs a process of applying a “curve amount” rotation to the “curve direction” on the ball. Then, the CPU 10 ends the curve calculation process.

図24に戻り、ステップS85において、CPU10は、投球後経過時間が200より小さいか否かを判定する。判定結果が肯定の場合、CPU10は、次にステップS86の処理を実行する。判定結果が否定の場合、CPU10は、投球後ステート処理を終了する。   Returning to FIG. 24, in step S85, the CPU 10 determines whether or not the post-throwing elapsed time is less than 200. If the determination result is affirmative, the CPU 10 next executes a process of step S86. When the determination result is negative, the CPU 10 ends the post-throwing state process.

ステップS86において、CPU10は、ストレート判定済みか否かを判定する。ステップS86の処理では、後述するステップS87のストレート補正処理が実行されることによって、ストレート成立又はストレート不成立の判定がなされたか否かを判定する処理である。具体的には、CPU10は、メインメモリを参照することによって、ストレート判定の判定結果を示す値が、ストレート成立を示す値(例えば、1)又はストレート不成立を示す値(例えば、−1)であるか否かを判定する。判定結果が否定の場合、CPU10は、次にステップS87の処理を実行する。判定結果が肯定の場合、CPU10は、投球後ステート処理を終了する。   In step S86, the CPU 10 determines whether or not the straight determination has been completed. The process of step S86 is a process of determining whether straight is established or straight is not established by executing a straight correction process of step S87 described later. Specifically, the CPU 10 refers to the main memory, and the value indicating the straight determination result is a value indicating that the straight is established (for example, 1) or a value indicating that the straight is not established (for example, −1). It is determined whether or not. If the determination result is negative, the CPU 10 next executes a process of step S87. If the determination result is affirmative, the CPU 10 ends the post-throwing state process.

ステップS87において、CPU10は、ストレート補正処理を実行する。ここでの処理は、入力装置8を振る動作が終了したと考えられる時点(フィニッシュの状態の時点)における入力装置8の姿勢に基づいてボールの転がる方向をストレートに補正する処理である。ステップS87におけるストレート補正処理の詳細を、図27を用いて説明する。図27は、ストレート補正処理(ステップS87)の詳細を示したフローチャートである。   In step S87, the CPU 10 executes straight correction processing. The process here is a process for straightening the rolling direction of the ball based on the attitude of the input device 8 at the time when the operation of shaking the input device 8 is considered to be completed (at the time of the finish state). Details of the straight correction process in step S87 will be described with reference to FIG. FIG. 27 is a flowchart showing details of the straight correction process (step S87).

まず、ステップS110において、CPU10は、現在のXY方向の角速度の長さが0.3より小さいか否かを判定する。ここでの処理は、現在入力装置8が振られていないことを判定する処理である。図13に示すようなプレイヤが投球動作を終了した時点では、入力装置8は、略静止した状態(XYZ軸方向の角速度が略0の状態)である。ステップS110では、現在略静止した状態であるか否かを判定することにより、プレイヤが入力装置8を振り終わった状態であるか否かを判定する。具体的には、CPU10は、メインメモリの角速度データ63を参照して、最新のX軸周りの角速度及びY軸周りの角速度を取得する。そして、取得したX軸周りの角速度及びY軸周りの角速度を各成分とする角速度ベクトルの大きさが、所定の値(例えば、0.3)よりも小さいか否かを判定する。判定結果が肯定の場合、CPU10は、プレイヤが入力装置8を振り終わっていると判定して、次にステップS111の処理を行う。判定結果が否定の場合、CPU10は、プレイヤが入力装置8を振り終わっていないと判定し、ストレート補正処理を終了する。なお、判定結果が否定の場合、ストレート判定の判定結果を示す値は、ストレート成立を示す値(例えば、1)及びストレート不成立を示す値(例えば、−1)の何れでもない値(例えば、0)に設定される。   First, in step S110, the CPU 10 determines whether or not the current angular velocity length in the XY direction is smaller than 0.3. The processing here is processing for determining that the input device 8 is not currently shaken. When the player as shown in FIG. 13 finishes the pitching motion, the input device 8 is in a substantially stationary state (a state in which the angular velocity in the XYZ-axis directions is substantially 0). In step S110, it is determined whether or not the player has finished swinging the input device 8 by determining whether or not the player is currently stationary. Specifically, the CPU 10 refers to the angular velocity data 63 in the main memory and acquires the latest angular velocity around the X axis and angular velocity around the Y axis. Then, it is determined whether or not the magnitude of the angular velocity vector having the acquired angular velocity around the X axis and angular velocity around the Y axis as a component is smaller than a predetermined value (for example, 0.3). If the determination result is affirmative, the CPU 10 determines that the player has finished swinging the input device 8, and then performs the process of step S111. If the determination result is negative, the CPU 10 determines that the player has not finished swinging the input device 8, and ends the straight correction process. When the determination result is negative, the value indicating the straight determination result is a value that is neither a value indicating straight establishment (for example, 1) or a value indicating straight failure (for example, -1) (for example, 0). ).

ステップS111において、CPU10は、ループカウンタiの値を0に設定する。次に、ステップS112〜ステップS117の処理が実行される。ステップS112〜ステップS117では、プレイヤが入力装置8を振り終わった時点から前8サンプルの期間、次に示す2つの条件が満たされるか否かを判定し、その期間2つの条件が満たされていた場合、CPU10は、ステップS118において、ボールの回転方向又は/及び回転量の補正を行う。第1の条件は、プレイヤが入力装置8を振り終わった時点から前8サンプルの間に、入力装置8がロール方向に回転していないことである。また、第2の条件は、プレイヤが入力装置8を振り終わった時点から前8サンプルの間に、入力装置8の上面(ボタン面)が地面の方向を向いている場合において、入力装置8のZ軸正方向がプレイヤの真後ろ方向を向いていることである。上記、第1の条件又は第2の条件の何れかが満たされない場合、CPU10は、ボールの回転方向又は/及び回転量の補正を行わない。   In step S111, the CPU 10 sets the value of the loop counter i to 0. Next, the process of step S112-step S117 is performed. In steps S112 to S117, it is determined whether or not the following two conditions are satisfied for the period of the previous 8 samples from the time when the player finishes swinging the input device 8, and the two conditions are satisfied for that period. In this case, the CPU 10 corrects the rotation direction and / or the rotation amount of the ball in step S118. The first condition is that the input device 8 does not rotate in the roll direction during the previous eight samples from when the player has finished swinging the input device 8. The second condition is that the input device 8 has a top surface (button surface) that faces the ground during the previous eight samples from when the player has finished swinging the input device 8. That is, the positive direction of the Z-axis is directed in the direction directly behind the player. When either the first condition or the second condition is not satisfied, the CPU 10 does not correct the rotation direction or / and the rotation amount of the ball.

まず、ステップS112において、CPU10は、メインメモリの回転行列データ67を参照して、iサンプル前の回転行列Miを取得する。次に、CPU10は、ステップS113の処理を実行する。   First, in step S112, the CPU 10 refers to the rotation matrix data 67 of the main memory and acquires the rotation matrix Mi before i samples. Next, the CPU 10 executes the process of step S113.

ステップS113において、CPU10は、回転行列Miの要素Yxの絶対値が所定の値(例えば、0.3)より小さいか否かを判定する。ステップS113の処理は、上記第1の条件が満たされているか否かを判定する処理である。入力装置8が、ロール方向に回転している場合、回転行列Miの要素Yxの値は、0ではない値となる。従って、要素Yxの絶対値が所定の閾値以上の場合、入力装置8はロール方向に所定の値以上回転しているため、ボールの回転方向又は/及び回転量の補正は行われない。ステップS113において、判定結果が肯定の場合、CPU10は、次にステップS114の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS120の処理を実行する。   In step S113, the CPU 10 determines whether or not the absolute value of the element Yx of the rotation matrix Mi is smaller than a predetermined value (for example, 0.3). The process in step S113 is a process for determining whether or not the first condition is satisfied. When the input device 8 rotates in the roll direction, the value of the element Yx of the rotation matrix Mi is a non-zero value. Therefore, when the absolute value of the element Yx is equal to or greater than a predetermined threshold value, the input device 8 rotates by a predetermined value or more in the roll direction, so that the rotation direction and / or the rotation amount of the ball is not corrected. If the determination result is affirmative in step S113, the CPU 10 next executes the process of step S114. If the determination result is negative, the CPU 10 next executes the process of step S120.

続く、ステップS114及びステップS115において、上記第2の条件が満たされているか否かの判定が行われる。まず、ステップS114において、CPU10は、回転行列Miの要素Yyが0より小さいか否かを判定する。ステップS114の処理は、上記第2の条件のうち、入力装置8の上面が地面の方向を向いているか否かを判定する処理である。入力装置8の上面が地面の方向を向いている場合とは、入力装置8の上面に対して垂直に伸びる直線(Y軸正方向)が地面と交わる場合をいう(図15A参照)。要素Yyが0より小さい場合、入力装置8は、図15Aに示されるような姿勢となる。ステップS114において、判定結果が肯定の場合、CPU10は、次にステップS115の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS116の処理を実行する。   In subsequent steps S114 and S115, it is determined whether or not the second condition is satisfied. First, in step S114, the CPU 10 determines whether or not the element Yy of the rotation matrix Mi is smaller than zero. The process of step S114 is a process of determining whether or not the upper surface of the input device 8 faces the ground among the second conditions. The case where the upper surface of the input device 8 faces the direction of the ground means a case where a straight line (Y-axis positive direction) extending perpendicularly to the upper surface of the input device 8 intersects the ground (see FIG. 15A). When the element Yy is smaller than 0, the input device 8 takes a posture as shown in FIG. 15A. If the determination result is affirmative in step S114, the CPU 10 next executes the process of step S115. When the determination result is negative, the CPU 10 next executes a process of step S116.

ステップS115において、CPU10は、回転行列Miの要素Zzが0より小さく、かつ、回転行列Miの要素Zxの絶対値が0.3より小さいか否かを判定する。ステップS115の処理は、上記第2の条件のうち、入力装置8のZ軸正方向がプレイヤの真後ろ方向を向いているか否かを判定する処理である。入力装置8のZ軸正方向がプレイヤの真後ろ方向を向いていない場合とは、入力装置8の上面が地面の方向を向いている場合において、入力装置8のZ軸がxyz座標系におけるz軸に対してx軸方向に所定の角度傾いている場合である(図15B参照)。要素Zxの絶対値が、所定の値よりも大きい場合、入力装置8のZ軸は、x軸の正方向又は負方向に所定の角度傾いていることを示す。ステップS115において、判定結果が肯定の場合、CPU10は、次にステップS116の処理を実行する。判定結果が否定の場合、CPU10は、次にステップS120の処理を実行する。   In step S115, the CPU 10 determines whether or not the element Zz of the rotation matrix Mi is smaller than 0 and whether the absolute value of the element Zx of the rotation matrix Mi is smaller than 0.3. The process of step S115 is a process of determining whether or not the positive direction of the Z-axis of the input device 8 is in the direction directly behind the player among the second conditions. The case where the positive Z-axis direction of the input device 8 does not face the player's rearward direction means that the Z-axis of the input device 8 is the z-axis in the xyz coordinate system when the upper surface of the input device 8 faces the ground. This is a case where it is inclined at a predetermined angle in the x-axis direction (see FIG. 15B). When the absolute value of the element Zx is larger than a predetermined value, it indicates that the Z axis of the input device 8 is inclined at a predetermined angle in the positive direction or the negative direction of the x axis. If the determination result is affirmative in step S115, the CPU 10 next executes the process of step S116. If the determination result is negative, the CPU 10 next executes the process of step S120.

ステップS116において、CPU10は、ループカウンタiをインクリメントする。次にCPU10は、ステップS117において、ループカウンタiの値が8よりも小さいか否かを判定する。判定結果が肯定の場合、CPU10は、次にステップS118の処理を行う。判定結果が否定の場合、CPU10は、再びステップS112の処理を実行する。   In step S116, the CPU 10 increments the loop counter i. Next, in step S117, the CPU 10 determines whether or not the value of the loop counter i is smaller than 8. If the determination result is affirmative, the CPU 10 next performs a process of step S118. When the determination result is negative, the CPU 10 executes the process of step S112 again.

上記ステップS112〜ステップS117の処理が実行され、ステップS118の処理が実行される場合、プレイヤが入力装置8を振り終わった時点から前8サンプルの間、上記第1の条件及び第2の条件が満たされている。このような場合、プレイヤは、ストレートのボールを投球していると考えられるため、ステップS118において、ボールがストレートになるようにボールの回転方向、回転量の補正を行う。   When the process of step S112 to step S117 is performed and the process of step S118 is performed, the first condition and the second condition are satisfied during the previous 8 samples from the time when the player has swung the input device 8. be satisfied. In such a case, since it is considered that the player is throwing a straight ball, in step S118, the rotation direction and the rotation amount of the ball are corrected so that the ball becomes straight.

具体的には、ステップS118において、CPU10は、ボールの回転方向をピンの方向に向ける処理、又は/及び、ボールの回転量を小さくする処理を行う。例えば、ボールが左にカーブする方向に回転している場合、CPU10は、ボールの回転をピンの方向に向けるようにして、ボールが左にカーブしないように補正する。このように補正することにより、ボールは、カーブすることなくピンに対してまっすぐに転がる。次に、CPU10は、ステップS119の処理を実行する。   Specifically, in step S118, the CPU 10 performs a process of directing the rotation direction of the ball toward the pin or / and a process of reducing the rotation amount of the ball. For example, when the ball is rotating in a direction that curves to the left, the CPU 10 corrects the ball so that it does not curve to the left by directing the rotation of the ball toward the pin. By correcting in this way, the ball rolls straight with respect to the pin without curving. Next, the CPU 10 executes the process of step S119.

ステップS119において、CPU10は、ストレート判定の判定結果を示す値を、ストレート成立を示す値(例えば、1)に設定し、メインメモリに記憶する。そして、CPU10は、図27のストレート補正処理を終了し、図24に示す投球後ステート処理を終了する(図18の投球処理も終了し、図17の処理に戻る)。   In step S119, the CPU 10 sets a value indicating the straight determination result to a value indicating the straight establishment (for example, 1) and stores it in the main memory. Then, the CPU 10 ends the straight correction process of FIG. 27 and ends the post-throwing state process shown in FIG. 24 (the pitching process of FIG. 18 is also ended and the process returns to the process of FIG. 17).

一方、ステップS113又はステップS115において判定結果が否定の場合、プレイヤはストレートのボールを投球していないと判定され、CPU10は、ボールの回転方向又は/及び回転量の補正(ステップS118の処理)は行わない。ステップS113又はステップS115において判定結果が否定の場合、CPU10は、ステップS120の処理を実行する。ステップS120おいて、CPU10は、ストレート判定の判定結果を示す値を、ストレート不成立を示す値(例えば、−1)に設定し、メインメモリに記憶する。そして、CPU10は、図27のストレート補正処理を終了し、図24に示す投球後ステート処理を終了する(図18の投球処理も終了し、図17の処理に戻る)。   On the other hand, if the determination result is negative in step S113 or step S115, it is determined that the player is not throwing a straight ball, and the CPU 10 corrects the rotation direction and / or the rotation amount of the ball (processing in step S118). Not performed. If the determination result is negative in step S113 or step S115, the CPU 10 executes the process of step S120. In step S120, the CPU 10 sets a value indicating the straight determination result to a value indicating the straight failure (for example, -1), and stores it in the main memory. Then, the CPU 10 ends the straight correction process of FIG. 27 and ends the post-throwing state process shown in FIG. 24 (the pitching process of FIG. 18 is also ended and the process returns to the process of FIG. 17).

なお、図27に示すストレート補正処理の詳細において用いられた様々な判定のための閾値(例えば、ステップS110、S113〜S115)は、上述した値に限らずどのような値でもよい。   Note that the thresholds for various determinations (for example, steps S110 and S113 to S115) used in the details of the straight correction process shown in FIG. 27 are not limited to the values described above, and may be any values.

また、上記パワー更新処理(図24のステップS82)、カーブ計算処理(ステップS84)、及びストレート補正処理(ステップS87)は、投球後のどのようなタイミングにおいて実行されてもよい。例えば、上記パワー更新処理は投球成立から所定時間経過後において実行されてもよく、上記カーブ計算処理は投球成立前後の所定期間において実行されてもよい。   Further, the power update process (step S82 in FIG. 24), the curve calculation process (step S84), and the straight correction process (step S87) may be executed at any timing after the pitch. For example, the power update process may be executed after a predetermined time has elapsed since the pitch was established, and the curve calculation process may be executed during a predetermined period before and after the pitch is established.

図17に戻り、センササンプルループにおいて、所定回数ステップS3及びステップS4の処理が実行された後、ステップS5の処理が実行される。ステップS5において、CPU10は、ゲーム処理を行う。具体的には、CPU10は、ステップS3において設定されたプレイヤキャラクタのモーションや手の位置等に応じて、プレイヤキャラクタを画面上に表示したり、ステップS3において算出したボールに加えた力やその方向に応じて、ボールをゲーム空間内で移動させ、移動後のボールを画面上に表示させたりする。   Returning to FIG. 17, in the sensor sample loop, after the processes of step S3 and step S4 are executed a predetermined number of times, the process of step S5 is executed. In step S5, the CPU 10 performs a game process. Specifically, the CPU 10 displays the player character on the screen according to the motion of the player character set in step S3, the position of the hand, etc., or the force applied to the ball calculated in step S3 and its direction. In response to this, the ball is moved in the game space, and the moved ball is displayed on the screen.

なお、図17において図示されていないが、上記メインループは、ゲームが終了するタイミングで終了する。ゲームが終了するタイミングとは、プレイヤがゲームを終了するための操作を行った場合や、プレイヤがゲームをクリアした場合等である。メインループの処理が終了後、CPU10は、図17に示すゲーム処理を終了する。以上で、ゲーム処理の説明を終了する。   Although not shown in FIG. 17, the main loop ends at the timing when the game ends. The timing when the game ends is when the player performs an operation for ending the game, when the player clears the game, or the like. After the main loop process ends, the CPU 10 ends the game process shown in FIG. This is the end of the description of the game process.

以上のように、本実施形態では、ジャイロセンサ55及び56によって検出された角速度に基づいて、投球判定を行い(ステップS62)、投球成立前に加速度センサ37によって検出された加速度に基づいて、ボールに加える力(従って、ボールの移動速度)を算出した(ステップS64)。また、投球成立後に検出された加速度に基づいて、ボールに加える力を補正した(ステップS82)。さらに、投球成立前後に検出された加速度及び角速度に基づいて、ボールのカーブ量及びカーブ方向を算出した(ステップS84)。また、投球成立後の入力装置8の姿勢に基づいて、ストレート補正を行った(ステップS87)。このように角速度に基づいて入力装置8の姿勢及び振りの速さを求めることにより、プレイヤによる入力装置8の振り動作をより正確に求めることができる。これにより、プレイヤによる入力装置8の振り動作をより正確にボールの投球速度及び投球方向に反映させることができる。従って、プレイヤは実際の動作のような直感的な動作に基づいて、ゲームを行うことができる。   As described above, in the present embodiment, the pitch determination is performed based on the angular velocities detected by the gyro sensors 55 and 56 (step S62), and the ball is determined based on the acceleration detected by the acceleration sensor 37 before the pitch is established. The force applied to the ball (and hence the moving speed of the ball) was calculated (step S64). Further, the force applied to the ball was corrected based on the acceleration detected after the pitch was established (step S82). Further, the curve amount and curve direction of the ball were calculated based on the acceleration and angular velocity detected before and after the pitch was established (step S84). Further, straight correction was performed based on the attitude of the input device 8 after the pitch was established (step S87). Thus, by determining the attitude of the input device 8 and the speed of swing based on the angular velocity, the swing motion of the input device 8 by the player can be determined more accurately. Thereby, the swinging motion of the input device 8 by the player can be more accurately reflected in the pitching speed and direction of the ball. Therefore, the player can play a game based on an intuitive operation such as an actual operation.

なお、本実施形態では、XY方向の角速度の大きさが極大となり、かつその値が所定の閾値より大きい場合に、投球が成立したと判定し、加速度に基づいてボールを移動させる処理を行った。他の実施形態では、ジャイロセンサによって検出された角速度が所定の条件を満たした場合に、加速度に基づいて所定のオブジェクトを移動させる処理を行ってもよい。例えば、入力装置8の振り動作が開始されたことをジャイロセンサ55及び56によって検出された角速度に基づいて判定し、その振り動作中に加速度センサ37によって検出される加速度に基づいて、振りの強さを求めてもよい。そして、入力装置8の振り動作の開始に応じて、ゲームオブジェクトを移動させ、さらに、その移動量や移動速度、移動方向の変化量を加速度に基づいて設定してもよい。   In this embodiment, when the angular velocity in the XY directions is maximal and the value is larger than a predetermined threshold, it is determined that the pitch has been established, and a process of moving the ball based on the acceleration is performed. . In another embodiment, when the angular velocity detected by the gyro sensor satisfies a predetermined condition, a process of moving a predetermined object based on the acceleration may be performed. For example, it is determined based on the angular velocity detected by the gyro sensors 55 and 56 that the swing motion of the input device 8 has been started, and the strength of the swing is determined based on the acceleration detected by the acceleration sensor 37 during the swing motion. You may ask for it. Then, the game object may be moved in accordance with the start of the swing motion of the input device 8, and the movement amount, movement speed, and change amount of the movement direction may be set based on the acceleration.

また、本実施形態では、入力装置8のジャイロセンサ55及び56によって検出された角速度が所定の条件(角速度が極大、かつ、所定の閾値より大きい)を満たした場合に、加速度センサ37によって検出された加速度に基づいてボールの移動を開始させた(ボールの投球を行った)。他の実施形態では、入力装置8の角速度が所定の条件を満たした場合に、入力装置8の加速度に基づいて、移動しているオブジェクトを加速又は減速させたり、移動しているオブジェクトの移動方向(軌道)を変化させたりしてもよい。例えば、ゲーム空間上を移動しているオブジェクトに対する減速を、入力装置8に対する所定の振り動作に応じて行う場合、入力装置8に対する所定の振り動作を入力装置8の角速度に基づいて検出し、当該振り動作の検出前後に検出される入力装置8の加速度の大きさに応じて、オブジェクトに対する減速の度合いを決定してもよい。   Further, in the present embodiment, when the angular velocity detected by the gyro sensors 55 and 56 of the input device 8 satisfies a predetermined condition (the angular velocity is a maximum and larger than a predetermined threshold), the acceleration sensor 37 detects the angular velocity. The ball started to move based on the acceleration (the ball was thrown). In another embodiment, when the angular velocity of the input device 8 satisfies a predetermined condition, the moving object is accelerated or decelerated based on the acceleration of the input device 8, or the moving direction of the moving object is (Orbit) may be changed. For example, when the object moving in the game space is decelerated according to a predetermined swing motion with respect to the input device 8, the predetermined swing motion with respect to the input device 8 is detected based on the angular velocity of the input device 8, The degree of deceleration of the object may be determined according to the magnitude of acceleration of the input device 8 detected before and after the detection of the swing motion.

また、本実施形態では、ロール方向の角速度の積算値とX軸方向の加速度の積算値とに基づいて、カーブ量を計算し、ボールに回転をかけた(ステップS100)。他の実施形態では、所定の1軸方向の角速度と所定の1軸方向の加速度とに基づいて、カーブ量を計算してもよいし、所定の2軸(又は3軸)方向の角速度と所定の2軸(又は3軸)方向の加速度とに基づいて、カーブ量を計算してもよい。   In this embodiment, the curve amount is calculated based on the integrated value of the angular velocity in the roll direction and the integrated value of the acceleration in the X-axis direction, and the ball is rotated (step S100). In another embodiment, the amount of curve may be calculated based on a predetermined angular velocity in one axis direction and a predetermined acceleration in one axis direction, or the predetermined angular velocity in two axes (or three axes) and a predetermined amount. The amount of curve may be calculated based on the acceleration in the biaxial (or triaxial) direction.

また、本実施形態では、入力装置8の角速度が所定の条件を満たした場合に、角速度の積算値と加速度の積算値に基づいて、カーブ量を計算し、角速度の積算値の符号又は入力装置8の姿勢に基づいて、カーブ方向を計算することにより、ボールに回転をかけた(ステップS84)。すなわち、入力装置8の角速度が所定の条件を満たした場合に、入力装置8の角速度及び加速度に基づいて、オブジェクトの移動方向の変化量を計算し、入力装置8の角速度に基づいて、オブジェクトの移動方向の変化する方向を計算した。他の実施形態では、オブジェクトの移動方向の変化する方向は、入力装置8の加速度に基づいて計算されてもよい。この場合、入力装置8に対する重力方向の加速度を除いた加速度を算出し、算出した加速度に基づいて、オブジェクトの移動方向の変化する方向を計算することが好ましい。さらに、他の実施形態では、入力装置8の角速度が所定の条件を満たした場合に、入力装置8の加速度のみに基づいて、オブジェクトの移動方向の変化量及び変化する方向を計算してもよい。   In the present embodiment, when the angular velocity of the input device 8 satisfies a predetermined condition, the curve amount is calculated based on the integrated value of the angular velocity and the integrated value of the acceleration, and the sign of the integrated value of the angular velocity or the input device Based on the posture of 8, the curve direction was calculated to rotate the ball (step S84). That is, when the angular velocity of the input device 8 satisfies a predetermined condition, the amount of change in the moving direction of the object is calculated based on the angular velocity and acceleration of the input device 8, and based on the angular velocity of the input device 8, The changing direction of the moving direction was calculated. In other embodiments, the changing direction of the moving direction of the object may be calculated based on the acceleration of the input device 8. In this case, it is preferable that the acceleration excluding the acceleration in the gravity direction with respect to the input device 8 is calculated, and the direction in which the moving direction of the object changes is calculated based on the calculated acceleration. Furthermore, in another embodiment, when the angular velocity of the input device 8 satisfies a predetermined condition, the amount of change in the moving direction of the object and the direction in which the object moves may be calculated based only on the acceleration of the input device 8. .

また、本実施形態では、上記ストレート補正処理において、XY方向の角速度の大きさが所定の閾値より小さい場合(ステップS110)に、プレイヤの振り動作が終了したと判定し、ストレート補正を行った。他の実施形態では、加速度センサ37によって検出された加速度の大きさが所定の範囲である場合に、ストレート補正を行ってもよい。加速度センサ37によって検出される加速度は、重力による加速度とプレイヤの振り動作による加速度とが含まれる。プレイヤが入力装置8を振る場合、検出される加速度の大きさは、プレイヤによる振り動作に応じて、重力よりも大きくなったり、小さくなったりする。従って、検出される加速度の大きさが、重力の大きさと略等しい場合、プレイヤの振り動作が終了したと判定することができる。   Further, in the present embodiment, in the straight correction process, when the magnitude of the angular velocity in the XY directions is smaller than the predetermined threshold (step S110), it is determined that the player's swing motion has ended, and straight correction is performed. In another embodiment, straight correction may be performed when the magnitude of the acceleration detected by the acceleration sensor 37 is within a predetermined range. The acceleration detected by the acceleration sensor 37 includes acceleration due to gravity and acceleration due to the player's swing motion. When the player shakes the input device 8, the magnitude of the detected acceleration becomes larger or smaller than gravity depending on the swinging motion by the player. Accordingly, when the detected acceleration magnitude is substantially equal to the gravity magnitude, it can be determined that the player's swing motion has ended.

また、上記ストレート補正処理を行うタイミングは、入力装置8の振り動作が終了したと考えられる場合(ステップS110でYesと判定された場合)のみならず、どのようなタイミングであってもよい。例えば、自動投球判定後の予め定められた時点を基準にした所定期間において、上述した姿勢に関する第1の条件(ステップS114)及び第2の条件(ステップS115)が満たされている場合に、ストレート成立としてストレート補正(ステップS118)を行ってもよい。   The timing for performing the straight correction process is not limited to the case where it is considered that the swing operation of the input device 8 has been completed (when determined Yes in step S110), but may be any timing. For example, when the first condition (step S114) and the second condition (step S115) related to the posture described above are satisfied in a predetermined period based on a predetermined time after the automatic pitching determination, straight As the establishment, straight correction (step S118) may be performed.

また、本実施形態では、ボウリングゲームを例に説明したが、本発明が適用されるゲームはどのようなものであってもよい。例えば、野球ゲームにおける投球動作やゴルフゲームにおけるショット動作、槍投げ動作(陸上競技の槍投げ)等、様々なゲームに本発明を適用することができる。すなわち、プレイヤが入力装置8を振ることにより、その振り方に応じてゲーム世界におけるオブジェクトが移動制御されるゲームに、本発明は広く適用できる。   In this embodiment, a bowling game has been described as an example, but any game to which the present invention is applied may be used. For example, the present invention can be applied to various games such as a pitching action in a baseball game, a shot action in a golf game, and a throwing action (a throwing of an athletics). That is, the present invention can be widely applied to games in which an object in the game world is controlled to move according to how the player swings the input device 8.

また、本実施形態では、加速度センサ37によって3軸方向の加速度を検出し、ジャイロセンサ55及び56によって3軸方向の角速度を検出したが、1軸又は2軸方向の加速度又は角速度を検出することによっても本発明を実現することができる。   In this embodiment, the acceleration sensor 37 detects the acceleration in the triaxial direction, and the gyro sensors 55 and 56 detect the angular velocity in the triaxial direction. However, the acceleration or angular velocity in the uniaxial or biaxial direction is detected. The present invention can also be realized by.

また、本実施形態では、コントローラ5とゲーム装置3とが無線通信によって接続された態様を用いたが、コントローラ5とゲーム装置3とがケーブルを介して電気的に接続されてもかまわない。   In the present embodiment, the controller 5 and the game apparatus 3 are connected by wireless communication. However, the controller 5 and the game apparatus 3 may be electrically connected via a cable.

また、本発明のゲームプログラムは、光ディスク4等の外部記憶媒体を通じてゲーム装置3に供給されるだけでなく、有線又は無線の通信回線を通じてゲーム装置3に供給されてもよい。また、ゲームプログラムは、ゲーム装置3内部の不揮発性記憶装置に予め記録されていてもよい。なお、ゲームプログラムを記憶する情報記憶媒体(コンピュータ読み取り可能な記憶媒体)としては、CD−ROM、DVD、あるいはそれらに類する光学式ディスク状の記憶媒体の他に、不揮発性半導体メモリでもよい。   Further, the game program of the present invention may be supplied not only to the game apparatus 3 through an external storage medium such as the optical disc 4 but also to the game apparatus 3 through a wired or wireless communication line. The game program may be recorded in advance in a non-volatile storage device inside the game apparatus 3. The information storage medium (computer-readable storage medium) for storing the game program may be a non-volatile semiconductor memory in addition to a CD-ROM, DVD, or similar optical disk storage medium.

また、本実施形態においては、ゲーム装置3のCPU10がゲームプログラムを実行することによって、上述したフローチャートによる処理が行われた。他の実施形態においては、上記処理の一部又は全部は、ゲーム装置3が備える専用回路によって行われてもよい。   Moreover, in this embodiment, the process by the flowchart mentioned above was performed because CPU10 of the game device 3 performed a game program. In another embodiment, part or all of the above processing may be performed by a dedicated circuit included in the game apparatus 3.

以上のように、本発明に係るゲーム装置及びゲームプログラムは、加速度センサ及びジャイロセンサを備えた入力装置を用いた操作入力において、入力装置に対する振り動作に応じて仮想オブジェクト等を動作させる処理を行うことができ、例えば、ゲーム装置及びゲームプログラムとして利用することができる。   As described above, the game device and the game program according to the present invention perform a process of operating a virtual object or the like according to a swinging motion with respect to the input device in an operation input using the input device including the acceleration sensor and the gyro sensor. For example, it can be used as a game device and a game program.

1 ゲームシステム
2 テレビ
3 ゲーム装置
4 光ディスク
5 コントローラ
6 マーカ部
7 ジャイロセンサユニット
8 入力装置
10 CPU
11c GPU
11e 内部メインメモリ
12 外部メインメモリ
37 加速度センサ
55、56 ジャイロセンサ
63 角速度データ
64 加速度データ
DESCRIPTION OF SYMBOLS 1 Game system 2 Television 3 Game device 4 Optical disk 5 Controller 6 Marker part 7 Gyro sensor unit 8 Input device 10 CPU
11c GPU
11e Internal main memory 12 External main memory 37 Acceleration sensor 55, 56 Gyro sensor 63 Angular velocity data 64 Acceleration data

Claims (24)

角速度センサと加速度センサとを備えた入力装置から角速度データと加速度データとを含む操作データを取得して、当該操作データに基づいてゲーム処理を行うゲーム装置であって、
前記角速度データが所定の条件を満たしたか否かを判定する判定手段と、
前記角速度データが前記所定の条件を満たした時点を基準にして定められる所定期間に取得された前記加速度データに基づいて、ゲーム空間内の所定のオブジェクトの移動を制御する移動制御手段と、
前記移動制御手段によって移動制御される前記所定のオブジェクトを画面に表示する表示制御手段とを備えるゲーム装置。
A game device that acquires operation data including angular velocity data and acceleration data from an input device including an angular velocity sensor and an acceleration sensor, and performs game processing based on the operation data.
Determination means for determining whether or not the angular velocity data satisfies a predetermined condition;
A movement control means for controlling movement of a predetermined object in the game space based on the acceleration data acquired in a predetermined period determined based on a time point when the angular velocity data satisfies the predetermined condition;
A game apparatus comprising: display control means for displaying the predetermined object whose movement is controlled by the movement control means.
前記移動制御手段は、前記加速度データに基づいて、前記オブジェクトの移動速度を制御する、請求項1に記載のゲーム装置。   The game apparatus according to claim 1, wherein the movement control unit controls a moving speed of the object based on the acceleration data. 前記移動制御手段は、前記加速度データが示す加速度の大きさに基づいて、前記オブジェクトに力を加えることによって、前記オブジェクトの前記移動速度を制御する、請求項2に記載のゲーム装置。   The game apparatus according to claim 2, wherein the movement control unit controls the moving speed of the object by applying a force to the object based on a magnitude of acceleration indicated by the acceleration data. 前記判定手段によって前記角速度データが前記所定の条件を満たしたと判定されるまでの期間、前記角速度データに基づいて、前記オブジェクトの位置を決定する位置決定手段をさらに備え、
前記移動制御手段は、前記判定手段によって前記角速度データが前記所定の条件を満たしたと判定された場合に、前記位置決定手段において決定された位置から所定の方向へ前記オブジェクトを移動開始させる、請求項1に記載のゲーム装置。
A position determination unit that determines a position of the object based on the angular velocity data for a period until the determination unit determines that the angular velocity data satisfies the predetermined condition;
The movement control means starts moving the object in a predetermined direction from a position determined by the position determination means when the determination means determines that the angular velocity data satisfies the predetermined condition. The game device according to 1.
前記角速度データを逐次記憶する角速度記憶手段をさらに備え、
前記判定手段は、前記角速度記憶手段に記憶された前記角速度データに基づいて、前記角速度データが示す角速度の大きさが極大値を示し、かつ所定の閾値より大きい場合、前記角速度データが前記所定の条件を満たしたと判定する、請求項1に記載のゲーム装置。
An angular velocity storage means for sequentially storing the angular velocity data;
The determination means, based on the angular velocity data stored in the angular velocity storage means, when the magnitude of the angular velocity indicated by the angular velocity data indicates a maximum value and is greater than a predetermined threshold value, the angular velocity data is determined as the predetermined velocity. The game device according to claim 1, wherein it is determined that the condition is satisfied.
前記移動制御手段は、前記加速度データに基づいて、前記オブジェクトの移動方向をさらに制御する、請求項2に記載のゲーム装置。   The game apparatus according to claim 2, wherein the movement control unit further controls a moving direction of the object based on the acceleration data. 前記加速度データを逐次記憶する加速度記憶手段をさらに備え、
前記移動制御手段は、前記判定手段によって前記角速度データが前記所定の条件を満たしたと判定された時点を判定時として、当該判定時以前の所定長さの期間を前記所定期間とし、当該所定期間に含まれる前記加速度記憶手段に記憶された加速度データに基づいて、前記オブジェクトの前記移動速度を制御する、請求項2に記載のゲーム装置。
An acceleration storage means for sequentially storing the acceleration data;
The movement control means uses the time when the determination means determines that the angular velocity data satisfies the predetermined condition as a determination time, and sets a predetermined length period before the determination time as the predetermined period. The game device according to claim 2, wherein the moving speed of the object is controlled based on acceleration data stored in the included acceleration storage means.
前記移動制御手段は、前記所定期間に含まれる加速度データのうち、最大となる加速度の大きさに基づいて、前記オブジェクトの前記移動速度を制御する、請求項7に記載のゲーム装置。   The game apparatus according to claim 7, wherein the movement control unit controls the movement speed of the object based on a magnitude of a maximum acceleration among acceleration data included in the predetermined period. 前記移動制御手段は、前記角速度データに基づいて算出される前記判定時における前記入力装置の姿勢に応じて、前記オブジェクトの前記移動速度をさらに制御する、請求項8に記載のゲーム装置。   The game apparatus according to claim 8, wherein the movement control unit further controls the movement speed of the object according to an attitude of the input device at the time of the determination calculated based on the angular velocity data. 前記移動制御手段は、前記判定時以降に取得した前記加速度データに基づいて、前記オブジェクトの前記移動速度をさらに変化させる、請求項8に記載のゲーム装置。   The game apparatus according to claim 8, wherein the movement control unit further changes the movement speed of the object based on the acceleration data acquired after the determination time. 前記移動制御手段は、前記判定時以降に取得した前記加速度データが示す加速度の大きさが、前記所定期間の加速度の最大値よりも大きい場合に、当該判定時以降に取得した前記加速度データが示す加速度の大きさに基づいて、前記オブジェクトの前記移動速度をさらに変化させる、請求項10に記載のゲーム装置。   The movement control means indicates the acceleration data acquired after the determination when the magnitude of the acceleration indicated by the acceleration data acquired after the determination is larger than the maximum value of the acceleration during the predetermined period. The game device according to claim 10, wherein the moving speed of the object is further changed based on a magnitude of acceleration. 前記移動制御手段は、前記角速度データが前記所定の条件を満たしたときに前記ゲーム空間内の前記オブジェクトを所定方向に射出し、当該オブジェクトの射出時点もしくはそれ以前に取得された加速度データに基づいて射出直後の当該オブジェクトの移動速度を決定するとともに、当該オブジェクトの射出直後の一定期間に新たに取得された加速度データに基づいて射出直後の当該オブジェクトの移動速度を補正する、請求項1に記載のゲーム装置。   The movement control means injects the object in the game space in a predetermined direction when the angular velocity data satisfies the predetermined condition, and based on acceleration data acquired at or before the injection of the object. The movement speed of the object immediately after the injection is determined based on acceleration data newly acquired in a certain period immediately after the injection of the object, while determining the movement speed of the object immediately after the injection. Game device. 角速度センサと加速度センサとを備えた入力装置から角速度データと加速度データとを含む操作データを取得して、当該操作データに基づいてゲーム処理を行うゲーム装置のコンピュータにおいて実行されるゲームプログラムであって、
前記角速度データが所定の条件を満たしたか否かを判定する判定手段と、
前記角速度データが前記所定の条件を満たした時点を基準にして定められる所定期間に取得された前記加速度データに基づいて、ゲーム空間内の所定のオブジェクトの移動を制御する移動制御手段と、
前記移動制御手段によって移動制御される前記所定のオブジェクトを画面に表示する表示制御手段として、前記コンピュータを機能させる、ゲームプログラム。
A game program that is executed on a computer of a game device that acquires operation data including angular velocity data and acceleration data from an input device including an angular velocity sensor and an acceleration sensor and performs game processing based on the operation data. ,
Determination means for determining whether or not the angular velocity data satisfies a predetermined condition;
A movement control means for controlling movement of a predetermined object in the game space based on the acceleration data acquired in a predetermined period determined based on a time point when the angular velocity data satisfies the predetermined condition;
A game program for causing the computer to function as display control means for displaying the predetermined object whose movement is controlled by the movement control means on a screen.
前記移動制御手段は、前記加速度データに基づいて、前記オブジェクトの移動速度を制御する、請求項13に記載のゲームプログラム。   The game program according to claim 13, wherein the movement control means controls a moving speed of the object based on the acceleration data. 前記移動制御手段は、前記加速度データが示す加速度の大きさに基づいて、前記オブジェクトに力を加えることによって、前記オブジェクトの前記移動速度を制御する、請求項14に記載のゲームプログラム。   The game program according to claim 14, wherein the movement control unit controls the moving speed of the object by applying a force to the object based on a magnitude of acceleration indicated by the acceleration data. 前記判定手段によって前記角速度データが前記所定の条件を満たしたと判定されるまでの期間、前記角速度データに基づいて、前記オブジェクトの位置を決定する位置決定手段として、前記コンピュータをさらに機能させ、
前記移動制御手段は、前記判定手段によって前記角速度データが前記所定の条件を満たしたと判定された場合に、前記位置決定手段において決定された位置から所定の方向へ前記オブジェクトを移動開始させる、請求項13に記載のゲームプログラム。
The computer further functions as position determining means for determining the position of the object based on the angular velocity data for a period until the angular velocity data is determined to satisfy the predetermined condition by the determining means,
The movement control means starts moving the object in a predetermined direction from a position determined by the position determination means when the determination means determines that the angular velocity data satisfies the predetermined condition. 13. The game program according to 13.
前記角速度データを逐次記憶する角速度記憶手段として、前記コンピュータをさらに機能させ、
前記判定手段は、前記角速度記憶手段によって記憶された前記角速度データに基づいて、前記角速度データが示す角速度の大きさが極大値を示し、かつ所定の閾値より大きい場合、前記角速度データが前記所定の条件を満たしたと判定する、請求項13に記載のゲームプログラム。
As the angular velocity storage means for sequentially storing the angular velocity data, the computer is further functioned,
The determination means, based on the angular velocity data stored by the angular velocity storage means, shows that the angular velocity data indicated by the angular velocity data has a maximum value and is larger than a predetermined threshold value, the angular velocity data is The game program according to claim 13, wherein it is determined that the condition is satisfied.
前記移動制御手段は、前記加速度データに基づいて、前記オブジェクトの移動方向をさらに制御する、請求項14に記載のゲームプログラム。   The game program according to claim 14, wherein the movement control unit further controls a moving direction of the object based on the acceleration data. 前記加速度データを逐次記憶する加速度記憶手段として、前記コンピュータをさらに機能させ、
前記移動制御手段は、前記判定手段によって前記角速度データが前記所定の条件を満たしたと判定された時点を判定時として、当該判定時以前の所定長さの期間を前記所定期間とし、当該所定期間に含まれる前記加速度記憶手段によって記憶された加速度データに基づいて、前記オブジェクトの前記移動速度を制御する、請求項14に記載のゲームプログラム。
As an acceleration storage means for sequentially storing the acceleration data, the computer is further functioned,
The movement control means uses the time when the determination means determines that the angular velocity data satisfies the predetermined condition as a determination time, and sets a predetermined length period before the determination time as the predetermined period. The game program according to claim 14, wherein the moving speed of the object is controlled based on acceleration data stored by the included acceleration storage means.
前記移動制御手段は、前記所定期間に含まれる加速度データのうち、最大となる加速度の大きさに基づいて、前記オブジェクトの前記移動速度を制御する、請求項19に記載のゲームプログラム。   The game program according to claim 19, wherein the movement control unit controls the movement speed of the object based on a magnitude of a maximum acceleration among acceleration data included in the predetermined period. 前記移動制御手段は、前記角速度データに基づいて算出される前記判定時における前記入力装置の姿勢に応じて、前記オブジェクトの移動速度をさらに制御する、請求項20に記載のゲームプログラム。   The game program according to claim 20, wherein the movement control means further controls the movement speed of the object according to the attitude of the input device at the time of the determination calculated based on the angular velocity data. 前記移動制御手段は、前記判定時以降に取得した前記加速度データに基づいて、前記オブジェクトの前記移動速度をさらに変化させる、請求項20に記載のゲームプログラム。   The game program according to claim 20, wherein the movement control means further changes the moving speed of the object based on the acceleration data acquired after the determination time. 前記移動制御手段は、前記判定時以降に取得した前記加速度データが示す加速度の大きさが、前記所定期間の加速度の最大値よりも大きい場合に、当該判定時以降に取得した前記加速度データが示す加速度の大きさに基づいて、前記オブジェクトの前記移動速度をさらに変化させる、請求項22に記載のゲームプログラム。   The movement control means indicates the acceleration data acquired after the determination when the magnitude of the acceleration indicated by the acceleration data acquired after the determination is larger than the maximum value of the acceleration during the predetermined period. The game program according to claim 22, wherein the moving speed of the object is further changed based on a magnitude of acceleration. 前記移動制御手段は、前記角速度データが前記所定の条件を満たしたときに前記ゲーム空間内の前記オブジェクトを所定方向に射出し、当該オブジェクトの射出時点もしくはそれ以前に取得された加速度データに基づいて射出直後の当該オブジェクトの移動速度を決定するとともに、当該オブジェクトの射出直後の一定期間に新たに取得された加速度データに基づいて射出直後の当該オブジェクトの移動速度を補正する、請求項13に記載のゲームプログラム。   The movement control means injects the object in the game space in a predetermined direction when the angular velocity data satisfies the predetermined condition, and based on acceleration data acquired at or before the injection of the object. 14. The moving speed of the object immediately after the injection is determined, and the moving speed of the object immediately after the injection is corrected based on acceleration data newly acquired in a certain period immediately after the injection of the object. Game program.
JP2009087214A 2009-03-31 2009-03-31 GAME DEVICE AND GAME PROGRAM Active JP5420954B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2009087214A JP5420954B2 (en) 2009-03-31 2009-03-31 GAME DEVICE AND GAME PROGRAM
US12/491,622 US8303412B2 (en) 2009-03-31 2009-06-25 Game apparatus and game program
US13/331,297 US8353769B2 (en) 2009-03-31 2011-12-20 Game apparatus and game program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009087214A JP5420954B2 (en) 2009-03-31 2009-03-31 GAME DEVICE AND GAME PROGRAM

Publications (2)

Publication Number Publication Date
JP2010233929A JP2010233929A (en) 2010-10-21
JP5420954B2 true JP5420954B2 (en) 2014-02-19

Family

ID=43088847

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009087214A Active JP5420954B2 (en) 2009-03-31 2009-03-31 GAME DEVICE AND GAME PROGRAM

Country Status (1)

Country Link
JP (1) JP5420954B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11794094B2 (en) * 2016-10-17 2023-10-24 Aquimo Inc. Method and system for using sensors of a control device for control of a game
EP3807746B1 (en) * 2018-06-20 2023-07-26 Valve Corporation Holding and releasing virtual objects

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000308756A (en) * 1999-04-27 2000-11-07 Taito Corp Input controller of game device
JP5294442B2 (en) * 2006-09-13 2013-09-18 任天堂株式会社 GAME DEVICE AND GAME PROGRAM
JP5177615B2 (en) * 2006-12-01 2013-04-03 任天堂株式会社 GAME PROGRAM, GAME DEVICE, GAME SYSTEM, AND GAME PROCESSING METHOD

Also Published As

Publication number Publication date
JP2010233929A (en) 2010-10-21

Similar Documents

Publication Publication Date Title
JP5289031B2 (en) GAME DEVICE AND GAME PROGRAM
JP5131809B2 (en) GAME DEVICE AND GAME PROGRAM
JP5420824B2 (en) GAME DEVICE AND GAME PROGRAM
JP5700758B2 (en) GAME DEVICE, GAME PROGRAM, GAME SYSTEM, AND GAME PROCESSING METHOD
JP5430246B2 (en) GAME DEVICE AND GAME PROGRAM
JP5060798B2 (en) Information processing program and information processing apparatus
US8303412B2 (en) Game apparatus and game program
JP6029255B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP4918376B2 (en) Information processing program and information processing apparatus
JP5361044B2 (en) GAME DEVICE AND GAME PROGRAM
JP5430123B2 (en) GAME DEVICE AND GAME PROGRAM
JP5358168B2 (en) GAME DEVICE AND GAME PROGRAM
JP5498690B2 (en) GAME PROGRAM AND GAME DEVICE
JP5005627B2 (en) Information processing program and information processing apparatus
JP5537083B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP5872137B2 (en) Posture calculation apparatus, posture calculation program, posture calculation system, and posture calculation method
JP5525177B2 (en) Information processing program and information processing apparatus
JP5576721B2 (en) GAME PROGRAM, GAME DEVICE, GAME SYSTEM, AND GAME METHOD
JP5420954B2 (en) GAME DEVICE AND GAME PROGRAM
JP5350612B2 (en) GAME PROGRAM, GAME DEVICE, GAME SYSTEM, AND GAME PROCESSING METHOD
JP5443041B2 (en) GAME DEVICE AND GAME PROGRAM
JP5420955B2 (en) GAME DEVICE AND GAME PROGRAM
JP5704770B2 (en) GAME DEVICE, GAME PROGRAM, GAME SYSTEM, AND GAME PROCESSING METHOD
JP5443042B2 (en) GAME DEVICE AND GAME PROGRAM
JP5875169B2 (en) GAME SYSTEM, GAME DEVICE, GAME PROGRAM, AND GAME PROCESSING METHOD

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20110902

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20111111

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131031

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131112

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131121

R150 Certificate of patent or registration of utility model

Ref document number: 5420954

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250