JP2011053838A - Program, information storage medium, and image generation device - Google Patents

Program, information storage medium, and image generation device Download PDF

Info

Publication number
JP2011053838A
JP2011053838A JP2009200967A JP2009200967A JP2011053838A JP 2011053838 A JP2011053838 A JP 2011053838A JP 2009200967 A JP2009200967 A JP 2009200967A JP 2009200967 A JP2009200967 A JP 2009200967A JP 2011053838 A JP2011053838 A JP 2011053838A
Authority
JP
Japan
Prior art keywords
image
unit
processing
pixel
pixel data
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.)
Withdrawn
Application number
JP2009200967A
Other languages
Japanese (ja)
Inventor
Tomokazu Matsumaru
友和 松丸
Kazuki Takahashi
一樹 高橋
Hikaru Jinguji
光 神宮字
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bandai Namco Entertainment Inc
Original Assignee
Namco Bandai Games Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Namco Bandai Games Inc filed Critical Namco Bandai Games Inc
Priority to JP2009200967A priority Critical patent/JP2011053838A/en
Publication of JP2011053838A publication Critical patent/JP2011053838A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program, an information storage medium, and an image generation device for determining an object to be processed, and for performing prescribed arithmetic processing on the object by more reducing a processing load than a conventional manner. <P>SOLUTION: On the basis of pixel data for identifying each of a plurality of objects, processing for generating an image including the plurality of objects is performed, and on the basis of input information from an input part, the instruction position of the image is obtained, and on the basis of the pixel data of pixels corresponding to the instruction position, processing for determining the objects shown by the pixels is performed, and prescribed arithmetic processing corresponding to the determined objects is performed. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、プログラム、情報記憶媒体、及び、画像生成装置に関する。   The present invention relates to a program, an information storage medium, and an image generation apparatus.

従来より、キャラクタなどのオブジェクトが配置設定されるオブジェクト空間内(仮想的な3次元空間)において仮想カメラ(所与の視点)から見える画像を生成する画像生成装置(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。   Conventionally, there has been known an image generation device (game system) that generates an image that can be viewed from a virtual camera (a given viewpoint) in an object space (virtual three-dimensional space) in which an object such as a character is set. It is popular as a place to experience so-called virtual reality.

例えば、プレーヤが入力部を用いて、オブジェクト空間(3次元空間)において、弾を発射させて敵キャラクタを射撃するシューティングゲームの画像を生成する画像生成装置が存在する。   For example, there is an image generation apparatus in which a player uses an input unit to generate an image of a shooting game in which a bullet is fired to shoot an enemy character in an object space (three-dimensional space).

特開平11−259686JP-A-11-259686

このような従来の画像生成装置では、オブジェクト空間において、弾の移動速度や移動方向に基づき、弾の移動経路を示すレイ(線)と敵オブジェクトとのヒット処理(所与の演算処理の一例)を行っている。つまり、従来のヒット処理は、3次元空間における弾の移動速度や移動方向を毎フレーム演算しながら、レイと敵オブジェクトとのヒット処理を行っていたので、処理負荷が高いという問題があった。   In such a conventional image generating apparatus, hit processing between a ray (line) indicating a movement path of a bullet and an enemy object based on the movement speed and movement direction of the bullet in the object space (an example of given calculation processing) It is carried out. That is, the conventional hit processing has a problem that the processing load is high because the hit processing between the ray and the enemy object is performed while calculating the moving speed and moving direction of the bullet in the three-dimensional space every frame.

本発明は、上記課題に鑑みたものであり、従来よりも処理負荷を軽減させて、処理対象のオブジェクトを決定して当該オブジェクトについて所与の演算処理を行うことが可能なプログラム、情報記憶媒体、及び画像生成装置を提供することにある。   The present invention has been made in view of the above problems, and a program and an information storage medium capable of reducing a processing load as compared to the conventional method, determining an object to be processed, and performing a given arithmetic process on the object And providing an image generation apparatus.

(1)本発明は、所与の演算処理を行うプログラムであって、複数のオブジェクトそれぞれを識別する画素データに基づいて、当該複数のオブジェクトを含む画像を生成する処理を行う画像生成部と、入力部からの入力情報に基づいて、前記画像の指示位置を取得する取得部と、前記指示位置に対応する画素の画素データに基づいて、当該画素が示すオブジェクトを決定する処理を行う決定部と、前記決定部によって決定された前記オブジェクトに応じた所与の演算処理を行う演算処理部として、コンピュータを機能させるプログラムに関する。   (1) The present invention is a program that performs a given calculation process, and based on pixel data that identifies each of a plurality of objects, an image generation unit that performs a process of generating an image including the plurality of objects; An acquisition unit that acquires an indicated position of the image based on input information from the input unit; and a determination unit that performs a process of determining an object indicated by the pixel based on pixel data of a pixel corresponding to the indicated position The present invention relates to a program that causes a computer to function as an arithmetic processing unit that performs a given arithmetic processing according to the object determined by the determining unit.

本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部として、コンピュータを機能させるプログラムを記憶した情報記憶媒体、上記各部を含む画像生成装置に関係する。   The present invention relates to a computer-readable information storage medium, and relates to an information storage medium that stores a program that causes a computer to function as each unit, and an image generation apparatus that includes each unit.

本発明によれば、指示位置に対応する画素の画素データに基づいて、オブジェクトを決定する処理を行い、決定されたオブジェクトに応じた所与の演算処理を行うので、従来よりも処理負荷を軽減させて、処理対象のオブジェクトを決定して当該オブジェクトについて所与の演算処理を行うことが可能となる。例えば、所与の演算処理とは、決定されたオブジェクトが所与のオブジェクトであるか否かを判定する判定処理、決定されたオブジェクトについてエフェクト処理(動作処理)、決定されたオブジェクトに応じたパラメータ制御等である。   According to the present invention, the processing for determining the object is performed based on the pixel data of the pixel corresponding to the designated position, and the given arithmetic processing is performed according to the determined object, so that the processing load is reduced as compared with the conventional case. Thus, it is possible to determine the object to be processed and perform a given arithmetic process on the object. For example, a given calculation process includes a determination process for determining whether or not a determined object is a given object, an effect process (operation process) for the determined object, and a parameter corresponding to the determined object. Control, etc.

(2)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画素データは、色情報又は半透明情報を含み、前記色情報又は半透明情報によって、複数のオブジェクトそれぞれを識別するようにしてもよい。本発明によれば、色情報(例えば、RGBの3原色)や、半透明情報(A値(α値))を用いて複数のオブジェクトそれぞれを識別可能な画像を生成するので、簡易に複数のオブジェクトそれぞれを識別することができる。   (2) In the program, the information storage medium, and the image generation device of the present invention, the pixel data includes color information or translucent information, and each of the plurality of objects is identified by the color information or translucent information. It may be. According to the present invention, an image that can identify each of a plurality of objects is generated using color information (for example, three primary colors of RGB) and translucent information (A value (α value)). Each object can be identified.

(3)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画像生成部が、奥行き値を定義した画素データに基づいて、前記画像を生成し、前記決定部が、前記指示位置に対応する画素の画素データが示す奥行き値に基づいて、オブジェクトを決定する処理を行うようにしてもよい。本発明によれば、奥行きを考慮してオブジェクトを決定する処理を行うので処理効率が高まり、更に処理負荷を軽減させることができる。   (3) In the program, the information storage medium, and the image generation device of the present invention, the image generation unit generates the image based on pixel data defining a depth value, and the determination unit The object may be determined based on the depth value indicated by the pixel data of the pixel corresponding to. According to the present invention, since the process of determining an object in consideration of the depth is performed, the processing efficiency is increased and the processing load can be further reduced.

(4)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画像生成部が、オブジェクトを構成する複数の部位それぞれを識別する画素データに基づいて、前記画像を生成し、前記決定部が、前記指示位置に対応する画素の画素データに基づいて、前記オブジェクトを構成する複数の部位のうちいずれかの部位を決定する処理を行い、前記演算処理部が、前記決定部によって決定された前記部位に応じた所与の演算処理を行うようにしてもよい。本発明によれば、指示位置に対応する画素の画素データに基づいて決定された部位に応じた所与の演算処理を行うので、従来よりも処理負荷を軽減させて、処理対象の部位を決定して当該部位に応じた所与の演算処理を行うことが可能となる。   (4) In the program, the information storage medium, and the image generation device of the present invention, the image generation unit generates the image based on pixel data that identifies each of a plurality of parts constituting the object, and determines the determination. The unit performs a process of determining one of a plurality of parts constituting the object based on pixel data of a pixel corresponding to the designated position, and the arithmetic processing unit is determined by the determination unit. Alternatively, a given calculation process corresponding to the part may be performed. According to the present invention, since a given calculation process is performed according to the part determined based on the pixel data of the pixel corresponding to the designated position, the part to be processed is determined while reducing the processing load compared to the conventional method. Thus, it is possible to perform a given calculation process according to the part.

(5)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画像生成部が、表示出力用画像を生成すると共に、奥行き値を定義した画素データに基づいて前記画像を生成し、前記演算処理部が、前記決定部によって決定された前記オブジェクトが所与のオブジェクトである場合に、前記表示出力用画像において、前記指示位置に対応する画素の画素データが示す奥行き値に基づいて、前記オブジェクトに対してエフェクト処理を行うようにしてもよい。本発明によれば、画像の指示位置に対応する画素の画素データが示す奥行き値に基づいて、エフェクト処理を行うので、処理負荷を軽減させて奥行きを考慮したエフェクトを表現することができる。   (5) Further, in the program, the information storage medium, and the image generation device of the present invention, the image generation unit generates the display output image and generates the image based on the pixel data defining the depth value. The arithmetic processing unit, when the object determined by the determination unit is a given object, in the display output image, based on the depth value indicated by the pixel data of the pixel corresponding to the indicated position, Effect processing may be performed on the object. According to the present invention, since the effect processing is performed based on the depth value indicated by the pixel data of the pixel corresponding to the designated position of the image, it is possible to reduce the processing load and express the effect in consideration of the depth.

(6)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画像生成部が、表示出力用画像を生成すると共に、法線ベクトルを定義した画素データに基づいて、前記画像を生成し、前記演算処理部が、前記決定部によって決定された前記オブジェクトが所与のオブジェクトである場合に、前記表示出力用画像において、前記指示位置に対応する画素の画素データが示す法線ベクトルに基づいて、前記オブジェクトに対してエフェクト処理を行うようにしてもよい。本発明によれば、画像の指示位置に対応する画素の画素データが示す法線ベクトルに基づいて、エフェクト処理を行うので、処理負荷を軽減させて法線ベクトルを考慮したエフェクトを表現することができる。   (6) In the program, the information storage medium, and the image generation device of the present invention, the image generation unit generates the display output image and generates the image based on pixel data defining a normal vector. When the object determined by the determining unit is a given object, the arithmetic processing unit generates a normal vector indicated by pixel data of a pixel corresponding to the indicated position in the display output image. Based on this, effect processing may be performed on the object. According to the present invention, since the effect processing is performed based on the normal vector indicated by the pixel data of the pixel corresponding to the designated position of the image, it is possible to reduce the processing load and express the effect in consideration of the normal vector. it can.

(7)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画像生成部が、表示出力用画像を生成すると共に、属性情報を定義した画素データに基づいて、前記画像を生成し、前記演算処理部が、前記決定部によって決定された前記オブジェクトが所与のオブジェクトである場合に、前記表示出力用画像において、前記指示位置に対応する画素の画素データが示す属性情報に基づいて、前記オブジェクトに対してエフェクト処理を行うようにしてもよい。本発明によれば、画像の指示位置に対応する画素の画素データが示す属性情報に基づいて、エフェクト処理を行うので、処理負荷を軽減させて属性情報を考慮したエフェクトを表現することができる。例えば、属性情報は素材情報とすることができる。   (7) In the program, the information storage medium, and the image generation device according to the present invention, the image generation unit generates the display output image and generates the image based on pixel data defining attribute information. When the object determined by the determining unit is a given object, the arithmetic processing unit is based on attribute information indicated by pixel data of a pixel corresponding to the indicated position in the display output image. The effect processing may be performed on the object. According to the present invention, since the effect processing is performed based on the attribute information indicated by the pixel data of the pixel corresponding to the designated position of the image, it is possible to reduce the processing load and express the effect in consideration of the attribute information. For example, the attribute information can be material information.

(8)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記指示位置に基づいて、前記画像において所定範囲を設定する設定部として、コンピュータを更に機能させ、前記決定部が、前記所定範囲内の1又は複数の画素の画素データそれぞれに基づいて、1又は複数のオブジェクトを決定する処理を行い、前記演算処理部が、前記決定部によって決定された1又は複数の前記オブジェクトそれぞれについて、所与の演算処理を行うようにしてもよい。本発明によれば、例えば、所与の演算処理対象の1又は複数のオブジェクトを簡易に決定することができる。   (8) Further, the program, the information storage medium, and the image generation device of the present invention further cause a computer to function as a setting unit that sets a predetermined range in the image based on the designated position, and the determination unit A process for determining one or a plurality of objects is performed based on pixel data of one or a plurality of pixels within a predetermined range, and the arithmetic processing unit is configured for each of the one or a plurality of the objects determined by the determination unit. A given calculation process may be performed. According to the present invention, for example, it is possible to easily determine one or a plurality of objects to be given a calculation processing target.

(9)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画像生成部が、前記指示位置に対応する指示マーカーを描画した表示出力用画像を生成する処理を行い、前記設定部が、前記指示マーカーの形状及び大きさの少なくとも1つに応じた所定範囲を設定するようにしてもよい。本発明によれば、表示出力用画像で描画されるマーカーの形状及び大きさの少なくとも1つに応じた所定範囲を設定するので、表示出力用画像で表示される指示マーカーの形状及び大きさの少なくとも1つを反映した所与の演算処理を行うことができる。   (9) Further, in the program, the information storage medium, and the image generation device of the present invention, the image generation unit performs a process of generating a display output image in which an instruction marker corresponding to the instruction position is drawn, and the setting unit However, a predetermined range may be set according to at least one of the shape and size of the pointing marker. According to the present invention, since the predetermined range is set according to at least one of the shape and size of the marker drawn in the display output image, the shape and size of the instruction marker displayed in the display output image are set. A given calculation process reflecting at least one can be performed.

(10)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記取得部が、複数の指示位置を取得した場合に、各指示位置の位置関係に基づいて共通指示位置を発生させるか否かを判定する指示位置制御部として、コンピュータを更に機能させ、前記決定部が、前記共通指示位置を発生させると判定された場合に、前記共通指示位置に対応する画素の画素データに基づいてオブジェクトを決定する処理を行うようにしてもよい。   (10) In the program, the information storage medium, and the image generation device of the present invention, when the acquisition unit acquires a plurality of specified positions, generates a common specified position based on a positional relationship between the specified positions. The computer further functions as an instruction position control unit for determining whether or not, and when the determination unit determines to generate the common instruction position, based on pixel data of a pixel corresponding to the common instruction position You may make it perform the process which determines an object.

本発明によれば、各プレーヤが互いに協力し合う環境を提供でき、プレーヤに対してマルチプレイへの参加を促すことができる。   According to the present invention, it is possible to provide an environment in which each player cooperates with each other, and to encourage the player to participate in multiplayer.

(11)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記共通指示位置に基づいて、前記画像において第2の所定範囲を設定する設定部として、コンピュータを更に機能させ、前記決定部が、前記共通指示位置を発生させると判定された場合に、前記第2の所定範囲内の1又は複数の画素の画素データそれぞれに基づいて、1又は複数のオブジェクトを決定する処理を行い、前記演算処理部が、前記決定部によって決定された1又は複数の前記オブジェクトそれぞれについて、所与の演算処理を行うようにしてもよい。   (11) Further, the program, the information storage medium, and the image generation device of the present invention cause the computer to further function as a setting unit that sets a second predetermined range in the image based on the common designated position, and When the unit is determined to generate the common indication position, the unit performs processing for determining one or a plurality of objects based on pixel data of one or a plurality of pixels within the second predetermined range, The arithmetic processing unit may perform given arithmetic processing for each of the one or more objects determined by the determining unit.

本発明によれば、マルチプレイモードにおいて特有の所与の演算処理を行う環境を提供でき、プレーヤに対してマルチプレイへの参加を促すことができる。   ADVANTAGE OF THE INVENTION According to this invention, the environment which performs the specific calculation process peculiar in multiplayer mode can be provided, and a player can be encouraged to participate in multiplayer.

(12)また、本発明のプログラム、情報記憶媒体、画像生成装置は、前記画像生成部が、表示出力用画像を、表示出力用の画像バッファに描画する処理を行い、前記画像を、前記表示出力用の画像バッファを縮小させた縮小用の画像バッファに描画する処理を行うようにしてもよい。本発明によれば、画像を生成する際の処理負荷を軽減することができる。   (12) In the program, the information storage medium, and the image generation device of the present invention, the image generation unit performs a process of drawing a display output image in a display output image buffer, and displays the image as the display You may make it perform the process drawn in the image buffer for reduction which reduced the image buffer for output. According to the present invention, it is possible to reduce the processing load when generating an image.

本実施形態の画像生成装置の機能ブロック図の例。The example of a functional block diagram of the image generation device of this embodiment. 本実施形態の画像生成装置の外観図。1 is an external view of an image generation apparatus according to an embodiment. 図3(A)は、表示出力用画像の一例。図3(B)は、演算処理用画像の一例。FIG. 3A shows an example of a display output image. FIG. 3B shows an example of an arithmetic processing image. 図4(A)は、表示出力用画像で用いられるオブジェクトの一例。図4(B)は、演算処理用画像で用いられるオブジェクトの一例。FIG. 4A shows an example of an object used in the display output image. FIG. 4B shows an example of an object used in the arithmetic processing image. 図5(A)(B)は、色情報又は半透明情報によって、複数のオブジェクトそれぞれを識別することを説明するための図。5A and 5B are diagrams for explaining identification of a plurality of objects by color information or translucent information. 図6(A)は、表示出力用画像を格納する画像バッファ、Zバッファの説明図。図6(B)は、演算処理用画像を格納する画像バッファ、Zバッファの説明図。FIG. 6A is an explanatory diagram of an image buffer and a Z buffer for storing a display output image. FIG. 6B is an explanatory diagram of an image buffer and a Z buffer for storing an arithmetic processing image. 図7(A)(B)は、指示位置を取得する手法の説明図。FIGS. 7A and 7B are explanatory diagrams of a method for acquiring a designated position. 図8(A)〜(C)は、ヒットエリア、及び、画素を選択する手法の説明図。8A to 8C are explanatory diagrams of a technique for selecting a hit area and a pixel. 図9(A)〜(C)は従来のヒット手法の説明図。9A to 9C are explanatory diagrams of a conventional hit technique. 図10は、法線ベクトルの説明図。FIG. 10 is an explanatory diagram of normal vectors. 図11(A)(B)は、色情報又は半透明情報によって、法線ベクトル、属性の説明図。11A and 11B are explanatory diagrams of normal vectors and attributes based on color information or translucent information. 図12(A)(B)は、共通指示位置を取得する手法の説明図。12A and 12B are explanatory diagrams of a method for acquiring a common designated position. 図13(A)は表示出力用画像の一例。図13(B)は、演算処理用画像の一例。FIG. 13A shows an example of a display output image. FIG. 13B shows an example of an arithmetic processing image. 図14(A)(B)は、敵オブジェクトの一例を示す図。14A and 14B show examples of enemy objects. 図15(A)は、表示出力用画像のZ画像を示す。図15(B)は、演算処理用画像のZ画像を示す。FIG. 15A shows a Z image of the display output image. FIG. 15B shows a Z image of the calculation processing image. 図16(A)(B)は、物理演算によってヒット処理を行う例を示す図。FIGS. 16A and 16B are diagrams illustrating an example in which hit processing is performed by physical calculation. 本実施形態のフローチャート図。The flowchart figure of this embodiment. 本実施形態の応用例の説明図。Explanatory drawing of the application example of this embodiment. 図19(A)(B)は、演算処理用画像の説明図。FIGS. 19A and 19B are explanatory diagrams of images for arithmetic processing.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   Hereinafter, this embodiment will be described. In addition, this embodiment demonstrated below does not unduly limit the content of this invention described in the claim. In addition, all the configurations described in the present embodiment are not necessarily essential configuration requirements of the present invention.

1.構成
図1に本実施形態の画像生成装置(コンピュータ、端末、ゲーム装置)の機能ブロック図の例を示す。なお本実施形態の画像生成装置は図1の構成要素(各部)の一部を省略した構成としてもよい。
1. Configuration FIG. 1 shows an example of a functional block diagram of an image generation device (computer, terminal, game device) of this embodiment. Note that the image generation apparatus of the present embodiment may have a configuration in which some of the components (each unit) in FIG. 1 are omitted.

入力部160は、プレーヤからの入力情報を入力するための機器であり、プレーヤの入力情報を処理部に出力する。本実施形態の入力部160は、プレーヤの入力情報(入力信号)を検出する検出部162を備える。入力部160は、例えば、レバー、ボタン、ステアリング、マイク、タッチパネル型ディスプレイなどがある。また、入力部160は、所定振動信号に基づいて振動させる処理を行う振動部を備えていてもよい。   The input unit 160 is a device for inputting input information from the player, and outputs the input information of the player to the processing unit. The input unit 160 of this embodiment includes a detection unit 162 that detects input information (input signal) of the player. The input unit 160 includes, for example, a lever, a button, a steering, a microphone, a touch panel display, and the like. Further, the input unit 160 may include a vibrating unit that performs a process of vibrating based on a predetermined vibration signal.

また、入力部160は、3軸の加速度を検出する加速度センサや、角速度を検出するジャイロセンサ、撮像部を備えた入力機器でもよい。例えば、入力機器は、プレーヤが把持して動かすものであってもよいし、プレーヤが身につけて動かすものであってもよい。また、入力機器には、プレーヤが把持する刀型コントローラや銃型コントローラ、あるいはプレーヤが身につける(プレーヤが手に装着する)グローブ型コントローラなど実際の道具を模して作られたコントローラも含まれる。また入力機器には、入力機器と一体化されている画像生成装置、携帯型画像生成装置、携帯電話なども含まれる。   The input unit 160 may be an input device including an acceleration sensor that detects triaxial acceleration, a gyro sensor that detects angular velocity, and an imaging unit. For example, the input device may be one that the player holds and moves, or one that the player wears and moves. Input devices also include controllers made by imitating actual tools such as sword-type controllers and gun-type controllers held by players, or glove-type controllers worn by players (attached to hands by players) It is. The input device also includes an image generation device, a portable image generation device, a mobile phone, and the like that are integrated with the input device.

検出部162は、入力部160からの入力情報を検出する処理を行う。例えば、検出部162は、入力部160の引き金(トリガ)が引かれることによって発生する入力信号を、入力情報(攻撃入力情報)として検出する。例えば、検出部162は、入力部160から照準(ガンサイト)の位置を指示する入力情報(指示入力情報)を検出する。   The detection unit 162 performs processing for detecting input information from the input unit 160. For example, the detection unit 162 detects an input signal generated when a trigger (trigger) of the input unit 160 is pulled as input information (attack input information). For example, the detection unit 162 detects input information (instruction input information) indicating the position of the aim (gun site) from the input unit 160.

例えば、入力部160が、液晶ディスプレイと、プレーヤの接触位置を検出するためのタッチパネルとが積層されたタッチパネル型ディスプレイで有る場合には、タッチペンなどの指示入力機器や指先の接触位置情報を入力情報として検出する。   For example, when the input unit 160 is a touch panel type display in which a liquid crystal display and a touch panel for detecting the contact position of the player are stacked, the input information of the instruction input device such as a touch pen or the contact position information of the fingertip is input. Detect as.

また、入力部160が撮像部を備える入力機器である場合には、撮像画像におおける指示位置情報を入力情報として検出する。より具体的に説明すると、撮像部は、赤外線フィルタ、レンズ、撮像素子(イメージセンサ)、画像処理回路を含む。ここで、赤外線フィルタは、入力機器の前方に配置され、表示部190に関連付けられて配置されている光源(2つの光源)から入射する光から赤外線のみを通過させる。また、レンズは、赤外線フィルタを透過した赤外線を集光して撮像素子へ出射する。また、撮像素子は、例えば、CMOSセンサやCCDのような固体撮像素子であり、レンズが集光した赤外線を撮像して撮像画像を生成する。そして、撮像素子で生成された撮像画像は、画像処理回路で処理される。例えば、撮像部を備える入力機器は、撮像素子から得られた撮像画像を処理して高輝度部分を検知し、撮像画像における光源の位置情報(指示位置情報)を入力情報として検出する。   Further, when the input unit 160 is an input device including an imaging unit, instruction position information in the captured image is detected as input information. More specifically, the imaging unit includes an infrared filter, a lens, an imaging element (image sensor), and an image processing circuit. Here, the infrared filter is disposed in front of the input device, and allows only infrared light to pass through from light incident from light sources (two light sources) disposed in association with the display unit 190. The lens condenses the infrared light transmitted through the infrared filter and emits it to the image sensor. The imaging device is a solid-state imaging device such as a CMOS sensor or a CCD, for example, and images captured infrared light collected by the lens to generate a captured image. The captured image generated by the image sensor is processed by the image processing circuit. For example, an input device including an imaging unit processes a captured image obtained from an imaging element to detect a high-luminance portion, and detects position information (indicated position information) of a light source in the captured image as input information.

記憶部200は、処理部100や通信部196などのワーク領域となるもので、その機能はRAM、VRAMなどにより実現できる。   The storage unit 200 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its functions can be realized by a RAM, a VRAM, or the like.

記憶部200は、画像を記憶する画像バッファ、画像の各ピクセルの奥行き値(深度値、Z値)を記憶するZバッファを備える。画像バッファ221は、表示出力用画像の各画素(ピクセル)の(R,G,B,A)(RGBカラー値、及びα値(A値))が格納される。つまり、表示出力用画像の各画素の色情報(R、G、B)及び半透明情報(α値(A値ともいう))が画像バッファ221に格納される。Zバッファ222は、画像バッファ221に描画される各画素の奥行き値が格納される。   The storage unit 200 includes an image buffer that stores an image and a Z buffer that stores a depth value (depth value, Z value) of each pixel of the image. The image buffer 221 stores (R, G, B, A) (RGB color value and α value (A value)) of each pixel of the display output image. That is, the color information (R, G, B) and translucent information (α value (also referred to as A value)) of each pixel of the display output image are stored in the image buffer 221. The Z buffer 222 stores the depth value of each pixel rendered in the image buffer 221.

また、画像バッファ231(描画面A)は、演算処理用画像の各画素の(R,G,B,A)が格納される。画像バッファ231に格納される演算処理用画像は、オブジェクトのID(ヒットID)、オブジェクトの部位、オブジェクトのヒットタイプなどの情報を示す(R,G,B,A)が格納される。また、画像バッファ232(描画面B)も、演算処理用画像の各画素の(R,G,B,A)が格納される。画像バッファ232に格納される演算処理用画像は、法線ベクトルや、属性情報(オブジェクトの素材を情報など)を示す(R,G,B,A)が格納される。また、Zバッファ233(描画面C)は、画像バッファ231、232に描画される各画素の奥行き値が格納される。なお、画像バッファ231、232、Zバッファ233は、それぞれ縮小用のバッファであり、画像バッファ231、232、Zバッファ233の大きさは、画像バッファ221、Zバッファ222を1/8の大きさである。   The image buffer 231 (drawing surface A) stores (R, G, B, A) of each pixel of the calculation processing image. The arithmetic processing image stored in the image buffer 231 stores information (R, G, B, A) indicating information such as an object ID (hit ID), an object part, and an object hit type. The image buffer 232 (drawing surface B) also stores (R, G, B, A) of each pixel of the calculation processing image. The arithmetic processing image stored in the image buffer 232 stores a normal vector and (R, G, B, A) indicating attribute information (such as information on the material of the object). The Z buffer 233 (drawing plane C) stores the depth value of each pixel drawn in the image buffers 231 and 232. Note that the image buffers 231 and 232 and the Z buffer 233 are buffers for reduction, respectively. The size of the image buffers 231 and 232 and the Z buffer 233 is 1/8 that of the image buffer 221 and the Z buffer 222. is there.

情報記憶媒体180(コンピュータにより読み取り可能な媒体)は、プログラムやデータなどを格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、磁気ディスク、ハードディスク、磁気テープ、或いはメモリ(ROM)などにより実現できる。処理部100は、情報記憶媒体180に格納されるプログラム(データ)に基づいて本実施形態の種々の処理を行う。情報記憶媒体180には、本実施形態の各部としてコンピュータを機能させるためのプログラム(各部の処理をコンピュータに実行させるためのプログラム)を記憶することができる。   The information storage medium 180 (computer-readable medium) stores programs, data, and the like, and functions as an optical disk (CD, DVD), magneto-optical disk (MO), magnetic disk, hard disk, and magnetic tape. Alternatively, it can be realized by a memory (ROM). The processing unit 100 performs various processes of the present embodiment based on a program (data) stored in the information storage medium 180. The information storage medium 180 can store a program for causing a computer to function as each unit of the present embodiment (a program for causing a computer to execute processing of each unit).

表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、タッチパネル型ディスプレイ、或いはHMD(ヘッドマウントディスプレイ)などにより実現できる。音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカ、或いはヘッドフォンなどにより実現できる。   The display unit 190 outputs an image generated according to the present embodiment, and its function can be realized by a CRT, LCD, touch panel display, HMD (head mounted display), or the like. The sound output unit 192 outputs the sound generated by the present embodiment, and its function can be realized by a speaker, headphones, or the like.

通信部196は外部(例えば他の画像生成装置)との間で通信を行うための各種制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。   The communication unit 196 performs various controls for communicating with the outside (for example, another image generation apparatus), and the function is realized by various processors or hardware such as a communication ASIC, a program, or the like. it can.

なお、サーバが有する情報記憶媒体や記憶部に記憶されている本実施形態の各部としてコンピュータを機能させるためのプログラムやデータを、ネットワークを介して受信し、受信したプログラムやデータを情報記憶媒体180や記憶部200に記憶してもよい。このようにプログラムやデータを受信して画像生成装置を機能させる場合も本発明の範囲内に含む。   Note that a program or data for causing a computer to function as each unit of the present embodiment stored in the information storage medium or storage unit of the server is received via the network, and the received program or data is received by the information storage medium 180. Or may be stored in the storage unit 200. The case of receiving the program and data and causing the image generating apparatus to function is also included in the scope of the present invention.

処理部100(プロセッサ)は、入力部160からの入力情報やプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの処理を行う。   The processing unit 100 (processor) performs processing such as game processing, image generation processing, or sound generation processing based on input information from the input unit 160, a program, and the like.

この処理部100は記憶部200内の主記憶部210をワーク領域として各種処理を行う。処理部100の機能は各種プロセッサ(CPU、GPU、DSP等)、ASIC(ゲートアレイ等)などのハードウェアや、プログラムにより実現できる。   The processing unit 100 performs various processes using the main storage unit 210 in the storage unit 200 as a work area. The functions of the processing unit 100 can be realized by hardware such as various processors (CPU, GPU, DSP, etc.), ASIC (gate array, etc.), and programs.

処理部100は、オブジェクト空間設定部110、取得部111、決定部112、演算処理部113、移動・動作処理部114、ゲーム演算部115、設定部116、指示位置制御部117、画像生成部(描画部)120、音処理部130を含む。なおこれらの一部を省略する構成としてもよい。   The processing unit 100 includes an object space setting unit 110, an acquisition unit 111, a determination unit 112, a calculation processing unit 113, a movement / motion processing unit 114, a game calculation unit 115, a setting unit 116, an indicated position control unit 117, an image generation unit ( A drawing unit 120 and a sound processing unit 130. Note that some of these may be omitted.

オブジェクト空間設定部110は、キャラクタ(敵オブジェクト)の他に、建物、球場、車、樹木、柱、壁、マップ(地形)などの表示物を、オブジェクト空間に配置設定する処理を行う。   In addition to the character (enemy object), the object space setting unit 110 performs a process of arranging and setting display objects such as a building, a stadium, a car, a tree, a pillar, a wall, and a map (terrain) in the object space.

ここでオブジェクト空間とは、仮想的なゲーム空間であり、2次元空間、3次元空間の両方を含む。2次元空間とは、例えば2次元座標(X,Y)においてオブジェクトが配置される空間であり、3次元空間とは、例えば3次元座標(X,Y,Z)においてオブジェクトが配置される空間である。   Here, the object space is a virtual game space and includes both a two-dimensional space and a three-dimensional space. The two-dimensional space is a space in which an object is arranged at, for example, two-dimensional coordinates (X, Y), and the three-dimensional space is a space in which an object is arranged at, for example, three-dimensional coordinates (X, Y, Z). is there.

例えば、オブジェクト空間設定部110は、オブジェクト空間を3次元空間とした場合には、ワールド座標系にオブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブで構成されるオブジェクト)を配置する。また、例えば、ワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。   For example, when the object space is a three-dimensional space, the object space setting unit 110 arranges an object (an object composed of a primitive such as a polygon, a free-form surface, or a subdivision surface) in the world coordinate system. Also, for example, the position and rotation angle (synonymous with direction and direction) of the object in the world coordinate system is determined, and the rotation angle (X, Y, Z axis rotation) is determined at that position (X, Y, Z). Position the object at (Angle).

取得部111は、入力部160からの入力情報に基づいて、画像(演算処理用画像)の指示位置(カーソル位置)を取得する処理を行う。例えば、取得部111は、入力部160からの入力情報に基づいて、表示出力用画像の指示位置を取得する処理を行ってもよい。例えば、取得部111は、入力部160で検出された指示位置を、画像(演算処理用画像)の指示位置として取得する処理を行う。   The acquisition unit 111 performs processing for acquiring an indicated position (cursor position) of an image (calculation processing image) based on input information from the input unit 160. For example, the acquisition unit 111 may perform a process of acquiring the indicated position of the display output image based on input information from the input unit 160. For example, the acquisition unit 111 performs a process of acquiring the designated position detected by the input unit 160 as the designated position of the image (arithmetic processing image).

決定部112は、画像(演算処理用画像)の指示位置に対応する画素の画素データ(ピクセルデータ、ボクセルデータ、色情報(R,G,B)、α値、Z値、輝度などのピクセル単位の値を示すデータ)に基づいて、画素が示すオブジェクトを決定する処理を行う。例えば、指示位置に対応する画素の画素データは、指示位置の画素の画素データ、指示位置周囲の画素の画素データ、及び、指示位置に基づく所定範囲に含まれる1又は複数の画素の画素データの少なくとも1つとすることができる。なお、画素データは、所定値域(0〜127、或いは、0.0〜1.0までの値域など)の値として定義するようにしてもよい。   The determination unit 112 is a pixel unit such as pixel data (pixel data, voxel data, color information (R, G, B), α value, Z value, luminance) of a pixel corresponding to the designated position of the image (arithmetic processing image). Based on the data indicating the value of (), processing for determining the object indicated by the pixel is performed. For example, the pixel data of the pixel corresponding to the designated position includes pixel data of the pixel at the designated position, pixel data of the pixels around the designated position, and pixel data of one or more pixels included in a predetermined range based on the designated position. There can be at least one. The pixel data may be defined as a value in a predetermined value range (0 to 127, or a value range from 0.0 to 1.0).

また、決定部112は、指示位置に対応する画素の画素データが示す奥行き値に基づいて、1又は複数のオブジェクトを決定する処理を行う。   Further, the determination unit 112 performs a process of determining one or a plurality of objects based on the depth value indicated by the pixel data of the pixel corresponding to the designated position.

また、決定部112は、指示位置に対応する画素の画素データに基づいて、オブジェクトを構成する複数の部位のうちいずれかの1又は複数の部位を決定する処理を行う。つまり、決定部112によって、決定されたオブジェクトについて、指示位置に対応する画素の画素データに基づいて、更にそのオブジェクトの部位を決定してもよい。   Further, the determination unit 112 performs a process of determining any one or a plurality of parts among a plurality of parts constituting the object based on the pixel data of the pixel corresponding to the designated position. That is, the determination unit 112 may further determine the part of the determined object based on the pixel data of the pixel corresponding to the designated position.

また、決定部112は、所定範囲内の1又は複数の画素の画素データそれぞれに基づいて、1又は複数のオブジェクトを決定する処理を行う。   Further, the determination unit 112 performs a process of determining one or more objects based on the pixel data of one or more pixels within a predetermined range.

また、決定部112は、共通指示位置を発生させると判定された場合に、共通指示位置に対応する画素の画素データに基づいて、複数のオブジェクトのうち1又は複数のオブジェクトを決定する処理を行う。なお、決定部112は、共通指示位置を発生させると判定された場合に、共通指示位置に対応する画素の画素データに基づいて、決定されたオブジェクトについて、更にそのオブジェクトの部位を決定してもよい。   Further, when it is determined that the common designated position is to be generated, the determination unit 112 performs a process of determining one or a plurality of objects among the plurality of objects based on the pixel data of the pixels corresponding to the common designated position. . If it is determined that the common designated position is to be generated, the determining unit 112 may further determine the part of the determined object based on the pixel data of the pixel corresponding to the common designated position. Good.

また、決定部112は、共通指示位置を発生させると判定された場合に、第2の所定範囲内の1又は複数の画素の画素データそれぞれに基づいて、1又は複数のオブジェクトを決定する処理を行う。   The determination unit 112 performs a process of determining one or a plurality of objects based on the pixel data of one or a plurality of pixels within the second predetermined range when it is determined that the common designated position is generated. Do.

演算処理部113は、決定部112によって決定されたオブジェクトに応じた所与の演算処理を行う。また、演算処理部113は、決定部112によって決定されたオブジェクトの部位に応じた所与の演算処理を行う。例えば、所与の演算処理とは、決定されたオブジェクトが所与のオブジェクト(例えば、敵オブジェクト)であるか否かを判定する処理、決定されたオブジェクトに対して行うエフェクト処理(動作処理)、決定されたオブジェクトに対するパラメータ制御処理などである。   The arithmetic processing unit 113 performs given arithmetic processing corresponding to the object determined by the determining unit 112. In addition, the arithmetic processing unit 113 performs given arithmetic processing according to the part of the object determined by the determining unit 112. For example, the given arithmetic processing includes processing for determining whether or not the determined object is a given object (for example, an enemy object), effect processing (operation processing) performed on the determined object, For example, parameter control processing for the determined object.

より具体的に説明すると、演算処理部113は、ヒット判定部113−1、エフェクト処理部113−2とを含む。   More specifically, the arithmetic processing unit 113 includes a hit determination unit 113-1 and an effect processing unit 113-2.

例えば、ヒット判定部113−1は、決定部112によって決定されたオブジェクトが所与のオブジェクトであるか否かを判定する。例えば、決定部112によって決定されたオブジェクトが所与のオブジェクト(例えば、敵オブジェクト)であると判定された場合には、特定オブジェクト(例えば、弾オブジェクトなど)が所与のオブジェクトにヒットしたと判定する処理を行う。一方、決定部112によって決定されたオブジェクトが所与のオブジェクトではないと判定された場合には、特定オブジェクトが所与のオブジェクトにヒットしないと判定する処理を行う。なお、特定オブジェクトは、オブジェクト空間に存在していてもよいし、存在しなくてもよい。   For example, the hit determination unit 113-1 determines whether or not the object determined by the determination unit 112 is a given object. For example, when it is determined that the object determined by the determination unit 112 is a given object (for example, an enemy object), it is determined that a specific object (for example, a bullet object) has hit the given object. Perform the process. On the other hand, when it is determined that the object determined by the determination unit 112 is not the given object, processing is performed to determine that the specific object does not hit the given object. Note that the specific object may or may not exist in the object space.

また、ヒット判定部113−1は、決定部112によって決定されたオブジェクトの部位が、所与のオブジェクトの部位(例えば、敵オブジェクトの頭部)であると判定された場合には、特定オブジェクトが該部位にヒットしたと判定し、決定部112によって決定されたオブジェクトの部位が、所与のオブジェクトの部位(例えば、敵オブジェクトの頭部)でないと判定された場合には、特定オブジェクトが該部位にヒットしないと判定する処理を行ってもよい。   In addition, when the hit determination unit 113-1 determines that the part of the object determined by the determination unit 112 is the part of the given object (for example, the head of an enemy object), the specific object is When it is determined that the part has been hit and the part of the object determined by the determination unit 112 is not the part of the given object (for example, the head of an enemy object), the specific object is the part. A process for determining that no hit occurs may be performed.

また、ヒット判定部113−1は、指示位置に対応する画素の画素データが示す奥行き値に基づいて、決定部112によって決定されたオブジェクトに応じた所与の演算処理を行うようにしてもよい。例えば、決定部112によって決定されたオブジェクトが所与のオブジェクト(例えば、敵オブジェクト)であって、指示位置に対応する画素の画素データが示す奥行き値Zaが所定奥行き範囲内(例えば、Z1≦Za≦Z2)にある場合には、特定オブジェクト(例えば、弾オブジェクト)が、オブジェクト(敵オブジェクト)にヒットしたと判定する処理を行う。一方、決定部112によって決定されたオブジェクトが所与のオブジェクト(例えば、敵オブジェクト)であって、指示位置に対応する画素の画素データが示す奥行き値Zaが所定奥行き範囲内でない場合には、特定オブジェクト(例えば、弾オブジェクト)が、オブジェクト(敵オブジェクト)にヒットしないと判定する処理を行う。   Further, the hit determination unit 113-1 may perform a given calculation process according to the object determined by the determination unit 112 based on the depth value indicated by the pixel data of the pixel corresponding to the designated position. . For example, the object determined by the determination unit 112 is a given object (for example, an enemy object), and the depth value Za indicated by the pixel data of the pixel corresponding to the designated position is within a predetermined depth range (for example, Z1 ≦ Za). If ≦ Z2), a process of determining that a specific object (for example, bullet object) hits the object (enemy object) is performed. On the other hand, if the object determined by the determination unit 112 is a given object (for example, an enemy object) and the depth value Za indicated by the pixel data of the pixel corresponding to the designated position is not within the predetermined depth range, the specified Processing for determining that an object (for example, a bullet object) does not hit the object (enemy object) is performed.

例えば、エフェクト処理部113−2は、決定部112によって決定されたオブジェクトが所与のオブジェクトである場合に、表示出力用画像において、指示位置に対応する画素の画素データが示す奥行き値に基づいて、オブジェクトに対してエフェクト処理を行う。   For example, when the object determined by the determination unit 112 is a given object, the effect processing unit 113-2 is based on the depth value indicated by the pixel data of the pixel corresponding to the designated position in the display output image. Then, effect processing is performed on the object.

また、エフェクト処理部113−2は、決定部112によって決定されたオブジェクトが所与のオブジェクトである場合に、表示出力用画像において、指示位置に対応する画素の画素データが示す法線ベクトルに基づいて、オブジェクトに対してエフェクト処理を行う。   Further, when the object determined by the determination unit 112 is a given object, the effect processing unit 113-2 is based on the normal vector indicated by the pixel data of the pixel corresponding to the designated position in the display output image. Then, effect processing is performed on the object.

また、エフェクト処理部113−2は、決定部112によって決定されたオブジェクトが所与のオブジェクトである場合に、表示出力用画像において、指示位置に対応する画素の画素データが示す属性情報に基づいて、オブジェクトに対してエフェクト処理を行う。   Further, when the object determined by the determination unit 112 is a given object, the effect processing unit 113-2 is based on attribute information indicated by pixel data of a pixel corresponding to the designated position in the display output image. Then, effect processing is performed on the object.

移動・動作処理部114は、オブジェクト空間において、オブジェクトを移動・動作させる処理を行う。すなわち入力部160から入力された入力情報や、プログラム(移動・動作アルゴリズム)や、各種データ(モーションデータ)などに基づいて、オブジェクトをオブジェクト空間内で移動させたり、オブジェクトを動作(モーション、アニメーション)させたりする処理を行う。具体的には、オブジェクトの移動情報(位置、回転角度、移動速度、加速度、移動量、移動方向などの移動パラメータ)や動作情報(オブジェクトを構成する各パーツの位置、或いは回転角度)を、1フレーム(例えば、1/60秒)毎に順次求める処理を行う。なおフレームは、オブジェクトの移動・動作処理や画像生成処理を行う時間の単位である。   The movement / motion processing unit 114 performs processing for moving / moving an object in the object space. That is, based on input information input from the input unit 160, a program (movement / motion algorithm), various data (motion data), etc., the object is moved in the object space, or the object is moved (motion, animation). Process. Specifically, object movement information (movement parameters such as position, rotation angle, movement speed, acceleration, movement amount, movement direction) and operation information (positions or rotation angles of parts constituting the object) are set to 1 A process of sequentially obtaining each frame (for example, 1/60 second) is performed. Note that a frame is a unit of time for performing object movement / motion processing and image generation processing.

ゲーム演算部115は、種々のゲーム処理を行う。例えば、ゲーム開始条件が満たされた場合にゲームを開始する処理、ゲームを進行させる処理、ゲーム終了条件が満たされた場合にゲームを終了する処理、最終ステージをクリアした場合にはエンディングを進行させる処理などがある。   The game calculation unit 115 performs various game processes. For example, a process for starting a game when a game start condition is satisfied, a process for advancing the game, a process for ending a game when the game end condition is satisfied, and an ending when the final stage is cleared There is processing.

また、ゲーム演算部115は、プレーヤキャラクタの所与のパラメータ(体力値)が所定値(0)に達したか否かを判断する処理を行い、プレーヤキャラクタの所与のパラメータ(体力値)が所定値(0)に達した場合に、ゲーム終了と判定する処理を行う。   In addition, the game calculation unit 115 determines whether or not the given parameter (physical strength value) of the player character has reached a predetermined value (0), and the given parameter (physical strength value) of the player character is When the predetermined value (0) is reached, a process for determining that the game has ended is performed.

設定部116は、指示位置に基づいて、画像(演算処理用画像)において所定範囲(ヒットエリア)を設定する処理を行う。また、設定部116は、表示出力用画像に描画される指示マーカーの形状及び大きさの少なくとも1つに応じた所定範囲を設定する処理を行う。また設定部116は、共通指示位置に基づいて、画像(演算処理用画像)において第2の所定範囲(第2のヒットエリア)を設定する処理を行う。   The setting unit 116 performs processing for setting a predetermined range (hit area) in the image (arithmetic processing image) based on the designated position. The setting unit 116 performs a process of setting a predetermined range according to at least one of the shape and size of the instruction marker drawn on the display output image. The setting unit 116 performs processing for setting a second predetermined range (second hit area) in the image (calculation processing image) based on the common instruction position.

指示位置制御部117は、取得部111が、複数の指示位置を取得した場合に、各指示位置の位置関係に基づいて共通指示位置を発生させるか否かを判定する処理を行う。   The designated position control unit 117 performs processing for determining whether or not to generate a common designated position based on the positional relationship between the designated positions when the obtaining unit 111 obtains a plurality of designated positions.

画像生成部120は、処理部100で行われる種々の処理の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。画像生成部120が生成する画像は、いわゆる2次元画像であってもよいし、いわゆる3次元画像であってもよい。   The image generation unit 120 performs drawing processing based on the results of various processes performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. The image generated by the image generation unit 120 may be a so-called two-dimensional image or a so-called three-dimensional image.

2次元画像を生成する場合には、例えば、オブジェクト(スプライト)毎に優先度を設定し、設定された優先度が低いオブジェクトから順に描画する。オブジェクト同士が重なる場合には、優先度が低いオブジェクトの上に、優先度の高いオブジェクトを描画する。   In the case of generating a two-dimensional image, for example, a priority is set for each object (sprite), and rendering is performed in order from an object having a lower priority. When objects overlap, an object with a high priority is drawn on an object with a low priority.

いわゆる3次元ゲーム画像を生成する場合には、まずオブジェクト(モデル)の各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値
等)を含むオブジェクトデータ(モデルデータ)が入力され、入力されたオブジェクトデータに含まれる頂点データに基づいて、頂点処理(頂点シェーダによるシェーディング)が行われる。なお頂点処理を行うに際して、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。
When generating a so-called three-dimensional game image, first, object data (model data) including vertex data (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.) of each vertex of the object (model) ) Is input, and vertex processing (shading by a vertex shader) is performed based on the vertex data included in the input object data. When performing the vertex processing, vertex generation processing (tessellation, curved surface division, polygon division) for re-dividing the polygon may be performed as necessary.

頂点処理では、頂点処理プログラム(頂点シェーダプログラム、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換、例えばワールド座標変換、視野変換(カメラ座標変換)、クリッピング処理、透視変換(投影変換)、ビューポート変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データを変更(更新、調整)する。   In the vertex processing, according to the vertex processing program (vertex shader program, first shader program), vertex movement processing, coordinate transformation, for example, world coordinate transformation, visual field transformation (camera coordinate transformation), clipping processing, perspective transformation (projection transformation) ), Geometry processing such as viewport conversion is performed, and based on the processing result, the vertex data given to the vertex group constituting the object is changed (updated or adjusted).

そして、頂点処理後の頂点データに基づいてラスタライズ(走査変換)が行われ、ポリゴン(プリミティブ)の面とピクセルとが対応づけられる。そしてラスタライズに続いて、画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセル処理(ピクセルシェーダによるシェーディング、フラグメント処理)が行われる。ピクセル処理では、ピクセル処理プログラム(ピクセルシェーダプログラム、第2のシェーダプログラム)に従って、テクスチャの読出し(テクスチャマッピング)、色データの設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、画像を構成するピクセルの最終的な描画色を決定し、透視変換されたオブジェクトの描画色を描画バッファ(ピクセル単位で画像情報を記憶できるバッファ。VRAM、レンダリングターゲット)に出力(描画)する。すなわち、ピクセル処理では、ピクセルデータ、ボクセルデータなどの画素データ(色(RGB)、α値、Z値、輝度等)をピクセル単位で設定あるいは変更するパーピクセル処理を行う。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラから見える画像を生成することができる。   Then, rasterization (scan conversion) is performed based on the vertex data after the vertex processing, and the surface of the polygon (primitive) is associated with the pixel. Subsequent to rasterization, pixel processing (shading or fragment processing by a pixel shader) for drawing pixels (fragments forming a display screen) constituting an image is performed. In pixel processing, according to a pixel processing program (pixel shader program, second shader program), various processes such as texture reading (texture mapping), color data setting / change, translucent composition, anti-aliasing, etc. are performed, and an image is processed. The final drawing color of the constituent pixels is determined, and the drawing color of the perspective-transformed object is output (drawn) to a drawing buffer (a buffer that can store image information in units of pixels; VRAM, rendering target). That is, in pixel processing, per-pixel processing for setting or changing pixel data (color (RGB), α value, Z value, luminance, etc.) such as pixel data and voxel data in units of pixels is performed. Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated. When there are a plurality of virtual cameras (viewpoints), it is possible to generate an image that can be seen from each virtual camera.

なお、画像生成部120は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、3次元の画像を生成する場合には、ワールド座標系における仮想カメラの位置(X、Y、Z)又は回転角度(例えば、X、Y、Z軸の各軸の正方向からみて時計回りに回る場合における回転角度)を制御する処理を行う。要するに、視点位置、視線方向、画角を制御する処理を行う。また、画像生成部120は、仮想カメラを、予め決められた回転角度で回転させてもよい。この場合には、仮想カメラの位置又は回転角度を特定するための仮想カメラデータに基づいて仮想カメラを制御する。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラについて上記の制御処理が行われる。   The image generation unit 120 performs a virtual camera (viewpoint) control process for generating an image that can be seen from a given (arbitrary) viewpoint in the object space. Specifically, when generating a three-dimensional image, the virtual camera position (X, Y, Z) or rotation angle (for example, from the positive direction of each of the X, Y, and Z axes) in the world coordinate system is used. (Rotation angle when turning clockwise) is controlled. In short, processing for controlling the viewpoint position, the line-of-sight direction, and the angle of view is performed. The image generation unit 120 may rotate the virtual camera at a predetermined rotation angle. In this case, the virtual camera is controlled based on the virtual camera data for specifying the position or rotation angle of the virtual camera. When there are a plurality of virtual cameras (viewpoints), the above control process is performed for each virtual camera.

本実施形態では、プレーヤキャラクタの視点(一人称視点)に基づいて画像を生成する処理を行っている(いわゆる、ファーストパーソン・シューティングゲームである)。また、本実施形態では、仮想カメラの移動、向き、画角はプログラムで制御してもよいし、入力部160の入力情報に基づいて仮想カメラの移動、向き、画角を制御してもよい。   In the present embodiment, an image is generated based on the player character's viewpoint (first person viewpoint) (a so-called first person shooting game). In this embodiment, the movement, orientation, and angle of view of the virtual camera may be controlled by a program, or the movement, orientation, and angle of view of the virtual camera may be controlled based on input information from the input unit 160. .

例えば仮想カメラによりオブジェクト(例えば、プレーヤキャラクタ)を後方から撮影する場合には、オブジェクトの位置、向きの変化に仮想カメラが追従するように、仮想カメラの位置、仮想カメラの向きを制御する。この場合には、移動・動作処理部114で得られたオブジェクトの位置、向き又は速度などの情報に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた向きに設定したり、予め決められた移動経路で移動させる制御を行ってもよい。この場合には、仮想カメラの位置(移動経路)又は向きを特定するための仮想カメラデータに基づいて仮想カメラを制御する。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラについて上記の制御処理が行われる。   For example, when an object (for example, a player character) is photographed from behind using a virtual camera, the position of the virtual camera and the orientation of the virtual camera are controlled so that the virtual camera follows changes in the position and orientation of the object. In this case, the virtual camera can be controlled based on information such as the position, orientation, or speed of the object obtained by the movement / motion processing unit 114. Alternatively, the virtual camera may be set in a predetermined direction or may be controlled to move along a predetermined movement route. In this case, the virtual camera is controlled based on the virtual camera data for specifying the position (movement path) or orientation of the virtual camera. When there are a plurality of virtual cameras (viewpoints), the above control process is performed for each virtual camera.

なお頂点処理やピクセル処理は、シェーディング言語によって記述されたシェーダプログラムによって、ポリゴン(プリミティブ)の描画処理をプログラム可能にするハードウェア、いわゆるプログラマブルシェーダ(頂点シェーダやピクセルシェーダ)により実現される。プログラマブルシェーダでは、頂点単位の処理やピクセル単位の処理がプログラム可能になることで描画処理内容の自由度が高く、従来のハードウェアによる固定的な描画処理に比べて表現力を大幅に向上させることができる。   Note that the vertex processing and pixel processing are realized by hardware that enables polygon (primitive) drawing processing to be programmed by a shader program written in a shading language, so-called programmable shaders (vertex shaders and pixel shaders). Programmable shaders can be programmed with vertex-level processing and pixel-level processing, so that the degree of freedom of drawing processing is high, and expressive power is greatly improved compared to conventional hardware-based fixed drawing processing. Can do.

そして画像生成部120は、オブジェクトを描画する際に、ジオメトリ処理、テクスチャマッピング、隠面消去処理、αブレンディング等を行う。   The image generation unit 120 performs geometry processing, texture mapping, hidden surface removal processing, α blending, and the like when drawing an object.

ジオメトリ処理では、オブジェクトに対して、座標変換、クリッピング処理、透視投影変換、或いは光源計算等の処理が行われる。そして、ジオメトリ処理後(透視投影変換後)のオブジェクトデータ(オブジェクトの頂点の位置座標、テクスチャ座標、色データ(輝度データ)、法線ベクトル、或いはα値等)は、記憶部200に保存される。   In the geometry processing, processing such as coordinate conversion, clipping processing, perspective projection conversion, or light source calculation is performed on the object. Then, the object data (positional coordinates of object vertices, texture coordinates, color data (luminance data), normal vector, α value, etc.) after geometry processing (after perspective projection conversion) is stored in the storage unit 200. .

テクスチャマッピングは、記憶部200に記憶されるテクスチャ(テクセル値)をオブジェクトにマッピングするための処理である。具体的には、オブジェクトの頂点に設定(付与)されるテクスチャ座標等を用いて記憶部200からテクスチャ(色(RGB)、α値などの表面プロパティ)を読み出す。そして、2次元の画像であるテクスチャをオブジェクトにマッピングする。この場合に、ピクセルとテクセルとを対応づける処理や、テクセルの補間としてバイリニア補間などを行う。   Texture mapping is a process for mapping a texture (texel value) stored in the storage unit 200 to an object. Specifically, the texture (surface properties such as color (RGB) and α value) is read from the storage unit 200 using texture coordinates or the like set (given) to the vertex of the object. Then, a texture that is a two-dimensional image is mapped to an object. In this case, processing for associating pixels with texels, bilinear interpolation or the like is performed as texel interpolation.

隠面消去処理としては、描画ピクセルのZ値(奥行き情報)が格納されるZバッファ(奥行きバッファ)を用いたZバッファ法(奥行き比較法、Zテスト)による隠面消去処理を行うことができる。すなわちオブジェクトのプリミティブに対応する描画ピクセルを描画する際に、Zバッファに格納されるZ値を参照する。そして参照されたZバッファのZ値と、プリミティブの描画ピクセルでのZ値とを比較し、描画ピクセルでのZ値が、仮想カメラから見て手前側となるZ値(例えば小さなZ値)である場合には、その描画ピクセルの描画処理を行うとともにZバッファのZ値を新たなZ値に更新する。   As the hidden surface removal processing, hidden surface removal processing can be performed by a Z buffer method (depth comparison method, Z test) using a Z buffer (depth buffer) in which Z values (depth information) of drawing pixels are stored. . That is, when drawing pixels corresponding to the primitive of the object are drawn, the Z value stored in the Z buffer is referred to. Then, the Z value of the referenced Z buffer is compared with the Z value at the drawing pixel of the primitive, and the Z value at the drawing pixel is a Z value (for example, a small Z value) on the near side when viewed from the virtual camera. In some cases, the drawing process of the drawing pixel is performed and the Z value of the Z buffer is updated to a new Z value.

αブレンディング(α合成)は、α値(A値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)のことである。   α blending (α synthesis) is a translucent synthesis process (usually α blending, addition α blending, subtraction α blending, or the like) based on an α value (A value).

なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。   The α value is information that can be stored in association with each pixel (texel, dot), for example, plus alpha information other than color information. The α value can be used as mask information, translucency (equivalent to transparency and opacity), bump information, and the like.

なお、本実施形態の画像生成部120は、表示出力用画像と、演算処理用画像を生成する処理を行う。そして、本実施形態の画像生成部120は、演算処理用画像を生成する場合には、上記ピクセル処理(ピクセルシェーダによるパーピクセル処理)を行わないように制御しているが、演算処理の必要性に応じて、上記ピクセル処理を行うようにしてもよい。また、演算処理用のZ値を決定する際には、複数のオブジェクト間の予め決められた奥行き関係に基づいて、Z値を変更するようにしてもよい。   Note that the image generation unit 120 of the present embodiment performs a process of generating a display output image and an arithmetic processing image. The image generation unit 120 of the present embodiment controls the pixel processing (per-pixel processing by the pixel shader) not to be performed when generating the calculation processing image. Depending on the above, the pixel processing may be performed. Further, when determining the Z value for arithmetic processing, the Z value may be changed based on a predetermined depth relationship between a plurality of objects.

音処理部130は、処理部100で行われる種々の処理の結果に基づいて音処理を行い、BGM、効果音、又は音声などのゲーム音を生成し、音出力部192に出力する。   The sound processing unit 130 performs sound processing based on the results of various processes performed by the processing unit 100, generates a game sound such as BGM, sound effect, or sound, and outputs the game sound to the sound output unit 192.

なお、本実施形態の画像生成装置は、1人のプレーヤのみがプレイできるシングルプレーヤモード用の装置にしてもよいし、複数のプレーヤがプレイできるマルチプレーヤモードを備える装置にしてもよい。   Note that the image generation apparatus of the present embodiment may be an apparatus for a single player mode that can be played by only one player, or an apparatus that has a multiplayer mode that can be played by a plurality of players.

例えば、図2に示すように、マルチプレーヤモードの場合には、プレーヤそれぞれの入力部160−1、160−2を用意し、各入力部160−1、160−2が指示する照準位置に基づいて敵キャラクタ等のヒット処理を行う。また、本実施形態では、マルチプレーヤモードの場合には、複数のプレーヤに提供するデータ、表示出力用画像、演算処理用画像、ゲーム音を、1つの画像生成装置を用いて生成している。なお、画像生成装置が他の画像生成装置とネットワークを介して入力情報などのデータを送受信し、受信したデータと入力部160からの入力情報とに基づいて、画像生成処理を行うようにしてもよい。   For example, as shown in FIG. 2, in the multiplayer mode, input units 160-1 and 160-2 for each player are prepared, and based on the aiming positions indicated by the input units 160-1 and 160-2. To hit the enemy characters. In the present embodiment, in the multiplayer mode, data provided to a plurality of players, display output images, arithmetic processing images, and game sounds are generated using a single image generation device. It should be noted that the image generation apparatus transmits / receives data such as input information to / from other image generation apparatuses via the network, and performs image generation processing based on the received data and input information from the input unit 160. Good.

2.画素データを用いてヒット処理を行う手法
(1)概要
本実施形態の画像生成装置は、オブジェクト空間内で弾(特定オブジェクトの一例)を敵キャラクタにヒットさせて攻撃を行うシューティングゲームに関する処理を行うものである。
2. A technique for hit processing using pixel data
(1) Overview The image generation apparatus according to the present embodiment performs processing related to a shooting game in which an enemy character is hit by hitting a bullet (an example of a specific object) in an object space.

図2は、本実施形態における画像生成装置の外観図を示す。本実施形態では、入力部160(160−1、160−2)が設けられ、表示部190に画像生成装置が生成した表示出力用画像が表示される。つまり、本実施形態のシューティングゲームは、プレーヤが入力部160に設定されている引き金(トリガ)を引いて、出現する多数の敵キャラクタを攻撃して敵キャラクタを倒しながらゲームを進行させるゲームである。   FIG. 2 is an external view of the image generation apparatus according to this embodiment. In the present embodiment, the input unit 160 (160-1, 160-2) is provided, and the display output image generated by the image generation device is displayed on the display unit 190. That is, the shooting game of the present embodiment is a game in which the player pulls a trigger (trigger) set in the input unit 160, attacks a large number of appearing enemy characters, and advances the game while defeating the enemy characters. .

そして、本実施形態の画像生成装置は、表示部190に表示させる表示出力用画像Dを生成すると共に、演算処理用画像E(E1〜E3)を生成し、演算処理用画像Eに基づいてヒット処理を行う。   Then, the image generation apparatus according to the present embodiment generates a display output image D to be displayed on the display unit 190, generates calculation processing images E (E1 to E3), and hits based on the calculation processing image E Process.

つまり、本実施形態では、弾オブジェクト以外のオブジェクトであって、オブジェクト空間に存在する敵オブジェクト、背景オブジェクトなどの複数のオブジェクトを色分けした演算処理用画像Eを生成する。そして、演算処理用画像Eにおいて、指示位置(照準位置)に対応する所定範囲内のピクセルを選択し、選択されたピクセルの色が敵オブジェクトを示す色である場合に、敵オブジェクトにヒットしたと判定する処理を行っている。このようにすれば、3次元のオブジェクト空間内で、弾の軌跡(レイ)と、オブジェクトとのヒット処理を行う従来の手法に比べて処理負荷を軽減することができる。   That is, in the present embodiment, an arithmetic processing image E is generated that is an object other than a bullet object and is color-coded for a plurality of objects such as enemy objects and background objects existing in the object space. Then, in the calculation processing image E, when a pixel within a predetermined range corresponding to the designated position (aiming position) is selected, and the color of the selected pixel is a color indicating an enemy object, the enemy object is hit. Processing to determine. In this way, the processing load can be reduced compared to the conventional method of performing hit processing between a trajectory (ray) of a bullet and an object in a three-dimensional object space.

(2)画像を生成する手法
本実施形態は、表示出力用画像Dと、演算処理用画像E1(ヒット処理用画像E1)とを生成する手法について説明する。つまり、本実施形態では、フレーム毎に(例えば、1/60秒単位で)、図3(A)に示す表示出力用画像Dと、図3(B)に示す演算処理用画像E1とを生成する処理を行う。
(2) Method for Generating Image In this embodiment, a method for generating a display output image D and an arithmetic processing image E1 (hit processing image E1) will be described. That is, in the present embodiment, the display output image D shown in FIG. 3A and the arithmetic processing image E1 shown in FIG. 3B are generated for each frame (for example, in units of 1/60 seconds). Perform the process.

図4(A)(B)は、敵オブジェクトOB1のオブジェクトデータ(モデルデータ)を図示したものである。図4(A)は、表示出力用画像Dで用いられる敵オブジェクトOB1−1のオブジェクトデータを図示したものである。一方、図4(B)は、演算処理用画像E1で用いられる敵オブジェクトEOB1−2のオブジェクトデータを図示したものである。つまり、演算処理用画像E1で用いられるオブジェクト(モデル)は、当該オブジェクトの頂点数が表示出力用画像Dで用いられるオブジェクトの頂点数よりも少ない簡略オブジェクトである。例えば、本実施形態では、表示出力用画像Dを生成する際には、敵オブジェクトOB1−1を用いて生成する処理を行う。一方、演算処理用画像E1を描画する際には、表示出力用画像Dで用いられる敵オブジェクトOB1−1に替えて、敵オブジェクトOB1−1の頂点数を減らした敵オブジェクトOB1−2を用いて描画する処理を行っている。この理由は、演算処理用画像E1は、ヒット処理に関する処理を行うために用いられる画像であるので、ヒット処理の処理負荷の軽減や効率性を考えると、表示出力用画像Dで用いられるオブジェクトよりも頂点数を減らした簡易なオブジェクトを用いる方が適しているからである。   4A and 4B show object data (model data) of the enemy object OB1. FIG. 4A illustrates the object data of the enemy object OB1-1 used in the display output image D. On the other hand, FIG. 4B illustrates object data of the enemy object EOB1-2 used in the calculation processing image E1. That is, the object (model) used in the calculation processing image E1 is a simple object in which the number of vertices of the object is smaller than the number of vertices of the object used in the display output image D. For example, in the present embodiment, when the display output image D is generated, a process of generating using the enemy object OB1-1 is performed. On the other hand, when the calculation processing image E1 is drawn, the enemy object OB1-2 in which the number of vertices of the enemy object OB1-1 is reduced is used instead of the enemy object OB1-1 used in the display output image D. Processing to draw. The reason is that the calculation processing image E1 is an image used for performing processing related to hit processing, and therefore, considering the reduction in processing load and efficiency of hit processing, it is more than the object used in the display output image D. This is because it is more suitable to use a simple object with a reduced number of vertices.

ところで、本実施形態では、演算処理用画像E1を生成する際には、各オブジェクトの頂点データの(R,G,B,A)を、そのオブジェクトを特定できる(識別可能な)(R,G,B,A)に決定する。さらに、複数の部位で構成されるオブジェクトについては、オブジェクトを構成する部位を特定できる(識別可能な)(R,G,B,A)に決定する。そして、決定されたオブジェクトの頂点データの(R,G,B,A)に基づいて、演算処理用画像E1を生成する処理を行っている。   By the way, in this embodiment, when generating the processing image E1, the vertex data (R, G, B, A) of each object can be specified (identified) (R, G). , B, A). Further, for an object composed of a plurality of parts, it is determined that the parts constituting the object can be specified (identified) (R, G, B, A). Then, based on the determined vertex data (R, G, B, A) of the object, processing for generating the calculation processing image E1 is performed.

つまり、本実施形態では、演算処理用画像E1を生成する場合には、複数のオブジェクト単位で色分けし、さらに、オブジェクトの部位単位で色分けする処理を行っている。   In other words, in the present embodiment, when the calculation processing image E1 is generated, a process of color-coding in units of a plurality of objects and color-coding in units of parts of the objects is performed.

例えば、図5(A)に示すように、各オブジェクトを識別するIDを、R値、G値で決定し、オブジェクトの部位をB値で決定し、ヒットタイプをA値で決定する。なお、このヒットタイプは、複数のオブジェクトを、グループ化したものであり、例えば、「キャラクタ」というグループ、「背景」というグループ、「キャラクタ、背景以外のオブジェクト」という3種のグループに分けることができる。   For example, as shown in FIG. 5A, the ID for identifying each object is determined by the R value and the G value, the part of the object is determined by the B value, and the hit type is determined by the A value. This hit type is a group of a plurality of objects. For example, the hit type can be divided into three groups: “character” group, “background” group, and “character, object other than background”. it can.

例えば、図5(B)に示すように、敵キャラクタOB1−2の頭部オブジェクトは、ID=1、部位=1、ヒットタイプ=1であるので、敵キャラクタOB1−2の頭部オブジェクトF1の頂点データの(R,G,B,A)は(1,1,1,1)と決定される。   For example, as shown in FIG. 5B, the head object of the enemy character OB1-2 has ID = 1, part = 1, hit type = 1, and therefore the head object F1 of the enemy character OB1-2. The vertex data (R, G, B, A) is determined as (1, 1, 1, 1).

以上のように、オブジェクト単位で(R,G,B,A)を決定し、さらに、オブジェクトが複数の部位で構成されている場合には、部位単位での(R,G,B,A)が決定される。そして、決定された(R,G,B,A)に基づいて演算処理用画像E1を生成する。   As described above, (R, G, B, A) is determined in units of objects, and (R, G, B, A) in units of parts when the object is composed of a plurality of parts. Is determined. Then, an arithmetic processing image E1 is generated based on the determined (R, G, B, A).

つまり、本実施形態では、画像生成部120によって、表示出力用画像D、演算処理用画像E1とが次のように生成される。まず、本実施形態では、ワールド座標系(3次元のオブジェクト空間)に、表示出力用のオブジェクト(例えば、OB1−1)を配置させ、仮想カメラを用いて、表示出力用画像Dを描画する処理を行う。同様に、ワールド座標系に、演算処理用のオブジェクト(例えば、OB1−2)を配置させ、仮想カメラを用いて、演算処理用画像E1を描画する処理を行う。本実施形態では、同一の仮想カメラの位置、向き、画角に基づいて、表示出力用画像Dと、演算処理用画像E1とを生成する処理を行う。   That is, in this embodiment, the image generation unit 120 generates the display output image D and the calculation processing image E1 as follows. First, in the present embodiment, a process of placing a display output object (for example, OB1-1) in the world coordinate system (three-dimensional object space) and drawing a display output image D using a virtual camera. I do. Similarly, an object for arithmetic processing (for example, OB1-2) is arranged in the world coordinate system, and processing for rendering the arithmetic processing image E1 is performed using a virtual camera. In the present embodiment, processing for generating the display output image D and the arithmetic processing image E1 is performed based on the position, orientation, and angle of view of the same virtual camera.

なお、演算処理用画像E1を生成する際には、表示出力用画像Dよりも画角を広げて描画するようにしてもよい。このようにすれば、広範囲でのヒット判定を行うことができる。   Note that when the calculation processing image E1 is generated, the image may be drawn with a wider angle of view than the display output image D. In this way, hit determination can be performed over a wide range.

また、本実施形態では、演算処理用画像E1を生成する際には、攻撃側のオブジェクトである弾オブジェクト(特定オブジェクト)を含まないように、画像を生成する処理を行う。なぜなら、弾オブジェクトが、弾オブジェクト以外のオブジェクトに対してヒットしたか否かを判定する必要があるからである。   In the present embodiment, when the calculation processing image E1 is generated, a process of generating an image is performed so as not to include the bullet object (specific object) that is the attacking object. This is because it is necessary to determine whether or not the bullet object has hit an object other than the bullet object.

そして、表示出力用画像Dを生成する際には、頂点処理後のピクセル処理を行う。一方、演算処理用画像E1を生成する際には、頂点処理後のピクセル処理は行わないようにし、オブジェクト単位(部位オブジェクト単位)での色分けを保つようにしている。つまり、演算処理用画像のオブジェクト単位(部位オブジェクト単位)でのポリゴンの頂点色は全て同一であり、オブジェクト単位でのポリゴンの色が一様になるように制御している。なぜなら、ピクセル処理によってピクセル単位で色が変更されてしまうと、正確なヒット判定処理を行うことができなくなるからである。   Then, when the display output image D is generated, pixel processing after vertex processing is performed. On the other hand, when generating the calculation processing image E1, the pixel processing after the vertex processing is not performed, and the color classification in the object unit (part object unit) is maintained. That is, the vertex colors of the polygons in the object unit (part object unit) of the calculation processing image are all the same, and the polygon color in the object unit is controlled to be uniform. This is because if the color is changed in pixel units by pixel processing, accurate hit determination processing cannot be performed.

なお、本実施形態では、図6(A)に示すように表示出力用画像Dが画像バッファ221に描画され、図6(B)に示すように、演算処理用画像E1が演算処理用の画像バッファ231に描画される。本実施形態では、演算処理用の画像バッファ231(232、233も同様)は、縮小用バッファ(1/8フレームバッファ)であるので、演算処理用画像Eの解像度は、表示出力用画像Dの解像度よりも低くなる。しかし、演算処理用画像は、プレーヤが違和感を感じない程度のヒット処理が可能であるので問題は生じない。また、縮小用バッファを用いれば、演算処理用画像Eを生成するため描画処理(GPUの処理負荷)を軽減することができるメリットがある。   In this embodiment, the display output image D is drawn in the image buffer 221 as shown in FIG. 6A, and the arithmetic processing image E1 is used as the arithmetic processing image as shown in FIG. 6B. The image is drawn in the buffer 231. In this embodiment, since the image buffer 231 for arithmetic processing (same for 232 and 233) is a reduction buffer (1/8 frame buffer), the resolution of the arithmetic processing image E is equal to that of the display output image D. It becomes lower than the resolution. However, the image for arithmetic processing does not cause a problem because it can perform hit processing to the extent that the player does not feel uncomfortable. Further, if the reduction buffer is used, there is an advantage that the drawing processing (GPU processing load) can be reduced because the calculation processing image E is generated.

また、図6(A)に示すZバッファ222は、表示出力用画像Dの各画素のZ値(奥行き値、深度値)を格納し、また、図6(B)に示すZバッファ233は、演算処理用画像E1の各画素のZ値を格納する。   Further, the Z buffer 222 shown in FIG. 6A stores the Z value (depth value, depth value) of each pixel of the display output image D, and the Z buffer 233 shown in FIG. The Z value of each pixel of the calculation processing image E1 is stored.

また、図3(A)に示すように、表示出力用画像Dに入力部160によって指示される指示位置Pに、照準(指示マーカーの一例)Mを描画する処理を行っている。つまり、プレーヤは、表示出力用画像Dを見ながら、シューティング対象に対する狙いを定めて、照準Mを制御する入力操作を行うことになる。一方、図3(B)に示すように、演算処理用画像E1では、照準Mは描画されない。ヒット処理に影響を及ぼしてしまうからである。   Further, as shown in FIG. 3A, a process of drawing an aim (an example of an instruction marker) M at the indicated position P indicated by the input unit 160 on the display output image D is performed. That is, the player performs an input operation for controlling the aim M while aiming at the shooting target while viewing the display output image D. On the other hand, as shown in FIG. 3B, the aim M is not drawn in the arithmetic processing image E1. This is because the hit processing is affected.

なお、図4(A)に示すモデルデータを構成するオブジェクトの各頂点の頂点データ(R,G,B,A)が、図5(B)に示すように予め定義された(R,G,B,A)の情報(或いは一部の情報)を含むように定義してもよい。   Note that the vertex data (R, G, B, A) of each vertex of the object constituting the model data shown in FIG. 4 (A) is defined in advance as shown in FIG. 5 (B) (R, G, You may define so that the information (or some information) of B, A) may be included.

以上のように、本実施形態では、表示出力用画像Dと、演算処理用画像E1を生成している。   As described above, in this embodiment, the display output image D and the arithmetic processing image E1 are generated.

(3)ヒット処理
次に、本実施形態におけるヒット処理について説明する。本実施形態では、演算処理用画像E1において、指示位置Qに基づくヒットエリア(所定範囲)Nにおいて、1又は複数の画素を選択(抽出)する処理を行い、選択された画素の色情報又は半透明情報(R,G,B,A)に基づいて、弾オブジェクトが所与のオブジェクトにヒットしたか否かを判定する処理を行っている。
(3) Hit processing Next, hit processing in the present embodiment will be described. In this embodiment, in the processing image E1, a process of selecting (extracting) one or a plurality of pixels in a hit area (predetermined range) N based on the designated position Q is performed, and the color information or half of the selected pixel is selected. Based on the transparency information (R, G, B, A), a process is performed to determine whether or not the bullet object hits a given object.

例えば、本実施形態では、図7(A)(B)に示すように、入力部160からの入力情報に基づいて、表示出力用画像Dにおける指示位置Pと、演算処理用画像E1における、指示位置Pに対応する指示位置Qを取得する。なお、表示出力用画像D上の指示位置Pを、演算処理用画像E1上の指示位置Qに変換する処理を行って求めてもよい。例えば、演算処理用画像E1の大きさは表示出力用画像Dの1/8の大きさであるので、大きさの比率に基づいて指示位置Qを求めることができる。   For example, in the present embodiment, as shown in FIGS. 7A and 7B, based on the input information from the input unit 160, the indication position P in the display output image D and the indication in the calculation processing image E1 A designated position Q corresponding to the position P is acquired. Note that the indication position P on the display output image D may be obtained by performing processing for converting the indication position P into the indication position Q on the calculation processing image E1. For example, since the size of the calculation processing image E1 is 1/8 the size of the display output image D, the indicated position Q can be obtained based on the size ratio.

また、本実施形態では、図8(A)〜(C)に示すように、演算処理用画像E1において、指示位置Qを中心とするヒットエリアNにおいて複数の画素を選択する。例えば、図8(A)に示すように、所定間隔で画素を選択するようにしてもよい。また、図8(B)に示すように、ヒットエリアNにおいて、所定数の画素をランダムに選択するようにしてもよい。   In the present embodiment, as shown in FIGS. 8A to 8C, a plurality of pixels are selected in the hit area N centered on the designated position Q in the calculation processing image E1. For example, as shown in FIG. 8A, pixels may be selected at a predetermined interval. Further, as shown in FIG. 8B, in the hit area N, a predetermined number of pixels may be selected at random.

なお、本実施形態では、照準Mの形状及び大きさの少なくとも1つに基づいてヒットエリアNを設定している。したがって、表示出力用画像Dにおいてプレーヤが狙いを定めた照準Mの形状の大きさに対応したオブジェクトに対して、ヒットさせるように制御することができる。   In the present embodiment, the hit area N is set based on at least one of the shape and size of the aim M. Therefore, it is possible to control the object corresponding to the size of the shape of the aim M targeted by the player in the display output image D to be hit.

例えば、図7(A)に示すように、円形の照準Mである場合には、ヒットエリアNを円形にしている。   For example, as shown in FIG. 7A, in the case of a circular aim M, the hit area N is circular.

また、表示出力用画像Dで表示される照準Mの形状が菱形である場合には、図8(C)に示すように、ヒットエリアNを菱形にする。かかる場合には、演算処理用画像E1において指示位置Qの画素と、菱形の頂点(頂点付近)の画素とを選択するようにしてもよい。   When the shape of the aim M displayed in the display output image D is a rhombus, the hit area N is a rhombus, as shown in FIG. In such a case, the pixel at the designated position Q and the pixel at the rhombus apex (near the apex) may be selected in the calculation processing image E1.

そして、本実施形態では、ヒットエリア内から画素が選択されると、画素の(R,G,B,A)(画素データの一例)に基づいて、弾オブジェクトと、所与のオブジェクトとのヒット判定を行う。   In this embodiment, when a pixel is selected from the hit area, a hit between a bullet object and a given object is based on (R, G, B, A) (an example of pixel data) of the pixel. Make a decision.

例えば、図8(A)に示すように、選択した画素K1〜K9であるとすると、各画素K1〜K9それぞれの(R,G,B,A)に基づいて特定したオブジェクトにヒットしたと判定する。また、ヒットしたと判定されたオブジェクトのヒット部位を、各画素K1〜K9それぞれの(R,G,B,A)に基づいて判定する。   For example, as shown in FIG. 8A, if the selected pixels are K1 to K9, it is determined that the object specified based on (R, G, B, A) of each of the pixels K1 to K9 has been hit. To do. Further, the hit portion of the object determined to be hit is determined based on (R, G, B, A) of each of the pixels K1 to K9.

例えば、画素K1の色情報(R,G)=(1,1)であるとすると、図5(B)に示すように、色情報(R,G)=(1,1)は、ID=1のオブジェクトであるので、敵オブジェクトOB1であると決定することができる。つまり、画素K1の色情報に基づいて、画素K1が示すオブジェクトが敵オブジェクトOB1であると決定することができる。そして、本実施形態では、弾オブジェクトが決定された敵オブジェクトOB1にヒットしたと判定する。また、図5(B)に示すように、画素K1の色情報B値=1である場合には、頭部F1であると決定することができる。つまり、画素K1の色情報に基づいて、画素K1が示すオブジェクトが敵オブジェクトOB1の頭部F1であると決定できる。したがって、本実施形態では、弾オブジェクトが敵オブジェクトOB1の頭部F1にヒットしたと判定する。つまり、画素K1の色情報及び半透明情報(R,G,B,A)が(1,1,1,1)である場合には、図5(B)に示すように、弾が敵オブジェクトOB1の頭部F1にヒットしたと判定する処理を行う。   For example, if the color information (R, G) = (1, 1) of the pixel K1, as shown in FIG. 5B, the color information (R, G) = (1, 1) is ID = Since it is one object, it can be determined that it is the enemy object OB1. That is, based on the color information of the pixel K1, it can be determined that the object indicated by the pixel K1 is the enemy object OB1. In this embodiment, it is determined that the bullet object hits the determined enemy object OB1. Further, as shown in FIG. 5B, when the color information B value of the pixel K1 = 1, it can be determined that the head F1. That is, based on the color information of the pixel K1, it can be determined that the object indicated by the pixel K1 is the head F1 of the enemy object OB1. Therefore, in this embodiment, it is determined that the bullet object has hit the head F1 of the enemy object OB1. That is, when the color information and the translucent information (R, G, B, A) of the pixel K1 are (1, 1, 1, 1), as shown in FIG. Processing for determining that the head F1 of OB1 is hit is performed.

なお、本実施形態では、Zバッファ233の画素K1〜K9それぞれの奥行き値を参照し、ヒットタイプ毎に、最も投影面に近い(最も視点に対して手前にある)オブジェクトに対してヒットしたと判定してもよい。   In the present embodiment, the depth values of the pixels K1 to K9 of the Z buffer 233 are referred to, and for each hit type, the object closest to the projection plane (most closest to the viewpoint) is hit. You may judge.

例えば、画素K1〜K9の半透明情報Aに基づいて、画素K1〜K9をヒットタイプ毎に分類する。例えば、「キャラクタ」のヒットタイプ(A=1)の画素が、K1、K2である場合には、画素K1と、画素K2との奥行き値を参照し、仮想カメラに対して手前にある画素が画素K1である場合には、画素K1の(R,G,B,A)で決定されるキャラクタにヒットしたと判定する。同様に、背景のヒットタイプ(A=2)、他のオブジェクトのヒットタイプ(A=3)について、いずれのオブジェクトにヒットしたのかを判定する。   For example, the pixels K1 to K9 are classified for each hit type based on the translucent information A of the pixels K1 to K9. For example, if the “character” hit type (A = 1) pixels are K1 and K2, the depth values of the pixel K1 and the pixel K2 are referred to, and the pixel in front of the virtual camera is If it is the pixel K1, it is determined that the character determined by (R, G, B, A) of the pixel K1 has been hit. Similarly, with respect to the hit type of the background (A = 2) and the hit type of other objects (A = 3), it is determined which object has been hit.

また、本実施形態では、入力部160の引き金が引かれたタイミングで(攻撃入力情報を検出したタイミングで)、ヒット判定処理を行っている。つまり、引き金が引かれるタイミングで、オブジェクト空間において、弾がオブジェクトにヒットしたものとみなしている。   In the present embodiment, hit determination processing is performed at the timing when the trigger of the input unit 160 is pulled (at the timing when attack input information is detected). That is, it is considered that the bullet hits the object in the object space at the timing when the trigger is pulled.

そして、本実施形態では、選択した画素の(R,G,B,A)が示すオブジェクトが敵オブジェクトである場合には、敵オブジェクトに応じた所与の演算処理を行う。例えば、敵オブジェクトがヒット攻撃を受けるヒット処理を行う。より具体的には、敵オブジェクトの体力値などのパラメータを制御する処理(例えば減算処理)や、敵オブジェクトが攻撃を受けるエフェクト処理(攻撃を受ける動作処理)を行う。また、弾オブジェクトを敵オブジェクトにヒットさせる表示出力用画像を生成する処理を行う。なお、敵オブジェクトをヒットさせることによって、プレーヤキャラクタの得点を加算するなどの処理を行う。   In the present embodiment, when the object indicated by (R, G, B, A) of the selected pixel is an enemy object, a given calculation process according to the enemy object is performed. For example, hit processing in which an enemy object receives a hit attack is performed. More specifically, processing (for example, subtraction processing) for controlling parameters such as a physical strength value of the enemy object, and effect processing (operation processing for receiving an attack) in which the enemy object is attacked are performed. In addition, a process for generating a display output image for causing the bullet object to hit the enemy object is performed. It should be noted that processing such as adding a player character's score is performed by hitting an enemy object.

以上のように、本実施形態のヒット処理によれば、広範囲におけるヒット判定の負荷を軽減することができる。例えば、従来の手法では、図9(A)に示すように、指示位置Pに基づく照準Mが表示出力用画像に表示されていた場合、図9(B)に示すように、指示位置Pに基づくオブジェクト空間のレイVとオブジェクトとのヒット判定を行ったり、図9(C)に示すように、ヒットボリュームSVとオブジェクトとのヒット判定を行っていた。このような、3次元のオブジェクト空間における軌跡や、ヒットボリュームを用いる演算は、処理負荷が高いという問題があった。   As described above, according to the hit processing of this embodiment, it is possible to reduce the load of hit determination in a wide range. For example, in the conventional method, as shown in FIG. 9A, when the aim M based on the indicated position P is displayed on the display output image, as shown in FIG. The hit determination between the object space ray V and the object is performed, or as shown in FIG. 9C, the hit determination between the hit volume SV and the object is performed. Such a calculation using a trajectory in a three-dimensional object space or a hit volume has a problem that the processing load is high.

一方、本実施形態では、3次元空間内で、弾と各オブジェクトとのヒット判定を行わずに、選択された画素の(R,G,B,A)に基づいて、弾とオブジェクトとのヒット判定処理を行うことができる。したがって、本実施形態の手法によれば、3次元の演算処理が不要になるので、従来よりも処理負荷が軽減されるという効果がある。   On the other hand, in this embodiment, the hit between the bullet and the object is made based on the (R, G, B, A) of the selected pixel without performing the hit judgment between the bullet and each object in the three-dimensional space. Judgment processing can be performed. Therefore, according to the method of the present embodiment, three-dimensional arithmetic processing is not necessary, so that there is an effect that the processing load is reduced as compared with the conventional method.

なお、本実施形態では、オブジェクト空間内に弾オブジェクトを存在させずに、ヒット処理を行うようにしてもよい。つまり、演算処理用画像において選択された画素の(R,G,B,A)に基づいて、弾オブジェクトが所与のオブジェクトにヒットしたとみなしてヒット判定処理を行ってもよい。   In the present embodiment, hit processing may be performed without the bullet object existing in the object space. That is, the hit determination process may be performed on the basis of (R, G, B, A) of the pixel selected in the arithmetic processing image, assuming that the bullet object hits a given object.

(4)エフェクト処理
本実施形態では、弾オブジェクトが敵オブジェクト、箱などの所与のオブジェクトにヒットしたと判定された場合に、表示出力用画像Dに対してエフェクト処理(動作処理)を行う。例えば、図10に示すように、箱オブジェクトTOBに弾がヒットしたと判定されると、箱オブジェクトTOBを構成する各ポリゴンは、それぞれの法線ベクトルNV1〜NV6に基づいて、箱が破壊されるエフェクト処理を行う。例えば、本実施形態では、法線ベクトルNV1〜NV6に基づいて、適切な方向に破片オブジェクト(パーティクル)を離散させるエフェクト処理を行うようにしている。
(4) Effect processing In this embodiment, when it is determined that a bullet object hits a given object such as an enemy object or a box, effect processing (operation processing) is performed on the display output image D. For example, as shown in FIG. 10, when it is determined that a bullet hits the box object TOB, the polygons constituting the box object TOB are destroyed based on their normal vectors NV1 to NV6. Perform effect processing. For example, in the present embodiment, an effect process is performed in which the fragment objects (particles) are dispersed in an appropriate direction based on the normal vectors NV1 to NV6.

また、本実施形態では、ヒット位置のオブジェクトの属性情報(木材、金属、布などの素材情報)に基づいて、エフェクト処理を行っている。例えば、箱オブジェクトTOBの素材が木である場合には、箱オブジェクトTOBに替えて、木用の破片オブジェクトを離散させるエフェクト処理を行うようにする。   In the present embodiment, effect processing is performed based on attribute information (material information such as wood, metal, cloth, etc.) of the object at the hit position. For example, when the material of the box object TOB is wood, an effect process is performed to separate the wood fragment objects in place of the box object TOB.

本実施形態では、これらの法線ベクトルや属性情報を定義した(R,G,B,A)に基づいて、演算処理用画像(エフェクト用画像)E2を生成する。そして、弾オブジェクトが所与のオブジェクトにヒットしたと判定された場合に、演算処理用画像E2の指示位置Qに対応する画素の(R,G,B,A)に基づいて、エフェクト処理を行う。   In the present embodiment, an arithmetic processing image (effect image) E2 is generated based on (R, G, B, A) defining these normal vectors and attribute information. Then, when it is determined that the bullet object hits the given object, effect processing is performed based on (R, G, B, A) of the pixel corresponding to the designated position Q of the calculation processing image E2. .

この演算処理用画像E2は、演算処理用画像E1と同様に生成されるが、オブジェクトの頂点データ(R,G,B,A)は、法線ベクトルや属性情報を定義した(R,G,B,A)に基づいて決定される。   The arithmetic processing image E2 is generated in the same manner as the arithmetic processing image E1, but the vertex data (R, G, B, A) of the object defines normal vectors and attribute information (R, G, B, A).

具体的には、図11(A)に示すように、オブジェクトの頂点の(R,G,B,A)の(R,G,B)は、オブジェクトを構成するポリゴンの法線ベクトルの(x,y,z)に対応し、A値は属性情報に対応する。図11(B)に示すように、法線ベクトル(x、y、z)=(5,10,12)であって、属性情報が金属である場合の頂点データの(R,G,B,A)は、(5,10,12,1)と決定される。   Specifically, as shown in FIG. 11A, (R, G, B) at the vertex (R, G, B, A) of the object is (x, x) of the normal vector of the polygon constituting the object. , Y, z), and the A value corresponds to attribute information. As shown in FIG. 11B, the normal vector (x, y, z) = (5, 10, 12) and the vertex data (R, G, B, A) is determined as (5, 10, 12, 1).

そして、本実施形態では、エフェクト処理は次のように処理を行う。例えば、演算処理用画像E1の指示位置Qに基づいて選択された画素K1の(R,G,B,A)に基づいて、弾オブジェクトが例えば箱オブジェクトTOBにヒットされたと判定されると、演算処理用画像E2の当該指示位置Qに基づき選択された画素K1の(R,G,B,A)に基づいて、箱オブジェクトTOBの法線ベクトルを求め、属性情報を決定する。例えば、画素K1の(R,G,B)に基づいて箱オブジェクトTOBの法線ベクトルを求め、画素K1のA値に基づいて、箱オブジェクトTOBの属性情報を決定する。そして、求めた法線ベクトルと、決定された属性情報に基づいて、箱オブジェクトTOBに替えて、破片オブジェクトを離散させるエフェクト処理を行う。   In this embodiment, the effect process is performed as follows. For example, when it is determined that the bullet object is hit by, for example, the box object TOB based on (R, G, B, A) of the pixel K1 selected based on the designated position Q of the calculation processing image E1, the calculation is performed. Based on (R, G, B, A) of the pixel K1 selected based on the designated position Q of the processing image E2, a normal vector of the box object TOB is obtained, and attribute information is determined. For example, a normal vector of the box object TOB is obtained based on (R, G, B) of the pixel K1, and attribute information of the box object TOB is determined based on the A value of the pixel K1. Then, based on the obtained normal vector and the determined attribute information, an effect process is performed to separate the fragment object instead of the box object TOB.

このようにすれば、エフェクト処理に必要な情報を、画素の(R,G,B,A)のデータで保持することができ、ヒット処理に応じたエフェクト処理を容易に行うことができる。   In this way, information necessary for the effect processing can be held in the (R, G, B, A) data of the pixel, and the effect processing according to the hit processing can be easily performed.

なお、本実施形態では、演算処理用画像E2を用いて、弾がヒットしたオブジェクトを破壊させる破壊音を発生させるような音処理を行うようにしてもよい。例えば、弾が箱オブジェクトTOBにヒットした場合に、演算処理用画像E2の指示位置Qに基づいて選択された画素K1の(R,G,B,A)が示す法線ベクトルの方向に応じた音を発生させてもよい。   In the present embodiment, sound processing may be performed using the arithmetic processing image E2 so as to generate a breaking sound that destroys an object hit by a bullet. For example, when a bullet hits the box object TOB, it corresponds to the direction of the normal vector indicated by (R, G, B, A) of the pixel K1 selected based on the designated position Q of the calculation processing image E2. Sound may be generated.

また、演算処理用画像E2の指示位置Qに基づいて選択された画素K1のAが示す属性情報に応じた音を発生させるようにしてもよい。このようにすれば、臨場感溢れる演出を提供することができる。   Further, a sound corresponding to the attribute information indicated by A of the pixel K1 selected based on the designated position Q of the calculation processing image E2 may be generated. In this way, it is possible to provide an effect full of realism.

また、本実施形態では、Zバッファ233に格納される奥行き値を参照して、エフェクト処理を行うようにしてもよい。例えば、演算処理用画像E1における指示位置に基づき選択される画素K1に基づき、弾が箱オブジェクトTOBにヒットしたと判定された場合には、Zバッファ233の画素K1の奥行き値を参照し、参照された奥行き値に破片オブジェクト(エフェクトオブジェクト)を配置させる処理を行う。このようにすれば、奥行きに応じたエフェクト処理を行うことができる。   In the present embodiment, the effect processing may be performed with reference to the depth value stored in the Z buffer 233. For example, when it is determined that the bullet has hit the box object TOB based on the pixel K1 selected based on the designated position in the arithmetic processing image E1, the depth value of the pixel K1 in the Z buffer 233 is referred to A process of placing a shard object (effect object) at the set depth value is performed. In this way, effect processing according to depth can be performed.

なお、本実施形態では、表示出力用画像Dについて、エフェクト処理に関する画像生成処理を行っている。演算処理用画像Eについて、エフェクト処理を行うと、ピクセル単位で色情報等が変更されてしまい、正確なヒット処理を行うことができなるからである。   In the present embodiment, an image generation process related to the effect process is performed on the display output image D. This is because if the effect processing is performed on the arithmetic processing image E, the color information and the like are changed in units of pixels, and accurate hit processing cannot be performed.

(5)マルチプレーヤモード
本実施形態では、複数のプレーヤが協力して、敵オブジェクトを攻撃できる環境を提供している。
(5) Multiplayer mode In this embodiment, an environment is provided in which a plurality of players cooperate to attack an enemy object.

例えば、図12に示すように、第1のプレーヤの指示位置をP1、第2のプレーヤの指示位置をP2とすると、指示位置P1から指示位置P2までの距離が所定距離以内になると、共通指示位置PAが発生する。つまり、表示出力用画像Dにおいて、共通指示位置PAに共通照準(共通ガンサイト)MAを描画する処理を行う。   For example, as shown in FIG. 12, if the designated position of the first player is P1 and the designated position of the second player is P2, the common instruction is given when the distance from the designated position P1 to the designated position P2 is within a predetermined distance. A position PA is generated. That is, in the display output image D, a process of drawing the common aim (common gun site) MA at the common designated position PA is performed.

そして、本実施形態では、共通照準MAに基づいて、弾オブジェクトが所与のオブジェクトにヒットしたか否かを判定する場合には、演算処理用画像Eの共通指示位置QAに基づくヒットエリア(第2の所定範囲)NA内における画素を選択し、選択された複数の画素それぞれの(R,G,B,A)に基づいて、弾オブジェクトが所与のオブジェクトにヒットしたか否かを判定する処理を行う。   In the present embodiment, when determining whether or not a bullet object hits a given object based on the common aiming MA, the hit area (the first area based on the common designated position QA of the calculation processing image E) is determined. 2) A pixel within the NA is selected, and whether or not the bullet object hits the given object is determined based on (R, G, B, A) of each of the selected plurality of pixels. Process.

また、本実施形態では、共通照準MAの大きさを、照準M1、M2よりも大きなサイズにしている。そして、本実施形態では、演算処理用画像EのヒットエリアNAは、共通照準MAの大きさに応じて決めるので、各プレーヤが単独で照準M1、M2を狙うヒットエリアN1、N2よりもヒットエリアNAが広くなり、共通照準MAが現れた場合には、敵オブジェクトをヒットさせる確率(命中度)が高まる。   In the present embodiment, the size of the common aiming MA is larger than the aiming M1 and M2. In this embodiment, the hit area NA of the arithmetic processing image E is determined according to the size of the common aiming MA, so that each player alone hits the aiming areas M1 and M2 and hit areas N1 and N2 that are hit areas. When the NA increases and the common aiming MA appears, the probability (hit level) of hitting an enemy object increases.

(6)ポリゴンを上書き描画する例
本実施形態では、図13(A)に示すように、所定のゲーム状況になると、表示出力用画像Dにおいて敵オブジェクトの狙いを誘導する所定エリアTMを描画して、プレーヤに所定エリアTMをヒットさせることを促すようにしている。この所定エリアTMに弾がヒットすると、敵オブジェクトに大きなダメージを与えて倒すことができる。
(6) Example of Overdrawing Drawing of Polygon In this embodiment, as shown in FIG. 13 (A), when a predetermined game situation is reached, a predetermined area TM for guiding the aim of the enemy object is drawn in the display output image D. Thus, the player is prompted to hit the predetermined area TM. When a bullet hits the predetermined area TM, the enemy object can be defeated with great damage.

かかる場合には、図13(B)に示すように、演算処理用画像E1において、の所定エリアTMに相当するエリアS1の全画素について、所定エリアTMに対応する色情報及び半透明情報(R,G,B,A)を上書き描画する。つまり、演算処理用画像を生成する最終段階で、エリアS1の全画素について、同一色、同一のα値描画する処理を行う。このようにすれば、表示出力用画像Dにおいて所定エリアTMが表示されている場合には、敵オブジェクトOB1の動作に関係なく、確実に所定エリアTMに対するヒット処理を実現できる。   In such a case, as shown in FIG. 13B, color information and translucent information (R) corresponding to the predetermined area TM are obtained for all the pixels in the area S1 corresponding to the predetermined area TM in the calculation processing image E1. , G, B, A) are overwritten. That is, at the final stage of generating the arithmetic processing image, processing for drawing the same color and the same α value is performed for all the pixels in the area S1. In this way, when the predetermined area TM is displayed in the display output image D, it is possible to reliably realize hit processing for the predetermined area TM regardless of the operation of the enemy object OB1.

(7)Z値の制御
本実施形態では、演算処理用の奥行き値をZバッファに格納する場合には、ゲーム状況に応じて、3次元のオブジェクト空間における奥行き値とは異なる値を格納する処理を行っている。
(7) Control of Z value In this embodiment, when the depth value for arithmetic processing is stored in the Z buffer, processing for storing a value different from the depth value in the three-dimensional object space according to the game situation. It is carried out.

例えば、本実施形態では、図14(A)(B)に示すように、部位C1(腕部位)に防御機能があり(つまり弾がヒットしてもダメージを受けない)、部位C2が弱点部位(つまり弾がヒットするとダメージを大きく受ける)であるオブジェクトOB3を、オブジェクト空間に配置させる。そして、例えば、敵キャラクタOB3は図14(A)(B)のように、部位C1を動作させる処理を行っている。かかる場合には、プレーヤは部位C1ではなく部位C2を狙うように、指示位置を制御する入力操作を要する。本実施形態では、操作の不得手なプレーヤに対して、攻撃が容易になるように、演算処理用画像のZ値を次のように制御している。   For example, in this embodiment, as shown in FIGS. 14A and 14B, the part C1 (arm part) has a defense function (that is, no damage is received even if a bullet is hit), and the part C2 is a weak part. An object OB3 (that is, a damage is greatly received when a bullet hits) is placed in the object space. Then, for example, the enemy character OB3 performs a process of moving the part C1 as shown in FIGS. In such a case, the player needs an input operation for controlling the designated position so as to aim at the part C2 instead of the part C1. In the present embodiment, the Z value of the arithmetic processing image is controlled as follows so that a player who is poor in operation can easily attack.

例えば、図15(A)(B)に示すように、部位C1が開いている状態(図14(A)の状態)である場合について説明する。かかる場合、部位C1が開いているので、プレーヤは部位C2を狙って攻撃しようとする。   For example, as shown in FIGS. 15A and 15B, the case where the part C1 is open (the state shown in FIG. 14A) will be described. In such a case, since the part C1 is open, the player tries to attack the part C2.

例えば、図14(A)に示すように、オブジェクト空間において、部位C1は部位C2よりも視点に対して手前にあるので、表示出力用画像Dを生成する際は、部位C2よりも部位C1が手前になるように描画する。つまり、図15(A)に示すように、表示出力用画像DのZ画像D2は、部位C1は部位C2よりも手前になるように隠面消去(デプスソート)が行われる。一方、演算処理用画像E(E1、E2)のZ画像E3を生成する際は、オブジェクト空間において、部位C1は部位C2よりも視点に対して手前にあっても、部位C2が、部位C1よりも視点に対して手前になるように描画する。例えば、図15(B)に示すように、演算処理用画像E1、E2のZ画像E3は、部位C2は部位C1よりも手前になるように、隠面消去が行われる。   For example, as shown in FIG. 14A, in the object space, the part C1 is closer to the viewpoint than the part C2, and therefore when the display output image D is generated, the part C1 is more than the part C2. Draw to the front. That is, as shown in FIG. 15 (A), the hidden image removal (depth sort) is performed on the Z image D2 of the display output image D so that the part C1 is closer to the part C2. On the other hand, when generating the Z image E3 of the calculation processing image E (E1, E2), even though the part C1 is closer to the viewpoint than the part C2 in the object space, the part C2 is more than the part C1. Also draw so that it is in front of the viewpoint. For example, as shown in FIG. 15B, the hidden surface removal is performed on the Z image E3 of the calculation processing images E1 and E2 so that the part C2 is closer to the part C1.

このようにすれば、プレーヤは、表示出力用画像Dにおいて、本来は見ることができないC2の一部分についても、ヒット攻撃を行うことができるので、敵キャラクタOB3の弱点の部位C2を狙い易くなり、効果的に敵を倒すことが出来る。   In this way, the player can make a hit attack even on a part of C2 that cannot be seen in the display output image D, so that it becomes easier to aim at the weak part C2 of the enemy character OB3. Can effectively defeat the enemy.

(8)物理演算との切り替え
本実施形態では、武器に応じて、物理演算に基づくヒット処理と、演算処理用の画像Eを用いたヒット処理とを切り替えている。
(8) Switching to Physical Calculation In the present embodiment, hit processing based on physical calculation and hit processing using the image E for calculation processing are switched according to the weapon.

例えば、図16(A)に示すように、大砲GOBから発射される弾SOBをオブジェクトOB4に着弾させるような攻撃手法の場合は、オブジェクト空間において、所定距離Lを弾SOBが移動することになる。   For example, as shown in FIG. 16A, in the case of an attack method in which a bullet SOB fired from the cannon GOB is landed on the object OB4, the bullet SOB moves a predetermined distance L in the object space. .

一方、本実施形態では、演算処理用画像Eを用いてヒット処理を行う場合には、弾の発射スピードなどに関係なく、トリガが引かれたタイミングで、弾とオブジェクトとのヒット判定を行っている。したがって、大砲GOBなどの、弾が所定距離Lを移動する武器を用いた攻撃には、演算処理用画像Eを用いたヒット処理は不向きである。大砲GOBの場合には、弾の発射スピードなどに応じて、実際に弾がオブジェクトに着弾した瞬間にヒットしたか否かを判定することが望ましいからである。   On the other hand, in this embodiment, when hit processing is performed using the arithmetic processing image E, the hit determination between the bullet and the object is performed at the timing when the trigger is pulled regardless of the bullet firing speed or the like. Yes. Therefore, hit processing using the calculation processing image E is not suitable for an attack using a weapon such as a cannon GOB whose bullet moves a predetermined distance L. This is because in the case of the cannon GOB, it is desirable to determine whether or not the bullet hits the object at the moment when it hits the object according to the bullet firing speed or the like.

そこで、本実施形態では、武器の種類に応じて、演算処理用画像Eを用いたヒット処理と、物理演算に基づくヒット処理との切り替えを行っている。   Therefore, in the present embodiment, switching between hit processing using the calculation processing image E and hit processing based on physical calculation is performed according to the type of weapon.

例えば、本実施形態では、プレーヤキャラクタが使用する武器が、大砲GOB(ミサイル)などの距離を有する武器(第1の攻撃オブジェクト)で攻撃する場面では、物理的にヒット処理を実行するプログラム(第1のヒット処理プログラム)を実行する。一方、プレーヤキャラクタが使用する武器が、ハンドガン、ショットガン、マシンガンなどの近距離用の武器(第2の攻撃オブジェクト)で攻撃する場合には、演算処理用画像Eを用いたヒット処理を実行するプログラム(第2のヒット処理プログラム)を実行する。つまり、プレーヤキャラクタが使用する武器に応じて、ヒット処理プログラムを切り替える処理を行う。   For example, in this embodiment, in a scene where a weapon used by the player character attacks with a weapon (first attack object) having a distance such as a cannon GOB (missile), a program (first program) that physically executes hit processing 1 hit processing program). On the other hand, when the weapon used by the player character attacks with a short-range weapon (second attack object) such as a hand gun, shot gun, or machine gun, hit processing using the calculation processing image E is executed. A program (second hit processing program) is executed. That is, a process for switching the hit processing program is performed according to the weapon used by the player character.

このように、本実施形態では、武器に応じて、処理演算負荷のバランスを測りながら適切なヒット処理を行うので、プレーヤは違和感を感じることなく、ゲームプレイを行うことができる。   As described above, according to the present embodiment, an appropriate hit process is performed while measuring the balance of the processing calculation load according to the weapon, so that the player can play the game without feeling uncomfortable.

3.フローチャート
本実施形態の処理の流れについて、図17を用いて説明する。本実施形態では、CPU側の処理において、各モデルを初期化する際に、各モデルデータにヒットID、ヒットタイプを割り当てる処理を行う。なお、モデルデータを構成するポリゴンの各頂点カラーには、属性値、部位を特定する値が設定される。これらの値が実際に取り得る値の範囲は0〜127であるが、0〜127を0.0〜1.0にマッピングした値(0〜127の範囲の値を0.0〜1.0の範囲の値に変換した値)を、各モデルデータを構成するポリゴンの各頂点カラーとして設定する。また、ヒットIDは、モデルデータそれぞれを識別可能な値が設定される。
3. Flowchart The processing flow of this embodiment will be described with reference to FIG. In this embodiment, in the process on the CPU side, when each model is initialized, a process of assigning a hit ID and hit type to each model data is performed. Note that an attribute value and a value for specifying a part are set for each vertex color of the polygon constituting the model data. The range of values that these values can actually take is 0 to 127, but values obtained by mapping 0 to 127 to 0.0 to 1.0 (values in the range of 0 to 127 are 0.0 to 1.0). The value converted into a value in the range (1) is set as each vertex color of the polygon constituting each model data. The hit ID is set to a value that can identify each model data.

第Nフレーム目における描画処理について説明する。まず、CPU側の描画処理において、各モデルデータを描画する処理を行う(ステップS11)。各モデルデータ描画する場合には、各モデルデータを描画するタイミングで、各モデルデータに割り当てたヒットID、ヒットタイプをGPU(シェーダ)に転送する処理を行う。そして、モデルの描画が終了したか否かを判定する(ステップS12)。モデルの描画が終了していない場合には(ステップS12のN)、ステップS11に戻り、モデルの描画が終了している場合には(ステップS12のY)、Nフレーム目のCPU側の描画処理を終了する処理を行う。   A drawing process in the Nth frame will be described. First, in the drawing process on the CPU side, a process for drawing each model data is performed (step S11). When rendering each model data, a process of transferring the hit ID and hit type assigned to each model data to the GPU (shader) at the timing of rendering each model data. Then, it is determined whether or not the drawing of the model has been completed (step S12). If the drawing of the model has not ended (N in step S12), the process returns to step S11. If the drawing of the model has ended (Y in step S12), the CPU side drawing process for the Nth frame Process to end

そして、ステップS11において、各モデルデータを描画する場合には、モデルデータを描画する度に、GPUへヒットID、ヒットタイプの値を転送し、GPU(シェーダ)側の描画処理を行う。つまり、GPUが、CPU側から描画要求を受け取ると、描画面A〜Cへの描画処理(ステップS21、S22、S23)を行う。   In step S11, when each model data is drawn, each time the model data is drawn, the hit ID and hit type values are transferred to the GPU, and the drawing process on the GPU (shader) side is performed. That is, when the GPU receives a drawing request from the CPU side, it performs drawing processing (steps S21, S22, S23) on the drawing surfaces A to C.

まず、ヒットID、ヒットタイプ、部位を、描画面A(フレームバッファ231)に描画する処理を行う(ステップS21)。つまり、ヒットID、ヒットタイプ、及び、モデルデータに含まれる部位の値を元にした色情報を、描画面Aへ、そのモデル形状を用いて描画する処理を行う。   First, a process of drawing the hit ID, hit type, and part on the drawing surface A (frame buffer 231) is performed (step S21). That is, the color information based on the hit ID, the hit type, and the value of the part included in the model data is drawn on the drawing surface A using the model shape.

そして、属性、法線を、描画面Bに(フレームバッファ232)に描画する処理を行う(ステップS22)。つまり、モデルデータに含まれる属性値と、実際に描画するモデルのそれぞれの描画点に対する法線情報を色情報とし、描画面Bへ、そのモデル形状を用いて描画する処理を行う。   Then, a process of drawing attributes and normals on the drawing surface B (the frame buffer 232) is performed (step S22). That is, the attribute value included in the model data and the normal information for each drawing point of the model to be actually drawn are used as color information, and drawing processing is performed on the drawing surface B using the model shape.

そして、深度値(奥行き値)を、描画面C(Zバッファ233)に描画する処理を行う(ステップS23)すなわち、モデル形状を用いて描画面Cへ深度情報を描画する。   Then, a process of drawing the depth value (depth value) on the drawing surface C (Z buffer 233) is performed (step S23). That is, the depth information is drawn on the drawing surface C using the model shape.

次に、CPU側における第N+1フレーム目におけるヒット処理について説明する。なお、以下の説明は、各ヒットタイプに1箇所にだけヒットするものとして、処理を行う例である。   Next, the hit process in the (N + 1) th frame on the CPU side will be described. The following description is an example in which processing is performed assuming that only one location hits each hit type.

まず、指示される範囲(ヒットエリア)内のピクセルを走査する(ステップS31)。そして、深度値から投影面に近いピクセルを割り出す(選択する)(ステップS32)。すなわち、第Nフレーム目において描画された描画面Cにおいて、指示される範囲内のピクセルのうち、深度値に基づき投影面に近い画素を割り出す。そして、ヒットタイプ毎に投影面に近い点の画面座標を保持する(ステップS33)。そして、走査を終了する(ステップS34)。   First, the pixels within the designated range (hit area) are scanned (step S31). Then, a pixel close to the projection plane is determined (selected) from the depth value (step S32). That is, in the drawing surface C drawn in the Nth frame, pixels close to the projection surface are determined based on the depth value among the pixels within the designated range. Then, the screen coordinates of the points close to the projection plane are held for each hit type (step S33). Then, the scanning is finished (step S34).

次に、ヒットタイプ毎の処理に移行する(ステップS35)。まず、ステップS33において保持された当該ヒットタイプの画面座標における、第Nフレームにおいて描画された描画面Aを参照してヒットIDを抽出する処理を行う(ステップS36)。すなわち、抽出されたヒットIDに対応するモデルデータにヒットがあったものと判定する。   Next, the process proceeds to the process for each hit type (step S35). First, a process of extracting a hit ID with reference to the drawing surface A drawn in the Nth frame in the screen coordinates of the hit type held in step S33 (step S36). That is, it is determined that there is a hit in the model data corresponding to the extracted hit ID.

次に、深度値(0.0〜1.0の値域の値)からZ値(3次元の奥行き値)を求め(ステップS37)、ステップS33において保持された当該ヒットタイプの画面座標とZ値から逆透視変換を行い、3D座標を求める(ステップS38)。そして、第Nフレームにおいて描画された描画面Bを参照して、ステップS38で求められた3D座標における法線を算出する(ステップS39)。そして、第Nフレームにおいて描画された描画面Bを参照して、ステップS38で求められた3D座標における属性を求める。そして、求められた法線、属性に基づいて、エフェクト処理を行い、法線、属性に基づいてサウンドの発音させる音処理を行う(ステップS41)。以上で処理が終了する。   Next, the Z value (three-dimensional depth value) is obtained from the depth value (value in the range of 0.0 to 1.0) (step S37), and the screen coordinates and the Z value of the hit type held in step S33. Then, reverse perspective transformation is performed to obtain 3D coordinates (step S38). Then, with reference to the drawing surface B drawn in the Nth frame, the normal line in the 3D coordinates obtained in step S38 is calculated (step S39). Then, with reference to the drawing surface B drawn in the Nth frame, the attribute in the 3D coordinate obtained in step S38 is obtained. Then, effect processing is performed based on the obtained normal and attribute, and sound processing for sound generation is performed based on the normal and attribute (step S41). The process ends here.

4.応用例
(1)他のゲームへの応用
本実施形態では、シューティングゲームに関するヒット処理について説明を行ったが、他のゲームのヒット処理に応用してもよい。例えば、対戦格闘ゲーム、レースゲーム、ロールプレイングゲーム、スポーツゲーム、アクションゲーム、音楽ゲーム、シミュレーションゲームなど、種々のゲームにおけるヒット処理に応用してもよい。
4). Application examples (1) Application to other games In this embodiment, hit processing related to a shooting game has been described, but it may be applied to hit processing of other games. For example, the present invention may be applied to hit processing in various games such as a fighting fighting game, a racing game, a role playing game, a sports game, an action game, a music game, and a simulation game.

例えば、プレーヤキャラクタと敵キャラクタとが対戦格闘を行う対戦格闘ゲームの場合には、プレーヤキャラクタ、敵キャラクタに対して相手キャラクタを含むヒット処理用の画像Eを生成する。   For example, in the case of a battle fighting game in which a player character and an enemy character battle each other, an image E for hit processing including the opponent character is generated for the player character and the enemy character.

通常、対戦格闘ゲームでは、図18に示すように、3人称視点(仮想カメラVC)で、プレーヤキャラクタCH1と敵キャラクタCH2とを含む画像を生成し、生成された画像を表示出力用画像として表示部に表示させる。   Normally, in the competitive fighting game, as shown in FIG. 18, an image including the player character CH1 and the enemy character CH2 is generated from the third person viewpoint (virtual camera VC), and the generated image is displayed as a display output image. Display on the screen.

対戦格闘ゲームで本実施形態のヒット処理を応用する場合には、各キャラクタの視点から見える演算処理用の画像を生成する。例えば、図19(A)に示すように、プレーヤキャラクタCH1が敵キャラクタCH2とのヒット処理を行う場合には、プレーヤキャラクタ用の仮想カメラVC1(一人称視点)に基づいて、敵キャラクタCH2を含む演算処理用画像E1−1を生成する。一方、図19(B)に示すように、敵キャラクタCH2がプレーヤキャラクタCH1とのヒット処理を行う場合には、敵キャラクタCH2用の仮想カメラVC2(一人称視点)に基づいて、プレーヤキャラクタCH1を含む演算処理用画像E1−2を生成する。   When applying the hit processing of the present embodiment in a competitive fighting game, an image for arithmetic processing that is visible from the viewpoint of each character is generated. For example, as shown in FIG. 19A, when the player character CH1 performs a hit process with the enemy character CH2, the calculation including the enemy character CH2 is performed based on the player character virtual camera VC1 (first-person viewpoint). A processing image E1-1 is generated. On the other hand, as shown in FIG. 19B, when the enemy character CH2 performs a hit process with the player character CH1, the player character CH1 is included based on the virtual camera VC2 (first person viewpoint) for the enemy character CH2. An arithmetic processing image E1-2 is generated.

そして、入力部から、プレーヤキャラクタCH1が攻撃に関する入力情報を受け付けると、入力情報に基づいてプレーヤキャラクタCH1が敵キャラクタCH2に対する攻撃位置I1を求め、演算処理用画像E1−1の攻撃位置I1の画素J1(攻撃位置I1に基づくヒットエリア内の1又は複数の画素J1〜Jkでもよい)の画素データ(R,G,B,A)と、当該画素J1(J1〜Jk)の奥行き値とに基づいて、プレーヤキャラクタCH1と敵キャラクタCH2とがヒットしたか否かを判定する。   When the player character CH1 receives input information related to the attack from the input unit, the player character CH1 obtains an attack position I1 against the enemy character CH2 based on the input information, and the pixel of the attack position I1 of the arithmetic processing image E1-1. Based on pixel data (R, G, B, A) of J1 (may be one or a plurality of pixels J1 to Jk in the hit area based on the attack position I1) and the depth value of the pixel J1 (J1 to Jk) Thus, it is determined whether or not the player character CH1 and the enemy character CH2 are hit.

例えば、攻撃位置I1に基づき選択された画素の画素データが敵キャラクタを識別する画素データである場合には、プレーヤキャラクタCH1が、敵キャラクタCH2にヒットしたと判定し、敵キャラクタを識別する画素データでない場合には、ヒットしないと判定する。また、攻撃位置I1に基づき選択された画素の画素データが敵キャラクタを識別する画素データである場合、かつ、攻撃位置I1に基づき選択された画素の奥行き値が所定奥行き範囲内の値である場合にプレーヤキャラクタCH1が、敵キャラクタCH2にヒットしたと判定してもよい。   For example, when the pixel data of the pixel selected based on the attack position I1 is pixel data for identifying an enemy character, it is determined that the player character CH1 has hit the enemy character CH2, and the pixel data for identifying the enemy character If not, it is determined that there is no hit. When the pixel data of the pixel selected based on the attack position I1 is pixel data for identifying an enemy character, and the depth value of the pixel selected based on the attack position I1 is a value within a predetermined depth range. Alternatively, it may be determined that the player character CH1 has hit the enemy character CH2.

一方、敵キャラクタCH2の攻撃によって、敵キャラクタCH2がプレーヤキャラクタCH1にヒットしたか否かの判定も、同様に、演算処理用画像E1−2に基づいて判定する。このようにすれば、瞬時にヒット処理を行うことができる。   On the other hand, whether or not the enemy character CH2 hits the player character CH1 due to the attack of the enemy character CH2 is also determined based on the arithmetic processing image E1-2. In this way, hit processing can be performed instantaneously.

(2)なお、本実施形態では、演算処理用画像E1、E2、Z画像E3を生成する処理について説明したが、1つの演算処理用画像において、オブジェクトを識別する情報、部位を識別する情報、法線ベクトル、属性情報、奥行き値それぞれを定義するようにしてもよい。また、演算処理用画像は、表示出力用画像と同じサイズのバッファに描画するようにしてもよい。また、1つの画像を生成し、生成された画像を表示処理用と共に演算処理用としてもよい。   (2) In the present embodiment, the processing for generating the arithmetic processing images E1, E2, and the Z image E3 has been described. However, in one arithmetic processing image, information for identifying an object, information for identifying a part, Each of the normal vector, attribute information, and depth value may be defined. Further, the arithmetic processing image may be drawn in a buffer having the same size as the display output image. One image may be generated, and the generated image may be used for display processing and calculation processing.

(3)タッチパネル型ディスプレイ
本実施形態では、入力部160と共に表示部190としても機能するタッチパネル型ディスプレイを用いて処理を行ってもよい。なお、タッチパネル型ディスプレイへの接触操作は、タッチペンなどの入力機器を用いて行っても良いし、指先を用いて行ってもよい。例えば、タッチパネル型ディスプレイで検出された接触位置を指示位置(照準位置)として取得すればよい。
(3) Touch Panel Type Display In this embodiment, processing may be performed using a touch panel type display that also functions as the display unit 190 together with the input unit 160. Note that the touch operation on the touch panel display may be performed using an input device such as a touch pen, or may be performed using a fingertip. For example, the contact position detected by the touch panel display may be acquired as the designated position (aiming position).

例えば、2次元オブジェクト(スプライト)それぞれを識別するID(ヒットID)に対応する色情報を用いて、2次元オブジェクトを描画する。つまり、2次元オブジェクトそれぞれを識別する色情報によって、各2次元オブジェクトを色分けして描画する。   For example, a two-dimensional object is drawn using color information corresponding to an ID (hit ID) for identifying each two-dimensional object (sprite). That is, each two-dimensional object is drawn with different colors according to color information for identifying each two-dimensional object.

そして、タッチパネル型ディスプレイにおいて検出された接触位置を指示位置とし、指示位置に対応する画素(指示位置に基づく所定範囲内の1又は複数の画素)をスキャンし、スキャンされた画素の色情報に基づいてオブジェクトを決定する処理を行う。   Then, the contact position detected on the touch panel display is used as the designated position, and a pixel corresponding to the designated position (one or a plurality of pixels within a predetermined range based on the designated position) is scanned and based on the color information of the scanned pixel. To determine the object.

そして、決定されたオブジェクトが、例えば敵オブジェクトである場合には、敵オブジェクトのパラメータを制御する処理、敵オブジェクトが攻撃を受ける動作処理、敵オブジェクトに対してエフェクト処理等を行う。このようにすれば、敵オブジェクトが複雑な形状であっても、指示位置に対応する画素の画素データに基づいて敵オブジェクトを特定することができるので、処理負荷を軽減させてその形状に応じた細やかな処理を行うことができる。   If the determined object is, for example, an enemy object, processing for controlling the parameters of the enemy object, operation processing for the enemy object to be attacked, effect processing for the enemy object, and the like are performed. In this way, even if the enemy object has a complicated shape, the enemy object can be specified based on the pixel data of the pixel corresponding to the indicated position, so that the processing load is reduced and the shape of the enemy object can be reduced. Detailed processing can be performed.

100 処理部、110 オブジェクト空間設定部、111 取得部、112 決定部、113 演算処理部、113−1 ヒット判定部、113−2 エフェクト処理部、
114 移動・動作処理部、115 ゲーム演算部、
116 設定部、117 指示位置制御部、
120 画像生成部、130 音処理部、
160 入力部、162 検出部、180 情報記憶媒体、190 表示部、
192 音出力部、196 通信部、
200 記憶部、210 主記憶部、
221 画像バッファ、222 Zバッファ、
231 画像バッファ(描画面A)、232 画像バッファ(描画面B)、
231 Zバッファ(描画面C)
100 processing unit, 110 object space setting unit, 111 acquisition unit, 112 determination unit, 113 arithmetic processing unit, 113-1 hit determination unit, 113-2 effect processing unit,
114 movement / motion processing unit, 115 game calculation unit,
116 setting unit, 117 pointing position control unit,
120 image generation unit, 130 sound processing unit,
160 input unit, 162 detection unit, 180 information storage medium, 190 display unit,
192 sound output unit, 196 communication unit,
200 storage unit, 210 main storage unit,
221 image buffer, 222 Z buffer,
231 Image buffer (drawing surface A), 232 Image buffer (drawing surface B),
231 Z buffer (drawing surface C)

Claims (14)

所与の演算処理を行うプログラムであって、
複数のオブジェクトそれぞれを識別する画素データに基づいて、当該複数のオブジェクトを含む画像を生成する処理を行う画像生成部と、
入力部からの入力情報に基づいて、前記画像の指示位置を取得する取得部と、
前記指示位置に対応する画素の画素データに基づいて、当該画素が示すオブジェクトを決定する処理を行う決定部と、
前記決定部によって決定された前記オブジェクトに応じた所与の演算処理を行う演算処理部として、コンピュータを機能させることを特徴とするプログラム。
A program that performs a given calculation process,
An image generation unit that performs processing for generating an image including the plurality of objects based on pixel data for identifying each of the plurality of objects;
An acquisition unit that acquires an indicated position of the image based on input information from the input unit;
A determination unit that performs a process of determining an object indicated by the pixel based on pixel data of the pixel corresponding to the designated position;
A program that causes a computer to function as an arithmetic processing unit that performs given arithmetic processing according to the object determined by the determining unit.
請求項1において、
前記画素データは、色情報又は半透明情報を含み、
前記色情報又は半透明情報によって、複数のオブジェクトそれぞれを識別することを特徴とするプログラム。
In claim 1,
The pixel data includes color information or translucent information,
A program for identifying each of a plurality of objects by the color information or translucent information.
請求項1又は2において、
前記画像生成部が、
奥行き値を定義した画素データに基づいて、前記画像を生成し、
前記決定部が、
前記指示位置に対応する画素の画素データが示す奥行き値に基づいて、オブジェクトを決定する処理を行うことを特徴とするプログラム。
In claim 1 or 2,
The image generator
Generating the image based on pixel data defining a depth value;
The determination unit is
The program which performs the process which determines an object based on the depth value which the pixel data of the pixel corresponding to the said indication position shows.
請求項1〜3のいずれかにおいて、
前記画像生成部が、
オブジェクトを構成する複数の部位それぞれを識別する画素データに基づいて、前記画像を生成し、
前記決定部が、
前記指示位置に対応する画素の画素データに基づいて、前記オブジェクトを構成する複数の部位のうちいずれかの部位を決定する処理を行い、
前記演算処理部が、
前記決定部によって決定された前記部位に応じた所与の演算処理を行うことを特徴とするプログラム。
In any one of Claims 1-3,
The image generator
Based on pixel data identifying each of a plurality of parts constituting the object, the image is generated,
The determination unit is
Based on the pixel data of the pixel corresponding to the indicated position, performing a process of determining any one of a plurality of parts constituting the object,
The arithmetic processing unit is
A program for performing given arithmetic processing according to the part determined by the determination unit.
請求項1〜4のいずれかにおいて、
前記画像生成部が、
表示出力用画像を生成すると共に、
奥行き値を定義した画素データに基づいて前記画像を生成し、
前記演算処理部が、
前記決定部によって決定された前記オブジェクトが所与のオブジェクトである場合に、前記表示出力用画像において、前記指示位置に対応する画素の画素データが示す奥行き値に基づいて、前記オブジェクトに対してエフェクト処理を行うことを特徴とするプログラム。
In any one of Claims 1-4,
The image generator
In addition to generating a display output image,
Generating the image based on pixel data defining a depth value;
The arithmetic processing unit is
When the object determined by the determining unit is a given object, an effect is applied to the object based on a depth value indicated by pixel data of a pixel corresponding to the indicated position in the display output image. A program characterized by performing processing.
請求項1〜5のいずれかにおいて、
前記画像生成部が、
表示出力用画像を生成すると共に、
法線ベクトルを定義した画素データに基づいて、前記画像を生成し、
前記演算処理部が、
前記決定部によって決定された前記オブジェクトが所与のオブジェクトである場合に、前記表示出力用画像において、前記指示位置に対応する画素の画素データが示す法線ベクトルに基づいて、前記オブジェクトに対してエフェクト処理を行うことを特徴とするプログラム。
In any one of Claims 1-5,
The image generator
In addition to generating a display output image,
Generating the image based on pixel data defining a normal vector;
The arithmetic processing unit is
When the object determined by the determining unit is a given object, the object for the display is based on a normal vector indicated by pixel data of a pixel corresponding to the indicated position in the display output image. A program characterized by effect processing.
請求項1〜6のいずれかにおいて、
前記画像生成部が、
表示出力用画像を生成すると共に、
属性情報を定義した画素データに基づいて、前記画像を生成し、
前記演算処理部が、
前記決定部によって決定された前記オブジェクトが所与のオブジェクトである場合に、前記表示出力用画像において、前記指示位置に対応する画素の画素データが示す属性情報に基づいて、前記オブジェクトに対してエフェクト処理を行うことを特徴とするプログラム。
In any one of Claims 1-6,
The image generator
In addition to generating a display output image,
Based on pixel data defining attribute information, the image is generated,
The arithmetic processing unit is
When the object determined by the determining unit is a given object, an effect is applied to the object based on attribute information indicated by pixel data of a pixel corresponding to the indicated position in the display output image. A program characterized by performing processing.
請求項1〜7のいずれかにおいて、
前記指示位置に基づいて、前記画像において所定範囲を設定する設定部として、コンピュータを更に機能させ、
前記決定部が、
前記所定範囲内の1又は複数の画素の画素データそれぞれに基づいて、1又は複数のオブジェクトを決定する処理を行い、
前記演算処理部が、
前記決定部によって決定された1又は複数の前記オブジェクトそれぞれについて、所与の演算処理を行うことを特徴とするプログラム。
In any one of Claims 1-7,
Based on the indicated position, the computer further functions as a setting unit for setting a predetermined range in the image,
The determination unit is
Performing a process of determining one or more objects based on pixel data of one or more pixels within the predetermined range;
The arithmetic processing unit is
A program that performs given arithmetic processing on each of the one or more objects determined by the determination unit.
請求項8において、
前記画像生成部が、
前記指示位置に対応する指示マーカーを描画した表示出力用画像を生成する処理を行い、
前記設定部が、
前記指示マーカーの形状及び大きさの少なくとも1つに応じた所定範囲を設定することを特徴とするプログラム。
In claim 8,
The image generator
A process of generating a display output image in which an indication marker corresponding to the indication position is drawn,
The setting unit
A program that sets a predetermined range corresponding to at least one of the shape and size of the indication marker.
請求項1〜9のいずれかにおいて、
前記取得部が、複数の指示位置を取得した場合に、各指示位置の位置関係に基づいて共通指示位置を発生させるか否かを判定する指示位置制御部として、コンピュータを更に機能させ、
前記決定部が、
前記共通指示位置を発生させると判定された場合に、前記共通指示位置に対応する画素の画素データに基づいてオブジェクトを決定する処理を行うことを特徴とするプログラム。
In any one of Claims 1-9,
When the acquisition unit acquires a plurality of designated positions, the computer further functions as a designated position control unit that determines whether to generate a common designated position based on a positional relationship between the designated positions,
The determination unit is
A program for performing processing for determining an object based on pixel data of a pixel corresponding to the common designated position when it is determined that the common designated position is generated.
請求項10において、
前記共通指示位置に基づいて、前記画像において第2の所定範囲を設定する設定部として、コンピュータを更に機能させ、
前記決定部が、
前記共通指示位置を発生させると判定された場合に、前記第2の所定範囲内の1又は複数の画素の画素データそれぞれに基づいて、1又は複数のオブジェクトを決定する処理を行い、
前記演算処理部が、
前記決定部によって決定された1又は複数の前記オブジェクトそれぞれについて、所与の演算処理を行うことを特徴とするプログラム。
In claim 10,
Based on the common designated position, the computer further functions as a setting unit for setting a second predetermined range in the image,
The determination unit is
When it is determined that the common designated position is generated, a process of determining one or a plurality of objects is performed based on pixel data of one or a plurality of pixels within the second predetermined range,
The arithmetic processing unit is
A program that performs given arithmetic processing on each of the one or more objects determined by the determination unit.
請求項1〜11のいずれかにおいて、
前記画像生成部が、
表示出力用画像を、表示出力用の画像バッファに描画する処理を行い、
前記画像を、前記表示出力用の画像バッファを縮小させた縮小用の画像バッファに描画する処理を行うことを特徴とするプログラム。
In any one of Claims 1-11,
The image generator
Draw the display output image in the display output image buffer,
A program for performing a process of drawing the image in a reduction image buffer obtained by reducing the display output image buffer.
コンピュータにより読取可能な情報記憶媒体であって、請求項1〜12のいずれかに記載のプログラムを記憶することを特徴とする情報記憶媒体。   An information storage medium readable by a computer, wherein the program according to any one of claims 1 to 12 is stored. 所与の演算処理を行う画像生成装置であって、
複数のオブジェクトそれぞれを識別する画素データに基づいて、当該複数のオブジェクトを含む画像を生成する処理を行う画像生成部と、
入力部からの入力情報に基づいて、前記画像の指示位置を取得する取得部と、
前記指示位置に対応する画素の画素データに基づいて、当該画素が示すオブジェクトを決定する処理を行う決定部と、
前記決定部によって決定された前記オブジェクトに応じた所与の演算処理を行う演算処理部とを含むことを特徴とする画像生成装置。
An image generation device that performs a given calculation process,
An image generation unit that performs processing for generating an image including the plurality of objects based on pixel data for identifying each of the plurality of objects;
An acquisition unit that acquires an indicated position of the image based on input information from the input unit;
A determination unit that performs a process of determining an object indicated by the pixel based on pixel data of the pixel corresponding to the designated position;
An image generation apparatus comprising: an arithmetic processing unit that performs a given arithmetic process according to the object determined by the determination unit.
JP2009200967A 2009-08-31 2009-08-31 Program, information storage medium, and image generation device Withdrawn JP2011053838A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009200967A JP2011053838A (en) 2009-08-31 2009-08-31 Program, information storage medium, and image generation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009200967A JP2011053838A (en) 2009-08-31 2009-08-31 Program, information storage medium, and image generation device

Publications (1)

Publication Number Publication Date
JP2011053838A true JP2011053838A (en) 2011-03-17

Family

ID=43942788

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009200967A Withdrawn JP2011053838A (en) 2009-08-31 2009-08-31 Program, information storage medium, and image generation device

Country Status (1)

Country Link
JP (1) JP2011053838A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120229448A1 (en) * 2011-03-08 2012-09-13 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method
JP2012221021A (en) * 2011-04-05 2012-11-12 Nintendo Co Ltd Information processing program, information processing system and information processing method
JP5337925B1 (en) * 2013-06-24 2013-11-06 グリー株式会社 Shooting game program, game system, and shooting game control method
JP5337919B1 (en) * 2013-02-26 2013-11-06 グリー株式会社 Shooting game program, game system, and shooting game control method
US9205327B2 (en) 2011-03-08 2015-12-08 Nintento Co., Ltd. Storage medium having information processing program stored thereon, information processing apparatus, information processing system, and information processing method
US9375640B2 (en) 2011-03-08 2016-06-28 Nintendo Co., Ltd. Information processing system, computer-readable storage medium, and information processing method
US9561443B2 (en) 2011-03-08 2017-02-07 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method
US9643085B2 (en) 2011-03-08 2017-05-09 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method for controlling a virtual object using attitude data
US9925464B2 (en) 2011-03-08 2018-03-27 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method for displaying an image on a display device using attitude data of a display device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9492743B2 (en) 2011-03-08 2016-11-15 Nintendo Co., Ltd. Storage medium having stored thereon information processing program, information processing apparatus, information processing system, and information processing method
US9370712B2 (en) 2011-03-08 2016-06-21 Nintendo Co., Ltd. Information processing system, information processing apparatus, storage medium having information processing program stored therein, and image display method for controlling virtual objects based on at least body state data and/or touch position data
US9925464B2 (en) 2011-03-08 2018-03-27 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method for displaying an image on a display device using attitude data of a display device
US9643085B2 (en) 2011-03-08 2017-05-09 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method for controlling a virtual object using attitude data
US20120229448A1 (en) * 2011-03-08 2012-09-13 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method
US9345962B2 (en) 2011-03-08 2016-05-24 Nintendo Co., Ltd. Storage medium having stored thereon information processing program, information processing apparatus, information processing system, and information processing method
US9561443B2 (en) 2011-03-08 2017-02-07 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method
US9375640B2 (en) 2011-03-08 2016-06-28 Nintendo Co., Ltd. Information processing system, computer-readable storage medium, and information processing method
US9205327B2 (en) 2011-03-08 2015-12-08 Nintento Co., Ltd. Storage medium having information processing program stored thereon, information processing apparatus, information processing system, and information processing method
US9492742B2 (en) 2011-03-08 2016-11-15 Nintendo Co., Ltd. Storage medium having stored thereon information processing program, information processing apparatus, information processing system, and information processing method
US9522323B2 (en) 2011-03-08 2016-12-20 Nintendo Co., Ltd. Storage medium having stored thereon information processing program, information processing apparatus, information processing system, and information processing method
US9526981B2 (en) 2011-03-08 2016-12-27 Nintendo Co., Ltd. Storage medium having stored thereon information processing program, information processing apparatus, information processing system, and information processing method
US9539511B2 (en) * 2011-03-08 2017-01-10 Nintendo Co., Ltd. Computer-readable storage medium, information processing system, and information processing method for operating objects in a virtual world based on orientation data related to an orientation of a device
JP2012221021A (en) * 2011-04-05 2012-11-12 Nintendo Co Ltd Information processing program, information processing system and information processing method
JP5337919B1 (en) * 2013-02-26 2013-11-06 グリー株式会社 Shooting game program, game system, and shooting game control method
JP5337925B1 (en) * 2013-06-24 2013-11-06 グリー株式会社 Shooting game program, game system, and shooting game control method

Similar Documents

Publication Publication Date Title
JP5597837B2 (en) Program, information storage medium, and image generation apparatus
JP5161256B2 (en) Program, information storage medium, and image generation apparatus
JP5300777B2 (en) Program and image generation system
JP5614956B2 (en) Program, image generation system
JP5390115B2 (en) Program, game system
JP2011053838A (en) Program, information storage medium, and image generation device
JP5520443B2 (en) Program, information storage medium, and game system
US9345972B2 (en) Information storage medium, image generation system, and image generation method
JP6643775B2 (en) Game machine, game system and program
JP2012212237A (en) Image generation system, server system, program, and information storage medium
JP5388763B2 (en) program
JP2010029398A (en) Program, information storage medium and image generation system
JP2011215886A (en) Program, information storage medium, and image generation device
JP7245605B2 (en) Game system, game providing method and program
JP7426462B2 (en) Programs, game devices, server devices and game systems
JP5443129B2 (en) Program and network system
JP2012215934A (en) Program, information storage medium, terminal, and server
JP4806608B2 (en) Program, information storage medium, and image generation system
JP2020039403A (en) Program, game system and server system
JP5597869B2 (en) Program, information storage medium, and image generation apparatus
JP2008067853A (en) Program, information storage medium and image generation system
JP2009075739A (en) Program, information storage medium and image generation system
JP2014061039A (en) Program, information storage medium, game apparatus, and server device
JP2011255114A (en) Program, information storage medium, and image generation system
JP2011096017A (en) Program, information storage medium and terminal

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20121106