JP2009093666A - Input processing program and input processor - Google Patents
Input processing program and input processor Download PDFInfo
- Publication number
- JP2009093666A JP2009093666A JP2008290211A JP2008290211A JP2009093666A JP 2009093666 A JP2009093666 A JP 2009093666A JP 2008290211 A JP2008290211 A JP 2008290211A JP 2008290211 A JP2008290211 A JP 2008290211A JP 2009093666 A JP2009093666 A JP 2009093666A
- Authority
- JP
- Japan
- Prior art keywords
- dimensional
- virtual
- change amount
- input
- dimensional coordinate
- 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.)
- Granted
Links
- 239000013598 vector Substances 0.000 claims abstract description 66
- 230000008859 change Effects 0.000 claims description 82
- 238000001514 detection method Methods 0.000 claims description 33
- 238000004364 calculation method Methods 0.000 claims description 28
- 238000006243 chemical reaction Methods 0.000 claims description 23
- 238000000034 method Methods 0.000 description 23
- 230000008569 process Effects 0.000 description 21
- 238000010586 diagram Methods 0.000 description 9
- 241001422033 Thestylus Species 0.000 description 6
- 230000006870 function Effects 0.000 description 3
- 230000010365 information processing Effects 0.000 description 3
- 230000009466 transformation Effects 0.000 description 3
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000009471 action Effects 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
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000004080 punching Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Abstract
Description
本発明は、入力処理プログラムおよび入力処理装置に関し、より特定的には、仮想3次元空間に対して表示画面上の2次元座標を入力するデバイスを用いて操作する入力処理プログラムおよび入力処理装置に関する。 The present invention relates to an input processing program and an input processing device, and more specifically to an input processing program and an input processing device that operate using a device that inputs a two-dimensional coordinate on a display screen to a virtual three-dimensional space. .
従来、表示画面に表示される仮想3次元空間に対して、当該表示画面上の2次元座標を入力するタッチパネルを用いて操作する技術が開示されている(例えば、特許文献1および2参照)。これらの技術は、いずれも表示画面上に仮想3次元空間を表示し、当該表示画面に関連してタッチパネル等を設ける。そして、ユーザのタッチパネルの押下位置に基づいて3次元空間内のXおよびY座標を決定し、ユーザがタッチパネルを押圧する大きさに基づいて3次元空間内のZ座標(奥行方向)を決定する。
しかしながら、上述した従来技術では、タッチパネル等の押圧する大きさを検出するために、感圧素子等の押圧検出機能を新たに設ける必要があり、装置自体が複雑となりコスト増加の原因となる。また、ユーザが仮想3次元空間内の奥行方向に対して大きな入力をするとき、タッチパネルを強く押下しなければならないので、タッチパネルに多大な負荷がかかることになる。そのため、タッチパネルが故障しやすくなったり、寿命が短くなったりするといった問題があった。 However, in the above-described prior art, it is necessary to newly provide a pressure detection function such as a pressure sensitive element in order to detect the size of the touch panel or the like to be pressed, which complicates the apparatus itself and causes an increase in cost. Further, when the user makes a large input with respect to the depth direction in the virtual three-dimensional space, the touch panel must be pressed down strongly, so that a great load is applied to the touch panel. For this reason, there has been a problem that the touch panel is liable to break down or the life is shortened.
それ故に、本発明の目的は、表示画面上の2次元座標を入力するデバイスからの入力に基づいて仮想3次元空間に対する座標を求める入力処理プログラムおよび入力処理装置を提供することである。 SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an input processing program and an input processing device that obtain coordinates for a virtual three-dimensional space based on an input from a device that inputs two-dimensional coordinates on a display screen.
上記目的を達成するために、本発明は以下の構成を採用した。なお、括弧内の参照符号やステップ番号等は、本発明の理解を助けるために、後述する図面との対応関係を示したものであって、本発明の範囲を何ら限定するものではない。 In order to achieve the above object, the present invention employs the following configuration. Note that the reference numerals, step numbers, and the like in parentheses indicate correspondence with the drawings described later in order to help understanding of the present invention, and do not limit the scope of the present invention.
第1の発明は、入力処理装置(1)のコンピュータ(21)に実行されるプログラムである。入力処理装置は、表示画面(12)と、その表示画面上に対応する2次元座標を入力するポインティングデバイス(13)とを備えている。プログラムは、表示制御ステップ(S57)、2次元座標検出ステップ(S54)、2次元座標変化量算出ステップ(S72)、および3次元座標変化量変換ステップ(S73)をコンピュータに実行させる。表示制御ステップは、表示画面に仮想3次元空間を表示する(図3、図4)。2次元座標検出ステップは、ポインティングデバイスから入力された2次元座標を検出する。2次元座標変化量算出ステップは、所定の算出開始条件(S51でYes、S52でNo)に応じて、2次元座標検出ステップによって検出された2次元座標の単位時間における変化量(ベクトルv)を算出する。3次元座標変化量変換ステップは、2次元座標変化量算出ステップによって算出された変化量を、仮想3次元空間内における3次元座標変化量(ベクトルV)に変換する。なお、ポインティングデバイスは、表示画面上での2次元座標を指定する入力装置であり、例えば、タッチパネル、マウス、トラックパッド、トラックボールなどで実現される。そして、それぞれの入力装置で用いられる座標系は、タッチパネル
座標系や画面座標系である。
The first invention is a program executed by the computer (21) of the input processing device (1). The input processing device includes a display screen (12) and a pointing device (13) for inputting corresponding two-dimensional coordinates on the display screen. The program causes the computer to execute a display control step (S57), a two-dimensional coordinate detection step (S54), a two-dimensional coordinate change calculation step (S72), and a three-dimensional coordinate change conversion step (S73). The display control step displays a virtual three-dimensional space on the display screen (FIGS. 3 and 4). In the two-dimensional coordinate detection step, two-dimensional coordinates input from the pointing device are detected. The two-dimensional coordinate change amount calculating step calculates the change amount (vector v) in the unit time of the two-dimensional coordinates detected by the two-dimensional coordinate detection step according to a predetermined calculation start condition (Yes in S51, No in S52). calculate. The three-dimensional coordinate change amount conversion step converts the change amount calculated by the two-dimensional coordinate change amount calculation step into a three-dimensional coordinate change amount (vector V) in the virtual three-dimensional space. The pointing device is an input device that designates two-dimensional coordinates on the display screen, and is realized by, for example, a touch panel, a mouse, a track pad, or a track ball. A coordinate system used in each input device is a touch panel coordinate system or a screen coordinate system.
第2の発明は、上記第1の発明において、入力状態判別ステップ(S52)を、さらにコンピュータに実行させる。入力状態判別ステップは、ポインティングデバイスからの入力の状態を判別する。2次元座標変化量算出ステップは、入力状態判別ステップがポインティングデバイスからの入力が継続的に行われている状態(S52でYes)から無入力の状態(S52でNo)へ変化したことを判別したことを算出開始条件として、その無入力の状態の直前に2次元座標検出ステップが検出した単位時間における2次元座標の変化量を算出する。 In a second aspect based on the first aspect, the computer further executes an input state determination step (S52). In the input state determination step, the state of input from the pointing device is determined. The two-dimensional coordinate change amount calculating step determines that the input state determining step has changed from a state where the input from the pointing device is continuously performed (Yes in S52) to a state where there is no input (No in S52). As a calculation start condition, the change amount of the two-dimensional coordinate in the unit time detected by the two-dimensional coordinate detection step immediately before the no-input state is calculated.
第3の発明は、上記第2の発明において、表示制御ステップは、仮想3次元空間内に所定の仮想投影面(図5のS3)を設定し(S53)、入力状態判別ステップがポインティングデバイスからの入力が継続的に行われている状態であると判別しているとき、2次元座標検出ステップが検出した2次元座標をその仮想投影面上に投影した位置に所定のオブジェクト(I)を表示する(図3)。表示制御ステップは、3次元座標変化量変換ステップが3次元座標変化量に変換したとき、その3次元座標変化量に基づいてオブジェクトを仮想投影面から離して仮想3次元空間内を移動させて表示する(図4(b))。 In a third aspect based on the second aspect, the display control step sets a predetermined virtual projection plane (S3 in FIG. 5) in the virtual three-dimensional space (S53), and the input state determination step is performed from the pointing device. When it is determined that the input is continuously performed, the predetermined object (I) is displayed at the position where the two-dimensional coordinates detected by the two-dimensional coordinate detection step are projected on the virtual projection plane. (FIG. 3). In the display control step, when the three-dimensional coordinate change amount conversion step converts to a three-dimensional coordinate change amount, the object is moved away from the virtual projection plane and displayed in the virtual three-dimensional space based on the three-dimensional coordinate change amount. (FIG. 4B).
第4の発明は、上記第3の発明において、表示制御ステップは、入力状態判別ステップがポインティングデバイスからの入力が継続的に行われている状態であると判別しているとき、2次元座標検出ステップが検出した2次元座標に基づいて、その仮想投影面に投影するオブジェクトの表示角度(θ)を制御する(S55、図8)。 In a fourth aspect based on the third aspect, when the display control step determines that the input state determination step is a state in which input from the pointing device is continuously performed, two-dimensional coordinate detection is performed. Based on the two-dimensional coordinates detected by the step, the display angle (θ) of the object projected onto the virtual projection plane is controlled (S55, FIG. 8).
第5の発明は、上記第3の発明において、移動軌跡算出ステップ(S59)を、さらにコンピュータに実行させる。移動軌跡算出ステップは、3次元座標変化量変換ステップが変換した3次元座標変化量を仮想3次元空間におけるオブジェクトの初期的な移動ベクトル(V)に設定して、その仮想3次元空間における単位時間毎の移動軌跡を算出する。表示制御ステップは、移動軌跡算出ステップが算出する移動軌跡に基づいて、オブジェクトを仮想投影面から離して仮想3次元空間内を移動させて表示する。 In a fifth aspect based on the third aspect, the computer further executes a movement trajectory calculating step (S59). The movement trajectory calculation step sets the three-dimensional coordinate change amount converted by the three-dimensional coordinate change amount conversion step to the initial movement vector (V) of the object in the virtual three-dimensional space, and unit time in the virtual three-dimensional space Each movement trajectory is calculated. In the display control step, based on the movement locus calculated by the movement locus calculation step, the object is moved away from the virtual projection plane and moved in the virtual three-dimensional space for display.
第6の発明は、上記第5の発明において、表示制御ステップは、入力状態判別ステップがポインティングデバイスからの入力が継続的に行われている状態であると判別しているとき、2次元座標検出ステップが検出した2次元座標に基づいて、その仮想投影面に投影するオブジェクトの表示角度を制御する。移動軌跡算出ステップは、表示角度に応じてオブジェクトの初期的な法線ベクトル(n)を設定して、その仮想3次元空間における単位時間毎の移動軌跡を移動ベクトルおよび法線ベクトルに基づいて算出する。 In a sixth aspect based on the fifth aspect, when the display control step determines that the input state determination step is a state in which input from the pointing device is continuously performed, two-dimensional coordinate detection is performed. Based on the two-dimensional coordinates detected by the step, the display angle of the object projected on the virtual projection plane is controlled. In the movement trajectory calculation step, an initial normal vector (n) of the object is set according to the display angle, and the movement trajectory per unit time in the virtual three-dimensional space is calculated based on the movement vector and the normal vector. To do.
第7の発明は、上記第1の発明において、3次元座標変化量変換ステップは、2次元座標変化量算出ステップによって算出された第1軸および第2軸に対する変化量(vx、vy)に基づいて、その第1軸および第2軸に垂直な第3軸に対する変化量(Vz)を算出して、3次元座標変化量に変換する。 In a seventh aspect based on the first aspect, the three-dimensional coordinate change amount conversion step is based on the change amounts (vx, vy) with respect to the first axis and the second axis calculated by the two-dimensional coordinate change amount calculation step. Then, a change amount (Vz) with respect to the third axis perpendicular to the first axis and the second axis is calculated and converted into a three-dimensional coordinate change amount.
第8の発明は、上記第7の発明において、3次元座標変化量変換ステップは、2次元座標変化量算出ステップによって算出された第1軸に対する変化量をvxおよび第2軸に対する変化量をvyとし、所定の定数をa、b、c、d、e、およびfとしたとき、3次元座標変化量として示されるその第1軸に対する変化量Vx、その第2軸に対する変化量Vy、および第3軸に対する変化量Vzを、 In an eighth aspect based on the seventh aspect, in the three-dimensional coordinate change amount conversion step, the change amount with respect to the first axis and the change amount with respect to the second axis calculated by the two-dimensional coordinate change amount calculation step are indicated as vy. Where the predetermined constants are a, b, c, d, e, and f, the change amount Vx with respect to the first axis, the change amount Vy with respect to the second axis, and the The amount of change Vz for the three axes is
第9の発明は、上記第8の発明において、定数a、b、c、d、e、およびfは、それぞれオブジェクトの種類に応じてそれぞれ異なる(図7)。 In a ninth aspect based on the eighth aspect, the constants a, b, c, d, e, and f are different depending on the type of the object (FIG. 7).
第10の発明は、入力処理装置のコンピュータに実行されるプログラムである。入力処理装置は、表示画面と、その表示画面上に対応する2次元座標を入力するポインティングデバイスとを備え、その表示画面に仮想3次元空間を表示する。プログラムは、投影面設定ステップ(S53)、2次元座標検出ステップ(S54)、投影面上移動ステップ(S54)、3次元空間内移動ステップ(S59)、および表示制御ステップ(S57)をコンピュータに実行させる。投影面設定ステップは、仮想3次元空間内に仮想投影面を設定する。2次元座標検出ステップは、ポインティングデバイスから入力された2次元座標を検出する。投影面上移動ステップは、2次元座標検出ステップが検出した2次元座標を仮想投影面上に投影することによって、その2次元座標に応じたその仮想投影面上の位置に所定のオブジェクトを移動させる。3次元空間内移動ステップは、所定の入力条件に応じて、オブジェクトを仮想投影面から離れた仮想3次元空間内を移動させる。表示制御ステップは、投影面上移動ステップまたは3次元空間内移動ステップによって移動するオブジェクトを仮想3次元空間内で表現して表示画面に表示する。 A tenth invention is a program executed by a computer of an input processing device. The input processing device includes a display screen and a pointing device that inputs corresponding two-dimensional coordinates on the display screen, and displays a virtual three-dimensional space on the display screen. The program executes a projection plane setting step (S53), a two-dimensional coordinate detection step (S54), a projection plane movement step (S54), a three-dimensional space movement step (S59), and a display control step (S57). Let In the projection plane setting step, a virtual projection plane is set in the virtual three-dimensional space. In the two-dimensional coordinate detection step, two-dimensional coordinates input from the pointing device are detected. The movement step on the projection plane projects the two-dimensional coordinates detected by the two-dimensional coordinate detection step onto the virtual projection plane, thereby moving a predetermined object to a position on the virtual projection plane according to the two-dimensional coordinates. . In the movement step in the three-dimensional space, the object is moved in the virtual three-dimensional space away from the virtual projection plane according to a predetermined input condition. In the display control step, an object that is moved by the movement step on the projection plane or the movement step in the three-dimensional space is expressed in the virtual three-dimensional space and displayed on the display screen.
第11の発明は、表示画面、ポインティングデバイス、表示制御手段、2次元座標検出手段、2次元座標変化量算出手段、および3次元座標変化量変換手段を備える入力処理装置である。ポインティングデバイスは、表示画面上に対応する2次元座標を入力する。表示制御手段は、表示画面に仮想3次元空間を表示する。2次元座標検出手段は、ポインティングデバイスから入力された2次元座標を検出する。2次元座標変化量算出手段は、所定の算出開始条件に応じて、2次元座標検出手段によって検出された2次元座標の単位時間における変化量を算出する。3次元座標変化量変換手段は、2次元座標変化量算出手段によって算出された変化量を、仮想3次元空間内における3次元座標変化量に変換する。 An eleventh invention is an input processing apparatus including a display screen, a pointing device, display control means, two-dimensional coordinate detection means, two-dimensional coordinate change amount calculation means, and three-dimensional coordinate change amount conversion means. The pointing device inputs corresponding two-dimensional coordinates on the display screen. The display control means displays a virtual three-dimensional space on the display screen. The two-dimensional coordinate detection means detects a two-dimensional coordinate input from the pointing device. The two-dimensional coordinate change amount calculation means calculates the change amount in unit time of the two-dimensional coordinates detected by the two-dimensional coordinate detection means in accordance with a predetermined calculation start condition. The three-dimensional coordinate change amount conversion means converts the change amount calculated by the two-dimensional coordinate change amount calculation means into a three-dimensional coordinate change amount in the virtual three-dimensional space.
第12の発明は、表示画面、ポインティングデバイス、投影面設定手段、2次元座標検出手段、投影面上移動手段、3次元空間内移動手段、および表示制御手段を備える入力処理装置である。表示画面は、仮想3次元空間を表示する。ポインティングデバイスは、表示画面上に対応する2次元座標を入力する。投影面設定手段は、仮想3次元空間内に仮想投影面を設定する。2次元座標検出手段は、ポインティングデバイスから入力された2次元座標を検出する。投影面上移動手段は、2次元座標検出手段が検出した2次元座標を仮想投影面上に投影することによって、その2次元座標に応じたその仮想投影面上の位置に所定のオブジェクトを移動させる。3次元空間内移動手段は、所定の入力条件に応じて、オブジェクトを仮想投影面から離れた仮想3次元空間内を移動させる。表示制御手段は、投影面上移動手段または3次元空間内移動手段によって移動するオブジェクトを仮想3次元空間内で表現して表示画面に表示する。 A twelfth aspect of the present invention is an input processing apparatus including a display screen, a pointing device, a projection plane setting unit, a two-dimensional coordinate detection unit, a projection plane moving unit, a three-dimensional space moving unit, and a display control unit. The display screen displays a virtual three-dimensional space. The pointing device inputs corresponding two-dimensional coordinates on the display screen. The projection plane setting means sets a virtual projection plane in the virtual three-dimensional space. The two-dimensional coordinate detection means detects a two-dimensional coordinate input from the pointing device. The movement means on the projection plane projects the two-dimensional coordinates detected by the two-dimensional coordinate detection means onto the virtual projection plane, thereby moving a predetermined object to a position on the virtual projection plane corresponding to the two-dimensional coordinates. . The moving means in the three-dimensional space moves the object in the virtual three-dimensional space away from the virtual projection plane according to a predetermined input condition. The display control means expresses the object moved by the movement means on the projection plane or the movement means in the three-dimensional space in the virtual three-dimensional space and displays it on the display screen.
第13の発明は、上記第11および第12の発明のいずれかにおいて、ポインティングデバイスは、表示画面を覆うタッチパネルである。 In a thirteenth aspect based on any one of the eleventh and twelfth aspects, the pointing device is a touch panel that covers the display screen.
上記第1の発明によれば、所定の算出開始条件に応じて、2次元座標における変化量を
3次元座標の変化量に変換するので、第3軸の変化量を得るための押圧検出機能等の特別な入力装置を設けることなく簡単な構成で2次元座標を3次元座標へ変換することができる。また、背景技術のようにユーザからの押圧を検出しないので、タッチパネル等のポインティングデバイスに多大な負担がかかることがなく、故障が多くなったり寿命が短くなったりするといったデバイス信頼性の低下を回避することができる。
According to the first aspect of the invention, since the change amount in the two-dimensional coordinates is converted into the change amount in the three-dimensional coordinates in accordance with a predetermined calculation start condition, the pressure detection function for obtaining the change amount in the third axis, etc. It is possible to convert the two-dimensional coordinates into the three-dimensional coordinates with a simple configuration without providing any special input device. In addition, since it does not detect a user's press as in the background art, it does not impose a heavy burden on the pointing device such as a touch panel, and avoids a decrease in device reliability such as increased failure or shorter life. can do.
上記第2の発明によれば、ポインティングデバイスへの入力が継続的に行われている状態から無入力状態への変化を条件として、無入力の状態の直前に検出された2次元座標に基づいて3次元座標に変換する。したがって、簡単な操作で2次元座標に基づいた入力制御から仮想3次元空間における3次元座標に基づいた入力に適宜切り替えて制御することができる。 According to the second invention, based on the two-dimensional coordinates detected immediately before the no-input state, on condition that the input to the pointing device is continuously performed to the no-input state. Convert to 3D coordinates. Therefore, the input control based on the two-dimensional coordinates can be appropriately switched to the input based on the three-dimensional coordinates in the virtual three-dimensional space by a simple operation.
上記第3の発明によれば、表示画面上の2次元座標を入力するポインティングデバイスからの2次元入力座標に応じて仮想投影面上をオブジェクトが移動し、ポインティングデバイスからの入力が無入力になると仮想投影面を離れて仮想3次元空間に当該オブジェクトが移動するような入力処理を実現することができる。例えば、ポインティングデバイスからの入力が継続している間は3次元ゲーム空間に設定された仮想投影面上をアイテムが移動し、ポインティングデバイスからの入力が無入力になるとアイテムが仮想投影面からゲーム空間に投げ入れられるようなゲーム処理を実現できる。 According to the third aspect, when the object moves on the virtual projection surface in accordance with the two-dimensional input coordinates from the pointing device that inputs the two-dimensional coordinates on the display screen, and no input is made from the pointing device. An input process in which the object moves away from the virtual projection plane and moves into the virtual three-dimensional space can be realized. For example, while the input from the pointing device continues, the item moves on the virtual projection plane set in the three-dimensional game space, and when the input from the pointing device becomes no input, the item moves from the virtual projection plane to the game space. Game processing that can be thrown into the game can be realized.
上記第4の発明によれば、ポインティングデバイスから入力される2次元座標に基づいて、オブジェクトの表示角度を制御することができる。 According to the fourth aspect, the display angle of the object can be controlled based on the two-dimensional coordinates input from the pointing device.
上記第5の発明によれば、変換された3次元座標変化量に基づいてオブジェクトの移動軌跡を変化させるので、バリエーションに富んだ移動軌跡を表示することができる。 According to the fifth aspect, since the movement trajectory of the object is changed based on the converted three-dimensional coordinate change amount, it is possible to display a movement trajectory rich in variations.
上記第6の発明によれば、さらに2次元座標に応じて変化するオブジェクトの表示角度から得られる法線ベクトルに基づいてオブジェクトの移動軌跡を変化させるので、ポインティングデバイスにおける指示位置に応じてバリエーションに富んだ移動軌跡を表示することができる。 According to the sixth aspect of the invention, since the movement trajectory of the object is changed based on the normal vector obtained from the display angle of the object that changes according to the two-dimensional coordinates, the variation according to the indicated position on the pointing device can be used. A rich trajectory can be displayed.
上記第7の発明によれば、2次元座標の変化量に基づいて、2次元座標軸を構成する2軸に垂直な第3軸成分を算出するため、2次元座標の変化量から3次元座標の変化量を容易に求めることができる。 According to the seventh aspect of the invention, since the third axis component perpendicular to the two axes constituting the two-dimensional coordinate axis is calculated based on the change amount of the two-dimensional coordinate, The amount of change can be easily obtained.
上記第8の発明によれば、2次元座標の変化量から3次元座標の変化量を求める際、行列式を用いてそれぞれの軸に対する変化量を容易に求めることができる。 According to the eighth aspect, when the change amount of the three-dimensional coordinate is obtained from the change amount of the two-dimensional coordinate, the change amount with respect to each axis can be easily obtained using a determinant.
上記第9の発明によれば、オブジェクトの種類に応じて3次元座標の変化量が求められるため、オブジェクトの仮想3次元空間内での移動制御のバリエーションを増やすことができる。 According to the ninth aspect, since the amount of change in three-dimensional coordinates is determined according to the type of object, variations in movement control of the object in the virtual three-dimensional space can be increased.
上記第10の発明によれば、表示画面上の2次元座標を入力するポインティングデバイスからの入力座標に応じて仮想投影面上をオブジェクトが移動し、所定の入力条件に応じて仮想投影面から仮想3次元空間内に当該オブジェクトが移動するような入力制御を実現できる。 According to the tenth aspect of the invention, the object moves on the virtual projection plane in accordance with the input coordinates from the pointing device that inputs the two-dimensional coordinates on the display screen, and the virtual projection plane is virtualized in accordance with the predetermined input condition. It is possible to realize input control such that the object moves in the three-dimensional space.
また、本発明の入力制御装置によれば、上述した入力制御プログラムと同様の効果を得ることができる。 Further, according to the input control device of the present invention, the same effect as the above-described input control program can be obtained.
図面を参照して、本発明の一実施形態に係るゲームプログラムを実行するゲーム装置について説明する。なお、図1は、本発明のゲームプログラムを実行するゲーム装置1の外観図である。ここでは、ゲーム装置1の一例として、携帯ゲーム装置を示す。また、以下の説明で用いるゲームプログラムが本発明の入力処理プログラムの一例であり、ゲーム装置1が本発明の入力処理装置の一例である。
A game device that executes a game program according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is an external view of a
図1において、本実施形態のゲーム装置1は、2つの液晶表示器(LCD)11および12を所定の配置位置となるように、ハウジング18に収納して構成される。具体的には、第1液晶表示器(以下、「LCD」という)11および第2LCD12を互いに上下に配置して収納する場合は、ハウジング18が下部ハウジング18aおよび上部ハウジング18bから構成され、上部ハウジング18bが下部ハウジング18aの上辺の一部で回動自在に支持される。上部ハウジング18bは、第1LCD11の平面形状よりも少し大きな平面形状を有し、一方主面から第1LCD11の表示画面を露出するように開口部が形成される。下部ハウジング18aは、その平面形状が上部ハウジング18bよりも横長に選ばれ、横方向の略中央部に第2LCD12の表示画面を露出する開口部が形成され、第2LCD12を挟む何れか一方にスピーカ15の音抜き孔が形成されるとともに、第2LCD12を挟む左右に操作スイッチ部14が装着される。
In FIG. 1, the
操作スイッチ部14は、第2LCD12の右横における下部ハウジング18aの一方主面に装着される動作スイッチ(Aボタン)14aおよび動作スイッチ(Bボタン)14bと、第2LCD12の左横における下部ハウジング18aの一方主面に装着される方向指示スイッチ(十字キー)14cと、スタートスイッチ14dと、セレクトスイッチ14eと、側面スイッチ14fおよび14gとを含む。動作スイッチ14aおよび14bは、例えばサッカーゲーム等のスポーツゲームにおいてはパスやシュートを行う等の指示、アクションゲームにおいてはジャンプ、パンチ、武器を動かす等の指示、ロールプレイングゲーム(RPG)やシミュレーションRPGにおいてはアイテムの取得、武器またはコマンドの選択決定等の指示入力に使用される。方向指示スイッチ14cは、プレイヤによって操作スイッチ部14を用いて操作可能なプレイヤオブジェクト(またはプレイヤキャラクタ)の移動方向を指示したり、カーソルの移動方向を指示したりする等のゲーム画面における方向指示に用いられる。側面スイッチ(Lボタン)14fおよび側面スイッチ(Rボタン)14gは、下部ハウジング18aにおける上部面(上部側面)の左右に設けられる。また、必要に応じて、動作スイッチをさらに追加してもかまわない。
The
また、第2LCD12の上面には、本発明の入力装置の一例としてタッチパネル13(図1における破線領域)が装着される。タッチパネル13は、例えば、抵抗膜方式、光学式(赤外線方式)、静電容量結合式の何れの種類でもよく、その上面をスタイラス16(または指でも可)で押圧操作、移動操作、または撫でる操作をしたとき、スタイラス16の座標位置を検出して座標データを出力する2次元ポインティングデバイスである。
Further, on the upper surface of the
上部ハウジング18bの側面近傍には、必要に応じてタッチパネル13を操作するスタイラス16を収納するための収納孔(図1における二点破線領域)が形成される。この収納孔には、スタイラス16が収納される。下部ハウジング18aの側面の一部には、ゲームプログラムを記憶したメモリ(例えば、ROM)を内蔵したゲームカートリッジ17(以下、単にカートリッジ17と記載する)を着脱自在に装着するためのカートリッジ挿入部(図1における一点破線領域)が形成される。カートリッジ17は、ゲームプログラムを記憶する情報記憶媒体であり、例えば、ROMまたはフラッシュメモリのような不揮発性半導体メモリが用いられる。カートリッジ挿入部の内部には、カートリッジ17と電気的に接続するためのコネクタ(図2参照)が内蔵される。さらに、下部ハウジング18a(または上部ハウジング18bでも可)には、CPU等の各種電子部品を実装した電子回
路基板が収納される。なお、ゲームプログラムを記憶する情報記憶媒体としては、上記不揮発性半導体メモリに限らず、CD−ROM、DVD、あるいはそれらに類する光学式ディスク状記憶媒体でもよい。
In the vicinity of the side surface of the
図2は、ゲーム装置1のブロック図である。図2において、ハウジング18に収納される電子回路基板20には、CPUコア21が実装される。CPUコア21には、所定のバスを介して、コネクタ28が接続されるとともに、入出力インターフェース(I/F)回路27、第1グラフィック処理ユニット(第1GPU)24、第2グラフィック処理ユニット(第2GPU)26、WRAM22、およびLCDコントローラ29が接続される。コネクタ28には、カートリッジ17が着脱自在に接続される。カートリッジ17は、ゲームプログラムを格納するための記憶媒体であり、具体的には、ゲームプログラムを記憶するROM171とバックアップデータを書き換え可能に記憶するRAM172とを搭載する。カートリッジ17のROM171に記憶されたゲームプログラムは、WRAM22にロードされ、当該WRAM22にロードされたゲームプログラムがCPUコア21によって実行される。CPUコア21は、ゲームプログラムを実行して得られる一時的なデータや画像を生成するためのデータをWRAM22に記憶する。I/F回路27には、操作スイッチ部14およびタッチパネル13が接続されるとともに、スピーカ15が接続される。
FIG. 2 is a block diagram of the
第1GPU24には、第1ビデオRAM(第1VRAM)23が接続され、第2GPU26には、第2ビデオRAM(第2VRAM)25が接続される。第1GPU24は、CPUコア21からの指示に応じて、WRAM22に記憶されている、画像を生成するためのデータに基づいて第1のゲーム画像を生成し、第1VRAM23に描画(格納)する。第2GPU26は、CPUコア21からの指示に応じて、WRAM22に記憶されている、画像を生成するためのデータに基づいて第2のゲーム画像を生成し、第2VRAM25に描画(格納)する。第1VRAM23および第2VRAM25はLCDコントローラ29に接続される。
A first video RAM (first VRAM) 23 is connected to the
LCDコントローラ29は、レジスタ291を含む。レジスタ291は、CPUコア21からの指示に応じて0または1の値を記憶する。LCDコントローラ29は、レジスタ291の値が0の場合は、第1VRAM23に描画されたゲーム画像を第1LCD11に出力し、第2VRAM25に描画されたゲーム画像を第2LCD12に出力する。また、レジスタ291の値が1の場合は、第1VRAM23に描画されたゲーム画像を第2LCD12に出力し、第2VRAM25に描画されたゲーム画像を第1LCD11に出力する。
The
I/F回路27は、操作スイッチ部14、タッチパネル13、およびスピーカ15などの外部入出力装置とCPUコア21との間のデータの受け渡しを行う回路である。タッチパネル13(タッチパネル用のデバイスドライバを含む)は、第2VRAM25の座標系に対応する座標系を有し、スタイラス16によって入力(指示)された位置に対応する位置座標のデータを出力するものである。なお、本実施例では、第2LCD12の表示画面の解像度は256dot×192dotであり、タッチパネル13の検出精度も第2LCD12の表示画面に対応した256dot×192dotとして説明するが、タッチパネル13の検出精度は第2LCD12の表示画面の解像度よりも低いものであってもよいし、高いものであってもよい。
The I /
以下、図3および図4を参照して、上記ゲーム装置1によって実行されるゲームプログラムによるゲーム処理の流れを、具体的な表示画面例を参照しながら説明する。なお、本実施例では、ゲーム装置1によって実行されるゲームがゲーム空間にアイテムを投げ入れるゲームの場合について説明するが、本発明はこのようなゲームに限定されるものではな
い。なお、図3は、ゲーム空間に投入するためのアイテムIの初期位置を決定する様子を示す第2LCD12の表示画面例である。図4(a)は、アイテムIをゲーム空間に投げ入れる操作の様子を示す第2LCD12の表示画面例である。図4(b)は、投げ入れられたアイテムIのゲーム空間内における移動動作の様子を示す第2LCD12の表示画面例である。
Hereinafter, with reference to FIG. 3 and FIG. 4, the flow of the game process by the game program executed by the
図3において、第2LCD12には仮想3次元ゲーム空間の様子が表示され、当該ゲーム空間に投入されるアイテムI(図3ではフライングディスクが示されている)が表示される。後述により明らかとなるが、第2LCD12には所定のカメラ視点に基づいた視体積に応じたゲーム空間が表示され、アイテムIは、当該視体積内に設定された仮想投影面に投影されている。プレイヤは、タッチパネル13を用いて第2LCD12に表示されたアイテムIの位置をタッチ操作して、ゲーム空間内においてアイテムIを移動させることができる。具体的には、プレイヤは、タッチパネル13を用いて第2LCD12に表示されたアイテムIをドラッグするタッチ操作(第2LCD12上でアイテムIと重なったタッチパネル13をタッチ操作し、そのままの状態でタッチ操作位置を移動させる)を行うと、タッチパネル13からの入力座標に応じた仮想投影面の位置にアイテムIが移動する。例えば、図3では、プレイヤがアイテムIを図示A方向に移動させた一例を示している。つまり、プレイヤは、アイテムIに対してドラッグするタッチ操作を行うことによって、アイテムIを仮想投影面上で移動させることができる。
In FIG. 3, the state of the virtual three-dimensional game space is displayed on the
プレイヤがアイテムIをドラッグするタッチ操作を行った後、タッチパネル13に対するタッチ操作を終了(つまり、タッチ操作しているスタイラス16等をタッチパネル13から離す)した場合、アイテムIが上記仮想投影面からゲーム空間内に投げ入れられる。図4(a)に示すように、プレイヤがアイテムIを図示B方向にドラッグするタッチ操作を行い、図示C点で当該タッチ操作を終了してスタイラス16等をタッチパネル13から離したとする。この場合、タッチ操作を終了する直前のタッチパネル13からの2次元座標情報に基づいて、アイテムIが上記仮想投影面からゲーム空間内に投げ入れられる。図4(b)に示すように、図示C点でタッチ操作を終了する直前のタッチパネル13による2次元座標情報(ベクトルB)に基づいて、仮想3次元ゲーム空間に設定された3次元座標情報(移動ベクトルD)が算出され、当該移動ベクトルDに基づいてアイテムIが仮想投影面を離れてゲーム空間内を移動する。
After the player performs the touch operation of dragging the item I, when the touch operation on the
次に、図5を参照して、第2LCD12に表示される仮想3次元ゲーム空間および仮想投影面について説明する。なお、図5は、仮想3次元ゲーム空間および仮想投影面を説明するための概念図である。
Next, the virtual three-dimensional game space and the virtual projection plane displayed on the
図5において、カメラ視点Pを基準として手前側クリップ面S1および奥側クリップ面S2が設定される。そして、第2LCD12には、仮想3次元ゲーム空間のうち、手前側クリップ面S1および奥側クリップ面S2で挟まれた視体積に設定される空間が表示される。仮想投影面S3は、上記視体積内に設定され、例えば手前側クリップ面S1に対して平行に配置される。そして、手前側クリップ面S1においてタッチパネル13のタッチパネル座標系が設定され、タッチパネル13からの入力座標が仮想投影面S3に投影される。なお、説明を簡単にするためにタッチパネル座標系が設定される手前側クリップ面S1と仮想投影面S3とが互いに平行の平面とするが、手前側クリップ面S1と仮想投影面S3とが平行でなくても入力座標の投影を同様に行うことができることは言うまでもない。また、仮想投影面S3が平面でなく球面等であっても入力座標の投影を同様に行うことができることは言うまでもない。
In FIG. 5, the near-side clip surface S1 and the back-side clip surface S2 are set with the camera viewpoint P as a reference. Then, the
次に、図6および図7を参照して、2次元座標で示されるタッチパネル座標系から3次元座標で示されるゲーム空間座標系への座標変換について説明する。図6(a)は、タッ
チパネル13に設定されたタッチパネル座標系に設定されるベクトルv(vx、vy)を示す概念図である。図6(b)は、仮想3次元ゲーム空間に設定された3次元座標に設定されるベクトルV(Vx、Vy、Vz)を示す概念図である。図7は、座標変換の際に用いられる定数a〜fの設定例である。
Next, with reference to FIGS. 6 and 7, coordinate conversion from a touch panel coordinate system indicated by two-dimensional coordinates to a game space coordinate system indicated by three-dimensional coordinates will be described. FIG. 6A is a conceptual diagram showing a vector v (vx, vy) set in the touch panel coordinate system set in the
図6(a)において、タッチパネル13に対してタッチパネル座標系における点q1(x1、y1)から点q2(x2、y2)までタッチ操作されたとき、点q1からq2まで結ぶベクトルv(vx、vy)が得られる。ここで、
vx=x2−x1
vy=y2−y1
である。
In FIG. 6A, when a touch operation is performed on the
vx = x2-x1
vy = y2-y1
It is.
そして、本実施例では、プレイヤがタッチパネル13に対して所定条件と一致する操作を行った際、当該操作を行う直前に設定された上記2次元ベクトルv(vx、vy)を座標変換して図6(b)に示すような3次元ベクトルV(Vx、Vy、Vz)を算出する。ここで、2次元ベクトルv(vx、vy)から3次元ベクトルV(Vx、Vy、Vz)への座標変換は、
In the present embodiment, when the player performs an operation on the
次に、図8および図9を用いて、アイテムIが仮想投影面を離れて仮想ゲーム空間内を移動する際の移動軌跡の算出について説明する。なお、図8は、アイテムIに初期設定される傾斜角度に応じたアイテムIの画面表示例である。図9は、アイテムIが仮想投影面を離れて仮想ゲーム空間内を移動する際に設定される移動ベクトルおよび法線ベクトルの概念図である。 Next, the calculation of the movement trajectory when the item I leaves the virtual projection plane and moves in the virtual game space will be described with reference to FIGS. FIG. 8 is a screen display example of the item I corresponding to the inclination angle that is initially set for the item I. FIG. 9 is a conceptual diagram of movement vectors and normal vectors that are set when the item I leaves the virtual projection plane and moves in the virtual game space.
図8において、上述したようにプレイヤがタッチパネル13を用いて第2LCD12に表示されたアイテムIをドラッグするタッチ操作を行うと、タッチパネル13からの入力座標に応じた仮想投影面の位置にアイテムIが移動する。そして、タッチパネル13に対する図示xm方向(図8における横方向)の位置に応じて、アイテムIに初期設定される傾斜角度θが設定される。具体的には、タッチパネル13の中央をxm=0として、右方向を+xm、左方向を−xmとする。そして、傾斜角度θが
θ=jxm+k(j、kは定数)
で求められる。なお、タッチパネル13に対して縦方向となる図8における上方向を傾斜角度θ=0°とする。そして、第2LCD12には、傾斜角度θにアイテムIの法線方向を合わせて表示される。すなわち、アイテムIは、タッチパネル13に対する横方向の位置に応じてその法線方向を傾斜させて表示される。そして、初期設定されたアイテムIの
傾斜角度θに基づいて、法線ベクトルn=(sinθ、cosθ、0)が初期設定される。
In FIG. 8, when the player performs a touch operation of dragging the item I displayed on the
Is required. Note that the upward direction in FIG. 8, which is the vertical direction with respect to the
上述したように、アイテムIが仮想投影面を離れて3次元ゲーム空間内に投げ入れる操作をされた後、当該アイテムIは、ゲーム空間を移動ベクトルおよび法線ベクトルに基づいて移動する。図9において、アイテムIに設定される移動ベクトルおよび法線ベクトルは、ゲーム処理を行う1フレーム毎に算出される。具体的には、新たなフレーム(i+1)における法線ベクトルn(i+1)は、直前のフレーム(i)で設定された法線ベクトルn(i)、移動ベクトルV(i)、および定数αを用いて、 As described above, after the item I leaves the virtual projection plane and is thrown into the three-dimensional game space, the item I moves in the game space based on the movement vector and the normal vector. In FIG. 9, the movement vector and normal vector set for item I are calculated for each frame in which the game process is performed. Specifically, the normal vector n (i + 1) in the new frame (i + 1) includes the normal vector n (i), the movement vector V (i), and the constant α set in the previous frame (i). make use of,
次に、図10および図11を参照して、本発明のゲームプログラムによってゲーム装置1で実行されるタッチパネル13から入力される情報に基づいた処理について説明する。なお、図10および図11は、当該ゲームプログラムを実行することによってゲーム装置1が処理する動作を示すフローチャートである。なお、これらの処理を実行するためのプログラムは、ROM171に格納されたゲームプログラムに含まれており、ゲーム装置1の電源がオンになったときに、ROM171からWRAM22に読み出されて、CPUコア21によって実行される。
Next, with reference to FIG. 10 and FIG. 11, processing based on information input from the
まず、ゲーム装置1の電源(図示せず)がONされると、CPUコア21によってブートプログラム(図示せず)が実行され、これによりカートリッジ17に格納されているゲームプログラムがWRAM22にロードされる。当該ロードされたゲームプログラムがCPUコア21に実行されることによって、図10および図11に示すステップ(図10および図11では「S」と略称する)が実行される。なお、上記ゲームプログラムを実行することによって、当該ゲームプログラムに応じたゲーム画像などが第1LCD11および第2LCD12に描画されるが、ゲーム内容についての詳細な説明を省略し、ここではタッチパネル13から入力される情報に基づいてアイテムが移動する処理について詳述する。
First, when a power source (not shown) of the
図10において、CPUコア21がゲーム処理を開始すると各種の初期設定をした後、ゲームを開始する。そして、CPUコア21は、アイテム指示フラグがオンしているか否かを判断する(ステップ51)。そして、CPUコア21は、アイテム指示フラグがオンであれば処理を次のステップ52に進め、アイテム指示フラグがオフであれば処理を次のステップ58に進める。ここで、アイテム指示フラグは、プレイヤがタッチパネル13を
用いてアイテムI(図3参照)をタッチしているか否かを区別するフラグであり、プレイヤがアイテムIをタッチしているときにオンに設定される。
In FIG. 10, when the
ステップ52において、CPUコア21は、タッチパネル13から入力があるか否かを判断する。そして、CPUコア21は、タッチパネル13から入力がある場合に処理を次のステップ53に進め、タッチパネル13からの入力がない場合に処理を次のステップ71に進める。
In step 52, the
ステップ53において、CPUコア21は、仮想3次元ゲーム空間内に仮想投影面S3(図9参照)を設定し、処理を次のステップに進める。なお、仮想投影面S3については、上述したとおりであるので、ここでは詳細な説明を省略する。
In step 53, the
次に、CPUコア21は、タッチパネル13からの入力座標を検出し、検出した座標に対応する仮想投影面S3上の2次元座標位置に、アイテムIの表示位置を合わせる(ステップ54;図3)。そして、CPUコア21は、入力座標のx座標値(タッチパネル13の横方向の座標;図8に示すxm方向)に基づいて、アイテムIの傾き角度θを算出する(ステップ55;図8)。そして、CPUコア21は、上記ステップ55で算出された傾き角度θに基づいて、アイテムIの初期設定における法線ベクトルnを算出する(ステップ56)。ここで、CPUコア21は、アイテムIの法線ベクトルnをn=(sinθ、cosθ、0)で算出する。そして、CPUコア21は、ステップ55で算出された傾き角度θに応じてアイテムIを傾斜させて、第2LCD12に対するアイテム表示制御処理を行い(ステップ57;図8)、ゲームを継続する場合(ステップ63でNo)に上記ステップ51に戻って処理を繰り返す。これらステップ51〜57をCPUコア21が繰り返すことによって、プレイヤのタッチパネル13のタッチ操作に応じてアイテムIが仮想投影面S3上を移動する。
Next, the
一方、図11を参照して、アイテム指示フラグがオン(ステップ51でYes)でタッチパネル13からの入力がない(ステップ52でNo)の場合の処理について説明する。ステップ52でタッチパネル13からの入力がないと判断した場合、CPUコア21は、直前の2フレームにおいてタッチパネル13からの入力があったか否かを判断する(ステップ71)。そして、直前の2フレームにおいてタッチパネル13からの入力があった場合、CPUコア21は、処理を次のステップ72に進める。一方、直前の2フレームの何れかにおいてタッチパネル13からの入力がなかった場合、CPUコア21は、処理を次のステップ63に進める。
On the other hand, with reference to FIG. 11, a process when the item instruction flag is on (Yes in Step 51) and there is no input from the touch panel 13 (No in Step 52) will be described. When determining in step 52 that there is no input from the
ステップ72において、CPUコア21は、直前の2フレームにおいてタッチパネル13からの入力されたそれぞれの入力座標を用いて、2フレーム間の座標変化量を算出する。具体的には、直前の2フレームにおける入力座標が点q1(x1、y1)および点q2(x2、y2)の場合、座標変化量として点q1からq2まで結ぶベクトルv(vx、vy)を算出する。ここで、
vx=x2−x1
vy=y2−y1
である。そして、CPUコア21は、処理を次のステップに進める。
In step 72, the
vx = x2-x1
vy = y2-y1
It is. Then, the
次に、CPUコア21は、上記ステップ72で求めた座標変化量(ベクトルv)に基づいて、アイテムIに対する仮想3次元ゲーム空間内の移動速度(移動ベクトルV)を算出し(ステップ73)、処理を次のステップに進める。ステップ73においては、上述した2次元座標系で設定される2点間の移動量(ベクトルv)として示される2軸それぞれに対する数値を用いて、3次元座標系で設定される移動量(ベクトルV)の3軸それぞれに対する数値を算出する座標変換が用いられる。ここで、座標変換に用いられる定数a〜f
は、上述したようにアイテムIの種類に応じて設定される。
Next, the
Is set according to the type of item I as described above.
次に、CPUコア21は、アイテム指示フラグをオフにして(ステップ74)、処理をステップ57に進める。これらステップ71〜74をCPUコア21が実行することによって、2次元座標系で設定される2点間の移動量が3次元座標系で設定される移動量(ベクトルV)に座標変換される。
Next, the
一方、図10に戻って、アイテム指示フラグがオフ(ステップ51でNo)の場合の処理について説明する。ステップ51でアイテム指示フラグがオフと判断した場合、CPUコア21は、アイテムIが仮想投影面を離れて3次元ゲーム空間内を移動中か否かを判断する(ステップ58)。ここで、CPUコア21は、例えばアイテムIに移動ベクトルVが設定されている場合にアイテムIが3次元ゲーム空間内を移動中であると判断する。そして、CPUコア21は、アイテムIがゲーム空間内を移動中である場合、処理を次のステップ59に進める。一方、CPUコア21は、アイテムIがゲーム空間内を移動していない場合(例えば、プレイヤがタッチパネル13に最初にタッチしたときや、全くタッチパネル13に触れていないとき等)、処理を次のステップ60に進める。
On the other hand, returning to FIG. 10, the processing when the item instruction flag is off (No in step 51) will be described. If it is determined in step 51 that the item instruction flag is OFF, the
ステップ59において、CPUコア21は、3次元ゲーム空間内のアイテムIの移動軌跡を算出する。CPUコア21は、アイテムIの移動軌跡の算出にあたって、上述したように直前のフレームにおいて算出された法線ベクトルnおよび移動ベクトルVを用いて、新たなフレームの法線ベクトルnおよび移動ベクトルVを算出する(図9参照)。そして、CPUコア21は、ステップ59で算出された法線ベクトルnおよび移動ベクトルVに応じてアイテムIを移動させて、第2LCD12に対するアイテム表示制御処理を行い(ステップ57;図4(b))、ゲームを継続する場合(ステップ63でNo)に上記ステップ51に戻って処理を繰り返す。これらステップ51、58、59、および57をCPUコア21が繰り返すことによって、仮想投影面を離れて仮想ゲーム空間内を移動するアイテムIが表現される。
In
一方、ステップ60において、CPUコア21は、タッチパネル13から入力があるか否かを判断する。そして、CPUコア21は、タッチパネル13から入力がある場合に処理を次のステップ61に進め、タッチパネル13からの入力がない場合に処理を次のステップ63に進める。
On the other hand, in
ステップ61において、CPUコア21は、プレイヤが第2LCD12上でアイテムIと重なったタッチパネル13をタッチ操作したか否かを判断する。そして、CPUコア21は、プレイヤがアイテムIをタッチ操作している場合、アイテム指示フラグをオンして(ステップ62)、処理をステップ63に進める。一方、CPUコア21は、プレイヤがアイテムIをタッチ操作していない場合、そのまま処理をステップ63に進める。
In step 61, the
ステップ63では、CPUコア21は、ゲームを継続するか否かを判断する。そして、CPUコア21は、ゲームを継続する場合に上記ステップ51に戻って処理を繰り返し、ゲームを終了する場合に当該サブルーチンによる処理を終了する。なお、上記ステップ51〜63の処理がゲーム処理を行う単位時間(例えば、1フレーム)毎に繰り返される。
In step 63, the
なお、上述した説明では、仮想3次元ゲーム空間に対する移動ベクトルVの算出を、プレイヤがタッチパネル13からスタイラス16等を離す(ステップ52でNo)ことを条件として行ったが、他の条件に応じて算出を行ってもかまわない。例えば、プレイヤが操作スイッチ部14(例えば動作スイッチ(Aボタン)14a)を押下することを条件として、移動ベクトルVの算出を行ってもかまわない。
In the above description, the movement vector V with respect to the virtual three-dimensional game space is calculated on the condition that the player releases the
また、上述した説明では、仮想投影面S3を手前側クリップ面S1に対して平行に配置した平面として説明したが、仮想投影面S3と手前側クリップ面S1とは平行でなくてもかまわない。仮想投影面S3が手前側クリップ面S1に対して斜めの平面であっても、入力座標の投影を同様に行って仮想投影面S3上の2次元座標(X軸、Y軸)を設定することができる。この場合、仮想投影面S3に垂直な方向を第3軸(Z軸)として、仮想3次元ゲーム空間に対する移動ベクトルVを上述した座標変換を用いて同様に算出することができる。 In the above description, the virtual projection plane S3 is described as a plane arranged in parallel with the near-side clip plane S1, but the virtual projection plane S3 and the near-side clip plane S1 may not be parallel. Even if the virtual projection plane S3 is an oblique plane with respect to the near-side clip plane S1, the input coordinates are similarly projected to set the two-dimensional coordinates (X axis, Y axis) on the virtual projection plane S3. Can do. In this case, the movement vector V with respect to the virtual three-dimensional game space can be similarly calculated using the coordinate transformation described above, with the direction perpendicular to the virtual projection plane S3 as the third axis (Z axis).
このように、本発明のゲーム装置によれば、表示画面上の2次元座標を入力するタッチパネルからの入力座標に応じて仮想投影面上をアイテムが移動し、所定の条件(タッチパネルから離す操作)に基づいて仮想投影面から仮想3次元ゲーム空間に当該アイテムが投げ入れられるゲームを実現できる。また、仮想投影面上に設定されている2次元座標の変化量(ベクトルv)に基づいて、当該仮想投影面に垂直な成分を算出するため、2次元座標の変化量から3次元座標の変化量(ベクトルV)を容易に求めることができる。したがって。従来技術のように押圧検出機能を設けることなく簡単な構成で2次元座標から3次元座標への変換を行うことができる。また、押圧を検出しないので、タッチパネル等の入力手段に多大な負担がかかることがなく、故障が多くなったり寿命が短くなったりするといったデバイス信頼性の低下を回避することができる。 As described above, according to the game device of the present invention, the item moves on the virtual projection plane in accordance with the input coordinates from the touch panel for inputting the two-dimensional coordinates on the display screen, and the predetermined condition (operation to release the touch panel) Based on the above, it is possible to realize a game in which the item is thrown into the virtual three-dimensional game space from the virtual projection plane. Further, since the component perpendicular to the virtual projection plane is calculated based on the change amount (vector v) of the two-dimensional coordinates set on the virtual projection plane, the change of the three-dimensional coordinates from the change amount of the two-dimensional coordinates. The quantity (vector V) can be easily determined. Therefore. Conversion from two-dimensional coordinates to three-dimensional coordinates can be performed with a simple configuration without providing a pressure detection function as in the prior art. In addition, since pressing is not detected, a great burden is not imposed on input means such as a touch panel, and a decrease in device reliability such as an increase in failure or a shortened life can be avoided.
なお、上記実施例では、表示画面上の2次元座標を入力する入力装置としてタッチパネルを用いたが、他のポインティングデバイスを用いてもかまわない。ここで、ポインティングデバイスは、表示画面上での入力位置や座標を指定する入力装置であり、例えば、マウス、トラックパッド、トラックボールなどを入力装置として使用し、入力装置から出力される出力値から計算された画面座標系の情報を用いれば、本発明を同様に実現することができる。なお、マウス等のポインティングデバイスの場合、タッチ状態と非タッチ状態とをクリックボタンのオンオフに対応させ、マウス等から出力される出力値から座標を計算する処理をゲーム装置等で行えばよい。 In the above embodiment, the touch panel is used as the input device for inputting the two-dimensional coordinates on the display screen, but other pointing devices may be used. Here, the pointing device is an input device that specifies an input position and coordinates on the display screen. For example, a mouse, a trackpad, a trackball, or the like is used as an input device, and an output value output from the input device is used. If the information of the calculated screen coordinate system is used, the present invention can be similarly realized. Note that in the case of a pointing device such as a mouse, the game device or the like may perform processing for calculating coordinates from output values output from the mouse or the like in correspondence with the touch button and the non-touch button on / off.
また、上記実施例では、ゲーム装置1にタッチパネル13が一体的に設けられているが、ゲーム装置とタッチパネルとを別体にして構成しても、本発明を実現できることは言うまでもない。また、上記実施例では表示器を2つ設けたが、表示器は1つであってもかまわない。すなわち、上記実施例において、第1LCD11を設けず単に第2LCD12のみを設けるようにしてもよい。また、上記実施例において、第2LCD12を設けず第1LCD11の上面にタッチパネル13を設けても良い。
Moreover, in the said Example, although the
また、上記実施例では、ゲーム装置1にタッチパネル13が一体的に設けられているが、タッチパネルを入力装置の1つとする一般的なパーソナルコンピュータなどの情報処理装置でもかまわない。この場合、この情報処理装置のコンピュータが実行するプログラムは、典型的にゲームに用いられるゲームプログラムに限らず、上述した方式で得られた2次元座標値が上記情報処理装置に対する操作処理に用いられる汎用的な入力処理プログラムである。
Further, in the above embodiment, the
本発明の入力処理プログラムおよび入力処理装置は、簡単な構成で2次元座標から3次元座標への変換を行うことができ、表示画面上の2次元座標を入力するポインティングデバイスを用いて操作するゲームや入力処理等に適用できる。 INDUSTRIAL APPLICABILITY The input processing program and the input processing apparatus of the present invention can perform conversion from two-dimensional coordinates to three-dimensional coordinates with a simple configuration, and are operated using a pointing device that inputs two-dimensional coordinates on a display screen. And input processing.
1…ゲーム装置
11…第1LCD
12…第2LCD
13…タッチパネル
14…操作スイッチ部
15…スピーカ
16…スタイラス
17…カートリッジ
171…ROM
172…RAM
18…ハウジング
20…電子回路基板
21…CPUコア
22…WRAM
23…第1VRAM
24…第1GPU
25…第2VRAM
26…第2GPU
27…I/F回路
28…コネクタ
29…LCDコントローラ
291…レジスタ
1 ...
12 ... Second LCD
13 ...
172 ... RAM
18 ...
23. First VRAM
24 ... 1st GPU
25. Second VRAM
26 ... 2nd GPU
27 ... I /
Claims (13)
前記コンピュータに、
前記表示画面に仮想3次元空間を表示する表示制御ステップ、
前記ポインティングデバイスから入力された2次元座標を検出する2次元座標検出ステップ、
所定の算出開始条件に応じて、前記2次元座標検出ステップによって検出された2次元座標の単位時間における変化量を算出する2次元座標変化量算出ステップ、および
前記2次元座標変化量算出ステップによって算出された変化量を、前記仮想3次元空間内における3次元座標変化量に変換する3次元座標変化量変換ステップを実行させる、入力処理プログラム。 A program to be executed by a computer of an input processing device including a display screen and a pointing device for inputting corresponding two-dimensional coordinates on the display screen,
In the computer,
A display control step of displaying a virtual three-dimensional space on the display screen;
A two-dimensional coordinate detection step of detecting a two-dimensional coordinate input from the pointing device;
A two-dimensional coordinate change amount calculating step for calculating a change amount in unit time of the two-dimensional coordinates detected by the two-dimensional coordinate detection step according to a predetermined calculation start condition, and a calculation by the two-dimensional coordinate change amount calculation step An input processing program for executing a three-dimensional coordinate change amount conversion step of converting the changed amount into a three-dimensional coordinate change amount in the virtual three-dimensional space.
前記2次元座標変化量算出ステップは、前記入力状態判別ステップが前記ポインティングデバイスからの入力が継続的に行われている状態から無入力の状態へ変化したことを判別したことを前記算出開始条件として、当該無入力の状態の直前に前記2次元座標検出ステップが検出した単位時間における2次元座標の変化量を算出することを特徴とする、請求項1に記載の入力処理プログラム。 Further causing the computer to execute an input state determination step of determining an input state from the pointing device,
In the two-dimensional coordinate change amount calculating step, the calculation start condition is that the input state determining step has determined that the input from the pointing device has been changed to a no-input state. The input processing program according to claim 1, wherein a change amount of a two-dimensional coordinate in a unit time detected by the two-dimensional coordinate detection step immediately before the no-input state is calculated.
前記仮想3次元空間内に所定の仮想投影面を設定し、前記入力状態判別ステップが前記ポインティングデバイスからの入力が継続的に行われている状態であると判別しているとき、前記2次元座標検出ステップが検出した2次元座標を当該仮想投影面上に投影した位置に所定のオブジェクトを表示し、
前記3次元座標変化量変換ステップが前記3次元座標変化量に変換したとき、当該3次元座標変化量に基づいて前記オブジェクトを前記仮想投影面から離して前記仮想3次元空間内を移動させて表示することを特徴とする、請求項2に記載の入力処理プログラム。 The display control step includes:
When a predetermined virtual projection plane is set in the virtual three-dimensional space, and the input state determining step determines that the input from the pointing device is continuously performed, the two-dimensional coordinates A predetermined object is displayed at a position where the two-dimensional coordinates detected by the detection step are projected on the virtual projection plane;
When the three-dimensional coordinate change amount conversion step converts to the three-dimensional coordinate change amount, the object is moved away from the virtual projection plane based on the three-dimensional coordinate change amount and displayed in the virtual three-dimensional space. The input processing program according to claim 2, wherein:
前記表示制御ステップは、前記移動軌跡算出ステップが算出する移動軌跡に基づいて、前記オブジェクトを前記仮想投影面から離して前記仮想3次元空間内を移動させて表示することを特徴とする、請求項3に記載の入力処理プログラム。 The three-dimensional coordinate change amount converted by the three-dimensional coordinate change amount conversion step is set as an initial movement vector of the object in the virtual three-dimensional space, and a movement trajectory per unit time in the virtual three-dimensional space is calculated. Further causing the computer to execute a movement trajectory calculation step,
The display control step displays the object by moving the object in the virtual three-dimensional space away from the virtual projection plane based on the movement locus calculated by the movement locus calculation step. The input processing program according to 3.
前記移動軌跡算出ステップは、前記表示角度に応じてオブジェクトの初期的な法線ベクトルを設定して、当該仮想3次元空間における単位時間毎の移動軌跡を前記移動ベクトル
および当該法線ベクトルに基づいて算出することを特徴とする、請求項5に記載の入力処理プログラム。 The display control step is based on the two-dimensional coordinates detected by the two-dimensional coordinate detection step when the input state determination step determines that the input from the pointing device is continuously performed. Control the display angle of the object projected on the virtual projection plane,
The movement trajectory calculation step sets an initial normal vector of the object according to the display angle, and calculates a movement trajectory per unit time in the virtual three-dimensional space based on the movement vector and the normal vector. The input processing program according to claim 5, wherein the input processing program is calculated.
前記コンピュータに、
前記仮想3次元空間内に仮想投影面を設定する投影面設定ステップ、
前記ポインティングデバイスから入力された2次元座標を検出する2次元座標検出ステップ、
前記2次元座標検出ステップが検出した2次元座標を前記仮想投影面上に投影することによって、当該2次元座標に応じた当該仮想投影面上の位置に所定のオブジェクトを移動させる投影面上移動ステップ、
所定の入力条件に応じて、前記オブジェクトを前記仮想投影面から離れた前記仮想3次元空間内を移動させる3次元空間内移動ステップ、および
前記投影面上移動ステップまたは前記3次元空間内移動ステップによって移動する前記オブジェクトを前記仮想3次元空間内で表現して前記表示画面に表示する表示制御ステップを実行させる、入力処理プログラム。 A program that is executed by a computer of an input processing device that includes a display screen and a pointing device that inputs corresponding two-dimensional coordinates on the display screen, and displays a virtual three-dimensional space on the display screen,
In the computer,
A projection plane setting step for setting a virtual projection plane in the virtual three-dimensional space;
A two-dimensional coordinate detection step of detecting a two-dimensional coordinate input from the pointing device;
Projection plane movement step of moving a predetermined object to a position on the virtual projection plane corresponding to the two-dimensional coordinates by projecting the two-dimensional coordinates detected by the two-dimensional coordinate detection step onto the virtual projection plane. ,
According to a predetermined input condition, a moving step in the three-dimensional space for moving the object in the virtual three-dimensional space away from the virtual projection plane, and a moving step on the projection plane or a moving step in the three-dimensional space An input processing program for executing a display control step of expressing the moving object in the virtual three-dimensional space and displaying it on the display screen.
前記表示画面上に対応する2次元座標を入力するポインティングデバイスと、
前記表示画面に仮想3次元空間を表示する表示制御手段と、
前記ポインティングデバイスから入力された2次元座標を検出する2次元座標検出手段と、
所定の算出開始条件に応じて、前記2次元座標検出手段によって検出された2次元座標の単位時間における変化量を算出する2次元座標変化量算出手段と、
前記2次元座標変化量算出手段によって算出された変化量を、前記仮想3次元空間内における3次元座標変化量に変換する3次元座標変化量変換手段とを備える、入力処理装置。 A display screen;
A pointing device for inputting corresponding two-dimensional coordinates on the display screen;
Display control means for displaying a virtual three-dimensional space on the display screen;
Two-dimensional coordinate detection means for detecting two-dimensional coordinates input from the pointing device;
Two-dimensional coordinate change amount calculating means for calculating a change amount in unit time of the two-dimensional coordinates detected by the two-dimensional coordinate detection means according to a predetermined calculation start condition;
An input processing apparatus comprising: a three-dimensional coordinate change amount conversion unit that converts a change amount calculated by the two-dimensional coordinate change amount calculation unit into a three-dimensional coordinate change amount in the virtual three-dimensional space.
前記表示画面上に対応する2次元座標を入力するポインティングデバイスと、
前記仮想3次元空間内に仮想投影面を設定する投影面設定手段と、
前記ポインティングデバイスから入力された2次元座標を検出する2次元座標検出手段と、
前記2次元座標検出手段が検出した2次元座標を前記仮想投影面上に投影することによって、当該2次元座標に応じた当該仮想投影面上の位置に所定のオブジェクトを移動させる投影面上移動手段と、
所定の入力条件に応じて、前記オブジェクトを前記仮想投影面から離れた前記仮想3次元空間内を移動させる3次元空間内移動手段と、
前記投影面上移動手段または前記3次元空間内移動手段によって移動する前記オブジェクトを前記仮想3次元空間内で表現して前記表示画面に表示する表示制御手段とを備える、入力処理装置。 A display screen for displaying a virtual three-dimensional space;
A pointing device for inputting corresponding two-dimensional coordinates on the display screen;
Projection plane setting means for setting a virtual projection plane in the virtual three-dimensional space;
Two-dimensional coordinate detection means for detecting two-dimensional coordinates input from the pointing device;
On-projection surface moving means for moving a predetermined object to a position on the virtual projection surface corresponding to the two-dimensional coordinates by projecting the two-dimensional coordinates detected by the two-dimensional coordinate detection device onto the virtual projection surface. When,
Three-dimensional space moving means for moving the object in the virtual three-dimensional space away from the virtual projection plane according to a predetermined input condition;
An input processing apparatus comprising: display control means for expressing the object moved by the moving means on the projection plane or the moving means in the three-dimensional space in the virtual three-dimensional space and displaying the object on the display screen.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008290211A JP4724740B2 (en) | 2008-11-12 | 2008-11-12 | Input processing program and input processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008290211A JP4724740B2 (en) | 2008-11-12 | 2008-11-12 | Input processing program and input processing apparatus |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004304961A Division JP4388878B2 (en) | 2004-10-19 | 2004-10-19 | Input processing program and input processing apparatus |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009038398A Division JP4724758B2 (en) | 2009-02-20 | 2009-02-20 | Input processing program and input processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009093666A true JP2009093666A (en) | 2009-04-30 |
JP4724740B2 JP4724740B2 (en) | 2011-07-13 |
Family
ID=40665520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008290211A Active JP4724740B2 (en) | 2008-11-12 | 2008-11-12 | Input processing program and input processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4724740B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833783A (en) * | 2010-04-28 | 2010-09-15 | 深圳市五巨科技有限公司 | Method and device for realizing desktop sprites of mobile terminal |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6340967A (en) * | 1986-08-06 | 1988-02-22 | Nec Corp | Plane input device |
JPH05165565A (en) * | 1991-12-18 | 1993-07-02 | Hitachi Ltd | Coordinate input system |
JPH11232010A (en) * | 1998-02-18 | 1999-08-27 | Dainippon Screen Mfg Co Ltd | Method and device for three-dimensional instruction |
JPH11272892A (en) * | 1998-03-24 | 1999-10-08 | Rekusaa Research:Kk | Device and method for moving and arranging object in three-dimensional space display system |
-
2008
- 2008-11-12 JP JP2008290211A patent/JP4724740B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6340967A (en) * | 1986-08-06 | 1988-02-22 | Nec Corp | Plane input device |
JPH05165565A (en) * | 1991-12-18 | 1993-07-02 | Hitachi Ltd | Coordinate input system |
JPH11232010A (en) * | 1998-02-18 | 1999-08-27 | Dainippon Screen Mfg Co Ltd | Method and device for three-dimensional instruction |
JPH11272892A (en) * | 1998-03-24 | 1999-10-08 | Rekusaa Research:Kk | Device and method for moving and arranging object in three-dimensional space display system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833783A (en) * | 2010-04-28 | 2010-09-15 | 深圳市五巨科技有限公司 | Method and device for realizing desktop sprites of mobile terminal |
CN101833783B (en) * | 2010-04-28 | 2012-04-25 | 深圳市五巨科技有限公司 | Method and device for realizing desktop sprites of mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
JP4724740B2 (en) | 2011-07-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1650644B1 (en) | Storage medium having input processing program stored thereon and input processing device | |
US8574077B2 (en) | Storage medium having game program stored thereon, game apparatus, input device, and storage medium having program stored thereon | |
JP3734819B1 (en) | GAME PROGRAM, GAME DEVICE, AND INPUT DEVICE | |
JP3734820B1 (en) | GAME PROGRAM, GAME DEVICE, AND INPUT DEVICE | |
JP3833228B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP4897411B2 (en) | Information processing program and information processing apparatus | |
US20060052165A1 (en) | Storage medium having stored thereon game program, game machine, and input device | |
US20070075967A1 (en) | Image processing apparatus, storage medium having image processing program stored thereon, game apparatus and storage medium having game program stored thereon | |
JP4121492B2 (en) | GAME DEVICE AND GAME PROGRAM | |
US8926427B2 (en) | Video game with screen flip and dual sets of collision data | |
JP5354820B2 (en) | Input processing program and input processing apparatus | |
JP4302767B2 (en) | Input processing program and input processing apparatus | |
JP4726965B2 (en) | Input processing program and input processing apparatus | |
JP4724758B2 (en) | Input processing program and input processing apparatus | |
JP4724740B2 (en) | Input processing program and input processing apparatus | |
JP5363524B2 (en) | Input processing program and input processing apparatus | |
JP4730975B2 (en) | Input processing program and input processing apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100909 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101105 |
|
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: 20110314 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110411 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140415 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4724740 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140415 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140415 Year of fee payment: 3 |
|
R157 | Certificate of patent or utility model (correction) |
Free format text: JAPANESE INTERMEDIATE CODE: R157 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |