JP5438382B2 - Information processing program and information processing apparatus - Google Patents
Information processing program and information processing apparatus Download PDFInfo
- Publication number
- JP5438382B2 JP5438382B2 JP2009127507A JP2009127507A JP5438382B2 JP 5438382 B2 JP5438382 B2 JP 5438382B2 JP 2009127507 A JP2009127507 A JP 2009127507A JP 2009127507 A JP2009127507 A JP 2009127507A JP 5438382 B2 JP5438382 B2 JP 5438382B2
- Authority
- JP
- Japan
- Prior art keywords
- acceleration
- data
- calculated
- input device
- credit
- 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
Links
- 230000010365 information processing Effects 0.000 title claims description 51
- 230000001133 acceleration Effects 0.000 claims description 707
- 238000000034 method Methods 0.000 claims description 193
- 230000008569 process Effects 0.000 claims description 178
- 238000012937 correction Methods 0.000 claims description 176
- 239000013598 vector Substances 0.000 claims description 138
- 230000005484 gravity Effects 0.000 claims description 129
- 238000012545 processing Methods 0.000 claims description 123
- 230000008859 change Effects 0.000 claims description 90
- 238000004364 calculation method Methods 0.000 claims description 75
- 230000006870 function Effects 0.000 claims description 18
- 230000003247 decreasing effect Effects 0.000 claims description 4
- 230000002194 synthesizing effect Effects 0.000 claims 1
- 230000015654 memory Effects 0.000 description 53
- 238000001514 detection method Methods 0.000 description 51
- 230000033001 locomotion Effects 0.000 description 51
- 238000004891 communication Methods 0.000 description 32
- 238000013519 translation Methods 0.000 description 26
- 238000003384 imaging method Methods 0.000 description 24
- 230000005540 biological transmission Effects 0.000 description 21
- 230000003287 optical effect Effects 0.000 description 20
- 239000000758 substrate Substances 0.000 description 18
- 230000036544 posture Effects 0.000 description 17
- 238000013459 approach Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 13
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 7
- 230000003068 static effect Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000005070 sampling Methods 0.000 description 5
- 230000007423 decrease Effects 0.000 description 4
- CZZAPCPWFCGOCC-GHXNOFRVSA-N (5z)-2-amino-5-[[5-(2-nitrophenyl)furan-2-yl]methylidene]-1,3-thiazol-4-one Chemical compound S1C(N)=NC(=O)\C1=C\C1=CC=C(C=2C(=CC=CC=2)[N+]([O-])=O)O1 CZZAPCPWFCGOCC-GHXNOFRVSA-N 0.000 description 3
- 230000009471 action Effects 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 238000003825 pressing Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 238000010137 moulding (plastic) Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 239000012530 fluid Substances 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 238000004377 microelectronic Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000010453 quartz Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
- VYPSYNLAJGMNEJ-UHFFFAOYSA-N silicon dioxide Inorganic materials O=[Si]=O VYPSYNLAJGMNEJ-UHFFFAOYSA-N 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Position Input By Displaying (AREA)
Description
本発明は、情報処理プログラムおよび情報処理装置に関し、より特定的には、加速度センサを備えた入力装置の重力方向を算出する情報処理装置および当該情報処理装置で実行される情報処理プログラムに関する。 The present invention relates to an information processing program and an information processing apparatus, and more specifically to an information processing apparatus that calculates the direction of gravity of an input device including an acceleration sensor and an information processing program executed by the information processing apparatus.
従来、加速度センサを備えた入力装置において、当該入力装置の生じる重力方向を算出するものが知られている(例えば、特許文献1参照)。上記特許文献1で開示された入力装置は、加速度センサを備えており、加速度センサから出力される加速度信号に基づいて当該入力装置の重力方向を算出している。具体的には、上記特許文献1で開示された入力装置は、上記加速度センサから出力される加速度信号が示す加速度における合成ベクトルを算出し、当該合成ベクトルの大きさが重力加速度の大きさに対して予め定められた範囲内であれば、入力装置が静止状態であると判定される。そして、静止状態であると判定されている状態において算出された合成ベクトルの方向を上記入力装置の重力方向であるとして、当該入力装置の傾斜角が算出される。
2. Description of the Related Art Conventionally, an input device including an acceleration sensor that calculates the direction of gravity generated by the input device is known (see, for example, Patent Document 1). The input device disclosed in
しかしながら、上記特許文献1で開示された入力装置は、入力装置が静止状態であると判定するための上記範囲によって、重力方向が認識されにくくなったり、重力方向が誤認識されたりすることがある。例えば、上述した重力方向の算出方法では、上記合成ベクトルの大きさが重力加速度の大きさに対して予め定められた範囲内である場合に重力方向が認識されるため、当該範囲を相対的に狭い範囲に設定すると重力方向が認識されにくくなってしまう。一方、上記範囲を相対的に広い範囲に設定すると重力方向ではない方向まで重力方向として認識されることがあり、重力方向が誤認識されてしまう。
However, the input device disclosed in
それ故に、本発明の目的は、加速度センサを備えた入力装置の重力方向を正確に算出することができる情報処理プログラムおよび情報処理装置を提供することである。 Therefore, an object of the present invention is to provide an information processing program and an information processing apparatus capable of accurately calculating the direction of gravity of an input device including an acceleration sensor.
上記の目的を達成するために、本発明は以下の構成を採用した。なお、括弧内の参照符号やステップ番号等は、本発明の理解を助けるために後述する実施形態との対応関係を示したものであって、本発明の範囲を何ら限定するものではない。 In order to achieve the above object, the present invention employs the following configuration. Note that the reference numerals in parentheses, step numbers, and the like indicate correspondence with the embodiments described later in order to help understanding of the present invention, and do not limit the scope of the present invention.
本発明は、加速度を検出する加速度センサ(701)を備えた入力装置(6)から出力される加速度データ(Db、Dm)に基づいて、所定の処理を行う情報処理装置(5)のコンピュータ(10)で実行される情報処理プログラムである。情報処理プログラムは、データ取得手段(ステップ42およびステップ102を実行するCPU10;以下、単にステップ番号のみ記載する)、変化量算出手段(S51、S121)、および重力方向算出手段(S43、S103、S104)としてコンピュータを機能させる。データ取得手段は、加速度データを繰り返し取得する。変化量算出手段は、加速度データが示す加速度(a、as)の履歴を用いて入力装置に生じる加速度の変化量を算出する。重力方向算出手段は、加速度の変化量に基づいて、入力装置の重力方向(g、gs)を加速度データが示す加速度を用いて算出する。
The present invention provides a computer (5) for an information processing device (5) that performs predetermined processing based on acceleration data (Db, Dm) output from an input device (6) that includes an acceleration sensor (701) that detects acceleration. This is an information processing program executed in 10). The information processing program includes data acquisition means (CPU 10 that executes
上記によれば、入力装置に生じている加速度の変化量(例えば、加速度のサンプリング前後の差分)に基づいて、加速度センサを備えた入力装置の重力方向を正確に算出することができる。 Based on the above, it is possible to accurately calculate the direction of gravity of the input device including the acceleration sensor based on the amount of change in acceleration occurring in the input device (for example, the difference between before and after sampling acceleration).
また、重力方向算出手段は、加速度の変化量に基づいて、前回の処理において算出した重力方向を加速度データが示す加速度を用いて修正することによって今回の処理における重力方向を算出してもよい。 Further, the gravitational direction calculation means may calculate the gravitational direction in the current process by correcting the gravitational direction calculated in the previous process using the acceleration indicated by the acceleration data based on the change amount of the acceleration.
上記によれば、入力装置に生じている加速度の変化量に基づいて、前回の処理において算出した重力方向を加速度データが示す加速度を用いて修正することによって、加速度センサを備えた入力装置の重力方向を正確に算出することができる。 According to the above, the gravity of the input device provided with the acceleration sensor is corrected by correcting the gravity direction calculated in the previous process using the acceleration indicated by the acceleration data based on the change amount of the acceleration generated in the input device. The direction can be calculated accurately.
一例として、重力方向算出手段は、加速度の変化量が小さいほど前回の処理において算出した重力方向を大きく修正して、今回の処理における重力方向を算出してもよい。 As an example, the gravitational direction calculation means may calculate the gravitational direction in the current process by correcting the gravitational direction calculated in the previous process to be larger as the amount of change in acceleration is smaller.
上記によれば、例えば入力装置が静止状態にある場合、前回の処理において算出した重力方向を大きく修正されるため、重力方向を正確に算出することができる。 According to the above, for example, when the input device is in a stationary state, the direction of gravity calculated in the previous process is largely corrected, so that the direction of gravity can be accurately calculated.
他の例として、重力方向算出手段は、加速度の変化量が小さいほど前回の処理において算出した重力方向を修正する度合(t、ts)を大きくして、今回の処理における重力方向を算出してもよい。 As another example, the gravity direction calculation means calculates the gravity direction in the current process by increasing the degree (t, ts) of correcting the gravity direction calculated in the previous process as the amount of change in acceleration is smaller. Also good.
上記によれば、入力装置に生じる加速度の変化量が小さいほど前回の処理において算出した重力方向を修正する度合が大きくなり、入力装置が静止状態にある場合はそれ以前設定されていた重力方向が算出に用いられる度合が低くなるため、重力方向を正確に算出することができる。 According to the above, the smaller the amount of acceleration change that occurs in the input device, the greater the degree to which the gravity direction calculated in the previous process is corrected, and if the input device is in a stationary state, the previously set gravity direction is Since the degree used for calculation is low, the direction of gravity can be calculated accurately.
他の例として、重力方向算出手段は、加速度の変化量が所定値以下のときのみ修正してもよい。 As another example, the gravitational direction calculation means may correct only when the amount of change in acceleration is a predetermined value or less.
上記によれば、入力装置の動きが激しい場合は、当該入力装置に生じている加速度において当該動きによって生じている加速度の影響が強くなるため、入力装置の動きが激しい場合に生じた加速度を重力方向の算出に用いないことによって、重力方向を正確に算出することができる。 According to the above, when the motion of the input device is intense, the acceleration caused by the motion becomes stronger in the acceleration occurring in the input device. By not using for calculating the direction, the direction of gravity can be calculated accurately.
また、重力方向算出手段は、仮信用度算出手段(S51、S121)および信用度設定手段(S57、S58、S127、S128)を含んでいてもよい。仮信用度算出手段は、加速度の変化量に基づいて、加速度データが示す加速度が重力加速度として信用できる度合を表す仮信用度(d、ds)を算出する。信用度設定手段は、仮信用度に基づいて、前回の処理において算出した重力方向を修正する度合を示す信用度(t、ts)を設定する。この場合、重力方向算出手段は、前回の処理において算出した重力方向を、信用度設定手段で設定された信用度に応じて修正することによって今回の処理における重力方向を算出する。 The gravity direction calculating means may include provisional credit calculating means (S51, S121) and credit setting means (S57, S58, S127, S128). The temporary credit calculation means calculates a temporary credit (d, ds) representing the degree to which the acceleration indicated by the acceleration data can be trusted as the gravitational acceleration based on the change in acceleration. The reliability setting means sets the reliability (t, ts) indicating the degree of correction of the direction of gravity calculated in the previous process based on the provisional reliability. In this case, the gravity direction calculation means calculates the gravity direction in the current process by correcting the gravity direction calculated in the previous process according to the reliability set by the reliability setting means.
上記によれば、仮信用度および信用度を用いて、重力方向を正確に修正することができる。 According to the above, it is possible to correct the gravity direction accurately using the temporary creditworthiness and the creditworthiness.
また、仮信用度算出手段は、加速度の変化量が小さいほど仮信用度を高く算出してもよい。信用度設定手段は、仮信用度が高いほど信用度を高く設定してもよい。 Further, the provisional reliability calculation means may calculate the provisional reliability higher as the amount of change in acceleration is smaller. The credit level setting means may set the credit level higher as the temporary credit level is higher.
上記によれば、入力装置に生じている加速度の変化が小さいときに仮信用度や信用度が高くなるため、重力方向を正確に修正することができる。 According to the above, since the temporary reliability and the reliability become high when the change in acceleration generated in the input device is small, the direction of gravity can be corrected accurately.
また、信用度設定手段は、今回の処理における信用度を、前回の処理で設定された信用度より高くなるときには高くなりにくく、前回の処理で設定された信用度より低くなるときには低くなりやすく設定してもよい。 In addition, the credit setting means may set the credit in the current process to be less likely to be higher when it is higher than the credit set in the previous process, and to be easily lower when lower than the credit set in the previous process. .
上記によれば、前回より信用度が高くなった場合に信用度の上昇が抑制されるため、入力装置に生じている重力加速度を安定して検出するまで待機する時間を設けることができる。また、前回より信用度が低くなった場合は即時に信用度が下降するため、信用度の低下を即時に重力方向の算出に反映させることができる。 According to the above, since the increase in the creditworthiness is suppressed when the trustworthiness becomes higher than the previous time, it is possible to provide a waiting time until the gravitational acceleration generated in the input device is stably detected. In addition, when the creditworthiness is lower than the previous time, the creditworthiness immediately decreases, and therefore, the decrease in the creditworthiness can be immediately reflected in the calculation of the gravity direction.
また、信用度設定手段は、高低判定手段(S56)を含んでいてもよい。高低判定手段は、仮信用度算出手段が算出した仮信用度が前回の処理で設定された信用度(t0、ts0)より高くなったか否かを判定する。この場合、信用度設定手段は、仮信用度算出手段が算出した仮信用度が前回の処理で設定された信用度より高くなったと高低判定手段が判定した場合、仮信用度算出手段が算出した仮信用度と前回の処理で設定された信用度との間の値を、今回の処理における信用度に設定する。 Further, the reliability setting means may include a height determination means (S56). The high / low determination means determines whether or not the temporary credit calculated by the temporary credit calculation means is higher than the credit (t0, ts0) set in the previous process. In this case, the creditworthiness setting means, when the high / low judgment means determines that the temporary creditworthiness calculated by the temporary creditworthiness calculation means is higher than the creditworthiness set in the previous process, the temporary creditworthiness calculated by the temporary creditworthiness calculation means and the previous creditworthiness A value between the reliability set in the process is set as the reliability in the current process.
上記によれば、仮信用度が高くなった場合に信用度の上昇が抑制されるため、入力装置に生じている重力加速度を安定して検出するまで待機する時間を設けることができる。 According to the above, since the increase in the creditworthiness is suppressed when the temporary creditworthiness becomes high, it is possible to provide a time for waiting until the gravitational acceleration generated in the input device is stably detected.
また、信用度設定手段は、仮信用度算出手段が算出した仮信用度が前回の処理で設定された信用度と同じまたは低くなったと高低判定手段が判定した場合、仮信用度算出手段が算出した仮信用度の値を、今回の処理における信用度に設定してもよい。 In addition, the creditworthiness setting means, when the high / low judgment means determines that the temporary creditworthiness calculated by the temporary creditworthiness calculation means is the same or lower than the creditworthiness set in the previous process, the value of the temporary creditworthiness calculated by the temporary creditworthiness calculation means May be set as the reliability in the current process.
上記によれば、仮信用度が低くなった場合は即時に信用度が下降するため、仮信用度の低下を即時に重力方向の算出に反映させることができる。 According to the above, since the creditworthiness immediately decreases when the temporary creditworthiness becomes low, the decrease in the temporary creditworthiness can be immediately reflected in the calculation of the gravity direction.
また、重力方向算出手段は、前回の処理において算出した重力方向に生じる重力加速度と加速度データが示す加速度とを信用度が示す割合で合成することによって、今回の処理における重力方向を算出してもよい。 Further, the gravity direction calculating means may calculate the gravity direction in the current process by combining the gravity acceleration generated in the gravity direction calculated in the previous process and the acceleration indicated by the acceleration data at a ratio indicated by the reliability. .
上記によれば、重力方向を自然に修正することができる。 According to the above, the direction of gravity can be corrected naturally.
また、重力方向算出手段は、加速度の変化量が0である場合、加速度データが示す加速度が生じる方向をそのまま今回の処理における重力方向として算出してもよい。 Further, when the amount of change in acceleration is 0, the gravity direction calculation means may calculate the direction in which the acceleration indicated by the acceleration data is generated as it is as the gravity direction in the current process.
上記によれば、静止状態の入力装置に生じている加速度を重力加速度として推定するため、容易に重力方向を算出することができる。 According to the above, since the acceleration generated in the input device in a stationary state is estimated as the gravitational acceleration, the direction of gravity can be easily calculated.
また、本発明は、加速度ベクトル算出手段として、さらにコンピュータを機能させてもよい。加速度ベクトル算出手段は、データ取得手段が取得した加速度データが示す加速度に基づいて、加速度ベクトルを算出する。この場合、変化量算出手段は、加速度ベクトルの履歴を用いて加速度ベクトルの大きさの変化量を算出する。重力方向算出手段は、加速度ベクトルの大きさの変化量に基づいて、入力装置の重力方向を示す重力方向ベクトルを加速度ベクトル算出手段が算出した加速度ベクトルを用いて算出する。 In the present invention, the computer may further function as acceleration vector calculation means. The acceleration vector calculation means calculates an acceleration vector based on the acceleration indicated by the acceleration data acquired by the data acquisition means. In this case, the change amount calculating means calculates the change amount of the magnitude of the acceleration vector using the history of the acceleration vector. The gravity direction calculation means calculates a gravity direction vector indicating the gravity direction of the input device based on the change amount of the magnitude of the acceleration vector, using the acceleration vector calculated by the acceleration vector calculation means.
また、重力方向算出手段は、加速度ベクトルの大きさの変化量に基づいて、前回の処理において算出した重力方向ベクトルと加速度ベクトル算出手段が算出した加速度ベクトルとを所定の割合で合成することによって今回の処理における重力方向ベクトルを算出してもよい。 In addition, the gravity direction calculating unit combines the gravity direction vector calculated in the previous process and the acceleration vector calculated by the acceleration vector calculating unit at a predetermined ratio based on the change in the magnitude of the acceleration vector. The gravity direction vector in the above process may be calculated.
上記によれば、加速度をベクトルデータで取り扱うことによって、算出処理が容易となる。 According to the above, calculation processing is facilitated by handling acceleration with vector data.
また、重力方向算出手段は、加速度ベクトルの大きさの変化量が大きいほど加速度ベクトル算出手段が算出した加速度ベクトルを合成する割合を小さくして、今回の処理における重力方向ベクトルを算出してもよい。 Further, the gravity direction calculating means may calculate the gravity direction vector in the current process by decreasing the ratio of combining the acceleration vectors calculated by the acceleration vector calculating means as the change amount of the acceleration vector is larger. .
上記によれば、入力装置が静止状態にない場合、当該入力装置の動きが激しいほど前回の処理において算出した重力方向ベクトルを修正する度合が小さくなり、入力装置の動きが激しい場合はそれ以前設定されていた重力方向ベクトルが算出に用いられる度合が高くなるため、重力方向ベクトルを正確に算出することができる。 According to the above, when the input device is not in a stationary state, the degree of correction of the gravity direction vector calculated in the previous process becomes smaller as the movement of the input device becomes more intense. Since the degree to which the gravity direction vector that has been used for calculation is high, the gravity direction vector can be accurately calculated.
また、重力方向算出手段は、加速度ベクトルの大きさの変化量に対して線形に対応する割合で加速度ベクトル算出手段が算出した加速度ベクトルを合成して、今回の処理における重力方向ベクトルを算出してもよい。 Further, the gravity direction calculating means synthesizes the acceleration vector calculated by the acceleration vector calculating means at a ratio linearly corresponding to the amount of change in the magnitude of the acceleration vector, and calculates the gravity direction vector in this processing. Also good.
上記によれば、現在の加速度ベクトルと前回の処理で算出された重力方向ベクトルとを自然に合成することができる。 According to the above, the current acceleration vector and the gravity direction vector calculated in the previous process can be naturally synthesized.
また、本発明は、処理手段として、さらにコンピュータを機能させてもよい。処理手段は、重力方向算出手段が算出した重力方向を基準として、データ取得手段が取得した加速度データが示す加速度を用いて所定の処理を行う。 In the present invention, a computer may further function as the processing means. The processing means performs a predetermined process using the acceleration indicated by the acceleration data acquired by the data acquisition means with reference to the gravity direction calculated by the gravity direction calculation means.
上記によれば、正確に算出された重力方向を基準とした処理となるため、入力装置の正確な姿勢や動きに基づいた処理が可能となる。 According to the above, since the processing is based on the accurately calculated direction of gravity, processing based on the accurate posture and movement of the input device is possible.
また、本発明は、上記各手段を備える情報処理装置の形態で実施されてもよい。 Further, the present invention may be implemented in the form of an information processing apparatus that includes the above-described units.
本発明によれば、入力装置に生じている加速度の変化量(例えば、加速度のサンプリング前後の差分)に基づいて、加速度センサを備えた入力装置の重力方向を正確に算出することができる。 According to the present invention, it is possible to accurately calculate the direction of gravity of the input device including the acceleration sensor based on the amount of change in acceleration generated in the input device (for example, the difference between before and after sampling of acceleration).
(第1の実施形態)
図1を参照して、本発明の第1の実施形態に係る情報処理プログラムを実行する情報処理装置について説明する。以下、説明を具体的にするために、当該情報処理装置の一例の据置型のゲーム装置本体5を含むゲームシステムについて説明する。なお、図1は据置型のゲーム装置3を含むゲームシステム1の外観図であり、図2はゲーム装置本体5のブロック図である。以下、当該ゲームシステム1について説明する。
(First embodiment)
An information processing apparatus that executes an information processing program according to the first embodiment of the present invention will be described with reference to FIG. Hereinafter, in order to make the description more specific, a game system including a stationary game apparatus
図1において、ゲームシステム1は、表示手段の一例の家庭用テレビジョン受像機(以下、モニタと記載する)2と、当該モニタ2に接続コードを介して接続する据置型のゲーム装置3とから構成される。モニタ2は、ゲーム装置3から出力された音声信号を音声出力するためのスピーカ2aを備える。また、ゲーム装置3は、本願発明の情報処理プログラムの一例となるゲームプログラムを記録した光ディスク4と、当該光ディスク4のゲームプログラムを実行してゲーム画面をモニタ2に表示出力させるためのコンピュータを搭載したゲーム装置本体5と、ゲーム画面に表示されたキャラクタ等を操作するゲームに必要な操作情報をゲーム装置本体5に与えるための入力装置6とを備えている。
In FIG. 1, a
また、ゲーム装置本体5は、無線コントローラモジュール19(図2参照)を内蔵する。無線コントローラモジュール19は、入力装置6から無線送信されるデータを受信し、ゲーム装置本体5から入力装置6へデータを送信して、コントローラ7とゲーム装置本体5とを無線通信によって接続する。さらに、ゲーム装置本体5には、当該ゲーム装置本体5に対して交換可能に用いられる情報記憶媒体の一例の光ディスク4が脱着される。
In addition, the
また、ゲーム装置本体5には、セーブデータ等のデータを固定的に記憶するバックアップメモリとして機能するフラッシュメモリ17(図2参照)が搭載される。ゲーム装置本体5は、光ディスク4に記憶されたゲームプログラム等を実行することによって、その結果をゲーム画像としてモニタ2に表示する。また、ゲームプログラム等は、光ディスク4に限らず、フラッシュメモリ17に予め記録されたものを実行するようにしてもよい。さらに、ゲーム装置本体5は、フラッシュメモリ17に記憶されたセーブデータを用いて、過去に実行されたゲーム状態を再現して、ゲーム画像をモニタ2に表示することもできる。そして、ゲーム装置3のプレイヤは、モニタ2に表示されたゲーム画像を見ながら、入力装置6を操作することによって、ゲーム進行を楽しむことができる。
Further, the
入力装置6は、自機に対して行われた操作の内容を示す操作データをゲーム装置本体5に与えるものである。本実施形態では、入力装置6は、コントローラ7と角速度検出ユニット9とを含む。詳細は後述するが、入力装置6は、コントローラ7に対して角速度検出ユニット9が着脱可能に接続されている構成である。
The input device 6 gives operation data indicating the content of the operation performed on the own device to the
コントローラ7は、無線コントローラモジュール19を内蔵するゲーム装置本体5へ、例えばBluetooth(ブルートゥース;登録商標)の技術を用いて操作情報等の送信データを無線送信する。コントローラ7は、片手で把持可能な程度の大きさのハウジングと、当該ハウジングの表面に露出して設けられた複数個の操作ボタン(十字キーやスティック等を含む)とが設けられている。また、後述により明らかとなるが、コントローラ7は、当該コントローラ7から見た画像を撮像する撮像情報演算部74を備えている。そして、撮像情報演算部74の撮像対象の一例として、モニタ2の表示画面近傍に2つのLEDモジュール(以下、マーカと記載する)8Lおよび8Rが設置される。これらマーカ8Lおよび8Rは、それぞれモニタ2の前方に向かって例えば赤外光を出力する。また、コントローラ7は、ゲーム装置本体5の無線コントローラモジュール19から無線送信された送信データを通信部75で受信して、当該送信データに応じた音や振動を発生させることもできる。
The
次に、図2を参照して、ゲーム装置本体5の内部構成について説明する。図2は、ゲーム装置本体5の構成を示すブロック図である。ゲーム装置本体5は、CPU(Central Processing Unit)10、システムLSI(Large Scale Integration)11、外部メインメモリ12、ROM/RTC(Read Only Memory/Real Time Clock)13、ディスクドライブ14、およびAV−IC(Audio Video−Integrated Circuit)15等を有する。
Next, the internal configuration of the
CPU10は、光ディスク4に記憶されたゲームプログラムを実行することによってゲーム処理を実行するものであり、ゲームプロセッサとして機能する。CPU10は、システムLSI11に接続される。システムLSI11には、CPU10の他、外部メインメモリ12、ROM/RTC13、ディスクドライブ14、およびAV−IC15が接続される。システムLSI11は、それに接続される各構成要素間のデータ転送の制御、表示すべき画像の生成、外部装置からのデータの取得等の処理を行う。なお、システムLSI11の内部構成については、後述する。揮発性の外部メインメモリ12は、光ディスク4から読み出されたゲームプログラムや、フラッシュメモリ17から読み出されたゲームプログラム等のプログラムを記憶したり、各種データを記憶したりするものであり、CPU10のワーク領域やバッファ領域として用いられる。ROM/RTC13は、ゲーム装置本体5の起動用のプログラムが組み込まれるROM(いわゆるブートROM)と、時間をカウントするクロック回路(RTC)とを有する。ディスクドライブ14は、光ディスク4からプログラムデータやテクスチャデータ等を読み出し、後述する内部メインメモリ35または外部メインメモリ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
また、システムLSI11には、入出力プロセッサ31、GPU(Graphics Processor Unit)32、DSP(Digital Signal Processor)33、VRAM(Video RAM)34、および内部メインメモリ35が設けられる。図示は省略するが、これらの構成要素31〜35は、内部バスによって互いに接続される。
Further, the system LSI 11 is provided with an input /
GPU32は、描画手段の一部を形成し、CPU10からのグラフィクスコマンド(作画命令)に従って画像を生成する。VRAM34は、GPU32がグラフィクスコマンドを実行するために必要なデータ(ポリゴンデータやテクスチャデータ等のデータ)を記憶する。画像が生成される際には、GPU32は、VRAM34に記憶されたデータを用いて画像データを作成する。
The
DSP33は、オーディオプロセッサとして機能し、内部メインメモリ35や外部メインメモリ12に記憶されるサウンドデータや音波形(音色)データを用いて、音声データを生成する。
The
上述のように生成された画像データおよび音声データは、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-
入出力プロセッサ(I/Oプロセッサ)31は、それに接続される構成要素との間でデータの送受信を実行したり、外部装置からのデータのダウンロードを実行したりする。入出力プロセッサ31は、フラッシュメモリ17、無線通信モジュール18、無線コントローラモジュール19、拡張コネクタ20、および外部メモリカード用コネクタ21に接続される。無線通信モジュール18にはアンテナ22が接続され、無線コントローラモジュール19にはアンテナ23が接続される。
The input / output processor (I / O processor) 31 transmits / receives data to / from components connected thereto and downloads data from an external device. The input /
入出力プロセッサ31は、無線通信モジュール18およびアンテナ22を介してネットワークに接続し、ネットワークに接続される他のゲーム装置や各種サーバと通信することができる。入出力プロセッサ31は、定期的にフラッシュメモリ17にアクセスし、ネットワークへ送信する必要があるデータの有無を検出し、当該データが有る場合には、無線通信モジュール18およびアンテナ22を介して当該データをネットワークに送信する。また、入出力プロセッサ31は、他のゲーム装置から送信されてくるデータやダウンロードサーバからダウンロードしたデータを、ネットワーク、アンテナ22、および無線通信モジュール18を介して受信し、受信したデータをフラッシュメモリ17に記憶する。CPU10は、ゲームプログラムを実行することにより、フラッシュメモリ17に記憶されたデータを読み出してゲームプログラムで利用する。フラッシュメモリ17には、ゲーム装置本体5と他のゲーム装置や各種サーバとの間で送受信されるデータの他、ゲーム装置本体5を利用してプレイしたゲームのセーブデータ(ゲームの結果データまたは途中データ)が記憶されてもよい。
The input /
また、入出力プロセッサ31は、アンテナ23および無線コントローラモジュール19を介して、コントローラ7から送信される操作データ等を受信し、内部メインメモリ35または外部メインメモリ12のバッファ領域に記憶(一時記憶)する。なお、内部メインメモリ35には、外部メインメモリ12と同様に、光ディスク4から読み出されたゲームプログラムや、フラッシュメモリ17から読み出されたゲームプログラム等のプログラムを記憶したり、各種データを記憶したりしてもよく、CPU10のワーク領域やバッファ領域として用いられてもかまわない。
The input /
さらに、入出力プロセッサ31には、拡張コネクタ20および外部メモリカード用コネクタ21が接続される。拡張コネクタ20は、USBやSCSIのようなインターフェースのためのコネクタであり、外部記憶媒体のようなメディアを接続したり、他のコントローラのような周辺機器を接続したり、有線の通信用コネクタを接続することによって無線通信モジュール18に替えてネットワークとの通信を行ったりすることができる。外部メモリカード用コネクタ21は、メモリカードのような外部記憶媒体を接続するためのコネクタである。例えば、入出力プロセッサ31は、拡張コネクタ20や外部メモリカード用コネクタ21を介して、外部記憶媒体にアクセスし、データを保存したり、データを読み出したりすることができる。
Furthermore, the
また、ゲーム装置本体5(例えば、前部主面)には、当該ゲーム装置本体5の電源ボタン24、ゲーム処理のリセットボタン25、光ディスク4を脱着する投入口、およびゲーム装置本体5の投入口から光ディスク4を取り出すイジェクトボタン26等が設けられている。電源ボタン24およびリセットボタン25は、システムLSI11に接続される。電源ボタン24がオンされると、ゲーム装置本体5の各構成要素に対して、図示しないACアダプタを介して電力が供給される。リセットボタン25が押されると、システムLSI11は、ゲーム装置本体5の起動プログラムを再起動する。イジェクトボタン26は、ディスクドライブ14に接続される。イジェクトボタン26が押されると、ディスクドライブ14から光ディスク4が排出される。
In addition, on the game apparatus main body 5 (for example, the front main surface), the
図3および図4を参照して、入力装置6について説明する。なお、図3は、入力装置6の上側後方から見た一例を示す斜視図である。図4は、コントローラ7を下側前方から見た一例を示す斜視図である。
The input device 6 will be described with reference to FIGS. 3 and 4. FIG. 3 is a perspective view showing an example of the input device 6 as viewed from the upper rear side. FIG. 4 is a perspective view showing an example of the
図3および図4において、コントローラ7は、例えばプラスチック成型によって形成されたハウジング71を有しており、当該ハウジング71に複数の操作部72が設けられている。ハウジング71は、その前後方向を長手方向とした略直方体形状を有しており、全体として大人や子供の片手で把持可能な大きさである。
3 and 4, the
ハウジング71上面の中央前面側に、十字キー72aが設けられる。この十字キー72aは、十字型の4方向プッシュスイッチであり、4つの方向(前後左右)に対応する操作部分が十字の突出片にそれぞれ90°間隔で配置される。プレイヤが十字キー72aのいずれかの操作部分を押下することによって前後左右いずれかの方向を選択される。例えばプレイヤが十字キー72aを操作することによって、仮想ゲーム世界に登場するプレイヤキャラクタ等の移動方向を指示したり、複数の選択肢から選択指示したりすることができる。
A cross key 72 a is provided on the center front side of the upper surface of the
なお、十字キー72aは、上述したプレイヤの方向入力操作に応じて操作信号を出力する操作部であるが、他の態様の操作部でもかまわない。例えば、十字方向に4つのプッシュスイッチを配設し、プレイヤによって押下されたプッシュスイッチに応じて操作信号を出力する操作部を設けてもかまわない。さらに、上記4つのプッシュスイッチとは別に、上記十字方向が交わる位置にセンタスイッチを配設し、4つのプッシュスイッチとセンタスイッチとを複合した操作部を設けてもかまわない。また、ハウジング71上面から突出した傾倒可能なスティック(いわゆる、ジョイスティック)を倒すことによって、傾倒方向に応じて操作信号を出力する操作部を十字キー72aの代わりに設けてもかまわない。さらに、水平移動可能な円盤状部材をスライドさせることによって、当該スライド方向に応じた操作信号を出力する操作部を、上記十字キー72aの代わりに設けてもかまわない。また、タッチパッドを、十字キー72aの代わりに設けてもかまわない。
Note that the cross key 72a is an operation unit that outputs an operation signal in response to the above-described direction input operation of the player, but may be an operation unit of another mode. For example, four push switches may be provided in the cross direction, and an operation unit that outputs an operation signal according to the push switch pressed by the player may be provided. Further, apart from the four push switches, a center switch may be provided at a position where the cross direction intersects, and an operation unit in which the four push switches and the center switch are combined may be provided. An operation unit that outputs an operation signal in accordance with the tilt direction by tilting a tiltable stick (so-called joystick) protruding from the upper surface of the
ハウジング71上面の十字キー72aより後面側に、複数の操作ボタン72b〜72gが設けられる。操作ボタン72b〜72gは、プレイヤがボタン頭部を押下することによって、それぞれの操作ボタン72b〜72gに割り当てられた操作信号を出力する操作部である。例えば、操作ボタン72b〜72dには、1番ボタン、2番ボタン、およびAボタン等としての機能が割り当てられる。また、操作ボタン72e〜72gには、マイナスボタン、ホームボタン、およびプラスボタン等としての機能が割り当てられる。これら操作ボタン72a〜72gは、ゲーム装置本体5が実行するゲームプログラムに応じてそれぞれの操作機能が割り当てられる。なお、図3に示した配置例では、操作ボタン72b〜72dは、ハウジング71上面の中央前後方向に沿って並設されている。また、操作ボタン72e〜72gは、ハウジング71上面の左右方向に沿って操作ボタン72bおよび72dの間に並設されている。そして、操作ボタン72fは、その上面がハウジング71の上面に埋没しており、プレイヤが不意に誤って押下することのないタイプのボタンである。
A plurality of
また、ハウジング71上面の十字キー72aより前面側に、操作ボタン72hが設けられる。操作ボタン72hは、遠隔からゲーム装置本体5の電源をオン/オフする電源スイッチである。この操作ボタン72hも、その上面がハウジング71の上面に埋没しており、プレイヤが不意に誤って押下することのないタイプのボタンである。
An
また、ハウジング71上面の操作ボタン72cより後面側に、複数のLED702が設けられる。ここで、コントローラ7は、他のコントローラ7と区別するためにコントローラ種別(番号)が設けられている。例えば、LED702は、コントローラ7に現在設定されている上記コントローラ種別をプレイヤに通知するために用いられる。具体的には、無線コントローラモジュール19からコントローラ7へ、複数のLED702のうち、上記コントローラ種別に対応するLEDを点灯させるための信号が送信される。
A plurality of
また、ハウジング71上面には、操作ボタン72bおよび操作ボタン72e〜72gの間に後述するスピーカ(図5に示すスピーカ706)からの音を外部に放出するための音抜き孔が形成されている。
Further, on the upper surface of the
一方、ハウジング71下面には、凹部が形成されている。ハウジング71下面の凹部は、プレイヤがコントローラ7の前面をマーカ8Lおよび8Rに向けて片手で把持したときに、当該プレイヤの人差し指や中指が位置するような位置に形成される。そして、上記凹部の傾斜面には、操作ボタン72iが設けられる。操作ボタン72iは、例えばBボタンとして機能する操作部である。
On the other hand, a recess is formed on the lower surface of the
また、ハウジング71前面には、撮像情報演算部74の一部を構成する撮像素子743が設けられる。ここで、撮像情報演算部74は、コントローラ7が撮像した画像データを解析してその中で輝度が高い場所を判別してその場所の重心位置やサイズなどを検出するためのシステムであり、例えば、最大200フレーム/秒程度のサンプリング周期であるため比較的高速なコントローラ7の動きでも追跡して解析することができる。この撮像情報演算部74の詳細な構成については、後述する。また、ハウジング71の後面には、コネクタ73が設けられている。コネクタ73は、例えばエッジコネクタであり、例えば接続ケーブルと嵌合して接続するために利用される。図1および図3に示した入力装置6の一例では、コネクタ73を介して、コントローラ7の後面に角速度検出ユニット9が着脱自在に装着される。
An
ここで、以下の説明を具体的にするために、入力装置6(コントローラ7)に対して設定する座標系について定義する。図3および図4に示すように、互いに直交するXYZ軸を入力装置6(コントローラ7)に対して定義する。具体的には、コントローラ7の前後方向となるハウジング71の長手方向をZ軸とし、コントローラ7の前面(撮像情報演算部74が設けられている面)方向をZ軸正方向とする。また、コントローラ7の上下方向をY軸とし、ハウジング71の上面(操作ボタン72aが設けられた面)方向をY軸正方向とする。さらに、コントローラ7の左右方向をX軸とし、ハウジング71の右側面(図3で表されている側面)方向をX軸正方向とする。
Here, in order to make the following description concrete, a coordinate system set for the input device 6 (controller 7) is defined. As shown in FIGS. 3 and 4, XYZ axes orthogonal to each other are defined for the input device 6 (controller 7). Specifically, the longitudinal direction of the
角速度検出ユニット9は、3軸周りの角速度を検知するジャイロセンサ(図7に示す2軸ジャイロセンサ95および1軸ジャイロセンサ96)を有する。角速度検出ユニット9の前端(図3に示すZ軸正方向側の端部)には、コネクタ73に接続可能なプラグ(図7に示すプラグ93)が設けられる。さらに、プラグ93の両側にはフック(図示せず)が設けられる。角速度検出ユニット9がコントローラ7に対して装着される状態では、プラグ93がコネクタ73に接続されるとともに、上記フックがコントローラ7の係止穴73aに係止する。これによって、コントローラ7と角速度検出ユニット9とがしっかりと固定される。また、角速度検出ユニット9は、側面(図3に示すX軸方向の面)にボタン91を有している。ボタン91は、それを押下すれば上記フックの係止穴73aに対する係止状態を解除することができるように構成されている。したがって、ボタン91を押下しながらプラグ93をコネクタ73から抜くことによって、角速度検出ユニット9をコントローラ7から離脱することができる。
The angular velocity detection unit 9 includes gyro sensors (two-
また、角速度検出ユニット9の後端には、上記コネクタ73と同形状のコネクタ97(図18参照)が設けられる。したがって、コントローラ7(のコネクタ73)に対して装着可能な他の機器(例えば、後述するサブユニット76)は、角速度検出ユニット9の後端コネクタ97に対しても装着可能である。なお、図3においては、当該後端コネクタ97に対してカバー92が着脱可能に装着されている。
A connector 97 (see FIG. 18) having the same shape as the
次に、図5および図6を参照して、コントローラ7の内部構造について説明する。なお、図5は、コントローラ7の上筐体(ハウジング71の一部)を外した状態を後面側から見た斜視図である。図6は、コントローラ7の下筐体(ハウジング71の一部)を外した状態を前面側から見た斜視図である。ここで、図6に示す基板700は、図5に示す基板700の裏面から見た斜視図となっている。
Next, the internal structure of the
図5において、ハウジング71の内部には基板700が固設されており、当該基板700の上主面上に操作ボタン72a〜72h、加速度センサ701、LED702、およびアンテナ754等が設けられる。そして、これらは、基板700等に形成された配線(図示せず)によってマイコン751等(図6、図7参照)に接続される。また、無線モジュール753(図7参照)およびアンテナ754によって、コントローラ7がワイヤレスコントローラとして機能する。なお、ハウジング71内部には図示しない水晶振動子が設けられており、後述するマイコン751の基本クロックを生成する。また、基板700の上主面上に、スピーカ706およびアンプ708が設けられる。また、加速度センサ701は、操作ボタン72dの左側の基板700上(つまり、基板700の中央部ではなく周辺部)に設けられる。したがって、加速度センサ701は、コントローラ7の長手方向を軸とした回転に応じて、重力加速度の方向変化に加え、遠心力による成分が含まれる加速度を検出することができるので、所定の演算により、検出される加速度データからコントローラ7の動きを良好な感度でゲーム装置本体5等が判定することができる。
In FIG. 5, a
一方、図6において、基板700の下主面上の前端縁に撮像情報演算部74が設けられる。撮像情報演算部74は、コントローラ7の前方から順に赤外線フィルタ741、レンズ742、撮像素子743、および画像処理回路744によって構成されており、それぞれ基板700の下主面に取り付けられる。また、基板700の下主面上の後端縁にコネクタ73が取り付けられる。さらに、基板700の下主面上にサウンドIC707およびマイコン751が設けられている。サウンドIC707は、基板700等に形成された配線によってマイコン751およびアンプ708と接続され、ゲーム装置本体5から送信されたサウンドデータに応じてアンプ708を介してスピーカ706に音声信号を出力する。
On the other hand, in FIG. 6, an imaging
そして、基板700の下主面上には、バイブレータ704が取り付けられる。バイブレータ704は、例えば振動モータやソレノイドである。バイブレータ704は、基板700等に形成された配線によってマイコン751と接続され、ゲーム装置本体5から送信された振動データに応じてその作動をオン/オフする。バイブレータ704が作動することによってコントローラ7に振動が発生するので、それを把持しているプレイヤの手にその振動が伝達され、いわゆる振動対応ゲームが実現できる。ここで、バイブレータ704は、ハウジング71のやや前方寄りに配置されるため、プレイヤが把持している状態において、ハウジング71が大きく振動することになり、振動を感じやすくなる。
A
次に、図7を参照して、入力装置6(コントローラ7および角速度検出ユニット9)の内部構成について説明する。なお、図7は、入力装置6の構成の一例を示すブロック図である。
Next, the internal configuration of the input device 6 (the
図7において、コントローラ7は、上述した操作部72、撮像情報演算部74、加速度センサ701、バイブレータ704、スピーカ706、サウンドIC707、およびアンプ708の他に、その内部に通信部75を備えている。
In FIG. 7, the
撮像情報演算部74は、赤外線フィルタ741、レンズ742、撮像素子743、および画像処理回路744を含んでいる。赤外線フィルタ741は、コントローラ7の前方から入射する光から赤外線のみを通過させる。レンズ742は、赤外線フィルタ741を透過した赤外線を集光して撮像素子743へ出射する。撮像素子743は、例えばCMOSセンサやあるいはCCDのような固体撮像素子であり、レンズ742が集光した赤外線を撮像する。したがって、撮像素子743は、赤外線フィルタ741を通過した赤外線だけを撮像して画像データを生成する。撮像素子743で生成された画像データは、画像処理回路744で処理される。具体的には、画像処理回路744は、撮像素子743から得られた画像データを処理して高輝度部分を検知し、それらの位置座標や面積を検出した結果を示す処理結果データを通信部75へ出力する。なお、これらの撮像情報演算部74は、コントローラ7のハウジング71に固設されており、ハウジング71自体の方向を変えることによってその撮像方向を変更することができる。
The imaging
コントローラ7は、3軸(X、Y、Z軸)の加速度センサ701を備えていることが好ましい。この3軸の加速度センサ701は、3方向、すなわち、上下方向(図3に示すY軸)、左右方向(図3に示すX軸)、および前後方向(図3に示すZ軸)で直線加速度を検知する。また、少なくとも1軸方向に沿った直線加速度をそれぞれ検知する加速度検出手段を使用してもよい。例えば、これらの加速度センサ701は、アナログ・デバイセズ株式会社(Analog Devices, Inc.)またはSTマイクロエレクトロニクス社(STMicroelectronics N.V.)から入手可能であるタイプのものでもよい。加速度センサ701は、シリコン微細加工されたMEMS(Micro Electro Mechanical Systems:微小電子機械システム)の技術に基づいた静電容量式(静電容量結合式)であることが好ましい。しかしながら、既存の加速度検出手段の技術(例えば、圧電方式や圧電抵抗方式)あるいは将来開発される他の適切な技術を用いて、加速度センサ701が提供されてもよい。
The
加速度センサ701に用いられるような加速度検出手段は、加速度センサ701の持つ各軸に対応する直線に沿った加速度(直線加速度)のみを検知することができる。つまり、加速度センサ701からの直接の出力は、それら3軸のそれぞれに沿った直線加速度(静的または動的)を示す信号である。このため、加速度センサ701は、非直線状(例えば、円弧状)の経路に沿った動き、回転、回転運動、角変位、傾斜、位置、または姿勢等の物理特性を直接検知することはできない。
The acceleration detecting means used in the
しかしながら、加速度センサ701から出力される加速度の信号に基づいて、ゲーム装置のプロセッサ(例えばCPU10)またはコントローラのプロセッサ(例えばマイコン751)等のコンピュータが処理を行うことによって、コントローラ7に関するさらなる情報を推測または算出(判定)することができることは、当業者であれば本明細書の説明から容易に理解できるであろう。
However, based on the acceleration signal output from the
例えば、加速度センサ701を搭載するコントローラ7が静的な状態であることを前提としてコンピュータ側で処理する場合(すなわち、加速度センサ701によって検出される加速度が重力加速度のみであるとして処理する場合)、コントローラ7が現実に静的な状態であれば、検出された加速度に基づいてコントローラ7の姿勢が重力方向に対して傾いているか否か、またはどの程度傾いているかを知ることができる。具体的には、加速度センサ701の検出軸が鉛直下方向を向いている状態を基準としたとき、当該検出軸方向に1G(重力加速度)が作用しているか否かだけでコントローラ7が鉛直下方向に対して傾いているか否かを知ることができる。また、上記検出軸方向に作用している加速度の大きさによって、コントローラ7が鉛直下方向に対してどの程度傾いているかも知ることができる。また、多軸方向の加速度を検出可能な加速度センサ701の場合には、さらに各軸に対して検出された加速度の信号に対して処理を施すことによって、重力方向に対してコントローラ7がどの程度傾いているかをより詳細に知ることができる。この場合において、加速度センサ701からの出力に基づいて、プロセッサがコントローラ7の傾き角度のデータを算出する処理を行ってもよいが、当該傾き角度のデータを算出する処理を行うことなく、加速度センサ701からの出力に基づいて、おおよそのコントローラ7の傾き具合を推定するような処理としてもよい。このように、加速度センサ701をプロセッサと組み合わせて用いることによって、コントローラ7の傾き、姿勢、または位置を判定することができる。
For example, when processing is performed on the computer side on the assumption that the
一方、加速度センサ701が動的な状態であることを前提とする場合には、当該加速度センサ701が重力加速度成分に加えて加速度センサ701の動きに応じた加速度を検出するので、重力加速度成分を所定の処理により除去すれば、コントローラ7の動き方向等を知ることができる。具体的には、加速度センサ701を備えるコントローラ7がプレイヤの手で動的に加速されて動かされる場合に、加速度センサ701によって生成される加速度信号を処理することによって、コントローラ7の様々な動きおよび/または位置を算出することができる。なお、加速度センサ701が動的な状態であることを前提とする場合であっても、加速度センサ701の動きに応じた加速度を所定の処理により除去すれば、重力方向に対するコントローラ7の傾きを知ることが可能である。
On the other hand, when it is assumed that the
他の実施例では、加速度センサ701は、信号をマイコン751に出力する前に内蔵の加速度検出手段から出力される加速度信号に対して所望の処理を行うための、組込み式の信号処理装置または他の種類の専用の処理装置を備えていてもよい。例えば、組込み式または専用の処理装置は、加速度センサ701が静的な加速度(例えば、重力加速度)を検出するためのものである場合、検知された加速度信号をそれに相当する傾斜角(あるいは、他の好ましいパラメータ)に変換するものであってもよい。加速度センサ701でそれぞれ検知された加速度を示すデータは、通信部75に出力される。
In another embodiment, the
通信部75は、マイクロコンピュータ(Micro Computer:マイコン)751、メモリ752、無線モジュール753、およびアンテナ754を含んでいる。マイコン751は、処理の際にメモリ752を記憶領域として用いながら、送信データを無線送信する無線モジュール753を制御する。また、マイコン751は、アンテナ754を介して無線モジュール753が受信したゲーム装置本体5からのデータに応じて、サウンドIC707およびバイブレータ704の動作を制御する。サウンドIC707は、通信部75を介してゲーム装置本体5から送信されたサウンドデータ等を処理する。また、マイコン751は、通信部75を介してゲーム装置本体5から送信された振動データ(例えば、バイブレータ704をONまたはOFFする信号)等に応じて、バイブレータ704を作動させる。また、マイコン751は、コネクタ73に接続されている。角速度検出ユニット9から送信されてくるデータは、コネクタ73を介してマイコン751に入力される。以下、角速度検出ユニット9の構成について説明する。
The
角速度検出ユニット9は、プラグ93、マイコン94、2軸ジャイロセンサ95、および1軸ジャイロセンサ96を備えている。上述のように、角速度検出ユニット9は、3軸(本実施形態では、XYZ軸)周りの角速度を検出し、検出した角速度を示すデータ(角速度データ)をコントローラ7へ出力する。
The angular velocity detection unit 9 includes a
2軸ジャイロセンサ95は、X軸周りの角速度およびY軸周りの(単位時間あたりの)角速度を検出する。また、1軸ジャイロセンサ96は、Z軸周りの(単位時間あたりの)角速度を検出する。なお、本明細書では、図3に示すように、コントローラ7の前後方向となるハウジング71の長手方向周り(Z軸周り)の回転方向をロール方向、コントローラ7の上下方向周り(Y軸周り)の回転方向をヨー方向、コントローラ7の左右方向周り(X軸周り)の回転方向をピッチ方向と呼ぶ。すなわち、2軸ジャイロセンサ95は、ピッチ方向(X軸周りの回転方向)およびヨー方向(Y軸周りの回転方向)の角速度を検出し、1軸ジャイロセンサ96は、ロール方向(Z軸周りの回転方向)の角速度を検出する。
The
なお、本実施形態では、3軸周りの角速度を検出するために、2軸ジャイロセンサ95と1軸ジャイロセンサ96とを用いる構成としたが、他の実施形態においては、3軸周りの角速度を検出することができればよく、用いるジャイロセンサの数および組み合わせはどのようなものであってもよい。また、2軸ジャイロセンサ95と1軸ジャイロセンサ96は、本発明において角速度を検出する手段の一例であり、様々な種類の角速度センサを用いることが可能である。例えば、振動式、機械式、流体式、光学式等の角速度センサを用いることが可能である。具体的には、角速度を検出する手段として、振動する物体に作用するコリオリ力を用いた振動式ジャイロスコープやサニャック(Sagnac)効果を用いた光学式ジャイロスコープ等を用いることが可能である。なお、2軸ジャイロセンサ95および1軸ジャイロセンサ96を総称して説明する場合は、ジャイロセンサ95および96と記載する。
In this embodiment, the two-
各ジャイロセンサ95および96で検出された角速度を示すデータは、マイコン94に出力される。したがって、マイコン94には、XYZ軸の3軸周りの角速度を示すデータが入力されることになる。マイコン94は、上記3軸周りの角速度を示すデータを角速度データとしてプラグ93を介してコントローラ7へ出力する。なお、マイコン94からコントローラ7への出力は、所定の周期毎に逐次行われるが、ゲームの処理は1/60秒を単位として(1フレーム時間として)行われることが一般的であるので、この時間以下の周期で出力を行うことが好ましい。一例として、各ジャイロセンサ95および96が角速度を検出してコントローラ7への出力する動作が、1/200秒毎に行われる。
Data indicating the angular velocity detected by each
コントローラ7の説明に戻り、コントローラ7に設けられた操作部72からの操作信号(キーデータ)、加速度センサ701からの3軸方向の加速度信号(X、Y、およびZ軸方向加速度データ)、撮像情報演算部74からの処理結果データ、および角速度検出ユニット9からの3軸周りの角速度を示すデータ(X、Y、Z軸周り角速度データ)は、マイコン751に出力される。マイコン751は、入力した各データ(キーデータ、X、Y、およびZ軸方向加速度データ、処理結果データ、X、Y、およびZ軸周り角速度データ)を無線コントローラモジュール19へ送信する送信データとして一時的にメモリ752に格納する。ここで、通信部75から無線コントローラモジュール19への無線送信は、所定の周期毎に行われるが、ゲームの処理は1/60秒を単位として行われることが一般的であるので、それよりも短い周期で送信を行うことが必要となる。具体的には、ゲームの処理単位は16.7ms(1/60秒)であり、ブルートゥース(登録商標)で構成される通信部75の送信間隔は5msである。マイコン751は、無線コントローラモジュール19への送信タイミングが到来すると、メモリ752に格納されている送信データを一連の操作情報として出力し、無線モジュール753へ出力する。そして、無線モジュール753は、例えばブルートゥース(登録商標)の技術を用いて、操作情報を示す電波信号を所定周波数の搬送波を用いてアンテナ754から放射する。つまり、コントローラ7に設けられた操作部72からのキーデータ、加速度センサ701からのX、Y、およびZ軸方向加速度データ、撮像情報演算部74からの処理結果データ、角速度検出ユニット9からのX、Y、およびZ軸周り角速度データが、コントローラ7から送信される。そして、ゲーム装置本体5の無線コントローラモジュール19でその電波信号を受信し、ゲーム装置本体5で当該電波信号を復調や復号することによって、一連の操作情報(キーデータ、X、Y、およびZ軸方向加速度データ、処理結果データ、X、Y、およびZ軸周り角速度データ)を取得する。そして、ゲーム装置本体5のCPU10は、取得した操作情報とゲームプログラムとに基づいて、ゲーム処理を行う。なお、ブルートゥース(登録商標)の技術を用いて通信部75を構成する場合、通信部75は、他のデバイスから無線送信された送信データを受信する機能も備えることができる。
Returning to the description of the
入力装置6を用いることによって、プレイヤは、各操作ボタンを押下する従来の一般的なゲーム操作に加えて、コントローラ7自体を任意の傾斜角度に傾けたり、任意の方向に動かしたりする操作を行うことができる。その他、入力装置6によれば、プレイヤは、入力装置6を指し示すことによって、画面上の任意の位置を指示する操作を行うこともできる。
By using the input device 6, the player performs an operation of tilting the
次に、ゲーム装置本体5が行う具体的な処理を説明する前に、図8〜図10を用いてゲーム装置本体5で行う処理の概要について説明する。なお、図8は、入力装置6を水平に維持して操作した場合にモニタ2に表示されるゲーム画面の一例を示す図である。図9は、入力装置6を上方へ平行移動させて動かして操作した場合にモニタ2に表示されるゲーム画面の一例を示す図である。図10は、入力装置6を左へ傾けて操作した場合にモニタ2に表示されるゲーム画面の一例を示す図である。
Next, before describing specific processes performed by the
図8〜図10において、モニタ2には、仮想ゲーム空間においてウェイクボードをするプレイヤキャラクタPCが表示されている。ここで、ウェイクボードは、ボード上に競技者の両足が固定された状態でボートに引かれることによって、当該ボードで水面上を滑る競技である。そして、図8〜図10に示される仮想ゲーム空間におけるウェイクボードにおいては、入力装置6を操作するプレイヤが入力装置6自体を傾けたり動かしたりすることによって、プレイヤキャラクタPCを旋回させたりジャンプさせたりすることができる。
8 to 10, the
具体的には、図8に示すように、プレイヤが入力装置6を水平に維持して操作する場合、プレイヤキャラクタPCは、仮想ゲーム空間において引かれているボートに向かって真っ直ぐ滑るように動作する。また、図9に示すように、プレイヤが入力装置6を上方へ平行移動させて動かして操作した場合、プレイヤキャラクタPCは、仮想ゲーム空間において水面から上方へジャンプするように動作する。また、図10に示すように、プレイヤが入力装置6を左へ傾けて操作した場合、プレイヤキャラクタPCは、仮想ゲーム空間において水面上を左へ旋回して滑るように動作する。 Specifically, as shown in FIG. 8, when the player operates the input device 6 while keeping it horizontal, the player character PC moves so as to slide straight toward the boat drawn in the virtual game space. . Also, as shown in FIG. 9, when the player operates the input device 6 by moving it in parallel upward, the player character PC operates to jump upward from the water surface in the virtual game space. Also, as shown in FIG. 10, when the player operates the input device 6 while tilting it to the left, the player character PC operates to turn left on the water surface and slide in the virtual game space.
次に、ゲームシステム1において行われるゲーム処理の詳細を説明する。まず、図11を参照して、ゲーム処理において用いられる主なデータについて説明する。なお、図11は、ゲーム装置本体5の外部メインメモリ12および/または内部メインメモリ35(以下、2つのメインメモリを総称して、単にメインメモリと記載する)に記憶される主なデータおよびプログラムの一例を示す図である。
Next, the details of the game process performed in the
図11に示すように、メインメモリのデータ記憶領域には、角速度データDa、加速度データDb、前回加速度データDc、一時的な信用度データDd、信用度データDe、前回信用度データDf、重力加速度データDg、前回重力加速度データDh、補正度合値データDi、前回補正度合値データDj、平行移動加速度データDk、および画像データDl等が記憶される。なお、メインメモリには、図11に示すデータの他、ゲームに登場する各種オブジェクトの画像データや、オブジェクトの各種パラメータを示すデータ等、ゲーム処理に必要なデータが記憶される。また、メインメモリのプログラム記憶領域には、ゲームプログラムを構成する各種プログラム群Paが記憶される。各種プログラム群Paは、ゲーム装置本体5に電源が投入された後の適宜のタイミングで光ディスク4やその他の記録媒体からその一部または全部が読み込まれてメインメモリに記憶される。
As shown in FIG. 11, the data storage area of the main memory includes angular velocity data Da, acceleration data Db, previous acceleration data Dc, temporary credit data Dd, credit data De, previous credit data Df, gravitational acceleration data Dg, Previous gravitational acceleration data Dh, correction degree value data Di, previous correction degree value data Dj, parallel movement acceleration data Dk, image data Dl, and the like are stored. In addition to the data shown in FIG. 11, the main memory stores data necessary for game processing, such as image data of various objects appearing in the game and data indicating various parameters of the objects. Various program groups Pa constituting the game program are stored in the program storage area of the main memory. Various program groups Pa are partially or entirely read from the optical disc 4 and other recording media and stored in the main memory at an appropriate timing after the
角速度データDaは、角速度検出ユニット9のジャイロセンサ95および96によって検出された角速度を示すデータであり、使用される入力装置6毎に対応させて格納される。例えば、角速度データDaは、入力装置6(ジャイロセンサ95および96)に生じた角速度を示すデータであり、入力装置6から送信データとして送信されてくる一連の操作情報に含まれる角速度データが格納される。角速度データDaには、ジャイロセンサ95および96が検出したX軸周りの角速度ωxを示すX軸周り角速度データDa1、Y軸周りの角速度ωyを示すY軸周り角速度データDa2、Z軸周りの角速度ωzを示すZ軸周り角速度データDa3が含まれる。なお、ゲーム装置本体5に備える無線コントローラモジュール19は、コントローラ7から所定周期(例えば、1/200秒毎)に送信される操作情報に含まれる角速度データを受信し、無線コントローラモジュール19に備える図示しないバッファに蓄えられる。その後、例えば、上記バッファに蓄えられた角速度データがゲーム処理周期である1フレーム毎(例えば、1/60秒毎)に当該期間中に蓄えられたデータが読み出されて、メインメモリの角速度データDaが更新される。
The angular velocity data Da is data indicating the angular velocity detected by the
加速度データDbは、コントローラ7に生じた加速度を示すデータであり、コントローラ7から送信データとして送信されてくる一連の操作情報に含まれる加速度データが格納される。この加速度データDbには、加速度センサ701がX軸成分に対して検出した加速度axを示すX軸方向加速度データDb1、Y軸成分に対して検出した加速度ayを示すY軸方向加速度データDb2、およびZ軸成分に対して検出した加速度azを示すZ軸方向加速度データDb3が含まれる。なお、上記角速度データDaと同様に、ゲーム装置本体5に備える無線コントローラモジュール19は、コントローラ7から所定周期(例えば、1/200秒毎)に送信される操作情報に含まれる加速度データを受信し、無線コントローラモジュール19に備える図示しないバッファに蓄えられる。その後、上記バッファに蓄えられた加速度データがゲーム処理周期である1フレーム毎(例えば、1/60秒毎)に読み出されて、メインメモリの加速度データDbが更新される。
The acceleration data Db is data indicating the acceleration generated in the
このように、操作情報を受信する周期と処理周期とが異なるために、上記バッファには複数の時点に受信した操作情報が記述されていることになる。後述する処理の説明においては、後述する各ステップにおいて、複数の時点に受信した操作情報のうち最新の操作情報のみを常に用いて処理して、次のステップに進める態様を用いる。 As described above, since the operation information reception period and the processing period are different, the operation information received at a plurality of points in time is described in the buffer. In the description of the processing to be described later, a mode is used in which, in each step to be described later, only the latest operation information among the operation information received at a plurality of points in time is always used for processing and the processing proceeds to the next step.
また、後述する処理フローでは、角速度データDaおよび加速度データDbがゲーム処理周期である1フレーム毎にそれぞれ更新される例を用いて説明するが、他の処理周期でそれぞれ更新されてもかまわない。例えば、コントローラ7からの送信周期毎に角速度データDaおよび加速度データDbを更新し、当該更新された角速度データDaおよび加速度データDbをそれぞれゲーム処理周期毎に利用する態様でもかまわない。この場合、角速度データDaに記憶する角速度データDa1〜Da3および加速度データDbに記憶する加速度データDb1〜Db3をそれぞれ更新する周期と、ゲーム処理周期とが異なることになる。
Further, in the processing flow described later, the angular velocity data Da and the acceleration data Db will be described using an example in which each frame is updated for each game processing cycle. However, the angular velocity data Da and the acceleration data Db may be updated in other processing cycles. For example, the angular velocity data Da and the acceleration data Db may be updated every transmission cycle from the
前回加速度データDcは、前回の処理において用いられた加速度データが格納される。具体的には、前回加速度データDcには、前回の処理において用いられたX軸成分の加速度a0xを示すX軸方向加速度データDc1、前回の処理において用いられたY軸成分の加速度a0yを示すY軸方向加速度データDc2、および前回の処理において用いられたZ軸成分の加速度a0zを示すZ軸方向加速度データDc3が含まれる。 The previous acceleration data Dc stores acceleration data used in the previous process. Specifically, the previous acceleration data Dc includes X-axis direction acceleration data Dc1 indicating the acceleration a0x of the X-axis component used in the previous processing, and Y indicating the acceleration a0y of the Y-axis component used in the previous processing. Axial acceleration data Dc2 and Z-axis acceleration data Dc3 indicating the acceleration a0z of the Z-axis component used in the previous process are included.
一時的な信用度データDdは、コントローラ7に作用する重力加速度を推定する際に、コントローラ7に作用している加速度が重力加速度として信用できるものなのか否かを表す信用度を一時的に示す(一時的な信用度d)データが格納される。なお、一時的な信用度データDdに格納されたデータが示す一時的な信用度(一時的な信用度d)が、本発明における仮信用度の一例に相当する。信用度データDeは、コントローラ7に作用している加速度が重力加速度として信用できるものなのか否かを表す最終的な信用度(信用度t)を示すデータが格納される。なお、信用度データDeに格納されたデータが示す最終的な信用度(信用度t)が、本発明における信用度の一例に相当する。前回信用度データDfは、前回の処理において用いられた最終的な信用度(信用度t0)を示すデータが格納される。
The temporary reliability data Dd temporarily indicates the reliability indicating whether or not the acceleration acting on the
重力加速度データDgは、コントローラ7に作用していると推定される重力加速度を示すデータが格納される。具体的には、重力加速度データDgには、コントローラ7に作用していると推定される重力加速度の大きさおよび方向を示す重力加速度ベクトルgを示すデータが格納される。前回重力加速度データDhは、前回の処理においてコントローラ7に作用していると推定された重力加速度ベクトル(重力加速度ベクトルg0)を示すデータが格納される。
The gravitational acceleration data Dg stores data indicating gravitational acceleration estimated to be acting on the
補正度合値データDiは、コントローラ7から得られた加速度を補正する度合を表す補正度合値fを示すデータが格納される。具体的には、補正度合値データDiには、X軸成分に対する補正度合値fxを示すX軸方向補正度合値データDi1、Y軸成分に対する補正度合値fyを示すY軸方向補正度合値データDi2、およびZ軸成分に対する補正度合値fzを示すZ軸方向補正度合値データDi3が含まれる。前回補正度合値データDjは、前回の処理において算出された補正度合値(補正度合値f0)を示すデータが格納される。具体的には、前回補正度合値データDjには、前回の処理において用いられたX軸成分に対する補正度合値f0xを示すX軸方向補正度合値データDj1、前回の処理において用いられたY軸成分に対する補正度合値f0yを示すY軸方向補正度合値データDj2、および前回の処理において用いられたZ軸成分に対する補正度合値f0zを示すZ軸方向補正度合値データDj3が含まれる。
In the correction degree value data Di, data indicating a correction degree value f indicating the degree of correction of the acceleration obtained from the
平行移動加速度データDkは、コントローラ7から得られた加速度のうち、コントローラ7が平行移動することによって得られた加速度を表す平行移動加速度を示すデータが格納される。具体的には、平行移動加速度データDkには、コントローラ7が平行移動することによって得られた加速度を表す平行移動加速度ベクトルpを示すデータが格納される。
The parallel movement acceleration data Dk stores data indicating the parallel movement acceleration representing the acceleration obtained by the parallel movement of the
画像データDlは、プレイヤキャラクタPC(図8〜図10参照)、他のオブジェクト、および背景等を仮想ゲーム空間に配置して画像を生成するためのデータが格納される。 The image data Dl stores data for generating an image by arranging the player character PC (see FIGS. 8 to 10), other objects, and the background in the virtual game space.
次に、図12〜図14を参照して、ゲーム装置本体5において行われるゲーム処理の詳細を説明する。なお、図12は、ゲーム装置本体5において実行されるゲーム処理の一例を示すフローチャートである。図13は、図12におけるステップ43の重力加速度更新処理の一例を示すサブルーチンである。図14は、図12におけるステップ44の補正度合値算出処理の一例を示すサブルーチンである。ここで、図12〜図14に示すフローチャートにおいては、ゲーム処理のうち、コントローラ7から得られる加速度が角速度データに応じて補正される動作や重力加速度が推定される動作について主に説明し、本願発明と直接関連しない他のゲーム処理については詳細な説明を省略する。また、図12〜図14では、CPU10が実行する各ステップを「S」と略称する。
Next, with reference to FIG. 12 to FIG. 14, details of the game processing performed in the
ゲーム装置本体5の電源が投入されると、ゲーム装置本体5のCPU10は、ROM/RTC13に記憶されている起動用のプログラムを実行し、これによってメインメモリ等の各ユニットが初期化される。そして、光ディスク4に記憶されたゲームプログラムがメインメモリに読み込まれ、CPU10によって当該ゲームプログラムの実行が開始される。図12〜図14に示すフローチャートは、以上の処理が完了した後に行われるゲーム処理を示すフローチャートである。
When the power of the
図12において、CPU10は、ゲーム処理の初期処理を行い(ステップ40)、次のステップに処理を進める。例えば、上記ステップ40における初期処理では、CPU10は、以降のゲーム処理を行うための各パラメータの初期設定を行う。具体的には、CPU10は、角速度データDa、加速度データDb、前回加速度データDc、一時的な信用度データDd、信用度データDe、前回信用度データDf、重力加速度データDg、前回重力加速度データDh、補正度合値データDi、前回補正度合値データDj、および平行移動加速度データDkに格納されているデータが示す値を、それぞれ初期値(例えば、0)に設定する。
In FIG. 12, the CPU 10 performs an initial process of the game process (step 40), and proceeds to the next step. For example, in the initial processing in
次に、CPU10は、入力装置6から角速度を示すデータを取得して(ステップ41)、次のステップに処理を進める。例えば、CPU10は、入力装置6(コントローラ7)から受信した操作情報を取得し、当該操作情報に含まれる最新の角速度データが示す角速度を用いて角速度データDaに格納する。具体的には、CPU10は、コントローラ7から受信した最新の操作情報に含まれるX軸周りの角速度データが示す角速度ωxを用いて、X軸周り角速度データDa1を更新する。また、CPU10は、最新の操作情報に含まれるY軸周りの角速度データが示す角速度ωyを用いて、Y軸周り角速度データDa2を更新する。そして、CPU10は、最新の操作情報に含まれるZ軸周りの角速度データが示す角速度ωzを用いて、Z軸周り角速度データDa3を更新する。
Next, the CPU 10 acquires data indicating the angular velocity from the input device 6 (step 41), and proceeds to the next step. For example, the CPU 10 acquires the operation information received from the input device 6 (controller 7), and stores it in the angular velocity data Da using the angular velocity indicated by the latest angular velocity data included in the operation information. Specifically, the CPU 10 updates the angular velocity data Da1 around the X axis using the angular velocity ωx indicated by the angular velocity data around the X axis included in the latest operation information received from the
次に、CPU10は、コントローラ7から加速度を示すデータを取得して(ステップ42)、次のステップに処理を進める。例えば、CPU10は、コントローラ7から受信した操作情報を取得し、当該操作情報に含まれる最新の加速度データが示す加速度を用いて加速度データDbに格納する。具体的には、CPU10は、コントローラ7から受信した最新の操作情報に含まれるX軸方向の加速度データが示す加速度axを用いて、X軸方向加速度データDb1を更新する。また、CPU10は、最新の操作情報に含まれるY軸方向の加速度データが示す加速度ayを用いて、Y軸方向加速度データDb2を更新する。そして、CPU10は、最新の操作情報に含まれるZ軸方向の加速度データが示す加速度azを用いて、Z軸方向加速度データDb3を更新する。
Next, the CPU 10 acquires data indicating acceleration from the controller 7 (step 42), and proceeds to the next step. For example, the CPU 10 acquires the operation information received from the
次に、CPU10は、重力加速度更新処理を行い(ステップ43)、次のステップに処理を進める。以下、図13を参照して、上記ステップ43で行う重力加速度更新処理について説明する。
Next, the CPU 10 performs gravity acceleration update processing (step 43), and proceeds to the next step. Hereinafter, with reference to FIG. 13, the gravity acceleration update process performed in
図13において、CPU10は、一時的な信用度dを算出し、算出された一時的な信用度dを用いて一時的な信用度データDdを更新して(ステップ51)、次のステップに処理を進める。ここで、当該重力加速度更新処理においては、現時点でコントローラ7に作用している加速度と、前回の処理において得られた加速度との差分が一定値以下の場合、すなわち加速度変化が閾値以下の場合、現時点でコントローラ7に作用している加速度が重力加速度であると推定する方法を用いている。そして、一時的な信用度dは、入力装置6(コントローラ7)に作用する重力加速度を推定する際に、現時点でコントローラ7に作用している加速度が重力加速度としてどれくらい信用できるものなのかを示す度合を、算出の過程において一時的に示すパラメータである。例えば、一時的な信用度d=1の場合、現時点でコントローラ7に作用している加速度が重力加速度として完全に信用できることを示す。一方、一時的な信用度d=0の場合、現時点でコントローラ7に作用している加速度が重力加速度として全く信用できないことを示す。
In FIG. 13, the CPU 10 calculates a temporary credit rating d, updates the temporary credit rating data Dd using the calculated temporary credit rating d (step 51), and proceeds to the next step. Here, in the gravitational acceleration update process, when the difference between the acceleration acting on the
具体的には、一時的な信用度dは、
d=1−(|a−a0|−admin)/(admax−admin) …(1)
で算出される。ここで、aは、現時点でコントローラ7に作用している加速度の大きさを示し、加速度データDbを参照して算出される。a0は、前回の処理において用いられた加速度の大きさを示し、前回加速度データDcを参照して算出される。admaxは、予め定められた定数であり、加速度の大きさaと加速度の大きさa0との差分において、当該差分が定数admax以上の場合に現時点でコントローラ7に作用している加速度が重力加速度として全く信用できないものとする値である。adminは、予め定められた定数であり、加速度の大きさaと加速度の大きさa0との差分において、当該差分が定数admin以下の場合に現時点でコントローラ7に作用している加速度が重力加速度として完全に信用できるものとする値である。このように、上記数式(1)によって一時的な信用度dを算出することによって、加速度の変化量|a−a0|が小さければ一時的な信用度dが1に近づくため、現時点でコントローラ7に作用している加速度を重力加速度として信用できることを、一時的な信用度dの値によって示すことができる。一方、加速度の変化量|a−a0|が大きければ一時的な信用度dが0に近づくため、現時点でコントローラ7に作用している加速度を重力加速度として信用できないことを、一時的な信用度dの値によって示すことができる。
Specifically, the temporary credit rating d is
d = 1− (| a−a0 | −admin) / (admax−admin) (1)
Is calculated by Here, a indicates the magnitude of acceleration acting on the
なお、上記数式(1)における加速度の変化量|a−a0|は、ゲーム処理周期である1フレーム毎にそれぞれ更新される加速度データDbを用いる場合、当該ゲーム処理周期を単位時間とした変化量となるが、他の周期を単位時間とした変化量であってもかまわない。一例として、コントローラ7から操作情報が送信される周期(例えば、1/200秒毎)を単位時間として、加速度の変化量|a−a0|を算出してもかまわない。この場合、加速度の変化量|a−a0|は、コントローラ7から操作情報が送信される周期(例えば、1/200秒)毎の変化量となり、ゲーム処理周期である1フレーム毎よりも短い時間を単位時間とした変化量とすることができる。他の例として、国際単位系の基本単位(例えば、1秒)を単位時間として、加速度の変化量|a−a0|を算出してもかまわない。この場合、加速度の変化量|a−a0|は、国際単位系の基本単位(例えば、1秒)毎の変化量となり、ゲーム処理周期である1フレーム毎よりも長い時間を単位時間とした変化量とすることができる。
Note that the amount of change in acceleration | a−a0 | in Equation (1) above is the amount of change using the game processing cycle as a unit time when using acceleration data Db updated for each frame that is the game processing cycle. However, it may be a change amount with other periods as unit time. As an example, the acceleration change amount | a−a0 | may be calculated using a period (for example, every 1/200 second) at which the operation information is transmitted from the
次に、CPU10は、上記ステップ51で算出された一時的な信用度dが1より大きいか否かを判断する(ステップ52)。そして、CPU10は、一時的な信用度dが1より大きい場合、次のステップ53に処理を進める。一方、CPU10は、一時的な信用度dが1以下の場合、次のステップ54に処理を進める。
Next, the CPU 10 determines whether or not the temporary reliability d calculated in
ステップ53において、CPU10は、一時的な信用度dを1に設定し、設定された一時的な信用度dを用いて一時的な信用度データDdを更新して、次のステップ56に処理を進める。つまり、一時的な信用度dの値が1より大きい場合、当該値が1に丸められることになる。
In step 53, the CPU 10 sets the temporary reliability d to 1, updates the temporary reliability data Dd using the set temporary reliability d, and proceeds to the
一方、一時的な信用度dが1以下の場合、ステップ54において、CPU10は、上記ステップ51で算出された一時的な信用度dが0より小さいか否かを判断する。そして、CPU10は、一時的な信用度dが0より小さい場合、次のステップ55に処理を進める。一方、CPU10は、一時的な信用度dが0以上の場合、次のステップ56に処理を進める。
On the other hand, when the temporary credit rating d is 1 or less, in
ステップ55において、CPU10は、一時的な信用度dを0に設定し、設定された一時的な信用度dを用いて一時的な信用度データDdを更新して、次のステップ56に処理を進める。つまり、一時的な信用度dの値が0より小さい場合、当該値が0に丸められることになる。
In
ステップ56において、CPU10は、前回信用度データDfを参照して、上記ステップ51で算出された一時的な信用度dが前回算出された信用度t0より大きいか否かを判断する。そして、CPU10は、一時的な信用度dが前回算出された信用度t0より大きい場合(すなわち、t0<dの場合)、次のステップ57に処理を進める。一方、CPU10は、一時的な信用度dが前回算出された信用度t0以下の場合(すなわち、d≦t0の場合)、次のステップ58に処理を進める。
In
ステップ57において、CPU10は、前回信用度データDfが示す前回の信用度t0および上記ステップ51で算出された一時的な信用度dを用いて、最終的な信用度tを算出し、次のステップ59に処理を進める。具体的には、CPU10は、最終的な信用度tを
t=t0*T+(1−T)*d …(2)
で算出し、算出された信用度tを用いて、信用度データDeを更新する。ここで、Tは、0<T<1を満たす予め定められた定数である。上記数式(2)から明らかなように、定数Tの大きさに応じて、前回の信用度t0に対して信用度tが更新される速さを調整することができ、定数Tの大きさが大きいほど信用度tが変化する速度が遅くなる。
In step 57, the CPU 10 calculates the final credit rating t using the previous credit rating t0 indicated by the previous credit rating data Df and the temporary credit rating d calculated in the
And the creditworthiness data De is updated using the calculated trustworthiness t. Here, T is a predetermined constant that satisfies 0 <T <1. As is clear from the above equation (2), the speed at which the credit level t is updated with respect to the previous credit level t0 can be adjusted according to the size of the constant T. The speed at which the reliability t changes is slow.
一方、ステップ58において、CPU10は、上記ステップ51で算出された一時的な信用度dを用いて最終的な信用度tを更新し、更新された最終的な信用度tを用いて信用度データDeを更新して、次のステップ59に処理を進める。
On the other hand, in
上記ステップ56〜ステップ58の処理から明らかなように、一時的な信用度dが前回算出された信用度t0より低く(小さく)なった場合は、一時的な信用度dが最終的な信用度tに即時に反映される。一方、一時的な信用度dが前回算出された信用度t0より高く(大きく)なった場合は、一時的な信用度dが最終的な信用度tに即時に反映されずに、最終的な信用度tが変化する速度が遅くなる。すなわち、一時的な信用度dが前回算出された信用度t0より高く(大きく)なった場合、最終的な信用度tは、前回の信用度t0と一時的な信用度dとの間の値となり、前回の信用度t0に対する値の増加が抑制される。つまり、今回の処理で算出する最終的な信用度tが、前回の処理で設定された最終的な信用度t0より高くなるときには高くなりにくく、前回の処理で設定された最終的な信用度t0より低くなるときには低くなりやすくなることになる。ここで、コントローラ7に搭載されている加速度センサの特性では、コントローラ7の動きを止めた際にその慣性で生じる加速度が前回の得られた加速度から徐々に減少する方向に変化していき、当該加速度の差分がそれほど大きい値にならない。したがって、算出された一時的な信用度dを最終的な信用度tに即座に反映させると、上記慣性により生じている加速度を安定した加速度(重力加速度)として扱ってしまうことがある。このような誤認識を回避するために、一時的な信用度dが前回算出された信用度t0より高く変化した際には、前回の信用度t0から徐々に変化するように更新する。また、逆に一時的な信用度dが前回算出された信用度t0より低く変化した際には算出された一時的な信用度dを信用度tに即座に反応させるようにしている。
As is clear from the processing in
ステップ59において、CPU10は、信用度データDeが示す最終的な信用度tに基づいて、重力加速度を算出し、当該サブルーチンによる処理を終了する。例えば、CPU10は、信用度データDeに格納されている信用度tと加速度データDbに格納されている加速度ax、ay、およびazとを用いて、重力加速度ベクトルgを算出し、算出された重力加速度ベクトルgを用いて重力加速度データDgを更新する。具体的には、重力加速度ベクトルgは、
g=an*t+g0*(1−t) …(3)
で算出されたベクトルを、重力の長さ(例えば、1)に正規化することによって算出される。ここで、anは、現時点でコントローラ7に生じている加速度ベクトル(ax,ay,az)を正規化(例えば、長さ1に正規化)したベクトルである。また、g0は、前回の処理において算出された重力加速度ベクトルであり、前回重力加速度データDhに格納されている重力加速度ベクトルg0である。この数式(3)によって、重力加速度ベクトルgは、現時点の加速度ベクトルaおよび前回算出された重力加速度ベクトルg0が、信用度tの割合で線形補間されたベクトルとなる。
In
g = an * t + g0 * (1-t) (3)
Is calculated by normalizing the vector calculated in
ここで、上述した説明から明らかなように、信用度tは、加速度の変化量|a−a0|が相対的に小さければ相対的に大きな値となり(具体的には1に近づく)、加速度の変化量|a−a0|が相対的に大きければ相対的に小さな値となる(具体的には0に近づく)。つまり、上記数式(3)によれば、加速度の変化量|a−a0|が相対的に小さいほど、前回の処理において算出した重力方向(前回算出された重力加速度ベクトルg0)を現時点の加速度ベクトルaを用いて修正する割合(度合)を相対的に大きくして、今回の処理における重力方向(重力加速度ベクトルg)を算出することになる。なお、上記数式(3)では、加速度の変化量|a−a0|に応じて、前回の処理において算出した重力方向を現時点の加速度ベクトルaを用いて修正する割合(度合)を調整しているが、他の数値を用いて調整してもかまわない。例えば、加速度の変化量|a−a0|に応じて、前回の処理において算出した重力方向を現時点の加速度ベクトルaを用いて修正する絶対量(修正量)を調整してもかまわない。この場合、加速度の変化量|a−a0|が相対的に小さいほど、前回の処理において算出した重力方向(前回算出された重力加速度ベクトルg0)を現時点の加速度ベクトルaを用いて修正する絶対量を相対的に大きくして、今回の処理における重力方向(重力加速度ベクトルg)を算出することになる。 Here, as is clear from the above description, the reliability t becomes a relatively large value (specifically, approaches 1) when the acceleration change amount | a−a0 | is relatively small, and the acceleration change. If the quantity | a−a0 | is relatively large, the value becomes relatively small (specifically, it approaches 0). That is, according to the above equation (3), as the acceleration change amount | a−a0 | is relatively small, the gravitational direction calculated in the previous process (the previously calculated gravitational acceleration vector g0) is represented as the current acceleration vector. The ratio (degree) of correction using a is relatively large, and the gravitational direction (gravitational acceleration vector g) in the current process is calculated. In the above formula (3), the rate (degree) of correcting the gravity direction calculated in the previous process using the current acceleration vector a is adjusted according to the acceleration change amount | a−a0 |. However, it may be adjusted using other numerical values. For example, the absolute amount (correction amount) for correcting the gravity direction calculated in the previous processing using the current acceleration vector a may be adjusted according to the acceleration change amount | a−a0 |. In this case, the smaller the acceleration change amount | a−a0 | is, the smaller the absolute amount by which the gravity direction calculated in the previous process (the previously calculated gravity acceleration vector g0) is corrected using the current acceleration vector a. Is made relatively large to calculate the gravity direction (gravitational acceleration vector g) in the current process.
図12に戻り、上記ステップ43の重力加速度更新処理の後、CPU10は、補正度合値算出処理を行い(ステップ44)、次のステップに処理を進める。以下、図14を参照して、上記ステップ44で行う補正度合値算出処理について説明する。
Returning to FIG. 12, after the gravitational acceleration update process in
図14において、CPU10は、入力装置6に設定されているXYZ軸から、補正度合値fを算出する対象軸を選択する(ステップ60)。そして、CPU10は、角速度データDaを参照して対象軸における補正度合値fを算出し、算出された補正度合値fを用いて補正度合値データDiを更新して(ステップ61)、次のステップに処理を進める。具体的には、対象軸がX軸である場合、補正度合値fxは、
fx=(|ωx|−Fmin)/(Fmax−Fmin)
で算出され、算出された補正度合値fxを用いてX軸方向補正度合値データDi1が更新される。ここで、|ωx|は、現時点で入力装置6に生じているX軸周りそれぞれの角速度ωxの絶対値であり、角速度データDa1に格納されている角速度ωxを参照することによって得られる。また、対象軸がY軸である場合、補正度合値fyは、
fy=(|ωy|−Fmin)/(Fmax−Fmin)
で算出され、算出された補正度合値fyを用いてY軸方向補正度合値データDi2が更新される。ここで、|ωy|は、現時点で入力装置6に生じているY軸周りそれぞれの角速度ωyの絶対値であり、角速度データDa2に格納されている角速度ωyを参照することによって得られる。さらに、対象軸がZ軸である場合、補正度合値fzは、
fz=(|ωz|−Fmin)/(Fmax−Fmin)
で算出され、算出された補正度合値fzを用いてZ軸方向補正度合値データDi3が更新される。ここで、|ωz|は、現時点で入力装置6に生じているZ軸周りそれぞれの角速度ωzの絶対値であり、角速度データDa3に格納されている角速度ωzを参照することによって得られる。ここで、Fmaxは、予め定められた定数であり、入力装置6に生じる角速度ωx、ωy、およびωzの大きさがそれぞれ定数Fmax以上の場合に、補正度合値fx、fy、およびfzをそれぞれ1以上とする値である。Fminは、予め定められた定数であり、入力装置6に生じる角速度ωx、ωy、およびωzの大きさがそれぞれ定数Fmin以下の場合に、補正度合値fx、fy、およびfzをそれぞれ0以下とする値である。
In FIG. 14, the CPU 10 selects the target axis for calculating the correction degree value f from the XYZ axes set in the input device 6 (step 60). Then, the CPU 10 calculates the correction degree value f in the target axis with reference to the angular velocity data Da, updates the correction degree value data Di using the calculated correction degree value f (step 61), and the next step Proceed with the process. Specifically, when the target axis is the X axis, the correction degree value fx is
fx = (| ωx | −Fmin) / (Fmax−Fmin)
The X-axis direction correction degree value data Di1 is updated using the calculated correction degree value fx. Here, | ωx | is an absolute value of each angular velocity ωx around the X axis generated in the input device 6 at the present time, and is obtained by referring to the angular velocity ωx stored in the angular velocity data Da1. When the target axis is the Y axis, the correction degree value fy is
fy = (| ωy | −Fmin) / (Fmax−Fmin)
The Y-axis direction correction degree value data Di2 is updated using the calculated correction degree value fy. Here, | ωy | is an absolute value of each angular velocity ωy around the Y axis generated in the input device 6 at the present time, and is obtained by referring to the angular velocity ωy stored in the angular velocity data Da2. Further, when the target axis is the Z axis, the correction degree value fz is
fz = (| ωz | −Fmin) / (Fmax−Fmin)
The Z-axis direction correction degree value data Di3 is updated using the calculated correction degree value fz. Here, | ωz | is the absolute value of each angular velocity ωz around the Z axis generated in the input device 6 at the present time, and is obtained by referring to the angular velocity ωz stored in the angular velocity data Da3. Here, Fmax is a predetermined constant. When the angular velocities ωx, ωy, and ωz generated in the input device 6 are equal to or larger than the constant Fmax, the correction degree values fx, fy, and fz are each set to 1 respectively. This is the value as described above. Fmin is a predetermined constant, and when the angular velocities ωx, ωy, and ωz generated in the input device 6 are each equal to or less than the constant Fmin, the correction degree values fx, fy, and fz are set to 0 or less, respectively. Value.
次に、CPU10は、上記ステップ61で算出された補正度合値fが1より大きいか否かを判断する(ステップ62)。そして、CPU10は、補正度合値fが1より大きい場合、次のステップ63に処理を進める。一方、CPU10は、補正度合値fが1以下の場合、次のステップ64に処理を進める。 Next, the CPU 10 determines whether or not the correction degree value f calculated in step 61 is greater than 1 (step 62). Then, when the correction degree value f is larger than 1, the CPU 10 advances the processing to the next step 63. On the other hand, if the correction degree value f is 1 or less, the CPU 10 advances the process to the next step 64.
ステップ63において、CPU10は、現在選択されている対象軸の補正度合値fを1に設定し、設定された補正度合値fを用いて対応する補正度合値データDiを更新して、次のステップ66に処理を進める。つまり、補正度合値fの値が1より大きい場合、当該値が1に丸められることになる。 In step 63, the CPU 10 sets the correction degree value f of the currently selected target axis to 1, updates the corresponding correction degree value data Di using the set correction degree value f, and performs the next step. The process proceeds to 66. That is, when the correction degree value f is larger than 1, the value is rounded to 1.
一方、補正度合値fが1以下の場合、ステップ64において、CPU10は、上記ステップ61で算出された補正度合値fが0より小さいか否かを判断する。そして、CPU10は、補正度合値fが0より小さい場合、次のステップ65に処理を進める。一方、CPU10は、補正度合値fが0以上の場合、次のステップ66に処理を進める。
On the other hand, when the correction degree value f is 1 or less, in step 64, the CPU 10 determines whether or not the correction degree value f calculated in step 61 is smaller than zero. If the correction degree value f is smaller than 0, the CPU 10 proceeds to the
ステップ65において、CPU10は、現在選択されている対象軸の補正度合値fを0に設定し、設定された補正度合値fを用いて対応する補正度合値データDiを更新して、次のステップ66に処理を進める。つまり、補正度合値fの値が0より小さい場合、当該値が0に丸められることになる。
In
このように、補正度合値fは、現時点で入力装置6に生じている角速度の大きさが大きければ補正度合値fの値が1に近づき、角速度の大きさが小さければ補正度合値fの値が0に近づく。したがって、補正度合値fは、入力装置6に生じている角速度の大きさの度合を0〜1の間の値で示すパラメータとして用いることができる。 In this way, the correction degree value f is a value of the correction degree value f that approaches 1 if the magnitude of the angular velocity currently occurring in the input device 6 is large, and the value of the correction degree value f if the magnitude of the angular velocity is small. Approaches 0. Therefore, the correction degree value f can be used as a parameter indicating the degree of the magnitude of the angular velocity generated in the input device 6 as a value between 0 and 1.
ステップ66において、CPU10は、前回補正度合値データDjを参照して、上記ステップ61〜ステップ65で算出された補正度合値fが、同じ対象軸に対して前回算出された補正度合値f0より小さいか否かを判断する。そして、CPU10は、補正度合値fが前回算出された補正度合値f0より小さい場合(すなわち、f<f0の場合)、次のステップ67に処理を進める。一方、CPU10は、補正度合値fが前回算出された補正度合値f0以上の場合(すなわち、f0≦fの場合)、次のステップ68に処理を進める。 In step 66, the CPU 10 refers to the previous correction degree value data Dj, and the correction degree value f calculated in steps 61 to 65 is smaller than the correction degree value f0 previously calculated for the same target axis. Determine whether or not. When the correction degree value f is smaller than the previously calculated correction degree value f0 (that is, when f <f0), the CPU 10 proceeds to the next step 67. On the other hand, if the correction degree value f is greater than or equal to the previously calculated correction degree value f0 (that is, if f0 ≦ f), the CPU 10 proceeds to the next step 68.
ステップ67において、CPU10は、上記ステップ61で算出された補正度合値fおよび前回補正度合値データDjが示す同じ対象軸に対する前回の補正度合値f0を用いて、補正度合値fを更新し、次のステップ68に処理を進める。具体的には、CPU10は、対象軸がX軸である場合、補正度合値fxを
fx←fx*S+(1−S)*f0x
で更新し、算出された補正度合値fxを用いて、X軸方向補正度合値データDi1を更新する。ここで、f0xは、X軸成分に対して前回算出された補正度合値であり、X軸方向補正度合値データDj1を参照することによって得られる。また、Sは、0<S<1を満たす予め定められた定数である。上記数式から明らかなように、定数Sの大きさに応じて、前回の補正度合値f0xに対して補正度合値fxが更新される速さを調整することができ、定数Sの大きさが小さいほど補正度合値fxが変化する速度が遅くなる。また、CPU10は、対象軸がY軸である場合、補正度合値fyを
fy←fy*S+(1−S)*f0y
で更新し、算出された補正度合値fyを用いて、Y軸方向補正度合値データDi2を更新する。ここで、f0yは、Y軸成分に対して前回算出された補正度合値であり、Y軸方向補正度合値データDj2を参照することによって得られる。さらに、CPU10は、対象軸がZ軸である場合、補正度合値fzを
fz←fz*S+(1−S)*f0z
で更新し、算出された補正度合値fzを用いて、Z軸方向補正度合値データDi3を更新する。ここで、f0zは、Z軸成分に対して前回算出された補正度合値であり、Z軸方向補正度合値データDj3を参照することによって得られる。
In step 67, the CPU 10 updates the correction degree value f using the correction degree value f calculated in step 61 and the previous correction degree value f0 for the same target axis indicated by the previous correction degree value data Dj. The process proceeds to step 68. Specifically, when the target axis is the X axis, the CPU 10 sets the correction degree value fx as follows: fx ← fx * S + (1−S) * f0x
The X-axis direction correction degree value data Di1 is updated using the calculated correction degree value fx. Here, f0x is the correction degree value calculated last time for the X-axis component, and is obtained by referring to the X-axis direction correction degree value data Dj1. S is a predetermined constant that satisfies 0 <S <1. As is apparent from the above formula, the speed at which the correction degree value fx is updated with respect to the previous correction degree value f0x can be adjusted according to the magnitude of the constant S, and the magnitude of the constant S is small. As the correction degree value fx changes, the rate of change becomes slower. Further, when the target axis is the Y axis, the CPU 10 sets the correction degree value fy to fy ← fy * S + (1−S) * f0y.
The Y-axis direction correction degree value data Di2 is updated using the calculated correction degree value fy. Here, f0y is the correction degree value calculated last time for the Y-axis component, and is obtained by referring to the Y-axis direction correction degree value data Dj2. Further, when the target axis is the Z axis, the CPU 10 sets the correction degree value fz to fz ← fz * S + (1−S) * f0z.
The Z-axis direction correction degree value data Di3 is updated using the calculated correction degree value fz. Here, f0z is the correction degree value calculated last time for the Z-axis component, and is obtained by referring to the Z-axis direction correction degree value data Dj3.
ここで、上記ステップ67では、上記ステップ61で算出された補正度合値fを前回の補正度合値f0に所定割合(すなわち、S対1−Sの割合)近づけることによって、最終的な補正度合値fとしている。あるいは、前回の補正度合値f0を上記ステップ61で算出された補正度合値fに所定割合(すなわち、1−S対Sの割合)近づけることによって、最終的な補正度合値fとしている。なお、上記ステップ67で補正度合値fを前回の補正度合値f0に近づける、または前回の補正度合値f0を補正度合値fに近づける大きさは、上記所定割合で算出しなくてもかまわない。例えば、上記ステップ61で算出された補正度合値fを前回の補正度合値f0に所定量(典型的には、一定量)近づけることによって、最終的な補正度合値fとしてもかまわない。あるいは、前回の補正度合値f0を上記ステップ61で算出された補正度合値fに所定量(典型的には、一定量)近づけることによって、最終的な補正度合値fとしてもかまわない。 Here, in step 67, the final correction degree value is obtained by bringing the correction degree value f calculated in step 61 closer to the previous correction degree value f0 by a predetermined ratio (that is, the ratio of S to 1-S). f. Alternatively, the final correction degree value f0 is obtained by bringing the previous correction degree value f0 closer to the correction degree value f calculated in step 61 above by a predetermined ratio (that is, a ratio of 1-S to S). Note that the magnitude at which the correction degree value f is brought close to the previous correction degree value f0 in step 67 or the previous correction degree value f0 is made closer to the correction degree value f may not be calculated at the predetermined ratio. For example, the final correction degree value f may be obtained by bringing the correction degree value f calculated in step 61 closer to the previous correction degree value f0 by a predetermined amount (typically, a constant amount). Alternatively, the final correction degree value f0 may be obtained by bringing the previous correction degree value f0 closer to the correction degree value f calculated in step 61 above by a predetermined amount (typically, a constant amount).
ステップ68において、CPU10は、入力装置6に設定されているXYZ軸全てに対して、それぞれ補正度合値fの算出が終了したか否かを判断する。そして、CPU10は、XYZ軸全てに対して、それぞれ補正度合値fの算出が終了している場合、当該サブルーチンによる処理を終了する。一方、CPU10は、XYZ軸のうち、補正度合値fの算出が終了していない軸がある場合、上記ステップ60に戻って処理を繰り返す。 In step 68, the CPU 10 determines whether or not the calculation of the correction degree value f has been completed for all the XYZ axes set in the input device 6. Then, when the calculation of the correction degree value f has been completed for all the XYZ axes, the CPU 10 ends the processing by the subroutine. On the other hand, when there is an axis for which the calculation of the correction degree value f is not completed among the XYZ axes, the CPU 10 returns to step 60 and repeats the process.
上記ステップ61〜ステップ67の処理から明らかなように、補正度合値fが前回算出された補正度合値f0以上の場合は、上記ステップ61〜ステップ65で算出された補正度合値fがそのまま採用される。一方、補正度合値fが前回算出された補正度合値f0より小さくなった場合は、上記ステップ61〜ステップ65で算出された補正度合値fがそのまま採用されずに、補正度合値fが変化する速度が遅くなる。すなわち、補正度合値fは、その値が大きくなる場合と比較して、その値が小さくなる速度が抑制されることになる。 As is apparent from the processing in steps 61 to 67, when the correction degree value f is equal to or larger than the correction degree value f0 calculated last time, the correction degree value f calculated in steps 61 to 65 is used as it is. The On the other hand, when the correction degree value f is smaller than the previously calculated correction degree value f0, the correction degree value f calculated in steps 61 to 65 is not adopted as it is, and the correction degree value f changes. The speed is slow. In other words, the correction degree value f is suppressed at a speed at which the value becomes smaller than when the value becomes larger.
図12に戻り、上記ステップ44の補正度合値算出処理の後、CPU10は、加速度ベクトルのXYZ軸成分それぞれに作用する形式となる形式値eに補正度合値fを変換して(ステップ45)、次のステップに処理を進める。例えば、CPU10は、以下の数式を用いて、補正度合値fx、fy、およびfzを形式値eに変換する。
e=(fy+fz,fx+fz,fx+fy)
そして、CPU10は、形式値eの各成分値を0〜1の範囲内に丸める。具体的には、CPU10は、形式値eの各成分値の何れかが1より大きい場合、当該成分値を1とする。また、CPU10は、形式値eの各成分値の何れかが0より小さい場合、当該成分値を0とする。
Returning to FIG. 12, after the correction degree value calculation processing in step 44, the CPU 10 converts the correction degree value f into a formal value e that has a format that acts on each of the XYZ axis components of the acceleration vector (step 45). Proceed to the next step. For example, the CPU 10 converts the correction degree values fx, fy, and fz into the format value e using the following mathematical formula.
e = (fy + fz, fx + fz, fx + fy)
And CPU10 rounds each component value of the format value e in the range of 0-1. Specifically, the CPU 10 sets the component value to 1 when any of the component values of the format value e is greater than 1. Further, when any of the component values of the format value e is smaller than 0, the CPU 10 sets the component value to 0.
ここで、形式値eの各成分値について説明する。例えば、入力装置6においてZ軸方向(図3参照)に作用している加速度には、Z軸に垂直な軸周り、すなわちX軸周りおよびY軸周りに入力装置6自体が回転することによって生じている加速度も含まれている。したがって、Z軸方向に作用している加速度のうち、入力装置6自体が平行移動することによって生じている加速度のみを取得したい場合、X軸周りおよびY軸周りに入力装置6自体が回転することによって生じている加速度を、Z軸方向の加速度から割り引く必要がある。 Here, each component value of the format value e will be described. For example, the acceleration acting in the Z-axis direction (see FIG. 3) in the input device 6 is caused by the rotation of the input device 6 itself around an axis perpendicular to the Z-axis, that is, around the X-axis and the Y-axis. Acceleration is also included. Therefore, when it is desired to obtain only the acceleration generated by the translation of the input device 6 itself out of the acceleration acting in the Z-axis direction, the input device 6 itself rotates around the X axis and the Y axis. Must be discounted from the acceleration in the Z-axis direction.
形式値eの3つ目の成分値はZ軸に関する成分値であり、fx+fyで算出される。ここで、補正度合値fxは、現時点で入力装置6に生じているX軸周りの角速度の大きさが大きければ値が大きくなるパラメータである。また、補正度合値fyは、現時点で入力装置6に生じているY軸周りの角速度の大きさが大きければ値が大きくなるパラメータである。つまり、形式値eのZ軸に関する成分値は、X軸周りおよびY軸周りの角速度が大きくなるとその値が大きくなる、すなわち、入力装置6自体がX軸周りおよびY軸周りに回転することによって生じている加速度が大きくなるとその値が大きくなるパラメータとなる。したがって、形式値eのZ軸に関する成分値は、入力装置6においてZ軸方向に作用している加速度から、入力装置6自体が回転することによって生じている加速度を割り引く際のパラメータとして用いることができる。 The third component value of the format value e is a component value related to the Z axis, and is calculated by fx + fy. Here, the correction degree value fx is a parameter whose value increases if the magnitude of the angular velocity around the X axis currently occurring in the input device 6 is large. Further, the correction degree value fy is a parameter that increases as the angular velocity around the Y-axis currently occurring in the input device 6 increases. That is, the component value related to the Z axis of the formal value e increases as the angular velocity around the X axis and around the Y axis increases, that is, by the input device 6 itself rotating around the X axis and the Y axis. When the generated acceleration increases, the value becomes a parameter. Therefore, the component value related to the Z-axis of the formal value e is used as a parameter for discounting the acceleration generated by the rotation of the input device 6 itself from the acceleration acting in the Z-axis direction in the input device 6. it can.
同様に、形式値eの1つ目の成分値は、fy+fzで算出されるX軸に関する成分値であり、入力装置6自体がY軸周りおよびZ軸周りに回転することによって生じている加速度が大きくなるとその値が大きくなるパラメータとなる。したがって、形式値eのX軸に関する成分値は、入力装置6においてX軸方向に作用している加速度から、入力装置6自体が回転することによって生じている加速度を割り引く際のパラメータとして用いることができる。さらに、形式値eの2つ目の成分値は、fx+fzで算出されるY軸に関する成分値であり、入力装置6自体がX軸周りおよびZ軸周りに回転することによって生じている加速度が大きくなるとその値が大きくなるパラメータとなる。したがって、形式値eのY軸に関する成分値は、入力装置6においてY軸方向に作用している加速度から、入力装置6自体が回転することによって生じている加速度を割り引く際のパラメータとして用いることができる。 Similarly, the first component value of the formal value e is a component value related to the X axis calculated by fy + fz, and the acceleration generated by the input device 6 itself rotating around the Y axis and the Z axis is detected. As the value increases, the value increases. Therefore, the component value related to the X axis of the formal value e is used as a parameter when the acceleration generated by the rotation of the input device 6 itself is discounted from the acceleration acting in the X axis direction in the input device 6. it can. Further, the second component value of the formal value e is a component value related to the Y axis calculated by fx + fz, and the acceleration generated by the input device 6 itself rotating around the X axis and the Z axis is large. Then, it becomes a parameter whose value increases. Therefore, the component value related to the Y axis of the formal value e is used as a parameter for discounting the acceleration generated by the rotation of the input device 6 itself from the acceleration acting in the Y axis direction in the input device 6. it can.
次に、CPU10は、上記ステップ45で変換された形式値eを用いて、平行移動加速度を算出し(ステップ46)、次のステップに処理を進める。例えば、CPU10は、加速度データDbが示す加速度ax、ay、およびazと重力加速度データDgが示す重力加速度ベクトルgと形式値eとを用いて平行移動加速度を示す平行移動加速度ベクトルpを算出し、平行移動加速度ベクトルpを示すデータを用いて平行移動加速度データDkを更新する。具体的には、平行移動加速度ベクトルpは、
p=(a−g)mul(1−e) …(4)
で算出される。ここで、aは、現時点で入力装置6に作用している加速度ベクトルを示す。gは、現時点で入力装置6に作用していると推定される重力加速度ベクトルを示す。eは、上記ステップ45で算出された形式値を示す。そして、mulは、XYZ軸成分毎に積算することを示している。したがって、平行移動加速度ベクトルpのXYZ軸成分が(px,py,pz)、重力加速度ベクトルgのXYZ軸成分が(gx,gy,gz)、形式値eのXYZ軸成分が(ex,ey,ex)でそれぞれ示されるとすると、上記数式(4)は、以下のようなXYZ軸成分毎の数式で示される。
px=(ax−gx)*(1−ex)
py=(ay−gy)*(1−ey)
pz=(az−gz)*(1−ez)
Next, the CPU 10 calculates a parallel movement acceleration using the format value e converted in step 45 (step 46), and proceeds to the next step. For example, the CPU 10 calculates the translation acceleration vector p indicating the translation acceleration using the accelerations ax, ay, and az indicated by the acceleration data Db, the gravity acceleration vector g indicated by the gravity acceleration data Dg, and the formal value e, The translation acceleration data Dk is updated using the data indicating the translation acceleration vector p. Specifically, the translation acceleration vector p is
p = (ag) mul (1-e) (4)
Is calculated by Here, a indicates an acceleration vector currently acting on the input device 6. g indicates a gravitational acceleration vector estimated to be acting on the input device 6 at the present time. e indicates the format value calculated in step 45 above. And mul has shown integrating | accumulating for every XYZ-axis component. Therefore, the XYZ-axis component of the translation acceleration vector p is (px, py, pz), the XYZ-axis component of the gravitational acceleration vector g is (gx, gy, gz), and the XYZ-axis component of the formal value e is (ex, ey, ex), the above formula (4) is represented by the following formula for each XYZ axis component.
px = (ax−gx) * (1-ex)
py = (ay-gy) * (1-ey)
pz = (az-gz) * (1-ez)
このように、平行移動加速度ベクトルpは、現時点で入力装置6に作用している加速度から重力加速度を減算することによって重力加速度を除いた加速度を算出し、重力加速度が減算された加速度に(1−e)を積算することによって得られる。ここで、上述したように形式値eのXYZ軸成分値は、それぞれの軸方向に作用する加速度に影響を与える角速度の大きさを示す0〜1の範囲で設定されるパラメータであり、当該角速度が大きいほど1に近づくパラメータである。したがって、積算される(1−e)は、それぞれの軸方向に作用する加速度に影響を与える角速度の大きさが大きいほど0に近づく0〜1の範囲の値となる。つまり、平行移動加速度ベクトルpは、重力加速度が減算された加速度に(1−e)を積算することによって、現時点で入力装置6に作用している加速度から重力加速度および入力装置6が回転することによって生じている加速度をそれぞれ割り引いたパラメータとなるため、入力装置6自体が平行移動することによって生じた加速度を示すベクトルとして用いることができる。 Thus, the translation acceleration vector p is calculated by subtracting the gravitational acceleration from the acceleration acting on the input device 6 at the present time, thereby calculating the acceleration excluding the gravitational acceleration. Obtained by integrating -e). Here, as described above, the XYZ axis component value of the formal value e is a parameter set in the range of 0 to 1 indicating the magnitude of the angular velocity that affects the acceleration acting in the respective axial directions. The larger the value is, the closer the parameter is to 1. Therefore, the accumulated (1-e) is a value in the range of 0 to 1 that approaches 0 as the magnitude of the angular velocity that affects the acceleration acting in the respective axial directions increases. That is, the translation acceleration vector p is obtained by adding (1-e) to the acceleration obtained by subtracting the gravitational acceleration, so that the gravitational acceleration and the input device 6 are rotated from the acceleration currently acting on the input device 6. Therefore, it can be used as a vector indicating the acceleration generated by the translation of the input device 6 itself.
次に、CPU10は、平行移動加速度データDkが示す平行移動加速度ベクトルpと角速度データDaが示す角速度ωx、ωy、およびωzとを用いて、ゲーム処理を行い(ステップ47)、次のステップに処理を進める。例えば、CPU10は、平行移動加速度ベクトルpと角速度ωx、ωy、およびωzとを用いて、プレイヤキャラクタPCの動作を制御する。 Next, the CPU 10 performs a game process using the translation acceleration vector p indicated by the translation acceleration data Dk and the angular velocities ωx, ωy, and ωz indicated by the angular velocity data Da (step 47), and the next step is processed. To proceed. For example, the CPU 10 controls the action of the player character PC using the parallel movement acceleration vector p and the angular velocities ωx, ωy, and ωz.
具体的には、CPU10は、平行移動加速度ベクトルpが所定値以上の大きさで入力装置6の上方を示している場合、平行移動加速度ベクトルpの大きさの応じてプレイヤキャラクタPCをジャンプさせる(図9参照)。平行移動加速度ベクトルpの実空間内における方向は、どのような方法で算出されてもよい。一例として、現時点で重力加速度が生じている方向(重力加速度ベクトルgの方向)が実空間における鉛直方向とし、当該鉛直方向を基準として、平行移動加速度ベクトルpの実空間内における方向を算出する。他の例として、後述する入力装置6の姿勢を基準として、平行移動加速度ベクトルpの実空間内における方向を算出する。 Specifically, the CPU 10 causes the player character PC to jump according to the magnitude of the parallel movement acceleration vector p when the parallel movement acceleration vector p is larger than a predetermined value and indicates the upper side of the input device 6 ( (See FIG. 9). The direction of the translation acceleration vector p in the real space may be calculated by any method. As an example, the direction in which the gravitational acceleration is occurring at present (the direction of the gravitational acceleration vector g) is the vertical direction in the real space, and the direction in the real space of the translation acceleration vector p is calculated using the vertical direction as a reference. As another example, the direction of the translation acceleration vector p in the real space is calculated with reference to the attitude of the input device 6 described later.
また、CPU10は、入力装置6の姿勢に応じて、プレイヤキャラクタPCの移動方向を算出する。例えば、入力装置6が左または右に傾けられた姿勢であることを角速度ωx、ωy、およびωzが示す場合、入力装置6の姿勢(例えば、傾き角度)に応じて、入力装置6が傾いている方向へプレイヤキャラクタPCを旋回させる(図10参照)。また、入力装置6が水平に維持された姿勢であることを角速度ωx、ωy、およびωzが示す場合、プレイヤキャラクタPCを直進させる(図8参照)。入力装置6の姿勢(角度)は、角速度ωx、ωy、およびωzを用いて算出することが可能であり、角速度ωx、ωy、およびωzから入力装置6の姿勢(角度)を算出する方法はどのような方法であってもよい。例えば、入力装置6の初期姿勢に(単位時間あたりの)角速度ωx、ωy、およびωzを逐次加算する方法がある。すなわち、ジャイロセンサ95および96から逐次出力された角速度ωx、ωy、およびωzを積分し、初期状態からの姿勢の変化量(角度の変化量)を積分結果から算出することによって、現在の入力装置6の姿勢を算出することができる。
Further, the CPU 10 calculates the moving direction of the player character PC according to the attitude of the input device 6. For example, when the angular velocities ωx, ωy, and ωz indicate that the input device 6 is tilted to the left or right, the input device 6 is tilted according to the posture of the input device 6 (for example, the tilt angle). The player character PC is turned in the present direction (see FIG. 10). Further, when the angular velocities ωx, ωy, and ωz indicate that the input device 6 is maintained in a horizontal posture, the player character PC is moved straight (see FIG. 8). The posture (angle) of the input device 6 can be calculated using the angular velocities ωx, ωy, and ωz. Which method is used to calculate the posture (angle) of the input device 6 from the angular velocities ωx, ωy, and ωz? Such a method may be used. For example, there is a method of sequentially adding angular velocities ωx, ωy, and ωz (per unit time) to the initial posture of the input device 6. That is, the current input device is obtained by integrating the angular velocities ωx, ωy, and ωz sequentially output from the
次に、CPU10は、上記ステップ41〜ステップ47の処理によって算出されたパラメータを用いて前回のパラメータを更新して(ステップ48)、次のステップに処理を進める。具体的には、CPU10は、加速度データDbが示す加速度ax、ay、およびazを用いて加速度a0x、a0y、およびa0zをそれぞれ更新し、更新された加速度a0x、a0y、およびa0zを用いて前回加速度データDcを更新する。CPU10は、信用度データDeが示す信用度tを用いて前回の信用度t0を更新し、更新された信用度t0を用いて前回信用度データDfを更新する。CPU10は、重力加速度データDgが示す重力加速度ベクトルgを用いて前回の重力加速度ベクトルg0を更新し、更新された重力加速度ベクトルg0を用いて前回重力加速度データDhを更新する。そして、CPU10は、補正度合値データDiが示す補正度合値fx、fy、およびfzを用いて前回の補正度合値f0x、f0y、およびf0zをそれぞれ更新し、更新された補正度合値f0x、f0y、およびf0zを用いて前回補正度合値データDjを更新する。 Next, the CPU 10 updates the previous parameter using the parameters calculated by the processing of the above steps 41 to 47 (step 48), and proceeds to the next step. Specifically, the CPU 10 updates the accelerations a0x, a0y, and a0z using the accelerations ax, ay, and az indicated by the acceleration data Db, respectively, and the previous acceleration using the updated accelerations a0x, a0y, and a0z. Data Dc is updated. The CPU 10 updates the previous credit rating t0 using the credit rating t indicated by the credit rating data De, and updates the previous credit rating data Df using the updated credit rating t0. The CPU 10 updates the previous gravitational acceleration vector g0 using the gravitational acceleration vector g indicated by the gravitational acceleration data Dg, and updates the previous gravitational acceleration data Dh using the updated gravitational acceleration vector g0. Then, the CPU 10 updates the previous correction degree values f0x, f0y, and f0z using the correction degree values fx, fy, and fz indicated by the correction degree value data Di, respectively, and the updated correction degree values f0x, f0y, And f0z are used to update the previous correction degree value data Dj.
次に、CPU10は、ゲームを終了するか否かを判断する(ステップ49)。ゲームを終了する条件としては、例えば、ステップ47でゲーム処理されているゲームがゲームオーバーとなる条件が満たされたことや、プレイヤが当該ゲームを終了する操作を行ったこと等がある。CPU10は、ゲームを終了しない場合、上記ステップ41に戻って処理を繰り返す。一方、CPU10は、ゲームを終了する場合、当該フローチャートによる処理を終了する。 Next, the CPU 10 determines whether or not to end the game (step 49). As a condition for ending the game, for example, a condition that the game being processed in step 47 becomes a game over condition is satisfied, or the player performs an operation to end the game. CPU10 returns to the said step 41, and repeats a process, when not complete | finishing a game. On the other hand, CPU10 complete | finishes the process by the said flowchart, when complete | finishing a game.
このように、第1の実施形態に係るゲーム処理によれば、3軸方向それぞれに作用している加速度を用いて入力装置6自体の姿勢や動きを判断するために、入力装置6に生じている角速度を用いて入力装置6の回転を判定し、入力装置6が平行移動しているときに生じている加速度を取得している。これによって、上記ゲーム処理では、入力装置6が平行移動することによって得られた加速度を瞬時に判断することができる。したがって、上記ゲーム処理では、入力装置6全体を引き上げたり、入力装置6全体を突き出したりするような平行移動動作を、入力装置6から得られる加速度を用いて正確に認識することができる。 As described above, according to the game processing according to the first embodiment, in order to determine the posture and movement of the input device 6 itself using the acceleration acting in each of the three axial directions, The rotation of the input device 6 is determined using the angular velocity, and the acceleration generated when the input device 6 is moving in parallel is acquired. Thereby, in the game process, the acceleration obtained by the parallel movement of the input device 6 can be determined instantaneously. Therefore, in the above game processing, it is possible to accurately recognize the parallel movement operation that pulls up the entire input device 6 or protrudes the entire input device 6 using the acceleration obtained from the input device 6.
(第2の実施形態)
次に、本発明の第2の実施形態に係る情報処理プログラムを実行する情報処理装置について説明する。なお、第2の実施形態に係る情報処理装置の一例である据置型のゲーム装置本体5を含むゲームシステムは、第1の実施形態に対して入力装置6の構成が異なり、他の構成については第1の実施形態におけるゲームシステムと同様であるため、同一の構成については同一の参照符号を付して詳細な説明を省略する。
(Second Embodiment)
Next, an information processing apparatus that executes an information processing program according to the second embodiment of the present invention will be described. Note that the game system including the stationary game apparatus
図15を参照して、第2の実施形態で用いる入力装置6の構成について説明する。なお、図15は、プレイヤが第2の実施形態で用いる入力装置6を操作している一例を示す外観図である。 With reference to FIG. 15, the configuration of the input device 6 used in the second embodiment will be described. FIG. 15 is an external view showing an example in which the player is operating the input device 6 used in the second embodiment.
図15において、入力装置6は、さらにサブユニット76を有している。サブユニット76は、片手で把持可能であり、接続ケーブル731を介して角速度検出ユニット9(コントローラ7)と接続されている。サブユニット76の後端から延びる接続ケーブル731の先端にはコネクタ732が設けられ、角速度検出ユニット9の後端に設けられているコネクタ97と接続される。コネクタ732をコネクタ97に接続することで、サブユニット76は、角速度検出ユニット9(コントローラ7)と物理的および電気的に結合される。
In FIG. 15, the input device 6 further includes a
サブユニット76の入力データは、接続ケーブル731および角速度検出ユニット9を介して、コントローラ7に与えられる。コントローラ7は、コントローラ7自身の入力データと、角速度検出ユニット9からの角速度データと、サブユニット76の入力データとを含む操作データをゲーム装置本体5に送信する。このとき、上記操作データを一度に送信してもいいが、一度に送信するデータ量に制限がある場合、角速度検出ユニット9からの角速度データとサブユニット76からの入力データとを交互に、角速度検出ユニット9がコントローラ7へ出力することによって、両者のデータを送信することもできる。このデータ送信制御は、角速度検出ユニット9によって行われるため、コントローラ7やサブユニット76には角速度検出ユニット9の搭載によって何ら設計の変更をする必要がない。
Input data of the
図16および図17を参照して、サブユニット76について説明する。なお、図16は、サブユニット76の一例を示す斜視図である。図17は、図16のサブユニット76の上筐体(ハウジング763の一部)を外した状態の一例を示す斜視図である。
The
図16において、サブユニット76は、例えばプラスチック成型によって形成されたハウジング763を有している。ハウジング763は、その前後方向を長手方向とし、サブユニット76において最太部となる頭部を前方に形成した流線型の立体形状を有しており、全体として大人や子供の片手で把持可能な大きさである。
In FIG. 16, the
ハウジング763上面の上記最太部近傍に、スティック761aが設けられる。スティック761aは、ハウジング763上面から突出した傾倒可能なスティックを倒すことによって、傾倒方向に応じて操作信号を出力する操作部である。例えば、プレイヤがスティック先端を360°任意の方向に傾倒することによって任意の方向や位置を指定することができ、仮想ゲーム世界に登場するプレイヤキャラクタ等の移動方向を指示したり、カーソルの移動方向を指示したりすることができる。
A
サブユニット76のハウジング763の前面に、複数の操作ボタン761bおよび761cが設けられる。操作ボタン761bおよび761cは、プレイヤがボタン頭部を押下することによって、それぞれの操作ボタン761bおよび761cに割り当てられた操作信号を出力する操作部である。例えば、操作ボタン761bおよび761cには、XボタンおよびYボタン等としての機能が割り当てられる。これら操作ボタン761bおよび761cは、ゲーム装置本体5が実行するゲームプログラムに応じてそれぞれの機能が割り当てられるが、本発明の説明とは直接関連しないため詳細な説明を省略する。なお、図16に示した配置例では、操作ボタン761bおよび761cは、ハウジング763前面の上下方向に沿って並設されている。なお、サブユニット76に設けられる操作部(スティック761a、操作ボタン761bおよび761c)を総称して説明する場合、以下の説明では操作部761と記載することがある。
A plurality of
ここで、以下の説明を具体的にするために、サブユニット76に対して設定する座標系について定義する。図16に示すように、互いに直交するXYZ軸をサブユニット76に対して定義する。具体的には、サブユニット76の前後方向となるハウジング763の長手方向をZ軸とし、サブユニット76の前面(操作ボタン761bおよび761cが設けられている面)方向をZ軸正方向とする。また、サブユニット76の上下方向をY軸とし、ハウジング763の上面方向(スティック761aが突出する方向)をY軸正方向とする。さらに、サブユニット76の左右方向をX軸とし、ハウジング763の右側面(図16では表されない側面)方向をX軸正方向とする。
Here, in order to make the following description concrete, a coordinate system set for the
図17において、ハウジング763の内部には基板が固設されており、当該基板の上主面上にスティック761aおよび加速度センサ762等が設けられる。そして、これらは、基板等に形成された配線(図示せず)を介して接続ケーブル731と接続されている。なお、サブユニット76もコントローラ7と同様に、3軸の加速度センサ762を備えていることが好ましく、加速度センサ762は、サブユニット76に生じたXYZ軸方向それぞれの加速度を検出する。加速度センサ762は、加速度センサ701と同様の機能や構成を有するため、詳細な説明を省略する。
In FIG. 17, a substrate is fixed inside the
次に、図18を参照して、第2の実施形態に係る入力装置6の内部構成について説明する。なお、図18は、第2の実施形態に係る入力装置6の構成の一例を示すブロック図である。以下においては、図7を用いて説明した第1の実施形態との主な相違点である角速度検出ユニット9およびサブユニット76について、主に説明する。
Next, an internal configuration of the input device 6 according to the second embodiment will be described with reference to FIG. FIG. 18 is a block diagram illustrating an example of the configuration of the input device 6 according to the second embodiment. In the following, the angular velocity detection unit 9 and the
角速度検出ユニット9のコネクタ97には、サブユニット76から延びる接続ケーブル731のコネクタ732が接続される。コネクタ732には、サブユニット76の操作部761および加速度センサ762が接続される。操作部761が操作されると、接続ケーブル731、コネクタ732、およびコネクタ97を介して、操作部761の操作内容を示すデータが角速度検出ユニット9のマイコン94に与えられる。マイコン94は、プラグ93およびコネクタ73を介して、操作部761の操作内容を示すデータを通信部75に出力する。また、加速度センサ762も加速度センサ701と同様のサンプリング周期を有しており、接続ケーブル731、コネクタ732、およびコネクタ97を介して、加速度センサ762が検出した加速度を示すデータも角速度検出ユニット9のマイコン94に与えられる。そして、マイコン94は、プラグ93およびコネクタ73を介して、加速度センサ762が検出した加速度を示すデータを通信部75に出力する。
A
次に、ゲーム装置本体5が行う具体的な処理を説明する前に、図19および図20を用いてゲーム装置本体5で行う処理の概要について説明する。なお、図19は、サブユニット76が接続された入力装置6を右へ傾けて操作した場合にモニタ2に表示されるゲーム画面の一例を示す図である。図20は、サブユニット76が接続された入力装置6を上方へ平行移動させて動かして操作した場合にモニタ2に表示されるゲーム画面の一例を示す図である。
Next, before describing specific processing performed by the
図19および図20において、モニタ2には、仮想ゲーム空間においてパーソナルウォータークラフト(水上オートバイ)を操縦するプレイヤキャラクタPCが表示されている。ここで、パーソナルウォータークラフトは、操縦者によって操縦され、水面を滑走しながら航走する小型舟艇である。そして、図19および図20に示される仮想ゲーム空間におけるパーソナルウォータークラフトにおいては、入力装置6を操作するプレイヤが入力装置6自体(コントローラ7およびサブユニット76)を同じ方向に傾けたり動かしたりすることによって、プレイヤキャラクタPCが操作するパーソナルウォータークラフトを旋回させたりジャンプさせたりすることができる。典型的には、プレイヤは、コントローラ7を右手に把持しサブユニット76を左手に把持して、あたかもパーソナルウォータークラフトのハンドルバーを両手で操縦するように操作する。
19 and 20, the
具体的には、図19に示すように、プレイヤがコントローラ7およびサブユニット76を共に右へ傾けて操作した場合、プレイヤキャラクタPCは、仮想ゲーム空間において水面上を右へ旋回してパーソナルウォータークラフトを航走する。また、図20に示すように、プレイヤがコントローラ7およびサブユニット76を共に上方へ平行移動させて動かして操作した場合、プレイヤキャラクタPCは、仮想ゲーム空間において水面から上方へジャンプするようにパーソナルウォータークラフトを航走する。
Specifically, as shown in FIG. 19, when the player operates the
次に、ゲームシステム1において行われるゲーム処理の詳細を説明する。まず、図21を参照して、ゲーム処理において用いられる主なデータについて説明する。なお、図21は、ゲーム装置本体5のメインメモリに記憶される主なデータおよびプログラムの一例を示す図である。
Next, the details of the game process performed in the
図21に示すように、メインメモリのデータ記憶領域には、角速度データDa、加速度データDb、前回加速度データDc、一時的な信用度データDd、信用度データDe、前回信用度データDf、重力加速度データDg、前回重力加速度データDh、補正度合値データDi、前回補正度合値データDj、平行移動加速度データDk、および画像データDlに加えて、サブ加速度データDm、前回サブ加速度データDn、一時的なサブ信用度データDo、サブ信用度データDp、前回サブ信用度データDq、サブ重力加速度データDr、および前回サブ重力加速度データDs等が記憶される。なお、メインメモリには、図21に示すデータの他、ゲームに登場する各種オブジェクトの画像データや、オブジェクトの各種パラメータを示すデータ等、ゲーム処理に必要なデータが記憶される。また、メインメモリのプログラム記憶領域には、ゲームプログラムを構成する各種プログラム群Paが記憶される。各種プログラム群Paは、ゲーム装置本体5に電源が投入された後の適宜のタイミングで光ディスク4やその他の記録媒体からその一部または全部が読み込まれてメインメモリに記憶される。
As shown in FIG. 21, the data storage area of the main memory includes angular velocity data Da, acceleration data Db, previous acceleration data Dc, temporary reliability data Dd, reliability data De, previous reliability data Df, gravity acceleration data Dg, In addition to the previous gravitational acceleration data Dh, the correction degree value data Di, the previous correction degree value data Dj, the parallel movement acceleration data Dk, and the image data Dl, the sub acceleration data Dm, the previous sub acceleration data Dn, and the temporary sub reliability data Do, sub reliability data Dp, previous sub reliability data Dq, sub gravity acceleration data Dr, previous sub gravity acceleration data Ds, and the like are stored. In addition to the data shown in FIG. 21, the main memory stores data necessary for the game process, such as image data of various objects appearing in the game and data indicating various parameters of the object. Various program groups Pa constituting the game program are stored in the program storage area of the main memory. Various program groups Pa are partially or entirely read from the optical disc 4 and other recording media and stored in the main memory at an appropriate timing after the
メインメモリのデータ記憶領域に記憶される角速度データDa、加速度データDb、前回加速度データDc、一時的な信用度データDd、信用度データDe、前回信用度データDf、重力加速度データDg、前回重力加速度データDh、補正度合値データDi、前回補正度合値データDj、平行移動加速度データDk、および画像データDlについては、第1の実施形態で説明したデータと同様であるため、詳細な説明を省略する。以下、第2の実施形態において加えられているサブ加速度データDm、前回サブ加速度データDn、一時的なサブ信用度データDo、サブ信用度データDp、前回サブ信用度データDq、サブ重力加速度データDr、および前回サブ重力加速度データDsについて説明する。 Angular velocity data Da, acceleration data Db, previous acceleration data Dc, temporary reliability data Dd, reliability data De, previous reliability data Df, gravity acceleration data Dg, previous gravity acceleration data Dh, stored in the data storage area of the main memory Since the correction degree value data Di, the previous correction degree value data Dj, the parallel movement acceleration data Dk, and the image data Dl are the same as the data described in the first embodiment, detailed description thereof is omitted. Hereinafter, the sub acceleration data Dm, the previous sub acceleration data Dn, the temporary sub reliability data Do, the sub reliability data Dp, the previous sub reliability data Dq, the sub gravity acceleration data Dr added in the second embodiment, and the previous The sub gravity acceleration data Ds will be described.
サブ加速度データDmは、サブユニット76に生じた加速度を示すデータであり、サブユニット76からコントローラ7を介して送信データとして送信されてくる一連の操作情報に含まれる加速度データ(サブ加速度データ)が格納される。このサブ加速度データDmには、加速度センサ762がX軸成分に対して検出した加速度asxを示すX軸方向加速度データDm1、Y軸成分に対して検出した加速度asyを示すY軸方向加速度データDm2、およびZ軸成分に対して検出した加速度aszを示すZ軸方向加速度データDm3が含まれる。なお、サブ加速度データDmが更新される周期については、上述した加速度データDbと同様であるため、詳細な説明を省略する。
The sub-acceleration data Dm is data indicating the acceleration generated in the
前回サブ加速度データDnは、前回の処理において用いられたサブ加速度データが格納される。具体的には、前回サブ加速度データDnには、前回の処理において用いられたサブユニット76のX軸成分の加速度as0xを示すX軸方向加速度データDn1、前回の処理において用いられたサブユニット76のY軸成分の加速度as0yを示すY軸方向加速度データDn2、および前回の処理において用いられたサブユニット76のZ軸成分の加速度as0zを示すZ軸方向加速度データDn3が含まれる。
The previous sub acceleration data Dn stores the sub acceleration data used in the previous process. Specifically, the previous sub-acceleration data Dn includes X-axis direction acceleration data Dn1 indicating the acceleration as0x of the X-axis component of the
一時的なサブ信用度データDoは、サブユニット76に作用する重力加速度を推定する際に、サブユニット76に作用している加速度が重力加速度として信用できるものなのか否かを表す信用度を一時的に示す(一時的なサブ信用度ds)データが格納される。なお、一時的なサブ信用度データDoに格納されたデータが示す一時的な信用度(一時的なサブ信用度ds)が、本発明における仮信用度の一例に相当する。サブ信用度データDpは、サブユニット76に作用している加速度が重力加速度として信用できるものなのか否かを表す最終的な信用度(サブ信用度ts)を示すデータが格納される。なお、サブ信用度データDpに格納されたデータが示す最終的な信用度(サブ信用度ts)が、本発明における信用度の一例に相当する。前回サブ信用度データDqは、前回の処理において用いられた最終的な信用度(サブ信用度ts0)を示すデータが格納される。
Temporary sub-credibility data Do temporarily indicates the reliability indicating whether or not the acceleration acting on the
サブ重力加速度データDrは、サブユニット76に作用していると推定される重力加速度を示すデータが格納される。具体的には、サブ重力加速度データDrには、サブユニット76に作用していると推定される重力加速度の大きさおよび方向を示すサブ重力加速度ベクトルgsを示すデータが格納される。前回サブ重力加速度データDsは、前回の処理においてサブユニット76に作用していると推定された重力加速度ベクトル(サブ重力加速度ベクトルgs0)を示すデータが格納される。
The sub gravitational acceleration data Dr stores data indicating gravitational acceleration estimated to be acting on the
次に、図22および図23を参照して、第2の実施形態においてゲーム装置本体5において行われるゲーム処理の詳細を説明する。なお、図22は、第2の実施形態においてゲーム装置本体5において実行されるゲーム処理の一例を示すフローチャートである。図23は、図22におけるステップ104のサブ重力加速度更新処理の一例を示すサブルーチンである。なお、図22および図23では、CPU10が実行する各ステップを「S」と略称する。
Next, with reference to FIG. 22 and FIG. 23, the details of the game processing performed in the
図21において、CPU10は、ゲーム処理の初期処理を行い(ステップ100)、次のステップに処理を進める。例えば、上記ステップ100における初期処理では、CPU10は、以降のゲーム処理を行うための各パラメータの初期設定を行う。具体的には、CPU10は、角速度データDa、加速度データDb、前回加速度データDc、一時的な信用度データDd、信用度データDe、前回信用度データDf、重力加速度データDg、前回重力加速度データDh、補正度合値データDi、前回補正度合値データDj、平行移動加速度データDk、サブ加速度データDm、前回サブ加速度データDn、一時的なサブ信用度データDo、サブ信用度データDp、前回サブ信用度データDq、サブ重力加速度データDr、および前回サブ重力加速度データDsに格納されているデータが示す値を、それぞれ初期値(例えば、0)に設定する。
In FIG. 21, the CPU 10 performs an initial process of the game process (step 100), and proceeds to the next step. For example, in the initial processing in
次に、CPU10は、入力装置6から角速度を示すデータを取得して(ステップ101)、次のステップに処理を進める。なお、上記ステップ101で行う処理は、上述したステップ41の処理と同様であるため、詳細な説明を省略する。 Next, the CPU 10 acquires data indicating the angular velocity from the input device 6 (step 101), and proceeds to the next step. Note that the processing performed in step 101 is the same as the processing in step 41 described above, and thus detailed description thereof is omitted.
次に、CPU10は、コントローラ7およびサブユニット76からそれぞれ加速度を示すデータを取得して(ステップ102)、次のステップに処理を進める。例えば、CPU10は、入力装置6(コントローラ7)から受信した操作情報を取得し、加速度センサ701から得られる最新の加速度データが示す加速度を用いて上記ステップ42と同様に加速度データDbに格納する。また、CPU10は、入力装置6(コントローラ7)から受信した操作情報を取得し、加速度センサ762から得られる最新の加速度データが示す加速度を用いてサブ加速度データDmに格納する。具体的には、CPU10は、サブユニット76から受信した最新の操作情報に含まれるサブユニット76のX軸方向の加速度データが示す加速度asxを用いて、X軸方向加速度データDm1を更新する。また、CPU10は、最新の操作情報に含まれるサブユニット76のY軸方向の加速度データが示す加速度asyを用いて、Y軸方向加速度データDm2を更新する。そして、CPU10は、最新の操作情報に含まれるサブユニット76のZ軸方向の加速度データが示す加速度aszを用いて、Z軸方向加速度データDm3を更新する。
Next, the CPU 10 acquires data indicating acceleration from the
次に、CPU10は、重力加速度更新処理を行い(ステップ103)、次のステップに処理を進める。なお、上記ステップ103で行う重力加速度更新処理は、上述したステップ43で行う重力加速度更新処理と同様であるため、詳細な説明を省略する。
Next, the CPU 10 performs a gravitational acceleration update process (step 103), and proceeds to the next step. The gravitational acceleration update process performed in step 103 is the same as the gravitational acceleration update process performed in
次に、CPU10は、サブ重力加速度更新処理を行い(ステップ104)、次のステップに処理を進める。以下、図23を参照して、上記ステップ104で行うサブ重力加速度更新処理について説明する。
Next, the CPU 10 performs a sub-gravity acceleration update process (step 104), and proceeds to the next step. Hereinafter, with reference to FIG. 23, the sub-gravity acceleration update process performed in
図23において、CPU10は、一時的なサブ信用度dsを算出し、算出された一時的なサブ信用度dsを用いて一時的なサブ信用度データDoを更新して(ステップ121)、次のステップに処理を進める。ここで、当該サブ重力加速度更新処理においても、現時点でサブユニット76に作用している加速度と、前回の処理において得られたサブユニット76の加速度との差分が一定値以下の場合、すなわち加速度変化が閾値以下の場合、現時点でサブユニット76に作用している加速度が重力加速度であると推定する方法を用いている。そして、一時的なサブ信用度dsは、サブユニット76に作用する重力加速度を推定する際に、現時点でサブユニット76に作用している加速度が重力加速度としてどれくらい信用できるものなのかを示す度合を、算出の過程において一時的に示すパラメータである。例えば、一時的なサブ信用度ds=1の場合、現時点でサブユニット76に作用している加速度が重力加速度として完全に信用できることを示す。一方、一時的なサブ信用度ds=0の場合、現時点でサブユニット76に作用している加速度が重力加速度として全く信用できないことを示す。
In FIG. 23, the CPU 10 calculates a temporary sub-credibility ds, updates the temporary sub-credibility data Do using the calculated temporary sub-credibility ds (step 121), and processes to the next step. To proceed. Here, also in the sub-gravity acceleration update processing, when the difference between the acceleration acting on the
具体的には、一時的なサブ信用度dsは、一時的な信用度dと同様に
ds=1−(|as−as0|−asdmin)/(asdmax−asdmin) …(5)
で算出される。ここで、asは、現時点でサブユニット76に作用している加速度の大きさを示し、サブ加速度データDmを参照して算出される。as0は、前回の処理において用いられたサブユニット76の加速度の大きさを示し、前回サブ加速度データDnを参照して算出される。asdmaxは、予め定められた定数であり、加速度の大きさasと加速度の大きさas0との差分において、当該差分が定数asdmax以上の場合に現時点でサブユニット76に作用している加速度が重力加速度として全く信用できないものとする値である。asdminは、予め定められた定数であり、加速度の大きさasと加速度の大きさas0との差分において、当該差分が定数asdmin以下の場合に現時点でサブユニット76に作用している加速度が重力加速度として完全に信用できるものとする値である。このように、上記数式(5)によって一時的なサブ信用度dsを算出することによって、サブユニット76の加速度の変化量|as−as0|が小さければ一時的なサブ信用度dsが1に近づくため、現時点でサブユニット76に作用している加速度を重力加速度として信用できることを、一時的なサブ信用度dsの値によって示すことができる。一方、サブユニット76の加速度の変化量|as−as0|が大きければ一時的なサブ信用度dsが0に近づくため、現時点でサブユニット76に作用している加速度を重力加速度として信用できないことを、一時的なサブ信用度dsの値によって示すことができる。
Specifically, the temporary sub-credibility ds is the same as the temporary reliability d ds = 1− (| as−as0 | −asdmin) / (asdmax−asdmin) (5)
Is calculated by Here, as indicates the magnitude of the acceleration acting on the
なお、上記数式(5)における加速度の変化量|as−as0|は、ゲーム処理周期である1フレーム毎にそれぞれ更新されるサブ加速度データDmを用いる場合、当該ゲーム処理周期を単位時間とした変化量となるが、他の周期を単位時間とした変化量であってもかまわない。一例として、コントローラ7を介してサブユニット76から操作情報が送信される周期(例えば、1/200秒毎)を単位時間として、加速度の変化量|as−as0|を算出してもかまわない。この場合、加速度の変化量|as−as0|は、コントローラ7を介してサブユニット76から操作情報が送信される周期(例えば、1/200秒)毎の変化量となり、ゲーム処理周期である1フレーム毎よりも短い時間を単位時間とした変化量とすることができる。他の例として、国際単位系の基本単位(例えば、1秒)を単位時間として、加速度の変化量|as−as0|を算出してもかまわない。この場合、加速度の変化量|as−as0|は、国際単位系の基本単位(例えば、1秒)毎の変化量となり、ゲーム処理周期である1フレーム毎よりも長い時間を単位時間とした変化量とすることができる。
Note that the acceleration change amount | as−as0 | in the above equation (5) changes when the sub-acceleration data Dm updated for each frame, which is a game processing cycle, is used, with the game processing cycle as a unit time. Although it is a quantity, it may be a change quantity with another period as a unit time. As an example, the acceleration change amount | as-as0 | may be calculated using a period (for example, every 1/200 second) in which operation information is transmitted from the
次に、CPU10は、上記ステップ121で算出された一時的なサブ信用度dsが1より大きいか否かを判断する(ステップ122)。そして、CPU10は、一時的なサブ信用度dsが1より大きい場合、次のステップ123に処理を進める。一方、CPU10は、一時的なサブ信用度dsが1以下の場合、次のステップ124に処理を進める。
Next, the CPU 10 determines whether or not the temporary sub-credibility ds calculated in
ステップ123において、CPU10は、一時的なサブ信用度dsを1に設定し、設定された一時的なサブ信用度dsを用いて一時的なサブ信用度データDoを更新して、次のステップ126に処理を進める。つまり、一時的なサブ信用度dsの値が1より大きい場合、当該値が1に丸められることになる。 In step 123, the CPU 10 sets the temporary sub-credibility ds to 1, updates the temporary sub-credibility data Do using the set temporary sub-credibility ds, and proceeds to the next step 126. Proceed. That is, when the value of temporary sub-credibility ds is larger than 1, the value is rounded to 1.
一方、一時的なサブ信用度dsが1以下の場合、ステップ124において、CPU10は、上記ステップ121で算出された一時的なサブ信用度dsが0より小さいか否かを判断する。そして、CPU10は、一時的なサブ信用度dsが0より小さい場合、次のステップ125に処理を進める。一方、CPU10は、一時的なサブ信用度dsが0以上の場合、次のステップ126に処理を進める。
On the other hand, if the temporary sub-credibility ds is 1 or less, in
ステップ125において、CPU10は、一時的なサブ信用度dsを0に設定し、設定された一時的なサブ信用度dsを用いて一時的なサブ信用度データDoを更新して、次のステップ126に処理を進める。つまり、一時的なサブ信用度dsの値が0より小さい場合、当該値が0に丸められることになる。 In step 125, the CPU 10 sets the temporary sub-credibility ds to 0, updates the temporary sub-credibility data Do using the set temporary sub-credibility ds, and proceeds to the next step 126. Proceed. That is, when the value of temporary sub-credibility ds is smaller than 0, the value is rounded to 0.
ステップ126において、CPU10は、前回サブ信用度データDqを参照して、上記ステップ121で算出された一時的なサブ信用度dsが前回算出されたサブ信用度ts0より大きいか否かを判断する。そして、CPU10は、一時的なサブ信用度dsが前回算出されたサブ信用度ts0より大きい場合(すなわち、ts0<dsの場合)、次のステップ127に処理を進める。一方、CPU10は、一時的なサブ信用度dsが前回算出されたサブ信用度ts0以下の場合(すなわち、ds≦ts0の場合)、次のステップ128に処理を進める。
In step 126, the CPU 10 refers to the previous sub-credibility data Dq and determines whether or not the temporary sub-credibility ds calculated in
ステップ127において、CPU10は、前回サブ信用度データDqが示す前回のサブ信用度ts0および上記ステップ121で算出された一時的なサブ信用度dsを用いて、最終的なサブ信用度tsを算出し、次のステップ129に処理を進める。具体的には、CPU10は、最終的なサブ信用度tsを
ts=ts0*Ts+(1−Ts)*ds …(6)
で算出し、算出されたサブ信用度tsを用いて、サブ信用度データDpを更新する。ここで、Tsは、0<Ts<1を満たす予め定められた定数である。上記数式(6)から明らかなように、定数Tsの大きさに応じて、前回のサブ信用度ts0に対してサブ信用度tsが更新される速さを調整することができ、定数Tsの大きさが大きいほどサブ信用度tsが変化する速度が遅くなる。
In step 127, the CPU 10 calculates the final sub-credibility ts using the previous sub-credit ts0 indicated by the previous sub-credibility data Dq and the temporary sub-credibility ds calculated in
And the sub-credibility data Dp is updated using the calculated sub-credibility ts. Here, Ts is a predetermined constant that satisfies 0 <Ts <1. As is clear from the above formula (6), the speed at which the sub-credit ts is updated with respect to the previous sub-credit ts0 can be adjusted according to the magnitude of the constant Ts. The greater the value, the slower the sub-credibility ts changes.
一方、ステップ128において、CPU10は、上記ステップ121で算出された一時的なサブ信用度dsを用いて最終的なサブ信用度tsを更新し、更新された最終的なサブ信用度tsを用いてサブ信用度データDSpを更新して、次のステップ129に処理を進める。
On the other hand, in
上記ステップ126〜ステップ128の処理から明らかなように、一時的なサブ信用度dsが前回算出されたサブ信用度ts0より低く(小さく)なった場合は、一時的なサブ信用度dsが最終的なサブ信用度tsに即時に反映される。一方、一時的なサブ信用度dsが前回算出されたサブ信用度ts0より高く(大きく)なった場合は、一時的なサブ信用度dsが最終的なサブ信用度tsに即時に反映されずに、最終的なサブ信用度tsが変化する速度が遅くなる。すなわち、一時的なサブ信用度dsが前回算出されたサブ信用度ts0より高く(大きく)なった場合、最終的なサブ信用度tsは、前回のサブ信用度ts0と一時的なサブ信用度dsとの間の値となり、前回のサブ信用度ts0に対する値の増加が抑制される。つまり、今回の処理で算出する最終的なサブ信用度tsが、前回の処理で設定された最終的なサブ信用度ts0より高くなるときには高くなりにくく、前回の処理で設定された最終的なサブ信用度ts0より低くなるときには低くなりやすくなることになる。ここで、サブユニット76に搭載されている加速度センサの特性では、サブユニット76の動きを止めた際にその慣性で生じる加速度が前回の得られた加速度から徐々に減少する方向に変化していき、当該加速度の差分がそれほど大きい値にならない。したがって、算出された一時的なサブ信用度dsをサブ信用度tsに即座に反映させると、上記慣性により生じている加速度を安定した加速度(重力加速度)として扱ってしまうことがある。このような誤認識を回避するために、一時的なサブ信用度dsが前回算出されたサブ信用度ts0より高く変化した際には、前回のサブ信用度ts0から徐々に変化するように更新する。また、逆に一時的なサブ信用度dsが前回算出されたサブ信用度ts0より低く変化した際には算出された一時的なサブ信用度dsを信用度tsに即座に反応させるようにしている。
As is apparent from the processing in steps 126 to 128, when the temporary sub-credibility ds is lower (smaller) than the previously calculated sub-credit ts0, the temporary sub-credibility ds becomes the final sub-credibility. Immediately reflected in ts. On the other hand, if the temporary sub-credibility ds is higher (larger) than the previously calculated sub-credit ts0, the temporary sub-credibility ds is not immediately reflected in the final sub-credit ts, but the final The speed at which the sub-credibility ts changes becomes slow. That is, when the temporary sub-credibility ds is higher (larger) than the previously calculated sub-credit ts0, the final sub-credit ts is a value between the previous sub-credit ts0 and the temporary sub-credit ds0. Thus, an increase in value with respect to the previous sub-credibility ts0 is suppressed. That is, when the final sub-credibility ts calculated in the current process is higher than the final sub-credibility ts0 set in the previous process, the final sub-credit ts0 set in the previous process is less likely to increase. When it becomes lower, it tends to be lower. Here, in the characteristics of the acceleration sensor mounted on the
ステップ129において、CPU10は、サブ信用度データDpが示す最終的なサブ信用度tsに基づいて、重力加速度を算出し、当該サブルーチンによる処理を終了する。例えば、CPU10は、サブ信用度データDpに格納されているサブ信用度tsとサブ加速度データDmに格納されている加速度asx、asy、およびaszとを用いて、サブ重力加速度ベクトルgsを算出し、算出されたサブ重力加速度ベクトルgsを用いてサブ重力加速度データDrを更新する。具体的には、サブ重力加速度ベクトルgsは、
gs=asn*ts+gs0*(1−ts) …(7)
で算出されたベクトルを、重力の長さ(例えば、1)に正規化することによって算出される。ここで、asnは、現時点でサブユニット76に生じている加速度ベクトル(asx,asy,asz)を正規化(例えば、長さ1に正規化)したベクトルである。また、gs0は、前回の処理において算出されたサブ重力加速度ベクトルgsであり、前回サブ重力加速度データDsに格納されているサブ重力加速度ベクトルgs0である。この数式(7)によって、サブ重力加速度ベクトルgsは、現時点でサブユニット76における加速度ベクトルasおよび前回算出されたサブ重力加速度ベクトルgs0が、サブ信用度tsの割合で線形補間されたベクトルとなる。
In step 129, the CPU 10 calculates the gravitational acceleration based on the final sub-credibility ts indicated by the sub-credibility data Dp, and ends the processing by the subroutine. For example, the CPU 10 calculates the sub-gravity acceleration vector gs using the sub-credibility ts stored in the sub-credibility data Dp and the accelerations asx, asy, and asz stored in the sub-acceleration data Dm. The sub gravity acceleration data Dr is updated using the sub gravity acceleration vector gs. Specifically, the sub gravitational acceleration vector gs is
gs = asn * ts + gs0 * (1-ts) (7)
Is calculated by normalizing the vector calculated in
ここで、上述した説明から明らかなように、サブ信用度tsは、加速度の変化量|as−as0|が相対的に小さければ相対的に大きな値となり(具体的には1に近づく)、加速度の変化量|as−as0|が相対的に大きければ相対的に小さな値となる(具体的には0に近づく)。つまり、上記数式(7)によれば、加速度の変化量|as−as0|が相対的に小さいほど、前回の処理において算出した重力方向(前回算出されたサブ重力加速度ベクトルgs0)を現時点の加速度ベクトルasを用いて修正する割合(度合)を相対的に大きくして、今回の処理における重力方向(サブ重力加速度ベクトルgs)を算出することになる。なお、上記数式(7)では、加速度の変化量|as−as0|に応じて、前回の処理において算出した重力方向を現時点の加速度ベクトルasを用いて修正する割合(度合)を調整しているが、他の数値を用いて調整してもかまわない。例えば、加速度の変化量|as−as0|に応じて、前回の処理において算出した重力方向を現時点の加速度ベクトルasを用いて修正する絶対量(修正量)を調整してもかまわない。この場合、加速度の変化量|as−as0|が相対的に小さいほど、前回の処理において算出した重力方向(前回算出されたサブ重力加速度ベクトルgs0)を現時点の加速度ベクトルasを用いて修正する絶対量を相対的に大きくして、今回の処理における重力方向(サブ重力加速度ベクトルgs)を算出することになる。 Here, as is clear from the above description, the sub-credibility ts becomes a relatively large value (specifically, approaches 1) if the acceleration change amount | as-as0 | If the change amount | as-as0 | is relatively large, the value becomes relatively small (specifically, it approaches 0). That is, according to the above equation (7), the smaller the acceleration change amount | as−as0 |, the more the gravitational direction calculated in the previous process (the sub gravitational acceleration vector gs0 calculated in the previous process) the current acceleration. The gravitational direction (sub-gravity acceleration vector gs) in the current process is calculated by relatively increasing the correction ratio (degree) using the vector as. In the above formula (7), the rate (degree) of correcting the gravity direction calculated in the previous process using the current acceleration vector as is adjusted according to the acceleration change amount | as-as0 |. However, it may be adjusted using other numerical values. For example, the absolute amount (correction amount) for correcting the gravity direction calculated in the previous process using the current acceleration vector as may be adjusted according to the change amount of acceleration | as-as0 |. In this case, the smaller the acceleration change amount | as-as0 | is, the more the absolute gravity direction (sub-gravity acceleration vector gs0 calculated last time) calculated in the previous process is corrected using the current acceleration vector as. The amount of gravity is relatively increased, and the gravity direction (sub-gravity acceleration vector gs) in the current process is calculated.
図22に戻り、上記ステップ104のサブ重力加速度更新処理の後、CPU10は、ステップ105〜ステップ107の処理を行って、次のステップ108に処理を進める。なお、上記ステップ105〜ステップ107で行う処理については、上述したステップ44〜ステップ46の処理と同様であるため、詳細な説明を省略する。
Returning to FIG. 22, after the sub-gravity acceleration update process of
ステップ108において、CPU10は、平行移動加速度とサブユニット76に生じている加速度とを比較し、次のステップに処理を進める。例えば、CPU10は、上記ステップ107で算出された平行移動加速度の大きさ(すなわち、コントローラ7が平行移動することによって生じている加速度の大きさ)とサブユニット76に生じている加速度から重力加速度を減じた加速度の大きさ(すなわち、重力以外でサブユニット76に生じている加速度の大きさ)とを比較する。具体的には、CPU10は、平行移動加速度データDkが示す平行移動加速度ベクトルpの大きさを平行移動加速度の大きさとして算出する。また、CPU10は、サブ加速度データDmが示す現時点でサブユニット76に生じている加速度ベクトル(asx,asy,asz)から、サブ重力加速度データDrが示すサブ重力加速度ベクトルgs0を減算したベクトルの大きさを、重力以外でサブユニット76に生じている加速度の大きさとして算出する。
In
次に、CPU10は、重力以外でサブユニット76に生じている加速度の大きさが平行移動加速度の大きさより大きいか否かを判断する(ステップ109)。そして、CPU10は、重力以外でサブユニット76に生じている加速度の大きさが平行移動加速度の大きさより大きい場合、次のステップ110に処理を進める。一方、CPU10は、重力以外でサブユニット76に生じている加速度の大きさが平行移動加速度の大きさ以下の場合、次のステップ111に処理を進める。
Next, the CPU 10 determines whether or not the magnitude of the acceleration generated in the
ステップ110において、CPU10は、平行移動加速度データDkが示す平行移動加速度ベクトルpと角速度データDaが示す角速度ωx、ωy、およびωzとを用いて、ゲーム処理を行い、次のステップ112に処理を進める。例えば、CPU10は、平行移動加速度ベクトルpと角速度ωx、ωy、およびωzとを用いて、プレイヤキャラクタPCの動作を制御する。
In step 110, the CPU 10 performs a game process using the translation acceleration vector p indicated by the translation acceleration data Dk and the angular velocities ωx, ωy, and ωz indicated by the angular velocity data Da, and proceeds to the
具体的には、CPU10は、入力装置6(コントローラ7)の姿勢に応じて、プレイヤキャラクタPCの移動方向を算出する。例えば、入力装置6が左または右に傾けられた姿勢であることを角速度ωx、ωy、およびωzが示す場合、入力装置6の姿勢(例えば、傾き角度)に応じて、入力装置6が傾いている方向へプレイヤキャラクタPCが操縦するパーソナルウォータークラフトを旋回させる(図19参照)。また、入力装置6が水平に維持された姿勢であることを角速度ωx、ωy、およびωzが示す場合、プレイヤキャラクタPCが操縦するパーソナルウォータークラフトを直進させる。入力装置6の姿勢(角度)は、角速度ωx、ωy、およびωzを用いて算出することが可能であり、角速度ωx、ωy、およびωzから入力装置6の姿勢(角度)を算出する方法はどのような方法であってもよい。 Specifically, the CPU 10 calculates the moving direction of the player character PC according to the attitude of the input device 6 (controller 7). For example, when the angular velocities ωx, ωy, and ωz indicate that the input device 6 is tilted to the left or right, the input device 6 is tilted according to the posture of the input device 6 (for example, the tilt angle). The personal watercraft operated by the player character PC is turned in the direction in which the player character PC is operated (see FIG. 19). Further, when the angular velocities ωx, ωy, and ωz indicate that the input device 6 is maintained in a horizontal posture, the personal watercraft that the player character PC is maneuvering is made to go straight. The posture (angle) of the input device 6 can be calculated using the angular velocities ωx, ωy, and ωz. Which method is used to calculate the posture (angle) of the input device 6 from the angular velocities ωx, ωy, and ωz? Such a method may be used.
また、CPU10は、平行移動加速度ベクトルpが所定値以上の大きさでコントローラ7の上方を示している場合、平行移動加速度ベクトルpの大きさの応じてプレイヤキャラクタPCが操縦するパーソナルウォータークラフトをジャンプさせる(図20参照)。平行移動加速度ベクトルpの実空間内における方向は、どのような方法で算出されてもよい。一例として、現時点で重力加速度が生じている方向(重力加速度ベクトルgの方向)が実空間における鉛直方向とし、当該鉛直方向を基準として、平行移動加速度ベクトルpの実空間内における方向を算出する。他の例として、後述する入力装置6の姿勢を基準として、平行移動加速度ベクトルpの実空間内における方向を算出する。
Further, the CPU 10 jumps the personal watercraft operated by the player character PC according to the magnitude of the parallel movement acceleration vector p when the parallel movement acceleration vector p is larger than a predetermined value and indicates the upper side of the
ここで、上記ステップ110のゲーム処理は、重力以外でサブユニット76に生じている加速度の大きさが平行移動加速度の大きさより大きい場合に行われる処理である。また、上記ステップ110のゲーム処理では、サブユニット76に生じている加速度がプレイヤキャラクタPCの動作制御に用いられていない。したがって、プレイヤがサブユニット76のみを振り動かしたとしても、プレイヤキャラクタPCを操作することはできない。つまり、入力装置6を操作するプレイヤは、プレイヤキャラクタPCを操作するために、サブユニット76だけでなくコントローラ7自体を少なくとも動かすような操作が求められることになる。
Here, the game process of step 110 is a process performed when the magnitude of the acceleration generated in the
一方、ステップ111において、CPU10は、重力以外でサブユニット76に生じている加速度と角速度データDaが示す角速度ωx、ωy、およびωzとを用いて、ゲーム処理を行い、次のステップ112に処理を進める。例えば、CPU10は、重力以外でサブユニット76に生じている加速度と角速度ωx、ωy、およびωzとを用いて、プレイヤキャラクタPCの動作を制御する。
On the other hand, in step 111, the CPU 10 performs a game process using acceleration generated in the
具体的には、上記ステップ110と同様に、CPU10は、入力装置6(コントローラ7)の姿勢(角速度ωx、ωy、およびωz)に応じて、プレイヤキャラクタPCの移動方向を算出する。また、CPU10は、重力以外でサブユニット76に生じている加速度が所定値以上の大きさでサブユニット76の上方を示している場合、当該加速度の大きさに応じてプレイヤキャラクタPCが操縦するパーソナルウォータークラフトをジャンプさせる(図20参照)。重力以外でサブユニット76に生じている加速度の実空間内における方向は、どのような方法で算出されてもよい。一例として、現時点でサブユニット76に重力加速度が生じている方向(サブ重力加速度ベクトルgsの方向)が実空間における鉛直方向とし、当該鉛直方向を基準として、重力以外でサブユニット76に生じている加速度の実空間内における方向を算出する。
Specifically, as in step 110 described above, the CPU 10 calculates the moving direction of the player character PC according to the posture (angular velocities ωx, ωy, and ωz) of the input device 6 (controller 7). Further, when the acceleration generated in the
ここで、上記ステップ111のゲーム処理は、重力以外でサブユニット76に生じている加速度の大きさが平行移動加速度の大きさ以下の場合に行われる処理である。また、上記ステップ111のゲーム処理では、コントローラ7に生じている加速度がプレイヤキャラクタPCの動作制御に用いられていない。したがって、プレイヤがコントローラ7のみを振り動かしたとしても、プレイヤキャラクタPCが操縦するパーソナルウォータークラフトをジャンプさせることはできない。つまり、入力装置6を操作するプレイヤは、パーソナルウォータークラフトをジャンプさせるために、コントローラ7だけでなくサブユニット76を少なくとも動かすような操作が求められることになる。上記ステップ110のゲーム処理と上記ステップ110のゲーム処理から明らかなように、入力装置6を操作するプレイヤがプレイヤキャラクタPCを操作するためには、コントローラ7およびサブユニット76の一方を操作するだけではプレイヤ所望の操作ができないため、結果的にコントローラ7およびサブユニット76を共に動かすような操作が求められることになる。
Here, the game process in step 111 is a process performed when the magnitude of the acceleration generated in the
なお、上述した処理では、サブユニット76に生じている加速度から重力加速度成分を減じた加速度を用いてゲーム処理されているが、ゲーム処理に用いられる加速度にサブユニット76を傾けることによって生じる加速度成分も含まれている。一方、コントローラ7に生じている加速度は、重力加速度成分と共にコントローラ7を傾けることによって生じている加速度成分も減じた状態でゲーム処理に用いられている。したがって、プレイヤがコントローラ7およびサブユニット76を共に把持した状態で同じような操作をしている場合は、常にコントローラ7から得られた加速度に基づいてゲーム処理されることになる。
In the processing described above, the game processing is performed using the acceleration obtained by subtracting the gravitational acceleration component from the acceleration generated in the
ステップ112において、CPU10は、上記ステップ101〜ステップ108の処理によって算出されたパラメータを用いて前回のパラメータを更新して、次のステップに処理を進める。具体的には、CPU10は、上記ステップ48と同様に、前回加速度データDc、前回信用度データDf、前回重力加速度データDh、および前回補正度合値データDjを更新する。また、CPU10は、サブ加速度データDmが示す加速度asx、asy、およびaszを用いて加速度as0x、as0y、およびas0zをそれぞれ更新し、更新された加速度as0x、as0y、およびas0zを用いて前回サブ加速度データDnを更新する。CPU10は、サブ信用度データDpが示すサブ信用度tsを用いて前回のサブ信用度ts0を更新し、更新されたサブ信用度ts0を用いて前回サブ信用度データDqを更新する。そして、CPU10は、サブ重力加速度データDrが示すサブ重力加速度ベクトルgsを用いて前回のサブ重力加速度ベクトルgs0を更新し、更新されたサブ重力加速度ベクトルgs0を用いて前回サブ重力加速度データDsを更新する。
In
次に、CPU10は、ゲームを終了するか否かを判断する(ステップ113)。ゲームを終了する条件としては、例えば、ステップ110またはステップ111でゲーム処理されているゲームがゲームオーバーとなる条件が満たされたことや、プレイヤが当該ゲームを終了する操作を行ったこと等がある。CPU10は、ゲームを終了しない場合、上記ステップ101に戻って処理を繰り返す。一方、CPU10は、ゲームを終了する場合、当該フローチャートによる処理を終了する。 Next, the CPU 10 determines whether or not to end the game (step 113). As a condition for ending the game, for example, a condition that the game being processed in step 110 or 111 is game over is satisfied, or that the player has performed an operation to end the game. . CPU10 returns to the said step 101, and repeats a process, when not complete | finishing a game. On the other hand, CPU10 complete | finishes the process by the said flowchart, when complete | finishing a game.
このように、第2の実施形態に係るゲーム処理によれば、コントローラ7とサブユニット76とが接続された形態の入力装置6を用いる場合、コントローラ7においては、3軸方向それぞれに作用している加速度を用いてコントローラ7自体の姿勢や動きを判断するために、コントローラ7に生じている角速度を用いて入力装置6全体の回転を判定し、入力装置6全体が平行移動しているときに生じている加速度を取得している。これによって、上記ゲーム処理では、入力装置6が平行移動することによって得られた加速度を瞬時に判断することができる。したがって、上記ゲーム処理では、コントローラ7とサブユニット76とが接続された形態の入力装置6全体を引き上げたり、入力装置6全体を突き出したりするような平行移動動作を、入力装置6から得られる加速度を用いて正確に認識することができる。
As described above, according to the game process according to the second embodiment, when the input device 6 in the form in which the
また、第2の実施形態に係るゲーム処理によれば、コントローラ7とサブユニット76とが接続された形態の入力装置6を用いる場合、コントローラ7に生じている加速度を示すデータとサブユニット76に生じている加速度を示すデータとを利用可能である。その一方で、角速度を検出する角速度検出ユニット9がコントローラ7にのみ装着されているために、サブユニット76に生じている角速度を直接検出することができない。しかしながら、上記ゲーム処理では、コントローラ7に生じている加速度とサブユニット76に生じている加速度とを比較分析して、何れか一方の加速度をゲーム処理に採用することによって、入力装置6全体が平行移動しているときに生じている加速度を取得してゲーム処理に用いることができる。また、コントローラ7に生じている加速度とサブユニット76に生じている加速度とを比較分析して、加速度の大きさが小さい方の加速度をゲーム処理に採用することによって、コントローラ7およびサブユニット76の一方を操作するだけではプレイヤ所望の操作ができないため、プレイヤにコントローラ7およびサブユニット76を共に動かすような操作が求めることができる。
Further, according to the game processing according to the second embodiment, when the input device 6 in a form in which the
ここで、上記ステップ61〜ステップ67で示すゲーム処理においては、補正度合値fが前回算出された補正度合値f0以上の場合と、補正度合値fが前回算出された補正度合値f0より小さくなった場合とによって、それぞれ異なる方式で補正度合値fを更新している。具体的には、補正度合値fが前回算出された補正度合値f0より小さくなった場合、補正度合値fは、
f←f*S+(1−S)*f0
で求められ、Sは0<S<1を満たす予め定められた定数である。これによって、補正度合値fが前回算出された補正度合値f0より小さくなった場合は、補正度合値fが変化する速度が遅くなることになる。ここで、補正度合値fが前回算出された補正度合値f0より小さくなる場合は、コントローラ7全体の回転速度(角速度)が遅くなる場合である。また、補正度合値fが大きい場合は、以降の処理によってコントローラ7に生じている加速度に、コントローラ7が回転することによって生じている加速度が多く含まれているとみなされる。一方、プレイヤがコントローラ7全体の回転を止めようとした場合、コントローラ7の回転が止めるためのプレイヤの操作が加速度を生じさせるために、コントローラ7の回転が止まった場合でも当該回転を止めるための加速度が残ることがある。このように、補正度合値fが変化する速度を遅くすることによって、コントローラ7の回転を止める際の加速度も抑制して、コントローラ7が平行移動することによる加速度成分を正確に認識することができる。
Here, in the game processing shown in steps 61 to 67, when the correction degree value f is greater than or equal to the previously calculated correction degree value f0, the correction degree value f is smaller than the previously calculated correction degree value f0. Depending on the case, the correction degree value f is updated by different methods. Specifically, when the correction degree value f is smaller than the previously calculated correction degree value f0, the correction degree value f is
f ← f * S + (1-S) * f0
S is a predetermined constant satisfying 0 <S <1. As a result, when the correction degree value f becomes smaller than the previously calculated correction degree value f0, the speed at which the correction degree value f changes becomes slow. Here, the case where the correction degree value f is smaller than the previously calculated correction degree value f0 is a case where the rotation speed (angular speed) of the
しかしながら、上述した効果を期待しない場合は、補正度合値fと前回算出された補正度合値f0との比較結果とは無関係に同じ方式で補正度合値fを更新してもかまわない。例えば、上記ステップ61〜ステップ65で算出された補正度合値fの値が、常にそのまま補正度合値fとして採用されるようにしてもよい。この場合、上記ステップ66およびステップ67の処理が不要となり、前回算出された補正度合値f0をメインメモリに格納することも不要となる。 However, if the effect described above is not expected, the correction degree value f may be updated by the same method regardless of the comparison result between the correction degree value f and the correction degree value f0 calculated last time. For example, the value of the correction degree value f calculated in steps 61 to 65 may be always adopted as the correction degree value f as it is. In this case, the processing of step 66 and step 67 is not necessary, and it is not necessary to store the correction degree value f0 calculated last time in the main memory.
また、コントローラ7とサブユニット76とが接続された形態の入力装置6を用いる場合、角速度検出ユニット9がコントローラ7にのみ装着される例を用いて説明したが、角速度検出ユニット9を装着する態様が異なるものであっても、本発明を適用することができる。第1の例として、角速度検出ユニット9をサブユニット76のみに装着する。この場合、上述した第2の実施形態に係るゲーム処理において、コントローラ7側から得られるデータを用いた処理をサブユニット76側から得られる処理に置き換え、サブユニット76側から得られるデータを用いた処理をコントローラ7側から得られる処理に置き換えれば、同様のゲーム処理が可能となる。第2の例として、2つの角速度検出ユニット9をコントローラ7およびサブユニット76にそれぞれ装着する。この場合、上述した第2の実施形態に係るゲーム処理において、コントローラ7側から得られるデータを用いた処理をサブユニット76側から得られる角速度データの処理にも適用すれば、コントローラ7から得られる加速度およびサブユニット76から得られる加速度を補正する処理をそれぞれ独立して行うことが可能となる。
Further, in the case of using the input device 6 in a form in which the
また、サブユニット76から出力されるデータ(操作部761の操作内容を示すデータ、加速度センサ762が検出した加速度を示すデータ)は、角速度検出ユニット9のマイコン94を介してコントローラ7へ出力されているが、マイコン94を介さずにコントローラ7へ出力されてもかまわない。この場合、サブユニット76から出力されるデータは、接続ケーブル731、コネクタ732、コネクタ97、プラグ93、およびコネクタ73を介して、通信部75に出力されることになる(図18に示す破線のルート)。
Data output from the subunit 76 (data indicating the operation content of the
また、上述した処理においては、加速度センサ701が加速度をそれぞれ検出する複数の軸(XYZ軸)と、角速度検出ユニット9が角速度をそれぞれ検出する複数の回転軸(XYZ軸)とを一致させているが、これらの軸が異なっていてもかまわない。加速度センサ701が加速度をそれぞれ検出する複数の軸と、角速度検出ユニット9が角速度をそれぞれ検出する複数の回転軸とのそれぞれの差を示す角度が予め判明している場合、当該角度を用いて座標変換することができる。一例として、上記差を示す角度を用いて、加速度センサ701が検出した複数の軸方向を基準とした加速度を、上記回転軸を基準とした加速度に座標変換することによって、本発明を実現することができる。他の例として、上記差を示す角度を用いて、角速度検出ユニット9が検出した複数の回転軸を基準とした角速度を、加速度センサ701が加速度をそれぞれ検出する複数の軸を基準とした角速度に座標変換することによって、本発明を実現することができる。また、上述した説明においては、加速度センサ701が加速度をそれぞれ検出する軸(XYZ軸)と、角速度検出ユニット9が角速度をそれぞれ検出する回転軸(XYZ軸)とを、それぞれ3軸としたが、それぞれの軸が1軸または2軸であってもかまわない。
In the above-described processing, a plurality of axes (XYZ axes) for detecting acceleration by the
また、上述した処理では、上記ステップ47、ステップ110、およびステップ111において、補正された加速度がゲーム処理に用いられる例を用いたが、本発明は、補正された加速度を他の装置へ出力する情報処理装置や当該情報処理装置で実行される情報処理プログラムであってもかまわない。この場合、上記ステップ47、ステップ110、およびステップ111を他の装置に加速度データを出力するステップに変更し、当該出力する加速度データを上記ステップ47、ステップ110、およびステップ111のゲーム処理で用いられている加速度を示すデータとすれば、本発明がゲーム処理を実行しない情報処理プログラムおよび情報処理装置として実現することができる。 In the above-described processing, an example is used in which the corrected acceleration is used in the game processing in Step 47, Step 110, and Step 111. However, the present invention outputs the corrected acceleration to another device. It may be an information processing apparatus or an information processing program executed by the information processing apparatus. In this case, step 47, step 110, and step 111 are changed to a step of outputting acceleration data to another device, and the output acceleration data is used in the game processing of step 47, step 110, and step 111. The present invention can be realized as an information processing program and an information processing apparatus that do not execute game processing.
上述した説明では、上記ステップ43、ステップ103、およびステップ104において、コントローラ7および/またはサブユニット76に生じている重力加速度を推定する処理がそれぞれ行われている。具体的には、上記重力加速度を推定する処理では、コントローラ7および/またはサブユニット76に生じている加速度の変化量(加速度のサンプリング前後の差分)が一定値以下、すなわち加速度の変化が少ないときに、当該加速度を重力加速度として推定している。
In the above description, the processing of estimating the gravitational acceleration occurring in the
また、角速度データDaに適宜格納される角速度データは、当該格納される前に所定の補正が行われてもかまわない。以下、角速度データの補正例について説明する。 Further, the angular velocity data appropriately stored in the angular velocity data Da may be subjected to predetermined correction before being stored. Hereinafter, an example of correction of angular velocity data will be described.
例えば、ジャイロセンサ95および96から出力された角速度データが示す角速度vを、
v←v+(sum/ct−v)×a
によって一次補正する。ここで、ctは、角速度vが格納されたデータバッファ(図示せず)から遡って、角速度が連続して安定範囲(下限)s1および安定範囲(上限)s2で設定された安定範囲内に収まると判断されたデータの数(連続個数ct)である。sumは、上記安定範囲内に収まると判断されたデータバッファ内の値の合計値(合計値sum)である。つまり、角速度vを書き込んだデータバッファの位置から遡って、新しいデータバッファから古いデータバッファへ順に、連続して上記安定範囲内に含まれるデータを繰り返し取得した場合の、その個数(連続個数ct)および合計値(合計値sum)である(ただし、検索上限数が設定される)。また、aは、静止具合値を示す。静止具合値aは、0〜1の範囲内の数値であり、ジャイロセンサ95および96の動きの変化が少ない(安定している)期間が長ければ長いほど1に近づく値である。そして、静止具合値aは、連続個数ctが上記検索上限数と等しいとき、すなわち角速度vが格納されたデータバッファから遡って連続して検索上限数分のデータバッファの値が全て上記安定範囲内に入っていたとき、最大値1になるようにして正規化される。
For example, the angular velocity v indicated by the angular velocity data output from the
v ← v + (sum / ct−v) × a
To make the primary correction. Here, ct goes back from a data buffer (not shown) in which the angular velocity v is stored, and the angular velocity continuously falls within the stable range set by the stable range (lower limit) s1 and the stable range (upper limit) s2. This is the number of data determined to be (continuous number ct). sum is a total value (total value sum) of values in the data buffer determined to be within the stable range. That is, the number (continuous number ct) when data included in the stable range is repeatedly acquired sequentially in order from the new data buffer to the old data buffer, starting from the position of the data buffer in which the angular velocity v is written. And a total value (total value sum) (however, a search upper limit number is set). Moreover, a shows a stationary condition value. The stationary state value a is a numerical value in the range of 0 to 1, and is a value that approaches 1 as the period during which the movement of the
そして、上記一次補正後の角速度vからゼロ点オフセット値(静止時出力値)ofsを減算することでオフセット補正する。ここで、ゼロ点オフセット値ofsは、ジャイロセンサ95および96が静止時に示すと想定されるデータの値であって、予め定められたデバイス固有値に設定されているが、上記一次補正後の角速度vに応じて、順次補正されて再設定される。具体的には、ゼロ点オフセット値ofsは、
ofs←ofs+(v−ofs)×a×C
によって順次補正されて再設定される。ここで、Cは、定数であり、例えばC=0.01に設定される。定数Cを小さい値にすることによって、短期間で角速度vが、入力装置6の静止状態における角速度(ゼロ点)であるように補正されることを防止している。そして、ジャイロセンサ95および96の静止時のように角速度に変化が少ない場合は、ゼロ点がその平均値に近づいていくようにゼロ点の補正が行われる。
Then, the offset correction is performed by subtracting the zero point offset value (stationary output value) ofs from the angular velocity v after the primary correction. Here, the zero point offset value ofs is a data value that is assumed to be displayed when the
ofs ← ofs + (v−ofs) × a × C
Are sequentially corrected and reset. Here, C is a constant, and is set to C = 0.01, for example. By setting the constant C to a small value, the angular velocity v is prevented from being corrected to be the angular velocity (zero point) in the stationary state of the input device 6 in a short period. When the change in the angular velocity is small as when the
そして、上記一次補正後の角速度vは、ゼロ点オフセット値ofsを用いてオフセット補正される。例えば、上記一次補正後の角速度vは、
v←v―ofs
によって、オフセット補正される。これによって、ジャイロセンサ95および96から出力された角速度データが示す角速度vは、ゼロ点(静止時出力値)を考慮した上で再度補正される。そして、上記オフセット補正後の角速度vを用いて、角速度データDaが適宜更新されることになる。なお、角速度データDaに適宜格納される角速度データは、上記一次補正をすることなく上記オフセット補正だけを行った角速度データであってもかまわない。また、ゼロ点オフセット値ofsを固定値にして、上記オフセット補正のみを行ってもかまわない。
The angular velocity v after the primary correction is offset corrected using the zero point offset value ofs. For example, the angular velocity v after the primary correction is
v ← v-ofs
Thus, the offset is corrected. As a result, the angular velocity v indicated by the angular velocity data output from the
また、上述した実施形態においては、コントローラ7に搭載されている撮像情報演算部74からの処理結果データを用いていない。したがって、本発明を実現する場合には、撮像情報演算部74がコントローラ7に搭載されていなくてもかまわない。また、上述した実施形態においては、コントローラ7に対してジャイロセンサ95および96が設けられている角速度検出ユニット9が着脱可能に接続される構成を用いたが、ジャイロセンサ95および96は、コントローラ7の内部に設けられてもかまわない。
In the above-described embodiment, the processing result data from the imaging
また、上述した説明では、据置型のゲーム装置に本願発明を適用した例を説明したが、ジャイロセンサおよび加速度センサを備えた入力装置によって操作される一般的なパーソナルコンピュータ等の情報処理装置にも適用することができる。例えば、入力装置のジャイロセンサから出力される角速度データおよび入力装置の加速度センサから出力される加速度データに応じて、情報処理装置が入力装置の姿勢や動き等を算出する等、入力装置に生じる角速度および加速度に基づいた様々な情報処理に用いることができる。 In the above description, the example in which the present invention is applied to a stationary game apparatus has been described. However, the information processing apparatus such as a general personal computer operated by an input device including a gyro sensor and an acceleration sensor is also described. Can be applied. For example, the angular velocity generated in the input device such as the information processing device calculates the posture or movement of the input device in accordance with the angular velocity data output from the gyro sensor of the input device and the acceleration data output from the acceleration sensor of the input device. And various information processing based on acceleration.
また、上述した説明では、コントローラ7(入力装置6)とゲーム装置本体5とが無線通信によって接続された態様を用いたが、コントローラ7とゲーム装置本体5とがケーブルを介して電気的に接続されてもかまわない。この場合、コントローラ7に接続されたケーブルをゲーム装置本体5の接続端子に接続する。
In the above description, the controller 7 (input device 6) and the game apparatus
また、上述した説明では、コントローラ7およびサブユニット76のうち、コントローラ7のみに通信部75を設けたが、コントローラ7とサブユニット76とが接続された入力装置6を用いる場合、サブユニット76にゲーム装置本体5へ送信データを無線送信する通信部を設けてもかまわない。また、コントローラ7およびサブユニット76それぞれに上記通信部を設けてもかまわない。例えば、コントローラ7およびサブユニット76に設けられた通信部がそれぞれゲーム装置本体5へ送信データを無線送信してもいいし、サブユニット76の通信部からコントローラ7へ送信データを無線送信してコントローラ7の通信部75で受信した後、コントローラ7の通信部75がサブユニット76の送信データと共にコントローラ7の送信データをゲーム装置本体5へ無線送信してもいい。これらの場合、コントローラ7とサブユニット76とを電気的に接続する接続ケーブル731が不要となる。
In the above description, the
また、上述したコントローラ7、サブユニット76、および角速度検出ユニット9の形状や、操作部72および761の形状、数、および設置位置等は、単なる一例に過ぎず他の形状、数、および設置位置であっても、本発明を実現できることは言うまでもない。また、上述した処理で用いられる係数、判定値、数式、処理順序等は、単なる一例に過ぎず他の値や数式や処理順序であっても、本発明を実現できることは言うまでもない。
In addition, the shape of the
また、本発明のゲームプログラムは、光ディスク4等の外部記憶媒体を通じてゲーム装置本体5に供給されるだけでなく、有線または無線の通信回線を通じてゲーム装置本体5に供給されてもよい。また、ゲームプログラムは、ゲーム装置本体5内部の不揮発性記憶装置に予め記録されていてもよい。なお、ゲームプログラムを記憶する情報記憶媒体としては、CD−ROM、DVD、あるいはそれらに類する光学式ディスク状記憶媒体の他に、不揮発性半導体メモリでもよい。
The game program of the present invention may be supplied not only to the
以上、本発明を詳細に説明してきたが、前述の説明はあらゆる点において本発明の例示にすぎず、その範囲を限定しようとするものではない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。 Although the present invention has been described in detail above, the above description is merely illustrative of the present invention in all respects and is not intended to limit the scope thereof. It goes without saying that various improvements and modifications can be made without departing from the scope of the present invention.
本発明に係る情報処理プログラムおよび情報処理装置は、入力装置に備えられた加速度センサから得られたデータを用いて正確に当該入力装置の動きを判断することができ、入力装置の動き等を示すデータを用いて所定の処理を実行する装置や当該装置で実行されるプログラムとして有用であり、入力装置の動き等を示すデータを出力する装置や当該装置で実行されるプログラムとしても有用である。 The information processing program and the information processing apparatus according to the present invention can accurately determine the movement of the input device using data obtained from the acceleration sensor provided in the input device, and show the movement of the input device and the like. It is useful as a device that executes predetermined processing using data or a program executed by the device, and is also useful as a device that outputs data indicating the movement of the input device or the like or a program executed by the device.
1…ゲームシステム
2…モニタ
2a、706…スピーカ
3…ゲーム装置
4…光ディスク
5…ゲーム装置本体
6…入力装置
10…CPU
11…システムLSI
12…外部メインメモリ
13…ROM/RTC
14…ディスクドライブ
15…AV−IC
16…AVコネクタ
17…フラッシュメモリ
18…無線通信モジュール
19…無線コントローラモジュール
20…拡張コネクタ
21…外部メモリカード用コネクタ
22、23…アンテナ
24…電源ボタン
25…リセットボタン
26…イジェクトボタン
31…入出力プロセッサ
32…GPU
33…DSP
34…VRAM
35…内部メインメモリ
7…コントローラ
71、763…ハウジング
72、761…操作部
73、97、732…コネクタ
731…接続ケーブル
74…撮像情報演算部
741…赤外線フィルタ
742…レンズ
743…撮像素子
744…画像処理回路
75…通信部
751、94…マイコン
752…メモリ
753…無線モジュール
754…アンテナ
76…サブユニット
700…基板
701、762…加速度センサ
702…LED
704…バイブレータ
707…サウンドIC
708…アンプ
8…マーカ
9…角速度検出ユニット
91…ボタン
92…カバー
93…プラグ
95…2軸ジャイロセンサ
96…1軸ジャイロセンサ
DESCRIPTION OF
11 ... System LSI
12 ... External
14 ...
16 ...
33 ... DSP
34 ... VRAM
35 ... Internal
704 ...
708 ... Amplifier 8 ... Marker 9 ... Angular
Claims (19)
前記コンピュータを、
前記加速度データを繰り返し取得するデータ取得手段と、
前記加速度データが示す加速度の履歴を用いて前記入力装置に生じる加速度の変化量を算出する変化量算出手段と、
前記加速度の変化量に基づいて、前記入力装置の重力方向を前記加速度データが示す加速度を用いて算出する重力方向算出手段として機能させる、情報処理プログラム。 An information processing program that is executed by a computer of an information processing device that performs predetermined processing based on acceleration data output from an input device including an acceleration sensor that detects acceleration,
The computer,
Data acquisition means for repeatedly acquiring the acceleration data;
A change amount calculation means for calculating a change amount of acceleration generated in the input device using an acceleration history indicated by the acceleration data;
An information processing program that functions as a gravity direction calculation unit that calculates the gravity direction of the input device using the acceleration indicated by the acceleration data based on a change amount of the acceleration.
前記加速度の変化量に基づいて、前記加速度データが示す加速度が重力加速度として信用できる度合を表す仮信用度を算出する仮信用度算出手段と、
前記仮信用度に基づいて、前回の処理において算出した重力方向を修正する度合を示す信用度を設定する信用度設定手段とを含み、
前記重力方向算出手段は、前回の処理において算出した重力方向を、前記信用度設定手段で設定された信用度に応じて修正することによって今回の処理における重力方向を算出する、請求項2に記載の情報処理プログラム。 The gravity direction calculating means includes
Based on the amount of change in acceleration, provisional credit calculation means for calculating provisional reliability indicating the degree to which the acceleration indicated by the acceleration data can be trusted as gravitational acceleration;
Credit quality setting means for setting a credit rating indicating a degree of correcting the direction of gravity calculated in the previous process based on the temporary credit rating;
The information according to claim 2, wherein the gravity direction calculation unit calculates the gravity direction in the current process by correcting the gravity direction calculated in the previous process according to the reliability set by the reliability setting unit. Processing program.
前記信用度設定手段は、前記仮信用度が高いほど信用度を高く設定する、請求項6に記載の情報処理プログラム。 The temporary creditworthiness calculating means calculates the temporary creditworthiness higher as the change amount of the acceleration is smaller,
The information processing program according to claim 6, wherein the trustworthiness setting unit sets the trustworthiness higher as the provisional trustworthiness is higher.
前記信用度設定手段は、前記仮信用度算出手段が算出した仮信用度が前回の処理で設定された信用度より高くなったと前記高低判定手段が判定した場合、前記仮信用度算出手段が算出した仮信用度と前回の処理で設定された信用度との間の値を、今回の処理における信用度に設定する、請求項7に記載の情報処理プログラム。 The credit quality setting means includes a high / low determination means for determining whether or not the temporary credit calculated by the temporary credit calculation means is higher than the credit set in the previous process,
If the high / low determination means determines that the temporary credit calculated by the temporary credit calculating means is higher than the credit set in the previous process, the credit setting means calculates the temporary credit calculated by the temporary credit calculating means and the previous credit The information processing program according to claim 7, wherein a value between the trustworthiness set in the process of step 1 is set as the trustworthiness in the current process.
前記変化量算出手段は、前記加速度ベクトルの履歴を用いて前記加速度ベクトルの大きさの変化量を算出し、
前記重力方向算出手段は、前記加速度ベクトルの大きさの変化量に基づいて、前記入力装置の重力方向を示す重力方向ベクトルを前記加速度ベクトル算出手段が算出した加速度ベクトルを用いて算出する、請求項1に記載の情報処理プログラム。 Based on the acceleration indicated by the acceleration data acquired by the data acquisition means, further causing the computer to function as an acceleration vector calculation means for calculating an acceleration vector,
The change amount calculating means calculates a change amount of the magnitude of the acceleration vector using a history of the acceleration vector,
The gravitational direction calculation means calculates a gravitational direction vector indicating a gravitational direction of the input device based on an amount of change in the magnitude of the acceleration vector, using the acceleration vector calculated by the acceleration vector calculation means. 1. An information processing program according to 1.
前記加速度データを繰り返し取得するデータ取得手段と、
前記加速度データが示す加速度の履歴を用いて前記入力装置に生じる加速度の変化量を算出する変化量算出手段と、
前記加速度の変化量に基づいて、前記入力装置の重力方向を前記加速度データが示す加速度を用いて算出する重力方向算出手段とを備える、情報処理装置。 An information processing device that performs predetermined processing based on acceleration data output from an input device that includes an acceleration sensor that detects acceleration,
Data acquisition means for repeatedly acquiring the acceleration data;
A change amount calculation means for calculating a change amount of acceleration generated in the input device using an acceleration history indicated by the acceleration data;
An information processing apparatus comprising: a gravitational direction calculating unit that calculates the gravitational direction of the input device using an acceleration indicated by the acceleration data based on a change amount of the acceleration.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009127507A JP5438382B2 (en) | 2009-05-27 | 2009-05-27 | Information processing program and information processing apparatus |
EP09166476.3A EP2251067B1 (en) | 2009-05-07 | 2009-07-27 | Storage medium storing information processing program, and information processing apparatus |
US12/510,422 US9050525B2 (en) | 2009-05-07 | 2009-07-28 | Storage medium storing information processing program, and information processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009127507A JP5438382B2 (en) | 2009-05-27 | 2009-05-27 | Information processing program and information processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010273765A JP2010273765A (en) | 2010-12-09 |
JP5438382B2 true JP5438382B2 (en) | 2014-03-12 |
Family
ID=43421298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009127507A Active JP5438382B2 (en) | 2009-05-07 | 2009-05-27 | Information processing program and information processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5438382B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012171088A (en) | 2011-02-24 | 2012-09-10 | Olympus Corp | Master operation input device, and master-slave manipulator |
JP5780568B1 (en) * | 2014-10-07 | 2015-09-16 | 株式会社ログバー | Gesture input data detection method |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3748483B2 (en) * | 1997-09-12 | 2006-02-22 | 株式会社リコー | Posture input device, pen-type input device having posture input function, and pen-type input system having the pen-type input device |
JP4290709B2 (en) * | 2006-04-27 | 2009-07-08 | 任天堂株式会社 | GAME DEVICE AND GAME PROGRAM |
JP4220531B2 (en) * | 2006-04-27 | 2009-02-04 | 任天堂株式会社 | Gravity direction calculation device and gravity direction calculation program |
JP4321554B2 (en) * | 2006-06-23 | 2009-08-26 | トヨタ自動車株式会社 | Attitude angle detection device and attitude angle detection method |
JP5177735B2 (en) * | 2006-12-01 | 2013-04-10 | 任天堂株式会社 | GAME PROGRAM AND GAME DEVICE |
JP5127242B2 (en) * | 2007-01-19 | 2013-01-23 | 任天堂株式会社 | Acceleration data processing program and game program |
JP4916390B2 (en) * | 2007-06-20 | 2012-04-11 | 任天堂株式会社 | Information processing program, information processing apparatus, information processing system, and information processing method |
-
2009
- 2009-05-27 JP JP2009127507A patent/JP5438382B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2010273765A (en) | 2010-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5507880B2 (en) | Information processing program and information processing apparatus | |
JP5430246B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP5224832B2 (en) | Information processing program and information processing apparatus | |
JP5430123B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP4916390B2 (en) | Information processing program, information processing apparatus, information processing system, and information processing method | |
JP5294442B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP5550433B2 (en) | Operating device and information processing system | |
JP5173174B2 (en) | GAME DEVICE, GAME PROGRAM, GAME SYSTEM, AND GAME PROCESSING METHOD | |
US8535155B2 (en) | Video game using dual motion sensing controllers | |
JP4988273B2 (en) | GAME PROGRAM AND GAME DEVICE | |
JP2010097429A (en) | Information processing apparatus and information processing program | |
JP2008209142A (en) | Information processing program and information processor | |
JP5358168B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP5005627B2 (en) | Information processing program and information processing apparatus | |
JP2008142509A (en) | Game system and game program | |
US8523678B2 (en) | Game apparatus and game program | |
JP5438382B2 (en) | Information processing program and information processing apparatus | |
EP2251067B1 (en) | Storage medium storing information processing program, and information processing apparatus | |
JP5339490B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP5513762B2 (en) | GAME DEVICE, GAME PROGRAM, GAME SYSTEM, AND GAME PROCESSING METHOD | |
JP5393218B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP2010207330A (en) | Device and program for calculating posture, game device and game program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20110902 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120314 |
|
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: 20131203 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131213 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5438382 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 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 |