JP7471782B2 - Program, electronic device, and method - Google Patents
Program, electronic device, and method Download PDFInfo
- Publication number
- JP7471782B2 JP7471782B2 JP2019133775A JP2019133775A JP7471782B2 JP 7471782 B2 JP7471782 B2 JP 7471782B2 JP 2019133775 A JP2019133775 A JP 2019133775A JP 2019133775 A JP2019133775 A JP 2019133775A JP 7471782 B2 JP7471782 B2 JP 7471782B2
- Authority
- JP
- Japan
- Prior art keywords
- data point
- point sequence
- sequence
- axis
- displacement
- 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
- 238000000034 method Methods 0.000 title claims description 24
- 238000006073 displacement reaction Methods 0.000 claims description 73
- 230000000717 retained effect Effects 0.000 claims description 18
- 230000014759 maintenance of location Effects 0.000 claims description 10
- 230000008859 change Effects 0.000 claims description 7
- 230000006870 function Effects 0.000 description 68
- 238000004891 communication Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 7
- 238000001514 detection method Methods 0.000 description 5
- 230000010365 information processing Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005057 finger movement Effects 0.000 description 2
- 230000004043 responsiveness Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005401 electroluminescence Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Description
本発明は、プログラム、電子装置、及び方法に関するものであり、特にタッチパネルを備える電子装置において実行されるプログラム、電子装置、及び方法に関する。 The present invention relates to a program, an electronic device, and a method, and in particular to a program, an electronic device, and a method executed in an electronic device equipped with a touch panel.
近年のタッチパネル技術の向上に伴い、タッチパネル上のユーザインタフェースを介してユーザ入力を行う電子装置が広く普及してきた。そして、電子装置において実行されるゲームにおいては、従来型の物理的なコントローラによるユーザ入力に代えて、電子装置に備えられたタッチパネルを介してユーザ入力を行う形態が広く普及してきている。 With recent improvements in touch panel technology, electronic devices that allow users to input via a user interface on a touch panel have become widespread. In games executed on electronic devices, instead of user input via a conventional physical controller, a form in which user input is performed via a touch panel provided on the electronic device has become widespread.
特にスマートフォン等に代表される小型の携帯型電子装置の普及が急速に進み、このような携帯型電子装置上で実行されるゲームも数多くリリースされている。このような状況において、タッチパネルに表示されたプレイヤキャラクタなどの仮想オブジェクトの操作方法については、例えば非特許文献1に示すバーチャルパッドに関する技術を含め、様々な技術が提案されている。 In particular, small portable electronic devices such as smartphones have become increasingly popular, and many games that can be played on such portable electronic devices have been released. In this situation, various techniques have been proposed for controlling virtual objects such as player characters displayed on a touch panel, including the virtual pad technique shown in Non-Patent Document 1.
例えば特許文献1には、タッチパネルを備えるゲーム装置であって、ユーザのタッチ操作に応じて原点を設定してジョイスティックを模した操作を行うことができるゲーム装置やプログラムが開示されている。当該ゲーム装置は、タッチパネルがタッチを検出していない状態から検出した状態に変化した場合に検出を開始したときの座標に基づき基準座標を設定し、その後タッチ検出を継続する場合、その後に検出した座標に基づき指示座標を設定する。そして当該ゲーム装置は、基準座標から指示座標へのベクトルの方向がジョイスティックを倒している方向、ベクトルの大きさがジョイスティックの倒し具合と認識することで、仮想ジョイスティックを実現し、仮想オブジェクトの操作を実現している。 For example, Patent Document 1 discloses a game device and program that is equipped with a touch panel and can set an origin in response to a user's touch operation to perform operations simulating a joystick. When the touch panel changes from a non-touch detection state to a touch detection state, the game device sets reference coordinates based on the coordinates at the start of detection, and if touch detection continues thereafter, sets designated coordinates based on the coordinates detected thereafter. The game device then recognizes that the direction of the vector from the reference coordinates to the designated coordinates represents the direction in which the joystick is tilted, and that the magnitude of the vector represents the degree to which the joystick is tilted, thereby realizing a virtual joystick and operating a virtual object.
特許文献1に示す従来技術において、ユーザは、タッチパネル上の1箇所を指で接触してゲーム装置に基準座標を認識させ、接触したままその指をスライドさせ、スライド後の指の接触位置によりゲーム装置に指示座標を認識させる。このように構成される従来技術は、ユーザが方向を入力するとき、基準座標から指示座標まで有意な距離を生成する必要があるため、高い応答性を実現することは難しかった。例えばユーザが仮想ジョイスティックを大きく倒した操作を行いたい場合、大きく倒したジョイスティックの倒し具合に対応する基準座標から指示座標へのベクトルの大きさを生成する必要があった。 In the conventional technology shown in Patent Document 1, a user touches a point on a touch panel with their finger to cause the game device to recognize the reference coordinates, then slides the finger while still in contact, causing the game device to recognize the designated coordinates based on the touch position of the finger after the slide. With conventional technology configured in this way, when a user inputs a direction, it is necessary to generate a significant distance from the reference coordinates to the designated coordinates, making it difficult to achieve high responsiveness. For example, if a user wants to perform an operation by tilting the virtual joystick greatly, it is necessary to generate the magnitude of a vector from the reference coordinates to the designated coordinates that corresponds to the degree to which the joystick was tilted greatly.
したがって、タッチパネルに表示された、仮想空間上に配置された仮想オブジェクトを制御する操作方法として、例えばより高速で直感的な操作方法の実現が求められている。更に一般化すると、仮想空間内に配置され、ユーザの操作対象となりうるオブジェクトである操作対象オブジェクトを制御する操作方法として、より操作性の高い操作方法の実現が求められている。 Therefore, there is a demand for a faster and more intuitive operation method for controlling virtual objects displayed on a touch panel and placed in a virtual space. More generally, there is a demand for a more user-friendly operation method for controlling target objects, which are objects that are placed in a virtual space and can be operated by a user.
本発明は、このような課題を解決するためになされたものであり、仮想空間における操作対象オブジェクトを制御するにあたって、より操作性を高くすることが可能なプログラム等を提供することを主目的とする。 The present invention has been made to solve these problems, and its main objective is to provide a program or the like that enables greater operability when controlling an object to be operated in a virtual space.
上記の目的を達成するために、本発明の一態様としてのプログラムは、タッチパネルを備える電子装置において実行されるプログラムであって、該電子装置に、前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示される1又は複数のデータポイントを、既定の処理時間ごとに、データポイント列として保持するステップと、保持されているデータポイント列におけるデータポイントの変位に基づいて、該データポイント列におけるデータポイントの変位速さを決定し、保持されたデータポイント列のうちの最新のデータポイント列における該変位速さの、該最新のデータポイント列より前に保持されたデータポイント列における該変位速さの平均値に対する偏りに基づいて、前記ユーザが仮想空間内の操作対象オブジェクトの移動を制御するための速度因子を決定するステップと、を実行させることを特徴とする。 In order to achieve the above object, a program as one aspect of the present invention is a program executed in an electronic device equipped with a touch panel, and causes the electronic device to execute the steps of: retaining, as a data point sequence for each predetermined processing time, one or more data points indicated by a first axis value and a second axis value obtained based on a touch event generated by a user's operation on the touch panel; determining a displacement speed of a data point in the retained data point sequence based on the displacement of the data point in the retained data point sequence; and determining a speed factor for the user to control the movement of an object to be operated in a virtual space based on the deviation of the displacement speed in the latest data point sequence among the retained data point sequences from the average displacement speed in the data point sequences retained prior to the latest data point sequence.
また、本発明において好ましくは、前記データポイント列として保持するステップは、
保持されている前記データポイント列のうち既定の保持時間を超えた前記データポイント列の保持を終了する。
In the present invention, preferably, the step of storing as a data point sequence comprises:
The retention of the sequence of data points that has exceeded a predetermined retention time is terminated.
また、本発明において好ましくは、前記速度因子を決定するステップは、保持されたデータポイント列のうちの一のデータポイント列における前記変位速さの、該一のデータポイント列より前に保持されたデータポイント列における前記変位速さの平均値に対する偏りに基づいて、前記速度因子を決定する。 Also, in the present invention, preferably, the step of determining the speed factor determines the speed factor based on the bias of the displacement speed in one of the retained data point sequences relative to the average value of the displacement speed in the data point sequence retained prior to the one data point sequence.
また、本発明において好ましくは、前記データポイント列として保持するステップは、1又は複数のデータポイントを、前記第1の軸の値及び前記第2の軸の値ごとに第1の軸の列及び第2の軸の列として保持し、前記速度因子を決定するステップは、保持した前記データポイント列における前記第1の軸の列の値の変位及び前記第2の軸の列の値の変位に基づいて、該データポイント列における前記変位速さを決定する。 Also, in the present invention, preferably, the step of storing as a data point sequence stores one or more data points as a first axis sequence and a second axis sequence for each of the first axis value and the second axis value, and the step of determining the speed factor determines the displacement speed in the data point sequence based on the displacement of the values of the first axis sequence and the displacement of the values of the second axis sequence in the stored data point sequence.
また、本発明において好ましくは、前記速度因子を決定するステップは、保持した前記データポイント列において時系列的に隣接するデータポイントの変位量、及び該データポイント列が含むデータポイントの数量に基づいて、該データポイント列における前記変位速さを決定する。 In the present invention, preferably, the step of determining the speed factor determines the displacement speed in the retained data point sequence based on the displacement amount of chronologically adjacent data points in the retained data point sequence and the number of data points contained in the data point sequence.
また、本発明において好ましくは、前記第1の軸及び前記第2の軸は、前記タッチパネルの長辺及び短辺と平行である。 In the present invention, preferably, the first axis and the second axis are parallel to the long and short sides of the touch panel.
また、本発明において好ましくは、前記既定の処理時間は、ゲームを実行するためのフレームレートに対応する時間であり、前記プログラムは、前記電子装置に、前記速度因子に基づいて、前記タッチパネルに表示される前記操作対象オブジェクトの移動状態を決定するステップを更に実行させる。 Also, in the present invention, preferably, the default processing time is a time corresponding to a frame rate for executing the game, and the program further causes the electronic device to execute a step of determining the movement state of the target object displayed on the touch panel based on the speed factor.
また、本発明において好ましくは、前記操作対象オブジェクトは、操作対象キャラクタであり、前記移動状態は、前記操作対象キャラクタが歩く状態及び走る状態を含む。 In the present invention, preferably, the object to be operated is a character to be operated, and the movement state includes a walking state and a running state of the character to be operated.
また、上記の目的を達成するために、本発明の一態様としての電子装置は、タッチパネルを備える電子装置であって、前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示される1又は複数のデータポイントを、既定の処理時間ごとに、データポイント列として保持し、保持されているデータポイント列におけるデータポイントの変位に基づいて、該データポイント列におけるデータポイントの変位速さを決定し、保持されたデータポイント列のうちの最新のデータポイント列における前記変位速さの、該最新のデータポイント列より前に保持されたデータポイント列における前記変位速さの平均値に対する偏りに基づいて、前記ユーザが仮想空間内の操作対象オブジェクトの移動を制御するための速度因子を決定する、ことを特徴とする。 In order to achieve the above object, an electronic device according to one aspect of the present invention is an electronic device having a touch panel, which stores one or more data points indicated by a first axis value and a second axis value obtained based on a touch event generated by a user's operation on the touch panel as a data point sequence for each predetermined processing time, determines a displacement speed of a data point in the stored data point sequence based on the displacement of the data point in the data point sequence, and determines a speed factor for the user to control the movement of an object to be operated in a virtual space based on the deviation of the displacement speed in the latest data point sequence among the stored data point sequences from the average displacement speed in the data point sequences stored before the latest data point sequence.
また、上記の目的を達成するために、本発明の一態様としての方法は、タッチパネルを備える電子装置において実行される方法であって、前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示される1又は複数のデータポイントを、既定の処理時間ごとに、データポイント列として保持するステップと、保持されているデータポイント列におけるデータポイントの変位に基づいて、該データポイント列におけるデータポイントの変位速さを決定し、保持されたデータポイント列のうちの最新のデータポイント列における該変位速さの、該最新のデータポイント列より前に保持されたデータポイント列における該変位速さの平均値に対する偏りに基づいて、前記ユーザが仮想空間内の操作対象オブジェクトの移動を制御するための速度因子を決定するステップと、を有することを特徴とする。 In order to achieve the above object, a method according to one aspect of the present invention is a method executed in an electronic device equipped with a touch panel, and is characterized by comprising the steps of: retaining, as a data point sequence for each predetermined processing time, one or more data points indicated by a first axis value and a second axis value obtained based on a touch event generated by a user's operation on the touch panel; determining a displacement speed of a data point in the retained data point sequence based on the displacement of the data point in the retained data point sequence; and determining a speed factor for the user to control the movement of an object to be operated in a virtual space based on the deviation of the displacement speed in the latest data point sequence among the retained data point sequences from the average value of the displacement speed in the data point sequences retained prior to the latest data point sequence.
本発明によれば、仮想空間における操作対象オブジェクトを制御するにあたって、より操作性を高くすることができる。 The present invention provides improved operability when controlling an object to be operated in a virtual space.
以下、図面を参照して、本発明の実施形態を説明する。各図において同一の符号は、特に言及が無い限り同一又は相当部分を示すものとし、説明の便宜上、図面の縦横の縮尺を実際のものとは異なるように表す場合がある。また、説明の便宜上、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成についての重複説明を省略する場合がある。 Below, an embodiment of the present invention will be described with reference to the drawings. In each drawing, the same reference numerals indicate the same or equivalent parts unless otherwise specified, and for the sake of convenience, the scale of the drawings may be different from the actual scale. In addition, for the sake of convenience, more detailed explanations than necessary may be omitted. For example, detailed explanations of already well-known matters and duplicate explanations of substantially identical configurations may be omitted.
本発明の一実施形態による電子装置10は、仮想空間に配置された仮想的なオブジェクトをユーザに提示し、ゲームを進行するゲームアプリケーションがインストールされている。本実施形態の電子装置10は、当該ゲームアプリケーションが実行されると、ユーザの操作に応じて、仮想空間内のユーザの操作対象の仮想的なオブジェクトである操作対象オブジェクトを制御するための仮想的なコントローラ(仮想コントローラ)を提供する。仮想空間は、当該ゲームアプリケーションにより定められるものであり、2次元空間であることもできるし、3次元空間であることもできる。例えば、仮想的なオブジェクトは、仮想空間に配置されたキャラクタ又はアイテムである。本実施形態では、操作対象オブジェクトは、仮想空間に配置されたキャラクタ(操作対象キャラクタ)である。ただし、操作対象オブジェクトは、仮想空間に配置されたアイテム又は仮想カメラなどとすることもできる。
The
説明の便宜上、本実施形態においては、電子装置10には上記のようなゲームアプリケーションがインストールされているものとするが、これに限定されない。電子装置10は、ユーザの操作に応じて、操作対象オブジェクトを制御することが可能なアプリケーションを実装していればよい。例えば、電子装置10には、ゲームアプリケーションの代わりに又はこれに追加して、ユーザの操作に応じて操作対象オブジェクトを動作させる入力支援アプリケーション又はシミュレーションアプリケーションが実装されてもよい。以下の説明において、アプリケーションは、アプリケーションプログラム全般を意味するものであり、スマートフォンやタブレット端末にインストールされるアプリを意味することができる。
For ease of explanation, in this embodiment, it is assumed that the
図1は本発明の一実施形態による電子装置10のハードウェア構成を示すブロック図である。電子装置10は、プロセッサ11、入力装置12、表示装置13、記憶装置14、及び通信装置15を備える。これらの各構成装置はバス16によって接続される。なお、バス16と各構成装置との間には必要に応じてインタフェースが介在しているものとする。本実施形態において、電子装置10はスマートフォンである。ただし、電子装置10は、上記の構成を備えるものであれば、タブレット型コンピュータ、タッチパッド等の接触型入力装置を備えるコンピュータなどの端末とすることができる。
Figure 1 is a block diagram showing the hardware configuration of an
プロセッサ11は、電子装置10全体の動作を制御する。例えばプロセッサ11は、CPUである。なお、プロセッサ11としては、MPU等の電子回路が用いられてもよい。プロセッサ11は、記憶装置14に格納されているプログラムやデータを読み込んで実行することにより、様々な処理を実行する。1つの例では、プロセッサ11は、複数のプロセッサから構成される。
The
入力装置12は、電子装置10に対するユーザからの入力を受け付けるユーザインタフェースであり、例えば、タッチパネル、タッチパッド、キーボード、又はマウスである。表示装置(ディスプレイ)13は、プロセッサ11の制御に従って、アプリケーション画面などを電子装置10のユーザに表示する。本実施形態においては、スマートフォンである電子装置10は入力装置12としてタッチパネル17を備え、タッチパネル17は表示装置13としても機能し、入力装置12と表示装置13は一体となった構造である。本実施形態のタッチパネル17は、投影型静電容量方式タッチパネルであるが、同等の機能を有するデバイスがあれば、それを用いてもよい。
The
記憶装置14は、揮発性メモリであるRAM及び不揮発性メモリであるROMを含む、一般的なスマートフォンが備える記憶装置である。記憶装置14は、外部メモリを含むこともできる。記憶装置14は、ゲームアプリケーションを含む各種プログラムを記憶する。例えば、記憶装置14は、オペレーティングシステム(OS)、ミドルウェア、アプリケーションプログラム、これらのプログラムの実行に伴って参照され得る各種データなどを格納する。
The
1つの例では、記憶装置14は、主記憶装置及び補助記憶装置を含む。主記憶装置は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、プロセッサ11が情報を処理する際の記憶領域及び作業領域として用いられる。補助記憶装置は、様々なプログラムや、各プログラムの実行に際してプロセッサ11が使用するデータを格納する。補助記憶装置は、例えばハードディスク装置であるが、情報を格納できるものであればいかなる不揮発性ストレージ又は不揮発性メモリであってもよく、着脱可能なものであっても構わない。
In one example, the
通信装置15は、ネットワークを介してサーバなどの他のコンピュータとの間でデータの授受を行う。例えば通信装置15は、移動体通信や無線LAN等の無線通信を行い、ネットワークへ接続する。1つの例では、電子装置10は、通信装置15によってプログラムをサーバからダウンロードして、記憶装置14に格納する。ただし、通信装置15は既知の有線通信を行ってもよい。他のコンピュータとの間でデータの送受信を行わない場合、電子装置10は通信装置15を備えなくてもよい。
The
図2は本発明の一実施形態による電子装置10の機能ブロック図である。電子装置10は、入力部21、表示部22、及び制御部23を備える。制御部23は、エンジン部24、状態決定部25、及びアプリケーション部26を備える。本実施形態においては、プログラムがプロセッサ11により実行されることによりこれらの機能が実現される。例えば実行されるプログラムは、記憶装置14に記憶されている又は通信装置15を介して受信したプログラムである。このように、各種機能がプログラム読み込みにより実現されるため、1つのパート(機能)の一部又は全部を他のパートが有していてもよい。ただし、各機能の一部又は全部を実現するための電子回路等を構成することによりハードウェアによってもこれらの機能は実現してもよい。
Figure 2 is a functional block diagram of an
入力部21は、入力装置12を用いて構成されるものであり、電子装置10に対するユーザからの入力を受け付ける。本実施形態では、入力部21は、タッチパネル17へのユーザのタッチ操作を受け付けてタッチイベントを発生するものであり、タッチパネル17を備えるスマートフォンが一般的に有しているタッチ検出機能を用いることができる。
The
表示部22は、ゲームアプリケーション画面を表示装置13に表示し、ユーザ操作に応じた画面を表示する。
The
制御部23は、仮想コントローラを実現するものである。本実施形態では、制御部23は3層構造のアーキテクチャを採用し、エンジン部24、状態決定部25、及びアプリケーション部26が各層に対応する。例えば制御部23は、各層に対応する各プログラムにより構成されるプログラムがプロセッサ11により実行されることにより実現される。
The
エンジン部24は、主として、タッチパネル17へのユーザのタッチ操作により発生したタッチイベントを用いてユーザが仮想空間内の操作対象オブジェクトの移動を制御するための速度因子及び角度を決定し、状態決定部25へ送出する。速度因子は、操作対象オブジェクトの速さを決定するための値である。本実施形態では、操作対象オブジェクトが操作対象キャラクタであるため、速度因子は、更に、歩くや走るなどの該キャラクタのモーションを決定するための値である。角度は、操作対象オブジェクトの移動方向を決定するための値である。エンジン部24の角度決定方法は、例えば特願2018-094656号に記載されている方法を用いるため、本明細書では説明を省略する。
The
状態決定部25は、主として、エンジン部24から送出された速度因子を用いて、操作対象オブジェクトの移動状態を決定し、速度因子及び移動状態をアプリケーション部26へ送出する。
The
アプリケーション部26は、ゲーム内の動作等を実装する、具体的なゲームアプリケーションに対応する。ゲームアプリケーションは、一般的なゲームアプリケーションと同様にして、フレームレートが定められ、例えばフレームレートに対応する時間ごとに、メインプログラムのメインループを処理する。フレームレートは、一般的に30fps(フレーム毎秒)又は60fpsである。ただし、アプリケーション部26は、ユーザの操作に応じて操作対象オブジェクトを動作させる入力支援アプリケーション又はシミュレーションアプリケーションに対応するものとすることができる。
The
エンジン部24は、タッチパネル17へのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示されるデータポイントを、記憶装置14内の第1のバッファに格納する。ここで、タッチイベントは、ユーザがタッチパネル17へ指を接触したとき(touchstart)、ユーザがタッチパネル17に指を接触させたまま動かしたとき(touchmove)、ユーザがタッチパネル17から指を離したとき(touchend)などに発生する。
The
エンジン部24は、タッチイベントが発生するときに、タッチイベントを取得する。エンジン部24は、タッチイベントを取得するとき、タッチパネル17上の静電容量が変化した位置に対応する、2つの変数からなる数値の組(x、y)を取得して、第1のバッファに格納する。当該2つの変数からなる数値の組のデータは、タッチイベントに付随してエンジン部24が取得するものであり、第1の軸の値及び第2の軸の値により示されるデータポイントに対応するものである。
The
本実施形態では、説明の便宜上、第1の軸及び第2の軸を以下のとおり定める。図3は、本実施形態の第1の軸及び第2の軸からなる座標軸を示す図である。第1の軸は、略長方形であるタッチパネル17の短辺と実質的に平行な横軸(x軸)である。第2の軸は、タッチパネル17の長辺と実質的に平行な縦軸(y軸)である。タッチパネル17上の位置は、第1の軸(x軸)及び第2の軸(y軸)により座標(x、y)として表される。したがって、本実施形態では、データポイントの座標(x、y)は、タッチパネル17上の位置に対応し、エンジン部24は、当該座標(x、y)を、データポイントとして第1のバッファに保持する。図3に示す座標設定は、一例であり、電子装置10が実装するプログラムにより、上記例示と異なるように設定することができる。
In this embodiment, for convenience of explanation, the first axis and the second axis are defined as follows. FIG. 3 is a diagram showing coordinate axes consisting of the first axis and the second axis in this embodiment. The first axis is a horizontal axis (x axis) substantially parallel to the short side of the
エンジン部24は、既定の処理時間ごとに、第1のバッファに保持された1又は複数のデータポイントをデータポイント列として格納する。本実施形態では、エンジン部24は、フレームの時間(フレーム間の時間)ごとに、当該データポイント列を、記憶装置14内の第2のバッファに保持する。フレームの時間F(秒)は、ゲームを実行するためのフレームレートに対応する時間であり、例えばフレームレートが30fpsの場合、Fは1/30秒である。
The
エンジン部24がi番目のフレームにおいて保持したデータポイント列P(i)は、各データポイント
により表される。P(i)が含む各データポイントは、i番目のフレームの時間内に第1のバッファに保持されたデータポイントである。各データポイントPi,k(k=1~m)のx座標の値及びy座標の値は(xi,k,yi,k)で表される。各データポイントは、Pi,1、Pi,2、…、Pi,mの順番に第1のバッファに格納された時間が早いものとする。エンジン部24は、i-1番目のP(i-1)を保持してから1フレームの時間F(秒)経過後にP(i)を保持し、更に1フレームの時間経過後にP(i+1)を保持する。変数mは、P(i)が含むデータポイントの数であるため、P(i)に応じて異なる。
The data point sequence P(i) held by the
Each data point included in P(i) is a data point held in the first buffer within the time of the i-th frame. The x-coordinate value and the y-coordinate value of each data point P i,k (k=1 to m) are expressed as (x i,k , y i,k ). The data points are stored in the first buffer in the order of P i,1 , P i,2 , ..., P i,m in order of earliest time. The
エンジン部24は、第2のバッファに保持されているデータポイント列のうち既定の保持時間を超えたデータポイント列の保持を終了する。例えばエンジン部24は、データポイント列のデータの保持を終了する場合、該データを削除してもよいし、該データを無効化してもよいし、又は該データに保持を終了したことを示すフラグを関連付けて適宜削除するようにしてもよい。例えばエンジン部24は、第2のバッファに格納するデータポイントの寿命を指定する変数Dを定める。変数Dにより指定される時間が既定の処理時間に対応し、本実施形態ではフレームの時間に対応する。例えばエンジン部24は、データポイント列P(i)を保持した時間tiと対応付けて該データポイント列P(i)を第2のバッファに保持する。エンジン部24は、一のデータポイント列P(i)を第2のバッファに格納すると、該データポイント列P(i)が格納されてからの経過時間Tを監視し、継続的に変数Dと比較する。エンジン部24は、監視したデータポイント列P(i)の経過時間Tが変数Dを超えたとき、該データポイント列P(i)の第2のバッファへの保持を終了する。エンジン部24は、保持した時間tiを用いて、経過時間Tを算出することができる。
The
本実施形態では、エンジン部24は、5フレームに対応する時間5F(秒)、一のデータポイント列P(i)を第2のバッファに保持する。したがって、エンジン部24は、5つのデータポイント列を保持することになる。エンジン部24は、新しいデータポイント列から順番にP(5)、P(4)、P(3)、P(2)、P(1)となるように5つのデータポイント列を保持する。したがって、エンジン部24が5フレームに対応するデータポイント列を保持する場合、P(5)が最新の保持したデータポイント列となる。エンジン部24は、新たにデータポイント列を保持する場合、新たなデータポイント列をP(5)として保持し、P(i)(1≦i≦4)をP(i+1)のデータで置き換える。このときエンジン部24は、既定の保持時間を超えたP(1)の保持を終了する。
In this embodiment, the
1つの好適な例では、エンジン部24は、フレームの時間ごとに、データポイント列として、x座標の値とy座標の値を分けて保持する。エンジン部24が保持するx座標の値の集合Xとy座標の値の集合Yは、各々式(1)、式(2)のとおりである。
(1)
(2)
ここで、nは、エンジン部24が第2のバッファに保持しているデータポイント列の数であり、フレーム数に対応する。本実施形態では、エンジン部24は5フレームに対応する時間5F(秒)データポイント列を保持するため、経過時間に応じて、n=1、n=2、n=3、n=4、n=5、n=5、…n=5となる。したがって、5フレームに対応する時間5F(秒)経過後は、n=5となる。また、最も新しく保持したデータポイント列P(n)のx座標の値がxn,0,…xn,mであり、最も新しく保持したデータポイント列P(n)のy座標の値がyn,0,…yn,mである。なお、エンジン部24がデータポイント列を保持する時間に応じて、nの最大値は異なる値となる。
In one preferred example, the
(1)
(2)
Here, n is the number of data point sequences held by the
エンジン部24は、保持されたデータポイント列のうち最新のデータポイント列における変位速さvnの、該最新のデータポイント列より前に保持されたデータポイント列における変位速さv1~vn-1の平均値に対する偏りに基づいて、速度因子を決定する。好ましくは、エンジン部24は、保持されたデータポイント列のうちの一のデータポイント列における変位速さvi(i=1~n)の、該一のデータポイント列より前に保持されたデータポイント列における変位速さv1~vi-1の平均値に対する偏りに基づいて、速度因子を決定する。ここで、変位速さviの変位速さv0~vi-1の平均値に対する偏りは、例えば変位速さviの変位速さv0~vi-1の平均値からの偏り(偏差)である。なお、変位速さv1~vi-1の平均値は、i=1の場合は0とし、i=2の場合はv1とする。
The
エンジン部24は、決定した速度因子を状態決定部25へ出力する。エンジン部24は、状態決定部25へ直接出力せずに、状態決定部25が参照する記憶装置14内のメモリ領域に決定した速度因子を格納してもよい。
The
具体的には、エンジン部24は、以下のように速度因子を算出する。速度因子は、以下のように定義されたCumulative Pointwize Deviation関数(CPD関数)の出力値である。CPD関数は、式(3)により算出する。エンジン部24は、CPD関数の出力値を状態決定部25へ出力する。
(3)
ここで、nは、エンジン部24が第2のバッファに保持しているデータポイント列の数である。
Specifically, the
(3)
Here, n is the number of data point strings that the
viは、i番目のデータポイント列における変位速さ、又はi番目のフレームにおける変位速さである。変位速さは、対象となるフレームの時間におけるタッチポイントの集合(データポイントの集合)から算出されたユーザの指の移動速度に対応する。1つの例では、エンジン部24は、第2のバッファに保持されているデータポイント列におけるデータポイントの変位に基づいて、該データポイント列におけるデータポイントの変位速さを決定する。1つの例では、エンジン部24が、データポイント列としてx座標の値とy座標の値を分けて保持する場合、エンジン部24は、第2のバッファに保持されているデータポイント列におけるx座標の値の変位及びy座標の値の変位に基づいて、変位速さを決定する。1つの例では、エンジン部24は、第2のバッファに保持されているデータポイント列において時系列的に隣接するデータポイントの変位量、及び該データポイント列が含むデータポイントの数量に基づいて、変位速さを決定する。
v i is the displacement speed in the i-th data point sequence or the displacement speed in the i-th frame. The displacement speed corresponds to the moving speed of the user's finger calculated from the set of touch points (set of data points) at the time of the target frame. In one example, the
具体的には、変位速さは、式(4)により算出する。
(4)
ここで、αは、ディスプレイのピクセル密度DPI(Dot-Per-Inch)に対応する係数としての0以上の実数であり、一般的には1である。βは、積算重みであり、大きくすることにより突発的な変化を変位速さに反映しやすくなり、小さくすることにより突発的な変化を変位速さに反映しにくくなる。P(i)がデータポイントを含まない場合、エンジン部24は、変位速さviを算出せず、例えばvi=0と設定する。P(i)がデータポイントを1つのみ含む場合も、エンジン部24は、変位速さviを同様に算出せず、例えばvi=0と設定する。
Specifically, the displacement speed is calculated by the formula (4).
(4)
Here, α is a real number equal to or greater than 0 as a coefficient corresponding to the pixel density DPI (Dot-Per-Inch) of the display, and is generally 1. β is an integrated weight, and by increasing it, it becomes easier to reflect sudden changes in the displacement speed, and by decreasing it, it becomes harder to reflect sudden changes in the displacement speed. When P(i) does not include a data point, the
avgi-1(v)は、i番目のフレームの直前までの変位速さviの平均である。avgi-1(v)は、式(5)により算出する。
(5)
ここで、i=1の場合は、直前までの変位速さが存在しないため、avgi-1(v)=0となる。
avg i -1 (v) is the average of the displacement speed v i up to the frame immediately before the i-th frame, and is calculated by the formula (5).
(5)
Here, when i=1, there is no displacement speed up to the previous point, so avg i-1 (v)=0.
状態決定部25は、エンジン部24が決定した速度因子に基づいて、タッチパネル17に表示される操作対象オブジェクトの移動状態を決定する。本実施形態では、操作対象オブジェクトは、操作対象キャラクタであり、状態決定部25が決定する移動状態は、操作対象キャラクタが歩く状態及び走る状態のいずれか1つである。
The
1つの例では、状態決定部25は、以下のように定義されたclassify関数の出力値である。classify関数は、式(6)により算出する。
(6)
classify関数は、CPD関数の出力値が、閾値τ以下のときは歩き(walk)と判定し、CPD関数の出力値が閾値τより大きいときは走り(run)と判定する関数である。例えばclassify関数は、閾値τ以下のときは「0」を出力し、閾値τより大きいときは「1」を出力する。状態決定部25は、CPD関数の出力値及びclassify関数の出力値をアプリケーション部26へ出力する。状態決定部25は、アプリケーション部26へ直接出力せずに、アプリケーション部26が参照するメモリ領域にCPD関数の出力値及びclassify関数の出力値を格納してもよい。
In one example, the
(6)
The classify function is a function that determines that the output value of the CPD function is a walk when it is equal to or less than a threshold value τ, and determines that the output value of the CPD function is a run when it is greater than the threshold value τ. For example, the classify function outputs "0" when it is equal to or less than the threshold value τ, and outputs "1" when it is greater than the threshold value τ. The
アプリケーション部26は、電子装置10上で起動されたアプリの機能を有し、当該アプリによるサービスの提供を行う。1つの好適な例では、アプリケーション部26は、状態決定部25から出力されたCPD関数の出力値及びclassify関数の出力値を、具体的な操作対象キャラクタのモーションなどに変換するものであり、一般的なゲームアプリに実装されている機能である。例えばアプリケーション部26は、状態決定部25から出力されたCPD関数の出力値をそのまま操作対象キャラクタの移動する速さに変換し、classify関数の出力値を操作対象キャラクタの移動状態(歩く又は走る)に変換する。本実施形態では、アプリケーション部26の機能は、電子装置10にインストールされたネイティブアプリにより実現される。
The
図4、図5は、電子装置10により制御される操作対象キャラクタ50の一例を示す図である。図4は、操作対象キャラクタ50が歩いている状態を示し、図5は、操作対象キャラクタ50が走っている状態を示す。電子装置10は、データポイントの集合からCPD関数及びclassify関数の出力を求め、該出力に基づいて、歩かせる又は走らせるなどの操作対象キャラクタ50のモーションを制御する。
Figures 4 and 5 are diagrams showing an example of a
エンジン部24による、式(3)に示すCPD関数を用いた速度因子算出の実施例を以下に説明する。n=5のとき、CPD関数は、式(7)により表される。
(7)
例えば、ユーザが意図的に指を早く動かした場合、必然的に指が一定の時間加速することになる。この場合、式(7)におけるv1~v5の値は全体的に大きくなるため、CPD関数はより大きな値を出力することとなる。一方、ユーザが意図的に指を早く動かしていない場合、例えば式(7)におけるv1~v5のいずれか1つの値が大きくなる。この場合、CPD関数は、v1~v5の値による演算に対して1/5(1/n)を乗算することにより平準化するため、極端に大きな値を出力しない。このように、5フレームに対応する時間5F(秒)経過後においては、CPD関数の出力値は、意図的に指を加速し続けている場合に大きな値となり、意図的に加速しないときは大きな値とならない。
An example of speed factor calculation using the CPD function shown in equation (3) by the
(7)
For example, if a user intentionally moves his/her finger quickly, the finger will inevitably accelerate for a certain period of time. In this case, the values of v 1 to v 5 in formula (7) will be large overall, so the CPD function will output a larger value. On the other hand, if the user does not intentionally move his/her finger quickly, for example, one of the values of v 1 to v 5 in formula (7) will be large. In this case, the CPD function does not output an extremely large value because it smoothes out the calculations based on the values of v 1 to v 5 by multiplying them by 1/5 (1/n). In this way, after the time 5F (seconds) corresponding to five frames has elapsed, the output value of the CPD function will be a large value if the finger continues to accelerate intentionally, and will not be a large value if the finger is not accelerated intentionally.
図6は、本発明の一実施形態の電子装置10による速度因子を決定する処理のフローチャートである。電子装置10は、フレームレートに対応するフレームの時間ごとに本処理を実行する。本フローチャートが実行されている間、エンジン部24は、発生したタッチイベントからデータポイントを取得して第1のバッファに格納しているものとする。ただし、本フローチャートの処理は、一定時間ごとに実行されれば、フレームの時間ごとでなくてもよい。
Figure 6 is a flowchart of a process for determining a speed factor by the
ステップ101で、エンジン部24は、1フレームの間に取得した座標(データポイント)をデータポイント列P(i)として第2のバッファに保持する。このとき、エンジン部24は、保持するデータポイント列P(i)に、格納後の経過時間をミリ秒で示すTと、第2のバッファに格納できる時間(保持寿命)をミリ秒で示す変数Dを関連付ける。
In step 101, the
続いてステップ102で、エンジン部24は、第2のバッファに保持されているデータポイント列P(i)のうち、経過時間Tが変数D以上であるデータポイント列P(i)の保持を終了する。
Next, in step 102, the
続いてステップ103で、式(3)~(5)を用いて、速度因子を決定する。ステップ104で、本フローチャートは、例えばゲームアプリケーションが終了するなどにより終了しない限り、ステップ101へ戻る。本フローチャートが終了すると、エンジン部24は、第2のバッファに保持するデータポイント列をすべて削除する。
Then, in step 103, the speed factor is determined using equations (3) to (5). In step 104, the flow returns to step 101 unless the flow ends, for example, because the game application ends. When the flow ends, the
次に、本発明の実施形態による電子装置10の主な作用効果について説明する。本実施形態では、タッチパネル17上で指をスワイプさせたとき、例えば100msなどの極めて短い時間に6回以上のタッチイベントが発生するという投影型静電容量方式タッチパネルの特徴を利用している。電子装置10が実装するソフトウェアのシステムアーキテクチャは、エンジン部24、状態決定部25、アプリケーション部26が第1層、第2層、第3層に各々対応する3層構造をとり、第3層は、例えばゲームアプリケーションに対応する。
Next, the main effects of the
第1層は、既定の処理時間ごとに、例えば既定の処理時間としてゲームアプリケーションにおけるフレームの時間ごとに、発生する複数のタッチイベントの集合(データポイントの集合)から、式(3)~(5)を用いてCPD関数を算出する。第1層は、CPD関数の出力値を、速度因子として、第2層へ出力する。第2層は、継続的に出力される速度因子を第3層へ出力するとともに、該速度因子を用いて、既定の処理時間ごとに、例えば操作対象キャラクタが歩く又は走るかを示す移動状態を第3層へ出力する。移動状態は、式(6)に示すclassify関数を用いて出力される。第3層は、第2層から出力されたCPD関数の出力値をそのまま操作対象キャラクタの移動する速さに変換し、classify関数の出力値を操作対象キャラクタの移動状態(歩く又は走る)に変換する。 The first layer calculates a CPD function using equations (3) to (5) from a set of multiple touch events (a set of data points) that occur for each predetermined processing time, for example, for each frame time in a game application as the default processing time. The first layer outputs the output value of the CPD function to the second layer as a speed factor. The second layer outputs the continuously output speed factor to the third layer, and uses the speed factor to output a movement state indicating, for example, whether the controlled character is walking or running to the third layer for each predetermined processing time. The movement state is output using the classify function shown in equation (6). The third layer converts the output value of the CPD function output from the second layer directly into the movement speed of the controlled character, and converts the output value of the classify function into the movement state (walking or running) of the controlled character.
第1層が第2のデータバッファにデータポイント列を保持し始めたとき、データポイント列を格納するフレーム数を示すnは、経過時間に応じて、n=1、n=2…と増加する。第1層がデータポイント列を保持する時間が経過した後は、nは最大値で固定される。CPD関数は、各フレームの変位速さが、その直前のフレームまでの変位速さの平均値よりも大きい値を保持するときに、より大きな値を出力する。したがって、ユーザが意図的に指を早く動かした場合、必然的に指が一定の時間加速することになるため、CPD関数はより大きな値を出力することとなる。一方で、タッチパネル17と指の接触状況により、1フレームの時間のみ変位速さが大きくなった場合、CPD関数は、1/nを乗算することにより平準化されるため、特にnが最大値のときには極端に大きな値を出力することがない。このように、CPD関数の出力値は、意図的に指を加速し続けている場合に大きな値となり、意図的に加速しないときは大きな値をとらないため、電子装置10は、ユーザの直感的な操作に対応させて操作対象キャラクタ50の移動状態を決定することが可能となる。更に、CPD関数は偏差を用いることで、ユーザごとの指を動かす速さの癖や個人差を吸収するため、電子装置10は、CPD関数を用いることにより、意図的な加速のみを検出することが可能となる。
When the first layer starts to hold the data point sequence in the second data buffer, n, which indicates the number of frames in which the data point sequence is stored, increases with the elapsed time, from n=1, to n=2, and so on. After the time during which the first layer holds the data point sequence has elapsed, n is fixed at the maximum value. The CPD function outputs a larger value when the displacement speed of each frame holds a value greater than the average value of the displacement speed up to the previous frame. Therefore, if the user intentionally moves his finger faster, the finger will inevitably accelerate for a certain period of time, and the CPD function will output a larger value. On the other hand, if the displacement speed becomes large only for one frame due to the contact state between the
また第1層が第2のデータバッファにデータポイント列を保持し始めたとき、n=1、n=2…とnは取りうる値の中で比較的小さな値となり、1/nを乗算することによる影響が少ない。そのため、電子装置10は、CPD関数を用いることにより、ユーザが入力した後の1フレーム目から即座に、操作対象キャラクタ50の移動状態を決定することが可能となる。例えば、ユーザが勢い良く指を動かせば、電子装置10は即座に操作対象キャラクタ50を走っている状態にすることができる。一方で、ユーザが徐々に指を加速させる動作でも、電子装置10は、加速の継続時間に応じた重みを積算するCPD関数を用いて毎フレーム移動状態を判定することから、操作対象キャラクタ50を歩いている状態から走っている状態へ移行させることができる。更に、CPD関数による判定は、経過フレーム数に応じて認識精度が上昇するため、1フレーム目で歩きと走りの識別ができない場合でも、2フレーム目や3フレーム目で識別できるようになる。
When the first layer starts to store the data point sequence in the second data buffer, n=1, n=2, etc., is a relatively small value among the possible values, and the impact of multiplying by 1/n is small. Therefore, by using the CPD function, the
また本実施形態では、第1層は極めて短い時間に発生するタッチイベントを用いてフレームレートごとに速度因子を算出し続ける構成であるため、いずれの層も、過去のタッチ座標を基準点として用いずに、操作対象キャラクタの移動する速さを算出することが可能となる。このように、本実施形態では、電子装置10は、従来技術における仮想コントローラで使用されていた、開始点(開始座標)や終了点(終了座標)といった点という空間的な概念を使用せずに速さを算出する。
In addition, in this embodiment, the first layer is configured to continue calculating the speed factor for each frame rate using touch events that occur in an extremely short time, so that each layer is able to calculate the speed at which the controlled character moves without using past touch coordinates as reference points. In this way, in this embodiment, the
また本実施形態では、従来技術における仮想コントローラ、すなわち基準座標と現在の指示座標との間の位置関係によって得られるベクトルを用いた仮想コントローラとは異なり、基準座標の概念がないため、基準座標を定める仮想コントローラよりも高い応答性を提供することが可能である。特に操作対象キャラクタの方向転換操作を行う場合、方向転換前とは大きく異なる方向にユーザがタッチパネル17上の操作を行ったとしても、現在の指示座標が基準座標に近づくという概念そのものがないため、ユーザの意図した操作内容に素早く応答して操作対象キャラクタのモーションに反映させることができる。また上記のように構成されることにより、スマートフォンで操作するユーザに対して片手での操作を可能とすることができる。これにより、ユーザが従来技術における仮想ジョイスティックの操作を行うにあたって、常に基準座標を意識する必要があり、片手での操作が難しい場合があるという問題点を解消することができる。このように、本実施形態では、より高速で直感的な操作を可能とする仮想コントローラを実現している。
In addition, in this embodiment, unlike the virtual controller in the conventional technology, that is, the virtual controller using a vector obtained by the positional relationship between the reference coordinate and the current designated coordinate, there is no concept of a reference coordinate, so it is possible to provide higher responsiveness than a virtual controller that determines a reference coordinate. In particular, when performing a direction change operation of the operation target character, even if the user performs an operation on the
また本実施形態では、電子装置10は、従来技術における仮想コントローラと異なり、基準座標からの指の移動距離に応じた入力ではないため、指の移動量がより少ない操作により、ユーザが意図する操作を実現することが可能となる。したがって、従来技術と比較して、より小さい実装面積で実現することが可能となる。例えば、タッチパネル17の大きさに関わらず、同一の操作性を実現することが可能となる。
Furthermore, in this embodiment, unlike the virtual controller in the conventional technology, the
また、本実施形態の電子装置10が提供する仮想コントローラの技術は、スワイプ操作に伴う指の移動速度と加速の継続時間からのモーション制御という、これまでにない観点からキャラクタのモーション制御を数理的にモデル化しているため、幅広いゲームジャンルに適用可能である。また、数理モデルに基づいてすべての動作を数値制御しており、式(4)に示すβの値などの設定値を変更することで色々なモーション制御を作り出すことができる。
The virtual controller technology provided by the
上記の作用効果は、特に言及が無い限り、他の実施形態や他の実施例においても同様である。 The above effects and advantages are the same in other embodiments and examples unless otherwise stated.
本発明の他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現するプログラムや該プログラムを格納したコンピュータ読み取り可能な記憶媒体とすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現する方法とすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現するプログラムをコンピュータに供給することができるサーバとすることもできる。また他の実施形態では、上記で説明した本発明の実施形態の機能やフローチャートに示す情報処理を実現する仮想マシンとすることもできる。 In other embodiments of the present invention, the present invention may be a program that realizes the functions of the embodiments of the present invention described above and the information processing shown in the flowcharts, or a computer-readable storage medium that stores the program. In still other embodiments, the present invention may be a method that realizes the functions of the embodiments of the present invention described above and the information processing shown in the flowcharts. In still other embodiments, the present invention may be a server that can supply a program that realizes the functions of the embodiments of the present invention described above and the information processing shown in the flowcharts to a computer. In still other embodiments, the present invention may be a virtual machine that realizes the functions of the embodiments of the present invention described above and the information processing shown in the flowcharts.
以下に本発明の実施形態の変形例について説明する。以下で述べる変形例は、矛盾が生じない限りにおいて、適宜組み合わせて本発明の任意の実施形態に適用することができる。 Below, we will explain modified examples of the embodiments of the present invention. The modified examples described below can be combined as appropriate and applied to any embodiment of the present invention, provided no contradictions arise.
1つの変形例では、状態決定部25が決定する移動状態は、操作対象キャラクタが歩く状態、早く歩く状態及び走る状態のいずれか1つである。この場合、classify関数は、式(8)により算出する。
(8)
classify関数は、CPD関数の出力値が、閾値t1以下のときは歩き(walk1)と判定し、閾値t1より大きく閾値t2より小さいときは早歩き(walk2)と判定し、閾値t2より大きいときは走り(run)と判定する関数である。例えばclassify関数は、閾値t1以下のときは「0」を出力し、閾値t1より大きく閾値t2以下のときは「1」を出力し、閾値t2より大きいときは「2」を出力する。状態決定部25は、CPD関数の出力値及びclassify関数の出力値をアプリケーション部26へ出力する。状態決定部25は、アプリケーション部26へ直接出力せずに、アプリケーション部26が参照するメモリ領域にCPD関数の出力値及びclassify関数の出力値を格納してもよい。このように、移動状態は、操作対象キャラクタが歩く状態及び走る状態を含む複数の状態とすることができ、classify関数は、設定した閾値に応じていずれか1つの移動状態を判定するものであればよい。
In one modified example, the movement state determined by the
(8)
The classify function is a function that determines that the output value of the CPD function is walking (walk1) when it is equal to or less than the threshold t1, determines that the output value is brisk walking (walk2) when it is greater than the threshold t1 and less than the threshold t2, and determines that the output value is running (run) when it is greater than the threshold t2. For example, the classify function outputs "0" when it is equal to or less than the threshold t1, outputs "1" when it is greater than the threshold t1 and less than the threshold t2, and outputs "2" when it is greater than the threshold t2. The
1つの変形例では、エンジン部24が、状態決定部25の代わりに、移動状態を決定し、アプリケーション部26へ出力する。
In one variant, the
1つの変形例では、エンジン部24は、CPD関数を算出する際に参照するため、決定した変位速さviを、記憶装置14内の第3のバッファに保持する。エンジン部24は、第3のバッファに保持する変位速さの数量が既定量を超える場合、保持されている変位速さのうち最初に保持された変位速さの保持を終了する。例えば、エンジン部24は、変位速さのデータの保持を終了する場合、該データを削除してもよいし、該データを無効化してもよいし、又は該データに保持を終了したことを示すフラグを関連付けて適宜削除するようにしてもよい。例えば、エンジン部24は、最大で5フレームに対応する変位速さviを保持する。エンジン部24は、新しい変位速さから順番にv5、v4、v3、v2、v1となるように5つの変位速さを保持する。したがって、エンジン部24が5フレームに対応する変位速さを保持する場合、v5が最新の保持したデータポイント列となる。エンジン部24は、新たに変位速さを保持する場合、新たな変位速さをv5として保持し、vi(1≦i≦4)をvi+1のデータで置き換えるとともに、v1の保持を終了する。
In one modified example, the
1つの変形例では、アプリケーション部26の機能は、電子装置10にインストールされたWebアプリにより実現される。この場合、電子装置10と通信するサーバが、アプリケーション部26の一部又は全部をWebページとして電子装置10へ送信し、Webアプリは、アプリケーション部26が実行する処理を電子装置10上で実行するとともに、当該サーバとデータの送受信を行う。
In one variation, the functions of the
1つの変形例では、入力装置12と表示装置13は、別の位置に配置される別個の形態である。この場合、入力装置12は、タッチパネル又は投影型静電容量方式タッチパネルと同等の機能を有するデバイスである。表示装置13は、プロセッサ11の制御に従って、アプリケーション画面などを電子装置10のユーザに表示するものであればよく、例えば液晶ディスプレイ、有機ELを用いたディスプレイやプラズマディスプレイなどである。
In one variation, the
以上に説明した処理又は動作において、あるステップにおいて、そのステップではまだ利用することができないはずのデータを利用しているなどの処理又は動作上の矛盾が生じない限りにおいて、処理又は動作を自由に変更することができる。また以上に説明してきた各実施例は、本発明を説明するための例示であり、本発明はこれらの実施例に限定されるものではない。本発明は、その要旨を逸脱しない限り、種々の形態で実施することができる。 In the processes or operations described above, the processes or operations can be freely modified as long as no inconsistencies in the processes or operations occur, such as the use of data in a step that should not yet be available in that step. Furthermore, the embodiments described above are merely examples for explaining the present invention, and the present invention is not limited to these embodiments. The present invention can be implemented in various forms as long as they do not deviate from the gist of the invention.
10 電子装置
11 プロセッサ
12 入力装置
13 表示装置
14 記憶装置
15 通信装置
16 バス
17 タッチパネル
21 入力部
22 表示部
23 制御部
24 エンジン部
25 状態決定部
26 アプリケーション部
50 操作対象キャラクタ
10
Claims (10)
前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示される複数のデータポイントを、既定時間ごとに、データポイント列として保持するステップと、
一の既定時間に保持されたデータポイント列におけるデータポイントの変位に基づいて、該一の既定時間のデータポイント列におけるデータポイントの変位速さを決定し、保持されたデータポイント列のうちの最新のデータポイント列における変位速さの、該最新のデータポイント列より前に保持されたデータポイント列における変位速さの平均値に対する偏りに基づいて、前記ユーザが仮想空間内の操作対象オブジェクトの移動を制御するための速度因子を決定するステップと、
を実行させるプログラム。 A program executed in an electronic device having a touch panel, the electronic device comprising:
storing, for each preset time, a plurality of data points indicated by a first axis value and a second axis value acquired based on a touch event generated by a user's operation on the touch panel, as a data point sequence;
determining a displacement speed of a data point in a data point sequence for a certain predetermined time based on the displacement of the data point in the data point sequence held for the certain predetermined time, and determining a speed factor for the user to control the movement of an object to be operated in a virtual space based on a deviation of the displacement speed in the latest data point sequence among the held data point sequences from an average value of the displacement speeds in the data point sequences held prior to the latest data point sequence;
A program that executes the following.
保持されている前記データポイント列のうち既定の保持時間を超えた前記データポイント列の保持を終了する、請求項1に記載のプログラム。 The step of retaining as a sequence of data points comprises:
The program according to claim 1 , further comprising: terminating retention of the data point sequence that has exceeded a predetermined retention time among the data point sequence being retained.
保持されたデータポイント列のうちの一の既定時間のデータポイント列における変位速さの、該一の既定時間のデータポイント列より前に保持されたデータポイント列における変位速さの平均値に対する偏りに基づいて、前記速度因子を決定する、請求項1又は2に記載のプログラム。 The step of determining a rate factor comprises:
The program of claim 1 or 2, wherein the speed factor is determined based on a deviation of the displacement speed in one of the retained data point sequences at a predetermined time from the average displacement speed in a data point sequence retained prior to the one of the retained data point sequences at the predetermined time.
前記速度因子を決定するステップは、一の既定時間に保持されたデータポイント列における前記第1の軸の列の値の変位及び前記第2の軸の列の値の変位に基づいて、該一の既定時間のデータポイント列における変位速さを決定する、請求項1から3のいずれか1項に記載のプログラム。 The step of storing as a data point sequence includes storing a plurality of data points as a first axis sequence and a second axis sequence for each value of the first axis and each value of the second axis;
4. The program of claim 1, wherein the step of determining the speed factor determines a rate of change in a series of data points held for a predetermined time based on a change in the values of the first axis column and a change in the values of the second axis column in the series of data points held for the predetermined time.
前記プログラムは、前記電子装置に、
前記速度因子に基づいて、前記タッチパネルに表示される前記操作対象オブジェクトの移動状態を決定するステップを更に実行させる、請求項1から6に記載のプログラム。 the predetermined processing time corresponds to a frame rate for executing a game,
The program includes:
The program according to claim 1 , further comprising the step of determining a moving state of the operation target object displayed on the touch panel based on the speed factor.
前記移動状態は、前記操作対象キャラクタが歩く状態及び走る状態を含む、請求項7に記載のプログラム。 the operation target object is an operation target character,
The program according to claim 7 , wherein the movement state includes a walking state and a running state of the operated character.
前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示される複数のデータポイントを、既定時間ごとに、データポイント列として保持し、
一の既定時間に保持されたデータポイント列におけるデータポイントの変位に基づいて、該一の既定時間のデータポイント列におけるデータポイントの変位速さを決定し、
保持されたデータポイント列のうちの最新のデータポイント列における変位速さの、該最新のデータポイント列より前に保持されたデータポイント列における変位速さの平均値に対する偏りに基づいて、前記ユーザが仮想空間内の操作対象オブジェクトの移動を制御するための速度因子を決定する、
電子装置。 An electronic device having a touch panel,
retaining a plurality of data points indicated by a first axis value and a second axis value acquired based on a touch event generated by a user's operation on the touch panel as a data point sequence for each predetermined time;
determining a rate of change of the data points in the sequence of data points held for a predetermined time based on the change of the data points in the sequence of data points held for the predetermined time;
determining a speed factor for the user to control the movement of the object to be operated in the virtual space based on a deviation of a displacement speed in a latest data point sequence among the stored data point sequences with respect to an average value of displacement speeds in data point sequences stored prior to the latest data point sequence;
Electronic device.
前記タッチパネルへのユーザの操作により発生したタッチイベントに基づいて取得される第1の軸の値及び第2の軸の値により示される複数のデータポイントを、既定時間ごとに、データポイント列として保持するステップと、
一の既定時間に保持されたデータポイント列におけるデータポイントの変位に基づいて、該一の既定時間のデータポイント列におけるデータポイントの変位速さを決定し、保持されたデータポイント列のうちの最新のデータポイント列における変位速さの、該最新のデータポイント列より前に保持されたデータポイント列における変位速さの平均値に対する偏りに基づいて、前記ユーザが仮想空間内の操作対象オブジェクトの移動を制御するための速度因子を決定するステップと、
を有する方法。 1. A method implemented in an electronic device having a touch panel, comprising:
storing, for each preset time, a plurality of data points indicated by a first axis value and a second axis value acquired based on a touch event generated by a user's operation on the touch panel, as a data point sequence;
determining a displacement speed of a data point in a data point sequence for a certain predetermined time based on the displacement of the data point in the data point sequence held for the certain predetermined time, and determining a speed factor for the user to control the movement of an object to be operated in a virtual space based on a deviation of the displacement speed in the latest data point sequence among the held data point sequences from an average value of the displacement speeds in the data point sequences held prior to the latest data point sequence;
The method according to claim 1,
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019133775A JP7471782B2 (en) | 2018-09-26 | 2019-07-19 | Program, electronic device, and method |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018180372A JP6560801B1 (en) | 2018-09-26 | 2018-09-26 | Program, electronic apparatus, and method |
JP2019133775A JP7471782B2 (en) | 2018-09-26 | 2019-07-19 | Program, electronic device, and method |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018180372A Division JP6560801B1 (en) | 2018-09-26 | 2018-09-26 | Program, electronic apparatus, and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020053021A JP2020053021A (en) | 2020-04-02 |
JP7471782B2 true JP7471782B2 (en) | 2024-04-22 |
Family
ID=90735812
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019133775A Active JP7471782B2 (en) | 2018-09-26 | 2019-07-19 | Program, electronic device, and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7471782B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018084169A1 (en) | 2016-11-01 | 2018-05-11 | 株式会社コロプラ | Gaming method and gaming program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001022488A (en) * | 1999-07-12 | 2001-01-26 | Matsushita Electronics Industry Corp | User interface control method and user interface controller |
JP6176907B2 (en) * | 2012-09-13 | 2017-08-09 | キヤノン株式会社 | Information processing apparatus, control method therefor, and program |
-
2019
- 2019-07-19 JP JP2019133775A patent/JP7471782B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018084169A1 (en) | 2016-11-01 | 2018-05-11 | 株式会社コロプラ | Gaming method and gaming program |
Also Published As
Publication number | Publication date |
---|---|
JP2020053021A (en) | 2020-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9772743B1 (en) | Implementation of a movable control pad on a touch enabled device | |
JP6389581B1 (en) | Program, electronic apparatus, and method | |
US20210205698A1 (en) | Program, electronic device, and method | |
JP7150108B2 (en) | Game program, information processing device, information processing system, and game processing method | |
US20150231491A1 (en) | Advanced Game Mechanics On Hover-Sensitive Devices | |
CN110215685B (en) | Method, device, equipment and storage medium for controlling virtual object in game | |
US10073609B2 (en) | Information-processing device, storage medium, information-processing method and information-processing system for controlling movement of a display area | |
US10078410B1 (en) | System to locomote an entity in three dimensional space | |
JP7471782B2 (en) | Program, electronic device, and method | |
JP6775076B1 (en) | Methods, programs, and electronics | |
JP6824369B1 (en) | Methods, programs, and electronics | |
JP7143364B2 (en) | Method, program and electronic device | |
JP7250451B2 (en) | Programs, electronic devices, and methods | |
JP6911216B1 (en) | Methods, programs, and electronics | |
JP7105574B2 (en) | Program and game device | |
JP6446149B1 (en) | Program, processing apparatus, and processing method | |
JP2019134880A (en) | Program and game device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210924 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220729 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220801 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20220929 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221129 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20230313 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230613 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20230621 |
|
A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20230901 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240410 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7471782 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |