JP2023042310A - Information processing device, program, and contact determination method - Google Patents

Information processing device, program, and contact determination method Download PDF

Info

Publication number
JP2023042310A
JP2023042310A JP2021149546A JP2021149546A JP2023042310A JP 2023042310 A JP2023042310 A JP 2023042310A JP 2021149546 A JP2021149546 A JP 2021149546A JP 2021149546 A JP2021149546 A JP 2021149546A JP 2023042310 A JP2023042310 A JP 2023042310A
Authority
JP
Japan
Prior art keywords
contact determination
contact
capsule
objects
shape
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.)
Pending
Application number
JP2021149546A
Other languages
Japanese (ja)
Inventor
唯信 隆藤
Yuishin Takafuji
理也 渡邉
Masanari Watanabe
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.)
Koei Tecmo Holdings Co Ltd
Original Assignee
Koei Tecmo Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koei Tecmo Holdings Co Ltd filed Critical Koei Tecmo Holdings Co Ltd
Priority to JP2021149546A priority Critical patent/JP2023042310A/en
Publication of JP2023042310A publication Critical patent/JP2023042310A/en
Pending legal-status Critical Current

Links

Images

Abstract

To reduce a processing load of determining the contact between objects.SOLUTION: An information processing device for determining the contact between objects within an object space is provided. The information processing device includes a calculation part for calculating the length of a line segment connecting the center coordinates of two hemispheres constituting a capsule shape in the case that at least one of objects to undergo contact determination is an object for undergoing the contact determination as the capsule shape, and a contact determination part for switching contact determination processing of the object for undergoing the contact determination as the capsule shape from contact determination processing for the capsule shape to contact determination processing for a spherical shape on the basis of the calculated length of the line segment.SELECTED DRAWING: Figure 3

Description

本開示は、情報処理装置、プログラム、及び接触判定方法に関する。 The present disclosure relates to an information processing device, a program, and a contact determination method.

従来から、テレビゲームにおいて、オブジェクト空間内のオブジェクト同士の接触判定を行う技術が知られている。例えば、オブジェクトのエッジの位置を検出するための仮想体であって、ゲーム中において画面に表示されない球体、カプセル状、棒状などの形状の仮想体を用いて、仮想体とオブジェクトとの接触(衝突)位置を検出する技術が記載されている(例えば特許文献1参照)。 2. Description of the Related Art Conventionally, in video games, there has been known a technique for determining contact between objects in an object space. For example, a virtual body for detecting the position of the edge of an object, which is not displayed on the screen during the game and has a shape such as a sphere, a capsule, or a rod, is used to detect contact (collision) between the virtual body and the object. ) describes a technique for detecting a position (see, for example, Patent Document 1).

特開2017-46950号公報JP 2017-46950 A

例えばオブジェクト空間内のオブジェクトの接触(衝突)判定は、接触判定を実装するためのコライダー(Collider)などの接触判定用のコンポーネントをオブジェクトに設定することで可能となる。接触判定用のコンポーネントは、接触判定のためのオブジェクトの接触判定形状を、球体、カプセル状、棒状などの形状として定義する。接触判定用のコンポーネントは画面に表示されないため、必ずしもオブジェクトのメッシュと同じ形状にしなくてもよい。 For example, contact (collision) determination of objects in the object space can be made by setting a component for contact determination such as a collider for implementing contact determination to the object. The contact determination component defines the contact determination shape of an object for contact determination as a sphere, capsule, rod, or the like. Since the contact detection component is not displayed on the screen, it does not necessarily have to have the same shape as the mesh of the object.

ところで、オブジェクトの接触判定形状をカプセル形状として定義した場合の処理負荷はオブジェクトの接触判定形状を球体形状として定義した場合よりも大きくなることが課題として知られている。なお、特許文献1は、オブジェクトの接触判定形状をカプセル形状として定義した場合の処理負荷が、オブジェクトの接触判定形状を球体形状として定義した場合よりも大きくなる、という課題を解決するものではない。 By the way, it is known that the processing load when the contact determination shape of the object is defined as a capsule shape is larger than that when the contact determination shape of the object is defined as a spherical shape. Note that Patent Document 1 does not solve the problem that the processing load when defining the contact determination shape of an object as a capsule shape is greater than when the contact determination shape of an object is defined as a spherical shape.

本開示は、オブジェクト同士の接触判定の処理負荷を軽減すること、を課題とする。 An object of the present disclosure is to reduce the processing load of contact determination between objects.

本開示によれば、オブジェクト空間内のオブジェクト同士の接触判定を行う情報処理装置であって、接触判定を行う前記オブジェクトの少なくとも一方が、カプセル形状として接触判定を行うオブジェクトである場合に、前記カプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さを算出する算出部と、算出した前記線分の長さに基づき、前記カプセル形状として接触判定を行うオブジェクトの接触判定処理を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替える接触判定部と、を有する情報処理装置が提供される。 According to the present disclosure, an information processing apparatus that performs contact determination between objects in an object space, and when at least one of the objects for which contact determination is performed is an object for which contact determination is performed as a capsule shape, the capsule A calculation unit that calculates the length of a line segment that connects the center coordinates of two hemispheres that form a shape, and a contact determination process for objects that perform contact determination as the capsule shape based on the calculated length of the line segment, An information processing apparatus having a contact determination unit that switches from contact determination processing for a capsule shape to contact determination processing for a spherical shape is provided.

本開示によれば、オブジェクト同士の接触判定の処理負荷を軽減できる。 According to the present disclosure, it is possible to reduce the processing load of contact determination between objects.

本実施形態に係るゲームシステムの一例の構成図である。1 is a configuration diagram of an example of a game system according to an embodiment; FIG. 本実施形態に係る情報処理装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the information processing apparatus which concerns on this embodiment. 本実施形態に係る情報処理装置の機能構成の一例を示す図である。It is a figure showing an example of functional composition of an information processor concerning this embodiment. オブジェクトDBの一例の構成図である。4 is a configuration diagram of an example of an object DB; FIG. 閾値設定DBの一例の構成図である。FIG. 4 is a configuration diagram of an example of a threshold setting DB; 接触判定形状が球体形状及びカプセル形状の場合の接触判定について説明するための一例の図である。FIG. 10 is a diagram for explaining an example of contact determination when contact determination shapes are a spherical shape and a capsule shape; カプセル形状のオブジェクトの接触判定の処理負荷を軽減する接触判定方法について説明するための一例の図である。FIG. 10 is a diagram illustrating an example of a contact determination method for reducing the processing load of contact determination of a capsule-shaped object; 本実施形態に係るゲームシステムの処理の一例のフローチャートである。4 is a flowchart of an example of processing of the game system according to the embodiment; 本実施形態に係る接触判定処理の一例のフローチャートである。6 is a flowchart of an example of contact determination processing according to the embodiment; 本実施形態に係るゲームシステムの処理の一例の説明図である。FIG. 4 is an explanatory diagram of an example of processing of the game system according to the embodiment; オブジェクトDBの一例の構成図である。4 is a configuration diagram of an example of an object DB; FIG. 閾値設定DBの一例の構成図である。FIG. 4 is a configuration diagram of an example of a threshold setting DB; 本実施形態に係る接触判定処理の一例のフローチャートである。6 is a flowchart of an example of contact determination processing according to the embodiment;

以下、本開示を実施するための形態について図面を参照して説明する。なお、本実施形態では、オブジェクト同士の接触判定と呼ぶが、オブジェクト同士の衝突判定又は当たり判定など、異なる呼び方であってもよい。 Hereinafter, embodiments for implementing the present disclosure will be described with reference to the drawings. In the present embodiment, the contact determination between objects is called, but a different name such as collision determination or hit determination between objects may be used.

[システム構成]
まず、一実施形態に係るオブジェクト同士の接触判定方法を実現する情報処理システムの一例として、ゲームシステムの例を説明する。なお、一実施形態に係るオブジェクト同士の接触判定方法を実現する情報処理システムは、ゲームシステム以外でもよく、例えば物理シミュレーションシステムであってもよい。
[System configuration]
First, an example of a game system will be described as an example of an information processing system that realizes a contact determination method between objects according to an embodiment. An information processing system that realizes the contact determination method between objects according to an embodiment may be other than a game system, and may be, for example, a physics simulation system.

図1は本実施形態に係るゲームシステムの一例の構成図である。本実施形態のゲームシステムは図1(A)に示す情報処理装置10、又は図1(B)に示す情報処理システムにより構成される。図1(A)に示す情報処理装置10は、ユーザが操作するコンピュータである。図1(A)の情報処理装置10は、ユーザからの操作を、タッチパネル、コントローラ、マウス、又はキーボード等で受け付けて、操作に応じた情報処理を実行し、実行結果を表示する。 FIG. 1 is a configuration diagram of an example of a game system according to this embodiment. The game system of this embodiment is configured by the information processing device 10 shown in FIG. 1(A) or the information processing system shown in FIG. 1(B). An information processing apparatus 10 shown in FIG. 1A is a computer operated by a user. The information processing apparatus 10 in FIG. 1A receives an operation from a user through a touch panel, a controller, a mouse, a keyboard, or the like, executes information processing according to the operation, and displays the execution result.

また、図1(B)のゲームシステムは、情報処理装置10とサーバ装置14とがネットワーク18を介して通信可能に接続された構成である。図1(B)の情報処理装置10は図1(A)と同様なコンピュータである。図1(B)のサーバ装置14も図1(A)と同様なコンピュータで実現できる。 The game system shown in FIG. 1B has a configuration in which the information processing device 10 and the server device 14 are communicably connected via the network 18 . The information processing apparatus 10 in FIG. 1B is a computer similar to that in FIG. 1A. The server device 14 in FIG. 1B can also be realized by a computer similar to that in FIG. 1A.

サーバ装置14は情報処理装置10との間でデータを送受信することで、情報処理装置10が受け付けたユーザの操作に応じた情報処理を実行し、実行結果を情報処理装置10に提供する。情報処理装置10はサーバ装置14から提供された実行結果を表示する。 By transmitting and receiving data to and from the information processing apparatus 10 , the server apparatus 14 executes information processing according to the user's operation received by the information processing apparatus 10 and provides the information processing apparatus 10 with the execution result. The information processing device 10 displays the execution result provided from the server device 14 .

サーバ装置14はクラウドコンピュータにより実現してもよい。なお、図1(B)に示したサーバ装置14の個数は、1つに限定されるものではなく、2つ以上で分散処理してもよい。サーバ装置14は情報処理装置10へのプログラム(アプリケーション)などのダウンロード処理、ユーザのログイン処理、又は各種データベースを管理する処理、などに利用してもよい。なお、図1のシステム構成は一例である。 The server device 14 may be realized by a cloud computer. Note that the number of server devices 14 shown in FIG. 1B is not limited to one, and distributed processing may be performed by two or more servers. The server device 14 may be used for download processing of programs (applications) to the information processing device 10, user login processing, or processing for managing various databases. Note that the system configuration in FIG. 1 is an example.

[ハードウェア構成]
本実施形態に係る情報処理装置10は、例えば図2に示すように構成される。サーバ装置14の構成は情報処理装置10と同様であるため、説明を省略する。図2は本実施形態に係る情報処理装置のハードウェア構成の一例を示す図である。
[Hardware configuration]
The information processing apparatus 10 according to this embodiment is configured as shown in FIG. 2, for example. Since the configuration of the server device 14 is the same as that of the information processing device 10, the description thereof is omitted. FIG. 2 is a diagram showing an example of the hardware configuration of the information processing apparatus according to this embodiment.

図2の情報処理装置10は、例えばCPU(Central Processing Unit)100、記憶装置102、通信装置104、入力装置106、及び出力装置108を有する。CPU100はプログラムに従って情報処理装置10を制御する。記憶装置102は、例えばROM(Read Only Memory)やRAM(Random Access Memory)などのメモリ、HDD(Hard Disk Drive)やSSD(Solid State Drive)などのストレージである。記憶装置102はCPU100で実行するプログラム及びデータを記憶する。 The information processing apparatus 10 of FIG. 2 has a CPU (Central Processing Unit) 100, a storage device 102, a communication device 104, an input device 106, and an output device 108, for example. The CPU 100 controls the information processing device 10 according to programs. The storage device 102 is, for example, a memory such as ROM (Read Only Memory) or RAM (Random Access Memory), or a storage such as HDD (Hard Disk Drive) or SSD (Solid State Drive). A storage device 102 stores programs and data to be executed by the CPU 100 .

通信装置104は、通信を制御するネットワーク回路などの通信デバイスである。入力装置106は、タッチパッド、コントローラ、マウス、キーボード、カメラ、マイクなどの入力デバイスである。また、出力装置108はディスプレイ、スピーカなどの出力デバイスである。タッチパネルは入力装置106の一例であるタッチパッドと出力装置108の一例であるディスプレイとを組み合わせることで実現される。図2のハードウェア構成は一例である。 The communication device 104 is a communication device such as a network circuit that controls communication. The input device 106 is an input device such as a touch pad, controller, mouse, keyboard, camera, and microphone. Also, the output device 108 is an output device such as a display and a speaker. A touch panel is realized by combining a touch pad as an example of the input device 106 and a display as an example of the output device 108 . The hardware configuration of FIG. 2 is an example.

[機能ブロック]
以下では、情報処理装置10がプレイヤなどのユーザから実行中のゲームに対する操作を受け付け、操作に応じたゲームの画像を生成して表示することで、ユーザにゲームをプレイさせる場合の機能構成例を説明する。図3の機能構成は一例であって、例えば図3に示した機能構成の少なくとも一部をサーバ装置14に設け、情報処理装置10とサーバ装置14とが連携して処理を行うようにしてもよい。
[Function block]
In the following, an example of a functional configuration in which the information processing apparatus 10 receives an operation for a game being executed from a user such as a player, generates and displays a game image according to the operation, and causes the user to play the game will be described. explain. The functional configuration shown in FIG. 3 is an example. For example, at least a part of the functional configuration shown in FIG. good.

図3は本実施形態に係る情報処理装置の機能構成の一例を示す図である。図3の情報処理装置10は、制御部200、操作受付部202、出力制御部204、通信部206、及び記憶部210を有する。 FIG. 3 is a diagram showing an example of the functional configuration of the information processing apparatus according to this embodiment. The information processing apparatus 10 in FIG. 3 has a control unit 200 , an operation reception unit 202 , an output control unit 204 , a communication unit 206 and a storage unit 210 .

記憶部210は、ゲームプログラム212、オブジェクトDB214、閾値設定DB216、及び基準座標DB218を記憶する。記憶部210は記憶装置102で実現してもよいし、ネットワーク18等を介して接続された記憶装置により実現してもよい。 Storage unit 210 stores game program 212 , object DB 214 , threshold setting DB 216 , and reference coordinate DB 218 . The storage unit 210 may be implemented by the storage device 102 or may be implemented by a storage device connected via the network 18 or the like.

ゲームプログラム212は、CPU100が実行するゲーム処理のプログラムの一例である。オブジェクトDB214は、ゲームの画像に表示されるオブジェクトに関する情報を記憶している。ゲームの画像に表示されるオブジェクトは、プレイヤキャラクタのオブジェクト、敵キャラクタのオブジェクト、背景のオブジェクト、武器や盾などの装備品のオブジェクト、武器や兵器から発射される弾丸のオブジェクトなど、である。 The game program 212 is an example of a game processing program executed by the CPU 100 . The object DB 214 stores information about objects displayed in game images. Objects displayed in game images include player character objects, enemy character objects, background objects, equipment objects such as weapons and shields, and bullet objects fired from weapons and weapons.

閾値設定DB216はオブジェクト同士の接触判定に利用する後述の接触判定切替用閾値を記憶している。基準座標DB218はオブジェクト同士の接触判定に利用する後述の基準座標を記憶している。 The threshold setting DB 216 stores a contact determination switching threshold, which will be described later, and is used to determine contact between objects. The reference coordinate DB 218 stores reference coordinates, which will be described later, used for determining contact between objects.

本実施形態では、オブジェクト空間内に、オブジェクト同士の接触判定を行う複数のオブジェクトが配置され、オブジェクト空間内を所定の視点(仮想カメラ)から見た画像を生成してユーザにゲームを実行させる。オブジェクト空間とは、2次元または3次元座標系上にポリゴンモデル等のオブジェクトが存在する空間のことである。例えばポリゴンモデルは、2次元または3次元のコンピュータグラフィックスでオブジェクト空間内に配置される。 In this embodiment, a plurality of objects for determining contact between objects are arranged in the object space, an image of the object space viewed from a predetermined viewpoint (virtual camera) is generated, and the user is allowed to play the game. An object space is a space in which an object such as a polygon model exists on a two-dimensional or three-dimensional coordinate system. For example, polygonal models are placed in object space in two-dimensional or three-dimensional computer graphics.

制御部200は情報処理装置10の全体の制御を行う。情報処理装置10の全体の制御には、ユーザから実行中のゲームに対する操作を受け付け、操作に応じたゲームの画像を生成して表示する制御が含まれる。 The control unit 200 controls the entire information processing apparatus 10 . The overall control of the information processing apparatus 10 includes control of receiving an operation for a game being executed from a user and generating and displaying a game image according to the operation.

制御部200は、CPU100がゲームプログラム212などのプログラムに記載された処理を実行することにより実現される。図3の制御部200は、ゲーム制御部230を有する構成である。ゲーム制御部230は、オブジェクト生成部240、画像生成部242、算出部244、接触判定部246、及び接触処理部248を有する構成である。 Control unit 200 is implemented by CPU 100 executing processing described in a program such as game program 212 . The control unit 200 in FIG. 3 is configured to have a game control unit 230 . The game control section 230 has an object generation section 240 , an image generation section 242 , a calculation section 244 , a contact determination section 246 and a contact processing section 248 .

ゲーム制御部230はゲームに関する制御を行う。例えばゲーム制御部230はゲーム処理を実行し、実行中のゲーム処理に従ってゲームの画像を生成し、ゲームの画面として出力装置108に表示させる。 The game control unit 230 controls games. For example, the game control unit 230 executes game processing, generates a game image according to the game processing being executed, and causes the output device 108 to display it as a game screen.

オブジェクト生成部240は、オブジェクト空間内に配置する複数のオブジェクトの例えばテクスチャをレンダリングし、ポリゴンモデルにテクスチャをマッピングして、オブジェクトを生成する。また、オブジェクト生成部240は生成したオブジェクトに、接触判定を実装するための接触判定用のコンポーネントを設定する。 The object generation unit 240 renders, for example, the textures of a plurality of objects arranged in the object space, maps the textures onto the polygon model, and generates objects. In addition, the object generation unit 240 sets contact determination components for implementing contact determination in the generated object.

接触判定用のコンポーネントは、接触判定のためのオブジェクトの接触判定形状を、球体、カプセル状、棒状など、様々な形状として定義できる。ここでは、オブジェクトの接触判定形状をカプセル形状又は球体形状として定義する場合の処理について説明する。 The contact determination component can define contact determination shapes of objects for contact determination as various shapes such as spheres, capsules, and rods. Here, a description will be given of the processing in the case where the object contact determination shape is defined as a capsule shape or a spherical shape.

画像生成部242は、オブジェクトDB214に記憶されているオブジェクトに関する情報、閾値設定DB216に記憶されている後述の接触判定切替用閾値、及び基準座標DB218に記憶されている後述の基準座標、などに従って、実行中のゲームの画像を生成する。画像生成部242は、接触判定を行う複数のオブジェクトがオブジェクト空間内に配置されたゲームの画像を生成する。 The image generation unit 242, according to the information about the object stored in the object DB 214, the contact determination switching threshold value stored in the threshold value setting DB 216 and the reference coordinates described later stored in the reference coordinate DB 218, etc. Generate an image of the running game. The image generator 242 generates a game image in which a plurality of objects for contact determination are arranged in the object space.

算出部244は、オブジェクト空間内に配置された複数のオブジェクト同士の接触判定を行うために必要な長さや距離を算出する。例えば算出部244は、接触判定形状がカプセル形状として設定されたオブジェクトの場合、後述するように、カプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さを算出する。また、算出部244は、後述するように、オブジェクト空間内に設定した基準座標と、接触判定形状がカプセル形状として設定されたオブジェクトとの距離を算出する。 The calculation unit 244 calculates lengths and distances necessary for determining contact between a plurality of objects placed in the object space. For example, in the case of an object whose contact determination shape is set as a capsule shape, the calculation unit 244 calculates the length of a line segment connecting the central coordinates of two hemispheres forming the capsule shape, as will be described later. Further, the calculation unit 244 calculates the distance between the reference coordinates set in the object space and the object whose contact determination shape is set as a capsule shape, as will be described later.

接触判定部246は、オブジェクト空間内に配置された複数のオブジェクト同士の接触判定を行う。例えば接触判定部246は、接触判定形状がカプセル形状として設定されたオブジェクトである場合、算出部244により算出されたカプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さに基づき、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替える。 The contact determination unit 246 performs contact determination between a plurality of objects arranged in the object space. For example, when the contact determination shape is an object set as a capsule shape, the contact determination unit 246 determines, based on the length of the line segment connecting the center coordinates of the two hemispheres forming the capsule shape calculated by the calculation unit 244, The contact determination process for the capsule shape is switched to the contact determination process for the spherical shape.

また、接触判定部246は、接触判定形状がカプセル形状として設定されたオブジェクトである場合、算出部244により算出されたカプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さが閾値(接触判定切替用閾値)より小さければ、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替える。 In addition, when the contact determination shape is an object set as a capsule shape, the contact determination unit 246 determines that the length of the line segment connecting the center coordinates of the two hemispheres forming the capsule shape calculated by the calculation unit 244 is the threshold value. If it is smaller than (threshold value for contact determination switching), the contact determination processing for the capsule shape is switched to the contact determination processing for the spherical shape.

閾値は、オブジェクト空間内に設定した基準座標と、接触判定を行うオブジェクトとの距離に応じて設定される。例えば設定値は、基準座標と、接触判定を行うオブジェクトとの距離が大きいほど大きく、距離が小さいほど小さく設定される。また、閾値は接触判定を行うオブジェクトのゲームにおける重要度(ユーザの注目度)などに基づき、設定されてもよい。その他、閾値は、オブジェクト空間内に設定した基準座標と接触判定を行うオブジェクトとの距離と、接触判定を行うオブジェクトの重要度と、の組み合わせに基づいて設定されてもよい。 The threshold is set according to the distance between the reference coordinates set in the object space and the object for contact determination. For example, the larger the distance between the reference coordinates and the object for which contact determination is to be performed, the larger the set value, and the smaller the distance, the smaller the set value is set. Also, the threshold value may be set based on the degree of importance in the game of the object for which contact determination is to be performed (the degree of attention of the user). Alternatively, the threshold may be set based on a combination of the distance between the reference coordinates set in the object space and the object for which contact determination is to be performed, and the importance of the object for which contact determination is to be performed.

接触処理部248は、オブジェクト空間内に配置されたオブジェクトであって、接触判定部246の接触判定により、接触したと判定されたオブジェクトに対して、接触処理を行う。例えば接触処理部248は、接触判定部246がオブジェクト空間内に配置された敵キャラクタのオブジェクトに弾丸のオブジェクトが接触したと判定した場合、その接触による敵キャラクタのオブジェクトへの影響を判断する。例えば弾丸のオブジェクトの接触による敵キャラクタのオブジェクトへの影響は、敵キャラクタのオブジェクトの描画を弾丸の当たった後の描画に変更する処理に利用される。 The contact processing unit 248 performs contact processing on objects that are arranged in the object space and that are determined to be in contact by the contact determination by the contact determination unit 246 . For example, when the contact determination unit 246 determines that the bullet object has come into contact with the object of the enemy character placed in the object space, the contact processing unit 248 determines the effect of the contact on the object of the enemy character. For example, the impact on the object of the enemy character due to the contact of the object of the bullet is used in the process of changing the drawing of the object of the enemy character to the drawing after being hit by the bullet.

操作受付部202は入力装置106に対するユーザの各種操作を受け付ける。出力制御部204は制御部200の制御に従って各種画面を出力装置108に表示する。操作受付部202はCPU100がプログラムに従って入力装置106を制御することにより実現される。また、出力制御部204は、CPU100がプログラムに従って出力装置108を制御することにより実現される。入力装置106に対するユーザの各種操作とは、CPU100に処理を実行させるため、ユーザが操作受付部202を操る操作をいう。出力制御部204は、制御部200の制御に従い、各種画面の表示と音の出力とを行う。 An operation reception unit 202 receives various user operations on the input device 106 . The output control unit 204 displays various screens on the output device 108 under the control of the control unit 200 . The operation reception unit 202 is implemented by the CPU 100 controlling the input device 106 according to a program. Also, the output control unit 204 is implemented by the CPU 100 controlling the output device 108 according to a program. The user's various operations on the input device 106 refer to operations by the user on the operation reception unit 202 in order to cause the CPU 100 to execute processing. The output control unit 204 displays various screens and outputs sounds under the control of the control unit 200 .

通信部206は、ネットワーク18等を介して通信する。通信部206はCPU100がプログラムを実行し、プログラムに従って通信装置104を制御することにより実現される。 A communication unit 206 communicates via the network 18 or the like. Communication unit 206 is implemented by CPU 100 executing a program and controlling communication device 104 according to the program.

図4はオブジェクトDBの一例の構成図である。オブジェクトDB214は、ゲームの画像に表示されるオブジェクトに関する情報として、オブジェクトID、及び接触判定形状定義情報を対応付けて記憶している。オブジェクトIDは、ゲームの画像に表示されているオブジェクトを識別する情報の一例である。接触判定形状定義情報は、接触判定のためのオブジェクトの接触判定形状を定義する情報の一例である。図4のオブジェクトDB214では、接触判定のためのオブジェクトの接触判定形状の一例として、カプセル形状及び球体形状が定義されている例を示している。 FIG. 4 is a configuration diagram of an example of an object DB. The object DB 214 associates and stores object IDs and contact determination shape definition information as information about objects displayed in game images. The object ID is an example of information identifying an object displayed in a game image. The contact determination shape definition information is an example of information defining the contact determination shape of an object for contact determination. The object DB 214 of FIG. 4 shows an example in which a capsule shape and a spherical shape are defined as examples of contact determination shapes of objects for contact determination.

図5は閾値設定DBの一例の構成図である。閾値設定DB216は、オブジェクト同士の接触判定に利用する情報として、接触判定切替用閾値を記憶している。図5は一つの接触判定切替用閾値を記憶する例を示したが、後述するように、条件と対応付けて複数の接触判定切替用閾値を動的に記憶していてもよい。 FIG. 5 is a configuration diagram of an example of a threshold setting DB. The threshold setting DB 216 stores contact determination switching thresholds as information used for determining contact between objects. FIG. 5 shows an example of storing one contact determination switching threshold, but as will be described later, a plurality of contact determination switching thresholds may be dynamically stored in association with conditions.

[接触判定形状が球体形状及びカプセル形状の場合の接触判定]
図6は接触判定形状が球体形状及びカプセル形状の場合の接触判定について説明するための一例の図である。図6(A)は接触判定形状が球体形状の場合の接触判定例を示している。図6(B)は接触判定形状が球体形状の場合の接触判定例を示している。
[Contact determination when the contact determination shape is a spherical shape and a capsule shape]
FIG. 6 is a diagram for explaining an example of contact determination when the contact determination shape is a spherical shape and a capsule shape. FIG. 6A shows an example of contact determination when the contact determination shape is spherical. FIG. 6B shows an example of contact determination when the contact determination shape is spherical.

図6(A)において、接触判定形状が球体形状のオブジェクト300(以下、単に球体形状のオブジェクトと呼ぶことがある)と、球体形状のオブジェクト300と比較して十分に小さいオブジェクト302との接触判定を行う場合は、矢印304に示す距離(オブジェクト300の中心とオブジェクト302との距離)がオブジェクト300の半径以下か否かにより、球体形状のオブジェクト300とオブジェクト302とが接触しているか否かを判定できる。 In FIG. 6A, contact determination between an object 300 whose contact determination shape is spherical (hereinafter sometimes simply referred to as a spherical object) and an object 302 sufficiently smaller than the spherical object 300 , whether or not the spherical objects 300 and 302 are in contact is determined by whether or not the distance indicated by the arrow 304 (the distance between the center of the object 300 and the object 302) is equal to or less than the radius of the object 300. I can judge.

図6(B)において、接触判定形状がカプセル形状のオブジェクト310(以下、単にカプセル形状のオブジェクトと呼ぶことがある)と、カプセル形状のオブジェクト310と比較して十分に小さいオブジェクト312との接触判定を行う場合は、以下の第1から第4の判定が必要になる。 In FIG. 6B, contact determination between an object 310 whose contact determination shape is a capsule shape (hereinafter sometimes simply referred to as a capsule-shaped object) and an object 312 sufficiently smaller than the capsule-shaped object 310 , the following first to fourth determinations are required.

例えば第1の判定では、矢印320に示す距離(オブジェクト310を構成する上側の半球(上球)の中心座標314とオブジェクト312との距離)がオブジェクト310の上球の半径以下であるか否かを判定する。矢印320に示す距離がオブジェクト310の上球の半径以下であれば、カプセル形状のオブジェクト310とオブジェクト312とは接触していると判定できる。 For example, in the first determination, whether or not the distance indicated by arrow 320 (the distance between the center coordinates 314 of the upper hemisphere (upper sphere) forming object 310 and object 312) is less than or equal to the radius of the upper sphere of object 310. judge. If the distance indicated by the arrow 320 is equal to or less than the radius of the upper sphere of the object 310, it can be determined that the capsule-shaped objects 310 and 312 are in contact with each other.

例えば第2の判定では、矢印322に示す距離(オブジェクト310を構成する下側の半球(下球)の中心座標316とオブジェクト312との距離)がオブジェクト310の下球の半径以下であるか否かを判定する。矢印322に示す距離がオブジェクト310の下球の半径以下であれば、カプセル形状のオブジェクト310とオブジェクト312とは接触していると判定できる。 For example, in the second determination, it is determined whether the distance indicated by the arrow 322 (the distance between the center coordinates 316 of the lower hemisphere (lower sphere) forming the object 310 and the object 312) is less than or equal to the radius of the lower sphere of the object 310. determine whether If the distance indicated by the arrow 322 is equal to or less than the radius of the lower sphere of the object 310, it can be determined that the capsule-shaped objects 310 and 312 are in contact with each other.

例えば第3の判定では、オブジェクト312からオブジェクト310の軸に垂直な線分を伸ばした場合に、軸と線分との交点が、矢印326に示すオブジェクト310の円柱部分に含まれるか否かを判定する。なお、オブジェクト310の軸は、上球の中心座標314と下球の中心座標316とを通る直線により表される。また、第4の判定では、矢印324に示す距離(オブジェクト312からオブジェクト310の軸に垂直な線分を伸ばした場合の距離)がオブジェクト310の半球の半径以下であるか否かを判定する。 For example, in the third determination, when a line segment perpendicular to the axis of the object 310 is extended from the object 312, it is determined whether or not the intersection of the axis and the line segment is included in the cylindrical portion of the object 310 indicated by the arrow 326. judge. The axis of the object 310 is represented by a straight line passing through the center coordinates 314 of the upper sphere and the center coordinates 316 of the lower sphere. In the fourth determination, it is determined whether or not the distance indicated by the arrow 324 (the distance obtained by extending the line segment perpendicular to the axis of the object 310 from the object 312) is less than or equal to the radius of the hemisphere of the object 310.

第3の判定で、軸と線分との交点が、矢印326に示すオブジェクト310の円柱部分に含まれると判定し、且つ、第4の判定で、矢印324に示す距離がオブジェクト310の半球の半径以下であると判定すれば、カプセル形状のオブジェクト310とオブジェクト312とは接触していると判定できる。 A third determination determines that the intersection of the axis and the line segment is included in the cylindrical portion of the object 310 indicated by the arrow 326 , and a fourth determination determines that the distance indicated by the arrow 324 is within the hemisphere of the object 310 . If it is determined that the distance is equal to or less than the radius, it can be determined that the capsule-shaped object 310 and the object 312 are in contact with each other.

第1から第4の判定の全てにおいてカプセル形状のオブジェクト310とオブジェクト312とが接触していると判定されなければ、カプセル形状のオブジェクト310とオブジェクト312とは接触していないと判定できる。 If it is determined that the capsule-shaped objects 310 and 312 are not in contact in all of the first to fourth determinations, it can be determined that the capsule-shaped objects 310 and 312 are not in contact.

図6に示すように、カプセル形状のオブジェクト310の接触判定の処理負荷(処理コスト)は、球体形状のオブジェクト300の接触判定の処理負荷よりも大きくなる。そこで、カプセル形状のオブジェクト310の接触判定の処理負荷を軽減する接触判定方法について検討した。 As shown in FIG. 6 , the processing load (processing cost) of contact determination for the capsule-shaped object 310 is greater than the processing load for contact determination of the spherical object 300 . Therefore, a contact determination method for reducing the processing load of contact determination of the capsule-shaped object 310 was examined.

図7はカプセル形状のオブジェクトの接触判定の処理負荷を軽減する接触判定方法について説明するための一例の図である。図7において、カプセル形状のオブジェクト330は図6(B)のカプセル形状のオブジェクト310と比べて、矢印342に示す円柱部分が短い(上球の中心座標334と下球の中心座標336とを繋ぐ線分が短い)。 FIG. 7 is a diagram illustrating an example of a contact determination method for reducing the processing load of contact determination of a capsule-shaped object. In FIG. 7, the capsule-shaped object 330 has a shorter cylindrical portion indicated by an arrow 342 (connecting the center coordinates 334 of the upper sphere and the center coordinates 336 of the lower sphere) than the capsule-shaped object 310 of FIG. short line).

図7のカプセル形状のオブジェクト330は矢印342に示す円柱部分が短く、例えば図6(A)に示した球体形状のオブジェクト300と近い形状となる。そこで、本実施形態では、カプセル形状のオブジェクト330の軸(半球と半球との間の円柱部分)が十分に短い場合に、カプセル形状のオブジェクト330の接触判定処理を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替えることで、接触判定の簡略化による処理コストの軽減を実現して、接触判定を高速化する。 The capsule-shaped object 330 in FIG. 7 has a short cylindrical portion indicated by an arrow 342, and has a shape similar to the spherical object 300 shown in FIG. 6A, for example. Therefore, in the present embodiment, when the axis of the capsule-shaped object 330 (the cylindrical portion between the hemispheres) is sufficiently short, the contact determination processing for the capsule-shaped object 330 is replaced with the capsule-shaped contact determination processing. , to the contact determination process for the spherical shape, the processing cost can be reduced by simplifying the contact determination, and the contact determination can be speeded up.

[処理]
以下では、本実施形態に係るゲームシステムがユーザからゲームに対する操作を受け付けて、その操作に応じたゲームの画像を生成して出力装置108に表示(出力)する処理例を説明する。図8は本実施形態に係るゲームシステムの処理の一例のフローチャートである。
[process]
An example of processing in which the game system according to the present embodiment receives a game operation from a user, generates a game image according to the operation, and displays (outputs) the image on the output device 108 will be described below. FIG. 8 is a flowchart of an example of processing of the game system according to this embodiment.

ステップS10において、情報処理装置10はゲームのプレイを開始する操作をユーザから受け付ける。情報処理装置10のゲーム制御部230は、ユーザから受け付けた操作に従って、ゲーム処理の実行を開始する。 In step S10, the information processing apparatus 10 receives an operation from the user to start playing the game. The game control unit 230 of the information processing device 10 starts executing game processing according to an operation received from the user.

ステップS12において、ゲーム制御部230は生成するゲームの画像に必要なプレイヤキャラクタ、敵キャラクタなどのオブジェクトの生成をオブジェクト生成部240に要求する。オブジェクト生成部240は、オブジェクト空間内に配置する複数のオブジェクトを生成する。 In step S12, the game control section 230 requests the object generation section 240 to generate objects such as player characters and enemy characters necessary for the generated game image. The object generator 240 generates a plurality of objects to be arranged in the object space.

また、オブジェクト生成部240は生成したオブジェクトに、接触判定を実装するための接触判定用のコンポーネントを設定し、それぞれのオブジェクトの接触判定形状を定義する。画像生成部242は、接触判定を行う複数のオブジェクトがオブジェクト空間内に配置されたゲームの画像を生成する。画像生成部242は、時間経過に従い、オブジェクト空間内の複数のオブジェクトが移動するゲームの画像を生成する。 In addition, the object generation unit 240 sets contact determination components for implementing contact determination to the generated objects, and defines the contact determination shape of each object. The image generator 242 generates a game image in which a plurality of objects for contact determination are arranged in the object space. The image generator 242 generates a game image in which a plurality of objects in the object space move over time.

ステップS14において、ゲーム制御部230はオブジェクト空間内に配置された複数のオブジェクト同士の接触判定が必要か否かを判定する。オブジェクト空間内に配置された複数のオブジェクト同士の接触判定が必要か否かの判定は、ゲームの種類によって適宜設定されればよい。 In step S14, the game control section 230 determines whether or not it is necessary to determine contact between a plurality of objects arranged in the object space. The determination as to whether or not it is necessary to determine contact between a plurality of objects arranged in the object space may be appropriately set according to the type of game.

例えばプレイヤキャラクタが発射した弾丸のオブジェクトがオブジェクト空間内に存在する間だけ、弾丸のオブジェクトと、その他のオブジェクトとの接触判定を行うゲームであれば、オブジェクト空間内に弾丸のオブジェクトが存在するか否かにより、接触判定が必要か否かを判定できる。 For example, in the case of a game that determines contact between the bullet object and other objects only while the bullet object fired by the player character exists in the object space, whether or not the bullet object exists in the object space is determined. It can be determined whether contact determination is necessary or not.

また、所定時間ごとにオブジェクト空間内に存在するオブジェクト同士の接触判定を行うゲームであれば、所定時間を経過しているか否かにより、接触判定が必要か否かを判定できる。 Further, in the case of a game in which contact determination between objects existing in the object space is performed at predetermined time intervals, it is possible to determine whether or not contact determination is necessary based on whether or not the predetermined time has elapsed.

ゲーム制御部230はオブジェクト空間内に配置された複数のオブジェクト同士の接触判定が必要と判定すると、ステップS16の接触判定処理を行う。ゲーム制御部230はオブジェクト空間内に配置された複数のオブジェクト同士の接触判定が必要でないと判定すると、ステップS16の接触判定処理をスキップする。 When the game control unit 230 determines that it is necessary to determine contact between a plurality of objects arranged in the object space, it performs contact determination processing in step S16. If the game control unit 230 determines that it is not necessary to determine contact between the objects arranged in the object space, it skips the contact determination process in step S16.

ステップS18において、ゲーム制御部230はゲーム終了か否かを判定する。ゲーム終了でなければ、ゲーム制御部230はステップS12に戻り、ステップS12以降に示したゲームの処理を継続する。なお、ゲーム終了であれば、ゲーム制御部230は図8のフローチャートの処理を終了する。 In step S18, the game control section 230 determines whether or not the game is over. If the game is not over, the game control unit 230 returns to step S12 and continues the game processing shown after step S12. If the game is over, the game control unit 230 ends the processing of the flowchart of FIG.

ステップS16の接触判定処理は、例えば図9に示す手順で実行される。図9は本実施形態に係る接触判定処理の一例のフローチャートである。ゲーム制御部230の算出部244はステップS30において、例えば図4のオブジェクトDB214から接触判定処理が未処理のオブジェクトを一つ選択する。 The contact determination process in step S16 is executed, for example, according to the procedure shown in FIG. FIG. 9 is a flowchart of an example of contact determination processing according to this embodiment. In step S30, the calculation unit 244 of the game control unit 230 selects one object for which contact determination processing has not been performed, for example, from the object DB 214 of FIG.

ステップS32において、算出部244はステップS30で選択したオブジェクトの接触判定形状の定義がカプセル形状であるか否かを判定する。カプセル形状であれば、算出部244はステップS34の処理に進み、ステップS30で選択したオブジェクトのカプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さを算出する。 In step S32, the calculation unit 244 determines whether the definition of the contact determination shape of the object selected in step S30 is a capsule shape. If it is a capsule shape, the calculation unit 244 proceeds to the process of step S34, and calculates the length of the line segment connecting the center coordinates of the two hemispheres forming the capsule shape of the object selected in step S30.

ステップS34に続いてステップS36の処理に進み、接触判定部246はステップS34で算出した線分の長さが、図5の閾値設定DB216の接触判定切替用閾値より小さいか否かを判定する。ステップS34で算出した線分の長さが、図5の閾値設定DB216の接触判定切替用閾値より小さければ、ステップS38の処理に進み、接触判定部246はステップS30で選択したカプセル形状のオブジェクトの接触判定を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替える。このように、接触判定部246はステップS30で選択したカプセル形状のオブジェクトの接触判定を、球体形状用の接触判定処理で行い、カプセル形状のオブジェクトの接触判定を簡略化する。 Proceeding to the process of step S36 following step S34, the contact determination unit 246 determines whether the length of the line segment calculated in step S34 is smaller than the contact determination switching threshold of the threshold setting DB 216 of FIG. If the length of the line segment calculated in step S34 is smaller than the contact determination switching threshold of the threshold setting DB 216 of FIG. The contact determination process is switched from the contact determination process for the capsule shape to the contact determination process for the spherical shape. In this manner, the contact determination unit 246 performs contact determination of the capsule-shaped object selected in step S30 by contact determination processing for the spherical shape, thereby simplifying the contact determination of the capsule-shaped object.

ステップS34で算出した線分の長さが、図5の閾値設定DB216の接触判定切替用閾値より小さくなければ、ステップS40の処理に進み、接触判定部246はステップS30で選択したカプセル形状のオブジェクトの接触判定を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替えない。接触判定部246は、ステップS30で選択したカプセル形状のオブジェクトの接触判定を、カプセル形状用の接触判定処理で行う。 If the length of the line segment calculated in step S34 is not smaller than the contact determination switching threshold of the threshold setting DB 216 of FIG. is not switched from the contact determination process for the capsule shape to the contact determination process for the spherical shape. The contact determination unit 246 performs contact determination of the capsule-shaped object selected in step S30 in the capsule-shaped contact determination process.

なお、ステップS32においてカプセル形状でないと判定すると、接触判定部246はステップS30で選択したカプセル形状以外の形状のオブジェクトの接触判定を、そのオブジェクトの接触判定形状に応じて行う。 If it is determined in step S32 that the shape of the object is not the capsule shape, the contact determination unit 246 performs contact determination of an object having a shape other than the capsule shape selected in step S30 according to the contact determination shape of the object.

ステップS44において、接触処理部248は接触判定部246がオブジェクトの接触ありと判定した場合、ステップS46の処理に進み、接触ありと判定されたオブジェクトに対して、接触処理を行う。なお、接触処理部248は接触判定部246がオブジェクトの接触ありと判定しなかった場合、ステップS46の処理をスキップする。 In step S44, when the contact determination unit 246 determines that the object is in contact with the object, the contact processing unit 248 proceeds to step S46 to perform contact processing on the object determined to be in contact. Note that the contact processing unit 248 skips the processing of step S46 when the contact determination unit 246 does not determine that there is contact with the object.

ステップS48において、算出部244は図4のオブジェクトDB214に未処理のオブジェクトがあるか否かを判定する。なお、未処理のオブジェクトがあれば、算出部244はステップS30の処理に戻り、図9のフローチャートの処理を継続する。未処理のオブジェクトがなければ、ゲーム制御部230は図9に示した接触判定処理を終了する。 In step S48, the calculation unit 244 determines whether or not there is an unprocessed object in the object DB 214 of FIG. Note that if there is an unprocessed object, the calculation unit 244 returns to the process of step S30 and continues the process of the flowchart of FIG. If there is no unprocessed object, the game control section 230 terminates the contact determination process shown in FIG.

図9に示した接触判定処理は、閾値設定DB216に設定されている閾値が一つの例である。閾値設定DB216に設定される閾値は、以下のように条件と対応付けて複数の閾値を動的に設けてもよい。 One example of the contact determination process illustrated in FIG. 9 is the threshold set in the threshold setting DB 216 . The thresholds set in the threshold setting DB 216 may dynamically set a plurality of thresholds in association with conditions as follows.

図10は本実施形態に係るゲームシステムの処理の一例の説明図である。図11はオブジェクトDBの一例の構成図である。図12は閾値設定DBの一例の構成図である。 FIG. 10 is an explanatory diagram of an example of processing of the game system according to this embodiment. FIG. 11 is a configuration diagram of an example of the object DB. FIG. 12 is a configuration diagram of an example of a threshold setting DB.

例えば図10では、仮想カメラやユーザキャラクタのオブジェクト1000の位置座標を基準座標(中心)としている。図10の例では、例えば基準座標を中心として、基準座標からの距離に応じた複数の接触判定切替用閾値が設定される。図10の例では、基準座標からの距離が小さいほど、接触判定切替用閾値が小さく、基準座標からの距離が大きいほど、接触判定切替用閾値が大きくなるように、閾値設定DB216に設定される。 For example, in FIG. 10, the position coordinates of the virtual camera and the user character object 1000 are used as the reference coordinates (center). In the example of FIG. 10, for example, a plurality of contact determination switching thresholds are set around the reference coordinates according to the distance from the reference coordinates. In the example of FIG. 10 , the threshold setting DB 216 is set such that the smaller the distance from the reference coordinates, the smaller the contact determination switching threshold, and the larger the distance from the reference coordinates, the larger the contact determination switching threshold. .

図10のカプセル形状のオブジェクト1002は、基準座標からの距離がA未満であるオブジェクトの例である。オブジェクト1004は、基準座標からの距離がA以上B未満であるオブジェクトの例である。オブジェクト1006は、基準座標からの距離がB以上の例である。基準座標とオブジェクト1002、1004、及び1006との距離は、基準座標DB218に記憶されている基準座標と、図11のオブジェクトDBの位置情報とから算出できる。 A capsule-shaped object 1002 in FIG. 10 is an example of an object whose distance is less than A from the reference coordinates. An object 1004 is an example of an object whose distance from the reference coordinates is greater than or equal to A and less than B. FIG. An object 1006 is an example with a distance of B or more from the reference coordinates. The distances between the reference coordinates and the objects 1002, 1004, and 1006 can be calculated from the reference coordinates stored in the reference coordinate DB 218 and the position information of the object DB in FIG.

オブジェクト1002は、基準座標からの距離が一番近いオブジェクトの例であり、接触判定切替用閾値を最も小さく設定することで、カプセル形状のオブジェクトの接触判定をカプセル形状用の接触判定処理で行いやすくしている。例えば基準座標からの距離がA未満であるカプセル形状のオブジェクトの接触判定切替用閾値を「0」に設定しておくことにより、基準座標からの距離がA未満であるカプセル形状のオブジェクト1002の接触判定は、必ずカプセル形状用の接触判定処理で行われる。したがって、基準座標からの距離がA未満であるカプセル形状のオブジェクト1002の接触判定処理はカプセル形状用の接触判定処理により正確に行われることになる。 An object 1002 is an example of an object that is closest to the reference coordinates. By setting the contact determination switching threshold to the smallest value, the contact determination of the capsule-shaped object can be easily performed in the capsule-shaped contact determination processing. are doing. For example, by setting the contact determination switching threshold for a capsule-shaped object whose distance from the reference coordinates is less than A to "0", the contact of the capsule-shaped object 1002 whose distance from the reference coordinates is less than A is determined. Determination is always performed in the contact determination process for the capsule shape. Therefore, the contact determination processing for the capsule-shaped object 1002 whose distance from the reference coordinates is less than A is accurately performed by the capsule-shaped contact determination processing.

オブジェクト1006は、基準座標からの距離が一番遠いオブジェクトの例であり、接触判定切替用閾値を最も大きく設定することで、カプセル形状のオブジェクトの接触判定を球体形状用の接触判定処理で行いやすくしている。例えば基準座標からの距離がB以上であるカプセル形状のオブジェクトの接触判定切替用閾値を「100」に設定しておくことにより、基準座標からの距離がB以上であるカプセル形状のオブジェクト1006の接触判定は、オブジェクト1006の円柱部分の長さが長くても、球体形状用の接触判定処理で行われやすくなる。したがって、基準座標からの距離がB以上であるカプセル形状のオブジェクト1006の接触判定処理は球体形状用の接触判定処理により簡易的に行われることになる。 The object 1006 is an example of an object that is the farthest from the reference coordinates. By setting the contact determination switching threshold to be the largest, the contact determination of the capsule-shaped object can be easily performed in the contact determination process for the spherical shape. are doing. For example, by setting the contact determination switching threshold for a capsule-shaped object whose distance from the reference coordinates is B or more to "100", the contact of the capsule-shaped object 1006 whose distance from the reference coordinates is B or more can be determined. Even if the length of the cylindrical portion of the object 1006 is long, the determination can be easily performed by contact determination processing for a spherical shape. Therefore, the contact determination processing for the capsule-shaped object 1006 whose distance from the reference coordinates is B or more is simply performed by the contact determination processing for the spherical shape.

オブジェクト1004は、基準座標からの距離がオブジェクト1002より遠く、オブジェクト1006より近いオブジェクトの例であり、接触判定切替用閾値を調整して設定することで、カプセル形状のオブジェクトの接触判定を球体形状用の接触判定処理で行いにくくしている。 An object 1004 is an example of an object whose distance from the reference coordinates is farther than the object 1002 and closer than the object 1006. By adjusting and setting the contact determination switching threshold, the contact determination of the capsule-shaped object can be changed to that of the spherical shape. It is difficult to perform in the contact determination process.

例えば基準座標からの距離がA以上B未満であるカプセル形状のオブジェクトの接触判定切替用閾値を「50」に設定しておくことにより、基準座標からの距離がA以上B未満であるカプセル形状のオブジェクト1004の接触判定は、オブジェクト1004の円柱部分の長さが短いという条件を満たしたときに、球体形状用の接触判定処理で行われることになる。 For example, by setting the contact determination switching threshold for a capsule-shaped object whose distance from the reference coordinates is A or more and less than B to "50", the capsule-shaped object whose distance from the reference coordinates is A or more and less than B is set to "50". Contact determination of the object 1004 is performed by contact determination processing for a spherical shape when the condition that the length of the cylindrical portion of the object 1004 is short is satisfied.

したがって、基準座標からの距離がA以上B未満であるカプセル形状のオブジェクト1006の接触判定処理は、オブジェクト1004の円柱部分の長さが短いという条件を満たしたときに、球体形状用の接触判定処理により簡易的に行われることになる。 Therefore, the contact determination processing for the capsule-shaped object 1006 whose distance from the reference coordinates is greater than or equal to A and less than B is the contact determination processing for the spherical shape when the condition that the cylindrical portion of the object 1004 is short is satisfied. will be performed more easily.

図10に示した例では、基準座標から近いカプセル形状のオブジェクトであれば、正確なカプセル形状用の接触判定処理を行うことで不自然な挙動を減らしつつ、基準座標から遠いカプセル形状のオブジェクトであるほど、簡易化した球体形状用の接触判定処理を行うことで処理負荷を軽減して接触判定処理を高速化できる。 In the example shown in FIG. 10, if the capsule-shaped object is close to the reference coordinates, by performing accurate capsule-shaped contact determination processing, unnatural behavior is reduced, and if the capsule-shaped object is far from the reference coordinates, By performing the simplified contact determination process for the spherical shape, the processing load can be reduced and the contact determination process can be speeded up.

ステップS16の接触判定処理は、例えば図13に示す手順で実行される。図13は本実施形態に係る接触判定処理の一例のフローチャートである。ゲーム制御部230の算出部244はステップS100において、例えば図11のオブジェクトDB214から接触判定処理が未処理のオブジェクトを一つ選択する。 The contact determination process in step S16 is executed, for example, according to the procedure shown in FIG. FIG. 13 is a flowchart of an example of contact determination processing according to this embodiment. In step S100, the calculation unit 244 of the game control unit 230 selects one object for which contact determination processing has not been performed, for example, from the object DB 214 of FIG.

ステップS102において、算出部244はステップS100で選択したオブジェクトの接触判定形状の定義がカプセル形状であるか否かを判定する。カプセル形状であれば算出部244はステップS104の処理に進み、ステップS100で選択したオブジェクトの位置情報と、基準座標DB218に記憶されている基準座標と、の距離を算出する。 In step S102, the calculation unit 244 determines whether the definition of the contact determination shape of the object selected in step S100 is a capsule shape. If it is a capsule shape, the calculation unit 244 proceeds to the process of step S104 and calculates the distance between the position information of the object selected in step S100 and the reference coordinates stored in the reference coordinate DB 218 .

また、ステップS106において、算出部244はステップS104で算出した距離に基づき、図12の閾値設定DB216から接触判定切替用閾値を設定する。本実施形態によれば、算出部244はオブジェクトの位置情報と、基準座標DB218に記憶されている基準座標と、の距離に基づき、異なる接触判定切替用閾値を設定できる。ステップS108において、算出部244はステップS100で選択したオブジェクトのカプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さを算出する。 Also, in step S106, the calculation unit 244 sets a contact determination switching threshold from the threshold setting DB 216 of FIG. 12 based on the distance calculated in step S104. According to this embodiment, the calculator 244 can set different contact determination switching thresholds based on the distance between the position information of the object and the reference coordinates stored in the reference coordinate DB 218 . In step S108, the calculation unit 244 calculates the length of the line segment connecting the central coordinates of the two hemispheres forming the capsule shape of the object selected in step S100.

ステップS110において、接触判定部246はステップS108で算出した線分の長さが、ステップS106で設定した接触判定切替用閾値より小さいか否かを判定する。ステップS108で算出した線分の長さが、ステップS106で設定した接触判定切替用閾値より小さければ、ステップS112の処理に進み、接触判定部246はステップS100で選択したカプセル形状のオブジェクトの接触判定を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替える。このように、接触判定部246はステップS100で選択したカプセル形状のオブジェクトの接触判定を、球体形状用の接触判定処理で行い、カプセル形状のオブジェクトの接触判定を簡略化する。 In step S110, the contact determination unit 246 determines whether the length of the line segment calculated in step S108 is smaller than the contact determination switching threshold set in step S106. If the length of the line segment calculated in step S108 is smaller than the contact determination switching threshold set in step S106, the process proceeds to step S112, and the contact determination unit 246 determines contact of the capsule-shaped object selected in step S100. is switched from the contact determination process for the capsule shape to the contact determination process for the spherical shape. In this manner, the contact determination unit 246 performs contact determination of the capsule-shaped object selected in step S100 by contact determination processing for the spherical shape, thereby simplifying contact determination of the capsule-shaped object.

ステップS108で算出した線分の長さが、ステップS106で設定した接触判定切替用閾値より小さくなければ、ステップS114の処理に進む。ステップS114において接触判定部246は、ステップS100で選択したカプセル形状のオブジェクトの接触判定を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替えない。接触判定部246は、ステップS100で選択したカプセル形状のオブジェクトの接触判定を、カプセル形状用の接触判定処理で行う。 If the length of the line segment calculated in step S108 is not smaller than the contact determination switching threshold set in step S106, the process proceeds to step S114. In step S114, the contact determination unit 246 does not switch the contact determination of the capsule-shaped object selected in step S100 from the capsule-shaped contact determination processing to the spherical-shaped contact determination processing. The contact determination unit 246 performs contact determination of the capsule-shaped object selected in step S100 by the capsule-shaped contact determination process.

なお、ステップS102においてカプセル形状でないと判定すると、接触判定部246はステップS100で選択したカプセル形状以外の形状のオブジェクトの接触判定を、そのオブジェクトの接触判定形状に応じて行う。 If it is determined in step S102 that the shape of the object is not the capsule shape, the contact determination unit 246 performs contact determination of an object having a shape other than the capsule shape selected in step S100 according to the contact determination shape of the object.

ステップS118において、接触処理部248は接触判定部246がオブジェクトの接触ありと判定した場合、ステップS120の処理に進む。接触処理部248は、接触ありと判定されたオブジェクトに対して、接触処理を行う。なお、接触処理部248は接触判定部246がオブジェクトの接触ありと判定しなかった場合、ステップS120の処理をスキップする。 In step S118, when the contact determination unit 246 determines that the contact processing unit 248 has contacted the object, the process proceeds to step S120. The contact processing unit 248 performs contact processing on objects determined to be in contact. Note that the contact processing unit 248 skips the processing of step S120 when the contact determination unit 246 does not determine that there is contact with the object.

ステップS122において、算出部244は図11のオブジェクトDB214に未処理のオブジェクトがあるか否かを判定する。なお、未処理のオブジェクトがあれば、算出部244はステップS100の処理に戻り、図13のフローチャートの処理を継続する。未処理のオブジェクトがなければ、ゲーム制御部230は図13に示した接触判定処理を終了する。 In step S122, the calculation unit 244 determines whether or not there is an unprocessed object in the object DB 214 of FIG. Note that if there is an unprocessed object, the calculation unit 244 returns to the process of step S100 and continues the process of the flowchart of FIG. If there is no unprocessed object, the game control section 230 terminates the contact determination process shown in FIG.

図13に示した接触判定処理は、例えば閾値設定DB216に、条件の一例であるオブジェクトの重要度と対応付けて複数の閾値が動的に設定されていてもよい。例えば、オブジェクトの重要度は、レイドボスなどのゲームにおいて重要なオブジェクト、ユーザの視線を集めやすいオブジェクトなどに高く設定し、重要でないオブジェクト、ユーザの視線を集めにくいオブジェクトなどに低く設定してもよい。 In the contact determination process shown in FIG. 13, for example, a plurality of thresholds may be dynamically set in the threshold setting DB 216 in association with the degree of importance of the object, which is an example of the condition. For example, the importance of objects may be set high for important objects in a game such as raid bosses and objects that easily attract the user's line of sight, and set low for unimportant objects and objects that are difficult to attract the user's line of sight.

その他、上記した接触判定処理は、ズーム機能を有するゲームに適用できる。ズーム機能を有するゲームに適用する場合、上記した接触判定処理は、例えばズームアップ可能な倍率ごとに閾値設定DB216を設定して対応してもよい。 In addition, the contact determination process described above can be applied to a game having a zoom function. When applied to a game having a zoom function, the contact determination process described above may be handled by setting the threshold value setting DB 216 for each zoomable magnification, for example.

このように、本実施形態では、接触判定を実装するための接触判定用のコンポーネントを変更せずに、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替えることで、少ない処理負荷で、オブジェクト空間内のオブジェクト同士の接触判定をLOD(Level of Detail)処理化できる。LOD処理により、本実施形態ではオブジェクト空間に配置された複数のオブジェクト同士の接触判定において、見た目を損なわずに接触判定の処理負荷を軽減し、高速化できる。 As described above, in the present embodiment, the processing load can be reduced by switching from the contact determination processing for the capsule shape to the contact determination processing for the spherical shape without changing the contact determination component for implementing the contact determination. , LOD (Level of Detail) processing can be used to determine contact between objects in the object space. With the LOD processing, in the present embodiment, it is possible to reduce the processing load of contact determination without impairing the appearance and speed up the contact determination between a plurality of objects arranged in the object space.

本実施形態は、例えばFPS(First-person shooter)ゲームやアクションゲームに適用可能である。また、本実施形態ではゲームの画像の例を説明したが、ソーシャルネットワークサービスの利用者のアバターやノンプレイヤキャラクタ(NPC)が交流する仮想空間内を所定の視点から見た画像において、利用者のアバターやNPCが移動する画面などにおける接触判定への適用も可能である。 This embodiment is applicable to, for example, FPS (First-person shooter) games and action games. In the present embodiment, an example of a game image has been described. It can also be applied to contact determination on screens where avatars and NPCs move.

本実施形態によれば、オブジェクト空間内を所定の視点から見た画像を生成してユーザにゲームを実行させる情報処理装置10において、不自然な接触判定を減らしつつ、オブジェクト同士の接触判定の処理負荷を軽減できる。 According to this embodiment, in the information processing apparatus 10 that generates an image of the object space viewed from a predetermined viewpoint and causes the user to execute the game, the process of determining contact between objects while reducing unnatural contact determination is performed. It can reduce the load.

開示した一実施形態の情報処理装置は例示であって制限的なものではないと考えられるべきである。上記の実施形態は添付の請求の範囲及びその主旨を逸脱することなく、様々な形態で変形及び改良が可能である。また、上記した複数の実施形態に記載された事項は矛盾しない範囲で他の構成も取り得ることができ、また、矛盾しない範囲で組み合わせることができる。 The information processing apparatus of the disclosed embodiment should be considered as an example and not as a limitation. The embodiments described above can be modified and improved in various ways without departing from the scope and spirit of the appended claims. In addition, the items described in the above-described multiple embodiments can be configured in other configurations within a consistent range, and can be combined within a consistent range.

10 情報処理装置
14 サーバ装置
18 ネットワーク
200 制御部
202 操作受付部
204 出力制御部
206 通信部
210 記憶部
212 ゲームプログラム
214 オブジェクトDB
216 閾値設定DB
218 基準座標DB
230 ゲーム制御部
240 オブジェクト生成部
242 画像生成部
244 算出部
246 接触判定部
248 接触処理部
10 information processing device 14 server device 18 network 200 control unit 202 operation reception unit 204 output control unit 206 communication unit 210 storage unit 212 game program 214 object DB
216 threshold setting DB
218 reference coordinate DB
230 game control unit 240 object generation unit 242 image generation unit 244 calculation unit 246 contact determination unit 248 contact processing unit

Claims (6)

オブジェクト空間内のオブジェクト同士の接触判定を行う情報処理装置であって、
接触判定を行う前記オブジェクトの少なくとも一方が、カプセル形状として接触判定を行うオブジェクトである場合に、前記カプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さを算出する算出部と、
算出した前記線分の長さに基づき、前記カプセル形状として接触判定を行うオブジェクトの接触判定処理を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替える接触判定部と、
を有する情報処理装置。
An information processing device that determines contact between objects in an object space,
when at least one of the objects for which contact determination is performed is an object for which contact determination is performed as a capsule shape, a calculation unit that calculates the length of a line segment connecting the center coordinates of two hemispheres that form the capsule shape;
a contact determination unit that switches, based on the calculated length of the line segment, contact determination processing of an object for which contact determination is performed as the capsule shape from contact determination processing for the capsule shape to contact determination processing for the spherical shape;
Information processing device having
前記オブジェクト空間内に設定した基準座標と、前記カプセル形状として接触判定を行うオブジェクトと、の距離が大きいほど閾値を大きく、前記距離が小さいほど閾値を小さく設定する閾値設定部、を更に有し、
前記接触判定部は、前記カプセル形状として接触判定を行うオブジェクトの接触判定処理を、算出した前記線分の長さが、設定した前記閾値より小さければ、前記カプセル形状用の接触判定処理から前記球体形状用の接触判定処理に切り替えること、
を特徴とする請求項1記載の情報処理装置。
a threshold value setting unit that sets a larger threshold value as the distance between the reference coordinates set in the object space and the object for which contact determination is performed as the capsule shape is larger, and a smaller threshold value as the distance is smaller,
If the calculated length of the line segment is smaller than the set threshold value, the contact determination unit performs the contact determination processing of the object for which the contact determination is performed as the capsule shape. switching to contact determination processing for shapes;
2. The information processing apparatus according to claim 1, characterized by:
前記閾値設定部は、前記カプセル形状として接触判定を行うオブジェクトの重要度が低いほど閾値を大きく、前記重要度が高いほど閾値を小さく設定すること、
を特徴とする請求項2記載の情報処理装置。
The threshold setting unit sets a larger threshold as the importance of the object for contact determination as the capsule shape is lower, and a smaller threshold as the importance is higher;
3. The information processing apparatus according to claim 2, characterized by:
前記基準座標は、前記オブジェクト空間内に設定した仮想カメラの位置座標、又はプレイヤキャラクタの位置座標であること
を特徴とする請求項2又は3記載の情報処理装置。
4. An information processing apparatus according to claim 2, wherein said reference coordinates are position coordinates of a virtual camera set in said object space or position coordinates of a player character.
オブジェクト空間内のオブジェクト同士の接触判定を行う情報処理装置を、
接触判定を行う前記オブジェクトの少なくとも一方が、カプセル形状として接触判定を行うオブジェクトである場合に、前記カプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さを算出する算出部、
算出した前記線分の長さに基づき、前記カプセル形状として接触判定を行うオブジェクトの接触判定処理を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替える接触判定部、
として機能させるためのプログラム。
An information processing device that determines contact between objects in the object space,
a calculation unit that calculates the length of a line segment connecting the center coordinates of two hemispheres forming the capsule shape when at least one of the objects for which contact determination is performed is an object for which contact determination is performed as a capsule shape;
a contact determination unit that switches, based on the calculated length of the line segment, the contact determination processing of the object for which contact determination is performed as the capsule shape from the contact determination processing for the capsule shape to the contact determination processing for the spherical shape;
A program to function as
オブジェクト空間内のオブジェクト同士の接触判定を行う情報処理装置の接触判定方法であって、
接触判定を行う前記オブジェクトの少なくとも一方が、カプセル形状として接触判定を行うオブジェクトである場合に、前記カプセル形状を構成する二つの半球の中心座標をつなぐ線分の長さを算出するステップと、
算出した前記線分の長さに基づき、前記カプセル形状として接触判定を行うオブジェクトの接触判定処理を、カプセル形状用の接触判定処理から球体形状用の接触判定処理に切り替えるステップと、
を情報処理装置が実行する接触判定方法。
A contact determination method for an information processing device for determining contact between objects in an object space, comprising:
when at least one of the objects for which contact determination is performed is an object for which contact determination is performed as a capsule shape, calculating the length of a line segment connecting the center coordinates of two hemispheres that form the capsule shape;
a step of switching the contact determination processing of the object for which contact determination is performed as the capsule shape from the contact determination processing for the capsule shape to the contact determination processing for the spherical shape based on the length of the calculated line segment;
A contact determination method executed by the information processing device.
JP2021149546A 2021-09-14 2021-09-14 Information processing device, program, and contact determination method Pending JP2023042310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021149546A JP2023042310A (en) 2021-09-14 2021-09-14 Information processing device, program, and contact determination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021149546A JP2023042310A (en) 2021-09-14 2021-09-14 Information processing device, program, and contact determination method

Publications (1)

Publication Number Publication Date
JP2023042310A true JP2023042310A (en) 2023-03-27

Family

ID=85717298

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021149546A Pending JP2023042310A (en) 2021-09-14 2021-09-14 Information processing device, program, and contact determination method

Country Status (1)

Country Link
JP (1) JP2023042310A (en)

Similar Documents

Publication Publication Date Title
US8723867B2 (en) Game apparatus, storage medium storing a game program, and game controlling method
JP4503073B2 (en) Image resource loading system and image resource loading method for loading object for updating game screen
JP2022533321A (en) VIRTUAL OBJECT CONTROL METHOD, APPARATUS, DEVICE AND COMPUTER PROGRAM
JP7387758B2 (en) Interface display method, device, terminal, storage medium and computer program
CN110465087B (en) Virtual article control method, device, terminal and storage medium
JPWO2005107903A1 (en) Electronic game device, data processing method in electronic game device, program therefor, and storage medium
JP6106393B2 (en) Program, game device, and server
JP5695621B2 (en) Program, game device, and server
US20220023760A1 (en) Virtual object selection method and apparatus, device, and storage medium
KR101826231B1 (en) Game system and method for attacking coordinate
WO2023103615A1 (en) Virtual object switching method and apparatus, device, medium and program product
JP2024001280A (en) Method, device, terminal, and storage medium, for selecting virtual objects
JP2023174714A (en) Program, image generation apparatus, and image generation method
US20130137513A1 (en) Game machine, game system, game machine control method, and information storage medium
JP2023042310A (en) Information processing device, program, and contact determination method
CN111558226A (en) Method, device, equipment and storage medium for detecting abnormal operation behaviors
US20210183146A1 (en) Content generation system and method
KR100510339B1 (en) Method and system for renewing screen using mechanics information
JP6147779B2 (en) Program, game device, and server
KR102656970B1 (en) Virtual object selection methods and devices, devices, and storage media
KR102648210B1 (en) Virtual object control method and device, terminal, and storage medium
JP7437440B2 (en) Programs, electronic devices, methods, and systems
JP7170397B2 (en) Program, image processing method, and image processing apparatus
JP2022188633A (en) Information processing device, program, and game image generation method
JP2022175027A (en) Information processing device, program, and game image generation method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20231010