JP2014184300A - Game program and game device - Google Patents

Game program and game device Download PDF

Info

Publication number
JP2014184300A
JP2014184300A JP2014092688A JP2014092688A JP2014184300A JP 2014184300 A JP2014184300 A JP 2014184300A JP 2014092688 A JP2014092688 A JP 2014092688A JP 2014092688 A JP2014092688 A JP 2014092688A JP 2014184300 A JP2014184300 A JP 2014184300A
Authority
JP
Japan
Prior art keywords
camera
area
viewpoint
game
virtual camera
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
JP2014092688A
Other languages
Japanese (ja)
Inventor
Katsuhiro Eguchi
勝博 江口
Yukio Nishimura
幸雄 西村
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.)
Capcom Co Ltd
Original Assignee
Capcom 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 Capcom Co Ltd filed Critical Capcom Co Ltd
Priority to JP2014092688A priority Critical patent/JP2014184300A/en
Publication of JP2014184300A publication Critical patent/JP2014184300A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a game program and a game device capable of preventing a virtual camera from entering an obstacle and capable of taking an image having a wide field of vision to the extent possible with the virtual camera.SOLUTION: When at least part of a camera area 50 overlaps with an entry forbidden area 42, virtual camera control means 33 of a game device 1 sets the camera area 50 including a candidate position at a position outside the entry forbidden area 42, and determines, as a position of a viewpoint 51 in the camera area 50 after the setting, a predetermined position in an area in a direction opposite to a direction of the viewpoint 51 with respect to the candidate position in the camera area.

Description

本発明は、仮想ゲーム空間内に配置されて該仮想ゲーム空間を撮影すると共に、プレイヤキャラクタ等に伴って移動する仮想カメラを制御するゲームプログラム、及びゲーム装置に関する。   The present invention relates to a game program and a game apparatus for controlling a virtual camera that is arranged in a virtual game space and shoots the virtual game space and moves with a player character or the like.

従来、三次元の仮想ゲーム空間内のプレイヤキャラクタを、プレイヤの操作に応じて動作させるゲームプログラムがある。この種のゲームプログラムでは、プレイヤキャラクタを含む仮想ゲーム空間内の様子を、該仮想ゲーム空間内に設定した仮想カメラにより、プレイヤキャラクタとは別の視点で撮影し、その画像を、ゲーム装置の表示部に表示させるようにしたものがある。また、仮想ゲーム空間は、平坦な地形だけで構成されているのではなく、切り立った崖や巨大な岩石、建物の壁などの障害物(仮想カメラの進入禁止領域)があり、仮想カメラを、このような障害物内に入ってしまうことがないように制御する方法が提案されている(特許文献1,2参照)。   Conventionally, there is a game program that causes a player character in a three-dimensional virtual game space to move in response to an operation of the player. In this type of game program, the state in the virtual game space including the player character is photographed from a viewpoint different from the player character by the virtual camera set in the virtual game space, and the image is displayed on the display of the game device. Some of them are displayed on the screen. In addition, the virtual game space is not only composed of flat terrain, but there are obstacles (virtual camera entry area) such as steep cliffs, huge rocks, and building walls. There has been proposed a method of controlling so as not to enter such an obstacle (see Patent Documents 1 and 2).

このうち特許文献1には、仮想カメラと障害物との衝突判定を行い、衝突したと判定した場合には、障害物の前方へ出るまで被写体側へ仮想カメラを移動させる方法が開示されている。また、特許文献2には、プレイヤキャラクタ等の被写体と仮想カメラとを含む所定の領域に障害物が存在するか否かを判定し、存在する場合には仮想カメラを被写体に近づける方法が開示されている。更に、特許文献2の仮想カメラには、視点を中心とする球形状のカメラ周辺領域が、障害物との衝突判定を行う対象領域として設定されており、障害物の存在により仮想カメラを被写体に近づけるほど、このカメラ周辺領域の径が小さくなるように制御されている。   Among them, Patent Document 1 discloses a method of performing a collision determination between a virtual camera and an obstacle and moving the virtual camera to the subject side until it comes out ahead of the obstacle when it is determined that the collision has occurred. . Patent Document 2 discloses a method for determining whether or not an obstacle exists in a predetermined area including a subject such as a player character and a virtual camera, and if so, brings the virtual camera closer to the subject. ing. Furthermore, in the virtual camera of Patent Document 2, a spherical camera peripheral area centered on the viewpoint is set as a target area for performing a collision determination with an obstacle, and the virtual camera is set as a subject due to the presence of the obstacle. The closer to the camera, the smaller the diameter of the peripheral area of the camera is controlled.

特開平11−137842号公報Japanese Patent Laid-Open No. 11-137842 特許第4489800号公報Japanese Patent No. 4489800

しかしながら、特許文献1,2のように、障害物の存在により仮想カメラを被写体側へ移動させると、移動前に仮想カメラの前方に位置していて該仮想カメラにより撮影された画像に含まれていたオブジェクトが、被写体側へ移動した後の仮想カメラによっては撮影されなくなる場合がある。また、仮想カメラに撮影されてゲーム装置の表示部に表示される画像に占めるプレイヤキャラクタの画像面積の割合が、移動前に比べて大きくなってしまう。そのため、仮想ゲーム空間の奥行き感のある画像を撮影することができず、プレイヤに広い視野を有するゲーム画像を提供できない可能性がある。   However, as in Patent Documents 1 and 2, if the virtual camera is moved to the subject side due to the presence of an obstacle, it is located in front of the virtual camera before the movement and is included in the image taken by the virtual camera. The captured object may not be shot depending on the virtual camera after moving to the subject side. In addition, the ratio of the image area of the player character to the image captured by the virtual camera and displayed on the display unit of the game apparatus becomes larger than before the movement. Therefore, there is a possibility that an image with a sense of depth in the virtual game space cannot be taken, and a game image having a wide field of view cannot be provided to the player.

そこで本発明は、仮想カメラが障害物内に入り込んでしまうのを回避しつつ、仮想カメラによって極力広い視野を有する画像を撮影することができるゲームプログラム、及びゲーム装置を提供することを目的とする。   Therefore, an object of the present invention is to provide a game program and a game apparatus capable of shooting an image having a field of view as wide as possible with the virtual camera while avoiding the virtual camera entering the obstacle. .

本発明に係るゲームプログラムは、コンピュータを、仮想のゲーム空間を生成するゲーム空間生成手段、前記ゲーム空間を撮影すべく、少なくとも該ゲーム空間内の仮想カメラの視点の位置及び向きを制御し、ゲームの進行に応じて該仮想カメラの視点を設定するための候補位置を算出する仮想カメラ制御手段、及び前記ゲーム空間内に設定された前記仮想カメラの進入禁止領域に、前記候補位置を領域内に含むように設定されたカメラ領域の少なくとも一部が重複したか否かを判定する禁止領域重複判定手段、として機能させ、前記仮想カメラ制御手段は、前記カメラ領域が前記進入禁止領域と重複していない場合には、前記候補位置を前記視点の位置として決定する一方、前記カメラ領域の少なくとも一部が前記進入禁止領域と重複している場合には、前記候補位置を含む前記カメラ領域を前記進入禁止領域外に設定すると共に、該カメラ領域内において前記候補位置に対し前記視点の向きとは反対側の領域の所定位置を、前記視点の位置として決定するよう構成されている。   A game program according to the present invention controls a game space generating means for generating a virtual game space, controlling at least the position and orientation of a viewpoint of a virtual camera in the game space so as to photograph the game space, Virtual camera control means for calculating a candidate position for setting the viewpoint of the virtual camera in accordance with the progress of the virtual camera, and the virtual camera control section that is set in the game space, the candidate position within the area Functioning as prohibition area duplication determination means for determining whether or not at least a part of camera areas set to include is duplicated, and the virtual camera control means is configured such that the camera area overlaps with the entry prohibition area. If not, the candidate position is determined as the position of the viewpoint, while at least a part of the camera area overlaps with the entry prohibition area. The camera area including the candidate position is set outside the entry prohibition area, and a predetermined position of the area opposite to the viewpoint direction with respect to the candidate position in the camera area is The position of the viewpoint is determined.

また、前記仮想カメラ制御手段は、前記ゲーム空間内に設定された注視点を前記仮想カメラの視点の視軸が通るように、該視点の向きを制御するよう構成されていてもよい。   The virtual camera control means may be configured to control the orientation of the viewpoint so that the visual axis of the viewpoint of the virtual camera passes through the gazing point set in the game space.

また、前記注視点は、前記ゲーム空間内で動作するプレイヤキャラクタを基準とする所定位置に配置され、該プレイヤキャラクタに伴って移動するよう設定されていてもよい。   The gazing point may be arranged at a predetermined position based on a player character operating in the game space, and may be set so as to move with the player character.

また、前記仮想カメラ制御手段は、前記カメラ領域の少なくとも一部が前記進入禁止領域と重複していると判定された場合は、前記候補位置を含む前記カメラ領域を、前記候補位置及び前記注視点を結ぶ直線に沿って前記進入禁止領域外へ、前記カメラ領域が該進入禁止領域に隣接するまで移動させた後の位置に設定するよう構成されていてもよい。   Further, when it is determined that at least a part of the camera area overlaps the entry prohibition area, the virtual camera control unit determines the camera area including the candidate position as the candidate position and the gaze point. The camera area may be set to a position after being moved out of the entry prohibition area until the camera area is adjacent to the entry prohibition area.

また、前記仮想カメラ制御手段は、前記進入禁止領域外へ移動した後の前記カメラ領域の境界と、該カメラ領域における前記候補位置及び前記注視点を結ぶ直線との交点のうち、該注視点から遠い方の交点を、前記視点の位置として決定するよう構成されていてもよい。   In addition, the virtual camera control means may determine from the gazing point among the intersections between the boundary of the camera area after moving out of the entry prohibition area and the straight line connecting the candidate position and the gazing point in the camera area. A distant intersection may be determined as the position of the viewpoint.

また、前記仮想カメラ制御手段は、前記候補位置を含む前記カメラ領域を、前記直線に沿って前記進入禁止領域外へ移動させた位置から更に所定距離だけ下方へ移動させた後の位置に設定するよう構成されていてもよい。   Further, the virtual camera control means sets the camera area including the candidate position to a position after moving further downward by a predetermined distance from a position moved outside the entry prohibition area along the straight line. It may be configured as follows.

また、カメラ領域は、前記候補位置を中心とする略球形状を成していてもよい。   The camera area may have a substantially spherical shape centered on the candidate position.

本発明に係るゲーム装置は、上述した何れかに記載のゲームプログラムを記録したプログラム記憶部、及び、該プログラム記憶部に記憶されたゲームプログラムを実行するコンピュータ、を備えるゲーム装置である。   A game device according to the present invention is a game device including a program storage unit that records the game program described above and a computer that executes the game program stored in the program storage unit.

本発明によれば、仮想カメラが障害物内に入り込んでしまうのを回避しつつ、仮想カメラによって極力広い視野を有する画像を撮影することができるゲームプログラム、及びゲーム装置を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the game program which can image | photograph the image which has a visual field as wide as possible with a virtual camera can be provided, avoiding that a virtual camera penetrates into an obstruction.

本発明の実施の形態に係るゲーム装置の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the game device which concerns on embodiment of this invention. ゲーム装置が備える制御部の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the control part with which a game device is provided. プレイヤキャラクタの移動に伴って仮想カメラの位置が変更される様子を側面視で示す模式図である。It is a schematic diagram which shows a mode that the position of a virtual camera is changed with the movement of a player character by a side view. プレイヤキャラクタに対して仮想カメラの上下方向位置が変更される様子を側面視で示す模式図である。It is a schematic diagram which shows a mode that the vertical direction position of a virtual camera is changed with respect to a player character in a side view. プレイヤキャラクタ回りに仮想カメラの位置が変更される様子を平面視で示す模式図である。It is a schematic diagram which shows a mode that the position of a virtual camera is changed around a player character in planar view. フレーム毎に実行される処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the process performed for every flame | frame. 図6に示すカメラ処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the camera process shown in FIG. 実施の形態1に係るカメラ位置補正処理の態様を示す模式図である。FIG. 6 is a schematic diagram illustrating a camera position correction process according to the first embodiment. 実施の形態1に係るカメラ位置補正処理の流れを示すフローチャートである。4 is a flowchart showing a flow of camera position correction processing according to the first embodiment. 実施の形態2に係るカメラ位置補正処理の態様を示す模式図である。FIG. 10 is a schematic diagram illustrating an aspect of camera position correction processing according to Embodiment 2. 実施の形態2に係るカメラ位置補正処理の流れを示すフローチャートである。10 is a flowchart showing a flow of camera position correction processing according to the second embodiment. 図11のステップS32の処理を説明するための模式図である。It is a schematic diagram for demonstrating the process of step S32 of FIG. 図12に示すカメラ領域の移動処理の流れを示すフローチャートである。13 is a flowchart illustrating a flow of a camera area movement process illustrated in FIG. 12. 実施の形態3に係るカメラ位置補正処理を説明するための模式図である。10 is a schematic diagram for explaining a camera position correction process according to Embodiment 3. FIG. 実施の形態4に係るカメラ位置補正処理を説明するための模式図である。10 is a schematic diagram for explaining camera position correction processing according to Embodiment 4. FIG.

以下、本発明の実施の形態に係るゲームプログラム、記憶媒体、及びゲーム装置について、図面を参照しつつ説明する。なお本実施の形態に係るゲームプログラムにより実現されるゲームは、いわゆるハンティングアクションゲームであって、プレイヤによる所定操作により、プレイヤキャラクタを仮想ゲーム空間内で行動させ、モンスター等の敵キャラクタを討伐するミッションを遂行するものを例示する。   Hereinafter, a game program, a storage medium, and a game device according to embodiments of the present invention will be described with reference to the drawings. The game realized by the game program according to the present embodiment is a so-called hunting action game, in which a player character is caused to act in a virtual game space by a predetermined operation by a player, and a mission for subjugating enemy characters such as monsters. Illustrate what accomplishes.

[ハードウェアの構成]
図1は、本発明の実施の形態に係るゲーム装置1の内部構成を示すブロック図である。図1に示すようにゲーム装置1は制御部30を備えており、該制御部30にはCPU11、描画データ生成プロセッサ12、RAM(Random Access Memory)13、ROM(Read Only Memory)14、描画処理プロセッサ15、及び音声処理プロセッサ18が含まれている。更にゲーム装置1は、この他にもVRAM(Video-RAM)16、アンプ19、スピーカ20、イヤホン端子21、操作部22、メディアインタフェース23、無線LANモジュール24、及びバス25を備えている。そして、これらのうちCPU11、描画データ生成プロセッサ12、RAM13、ROM14、描画処理プロセッサ15、音声処理プロセッサ18、操作部22、メディアインタフェース23、及び無線LANモジュール24が、バス25によって相互にデータ伝送可能に接続されている。
[Hardware configuration]
FIG. 1 is a block diagram showing an internal configuration of game device 1 according to the embodiment of the present invention. As shown in FIG. 1, the game apparatus 1 includes a control unit 30. The control unit 30 includes a CPU 11, a drawing data generation processor 12, a RAM (Random Access Memory) 13, a ROM (Read Only Memory) 14, and a drawing process. A processor 15 and an audio processor 18 are included. The game apparatus 1 further includes a VRAM (Video-RAM) 16, an amplifier 19, a speaker 20, an earphone terminal 21, an operation unit 22, a media interface 23, a wireless LAN module 24, and a bus 25. Of these, the CPU 11, the drawing data generation processor 12, the RAM 13, the ROM 14, the drawing processing processor 15, the voice processing processor 18, the operation unit 22, the media interface 23, and the wireless LAN module 24 can mutually transmit data via the bus 25. It is connected to the.

操作部22は、方向キー及びその他のボタン群(図示せず)を含んでおり、プレイヤの操作を受け付けて、その操作内容に応じた操作信号をCPU11に入力する。また、方向キー及びボタン群が有する各種のボタンは、プレイヤキャラクタの特定の動作を指示するための操作子である。また、操作部22には、これら操作子以外にゲーム機1の電源の入/切を行うための電源スイッチ等が含まれる。   The operation unit 22 includes direction keys and other button groups (not shown), receives an operation by the player, and inputs an operation signal corresponding to the operation content to the CPU 11. In addition, various buttons included in the direction key and the button group are operators for instructing a specific action of the player character. The operation unit 22 includes a power switch for turning on / off the game machine 1 in addition to these operators.

メディアインタフェース23は、図示しないメディア装着部にセットされたゲームメディア5にアクセスしてゲームプログラム5a及びゲームデータ5bを読み出す。このうちゲームプログラム5aは、上述したアクションゲームをゲーム装置1に実行させるものである。また、ゲームデータ5bには、上記ゲームを実行する上で必要なデータとして、キャラクタや背景の画像データ、ステータスなどの情報表示用の画像データ、効果音やBGMなどの音声データ、文字や記号によるメッセージデータ等が含まれている。なお、記憶媒体であるゲームメディア5は、半導体メモリのほか、光ディスクの一種であるUMD(Universal Media Disc)(登録商標)を採用することができる。   The media interface 23 accesses the game media 5 set in a media mounting unit (not shown) and reads the game program 5a and the game data 5b. Among these, the game program 5a causes the game apparatus 1 to execute the above-described action game. The game data 5b includes data necessary for executing the game, such as character and background image data, image data for displaying information such as status, sound data such as sound effects and BGM, characters and symbols. Message data etc. are included. Note that the game media 5 that is a storage medium may employ UMD (Universal Media Disc) (registered trademark), which is a kind of optical disc, in addition to a semiconductor memory.

RAM13には、ゲームの進行に応じてゲームメディア5から読み込まれたゲームプログラム5a及びゲームデータ5bを格納するロードエリア、並びに、CPU11がゲームプログラム5aを処理する際に使用するためのワークエリアが設定されている。ROM14には、ディスクローディング機能などのゲーム装置1の基本的機能や、ゲームメディア5に記憶されているゲームプログラム5a及びゲームデータ5bの読み出し処理を制御する基本プログラムが記憶されている。   In the RAM 13, a load area for storing the game program 5a and game data 5b read from the game media 5 according to the progress of the game, and a work area for use when the CPU 11 processes the game program 5a are set. Has been. The ROM 14 stores a basic function of the game apparatus 1 such as a disk loading function, and a basic program for controlling the reading process of the game program 5a and game data 5b stored in the game media 5.

CPU11は、ゲームメディア5に記録されているゲームプログラム5a及びゲームデータ5bの全部または一部を、メディアインタフェース23を通じてRAM13に読み込み、プレイヤによる操作部22の操作に応じてこれを実行し、ゲーム進行を制御する。より具体的には、プレイヤに操作されることによって操作部22から操作信号が入力されると、CPU11は、ゲームプログラム5aに従ってその操作信号に対応する所定のゲーム進行処理を行い、その処理結果を、ゲーム進行を示す画像(以下、「ゲーム画像」とも称する)としてディスプレイ2に表示すると共に、ゲーム進行を示す音声信号(以下、「ゲーム音声」とも称する)をスピーカ20やイヤホン端子21に出力する。   The CPU 11 reads all or part of the game program 5a and game data 5b recorded in the game media 5 into the RAM 13 through the media interface 23, and executes them in accordance with the operation of the operation unit 22 by the player. To control. More specifically, when an operation signal is input from the operation unit 22 by being operated by the player, the CPU 11 performs a predetermined game progress process corresponding to the operation signal in accordance with the game program 5a, and displays the processing result. In addition, an image indicating the progress of the game (hereinafter also referred to as “game image”) is displayed on the display 2, and an audio signal indicating the progress of the game (hereinafter also referred to as “game sound”) is output to the speaker 20 and the earphone terminal 21. .

上記ゲーム画像の描画は、CPU11の指示により、描画処理プロセッサ15が行う。即ち、CPU11は、操作部22から入力される操作信号に基づき、ディスプレイ2に表示すべきゲーム画像の内容を決定し、その内容に対して必要な描画データを描画データ生成プロセッサ12に生成させる。そして、その描画データを描画処理プロセッサ15に転送して描画処理を行わせる。描画処理プロセッサ15は、描画データに基づいて1/60秒毎にゲーム画像を生成し、生成したゲーム画像をVRAM16に書き込む。ディスプレイ2は、半透過型カラー液晶ディスプレイとバックライトLED(Light Emitting Diode)とを有し、VRAM16に書き込まれたゲーム画像を表示する。   Drawing of the game image is performed by the drawing processor 15 in accordance with an instruction from the CPU 11. That is, the CPU 11 determines the content of the game image to be displayed on the display 2 based on the operation signal input from the operation unit 22 and causes the drawing data generation processor 12 to generate necessary drawing data for the content. Then, the drawing data is transferred to the drawing processor 15 to perform drawing processing. The drawing processor 15 generates a game image every 1/60 seconds based on the drawing data, and writes the generated game image in the VRAM 16. The display 2 has a transflective color liquid crystal display and a backlight LED (Light Emitting Diode), and displays a game image written in the VRAM 16.

また、CPU11は、ゲームの進行に応じて、スピーカ20から出力すべき効果音やBGM等の音声を決定し、その音声を発音するための音声データをRAM13から読み出して音声処理プロセッサ18に入力する。即ち、CPU11は、ゲームの進行に伴って発音イベントが発生すると、その発音イベントに応じた音声データ(ゲームメディア5からロードされた音声データ)をRAM13から読み出して音声処理プロセッサ18に入力する。音声処理プロセッサ18は、DSP(Digital Signal Processor)で構成されており、CPU11によって入力された音声データに対して所定の効果(例えば、リバーブ、コーラスなど)を付与したのちアナログ信号に変換して、アンプ19に出力する。アンプ19は、音声処理プロセッサ18から入力された音声信号を増幅したのち、スピーカ20及びイヤホン端子21に出力する。   Further, the CPU 11 determines sound effects such as sound effects and BGM to be output from the speaker 20 in accordance with the progress of the game, reads out sound data for generating the sound from the RAM 13 and inputs the sound data to the sound processor 18. . That is, when a sound generation event occurs with the progress of the game, the CPU 11 reads out sound data corresponding to the sound generation event (voice data loaded from the game media 5) from the RAM 13 and inputs it to the sound processing processor 18. The audio processor 18 is constituted by a DSP (Digital Signal Processor), and after giving a predetermined effect (for example, reverb, chorus, etc.) to the audio data input by the CPU 11, it is converted into an analog signal, Output to the amplifier 19. The amplifier 19 amplifies the audio signal input from the audio processor 18 and then outputs it to the speaker 20 and the earphone terminal 21.

無線LANモジュール24は、通信規格IEEE802.11b(使用周波数帯2.4GHz、通信速度11Mbps)に準拠した無線LANによって他のゲーム装置1とデータ通信を行い、ネットワークを構成するための通信モジュールである。   The wireless LAN module 24 is a communication module for configuring a network by performing data communication with another game device 1 through a wireless LAN compliant with the communication standard IEEE802.11b (used frequency band 2.4 GHz, communication speed 11 Mbps). .

[制御部の機能的構成]
図2は、ゲーム装置1が備える制御部30の機能的な構成を示すブロック図である。制御部30は、ゲームメディア5から読み込んだゲームプログラム5a及びゲームデータ5bを実行することにより、ゲーム空間生成手段31,キャラクタ制御手段32,仮想カメラ制御手段33,禁止領域重複判定手段34などの機能を発揮する。
[Functional configuration of control unit]
FIG. 2 is a block diagram illustrating a functional configuration of the control unit 30 included in the game apparatus 1. The control unit 30 executes the game program 5a and the game data 5b read from the game media 5, and thereby functions such as a game space generation unit 31, a character control unit 32, a virtual camera control unit 33, and a prohibited area duplication determination unit 34. Demonstrate.

ゲーム空間生成手段31は、プレイヤキャラクタC1が行動する仮想ゲーム空間40(図3参照)を生成するものである。本実施の形態に係る仮想ゲーム空間40は、所定の三次元的な広がりを有する仮想的なゲーム空間として設定されており、プレイヤキャラクタC1が移動可能になっている。仮想ゲーム空間40としては、例えば地面41上の空間があるが、これに限られず、水中や空中を含んでいてもよい。   The game space generation means 31 generates a virtual game space 40 (see FIG. 3) in which the player character C1 acts. The virtual game space 40 according to the present embodiment is set as a virtual game space having a predetermined three-dimensional extent, and the player character C1 can move. The virtual game space 40 includes, for example, a space on the ground 41, but is not limited to this, and may include underwater or air.

キャラクタ制御手段32は、仮想ゲーム空間40におけるプレイヤキャラクタC1及び敵キャラクタを含む様々のキャラクタの動作を制御する。なお、このプレイヤキャラクタC1とは、プレイヤが操作部22を操作することによって、仮想ゲーム空間40内での動作を直接的に制御することができるキャラクタであり、本ゲームではこのプレイヤキャラクタC1がハンターとなって敵キャラクタを討伐する。但し、プレイヤが操作する対象はプレイヤキャラクタC1などの人型のオブジェクトに限られず、例えば車両や航空機などのオブジェクトであってもよい。また、敵キャラクタとは、プレイヤによる操作部22の操作によっては直接的に動作を制御することができず、状況に応じてCPU11がその動作を制御するノンプレイヤキャラクタである。   The character control means 32 controls the actions of various characters including the player character C1 and the enemy character in the virtual game space 40. The player character C1 is a character that can directly control the movement in the virtual game space 40 when the player operates the operation unit 22. In this game, the player character C1 is a hunter. And subjugate enemy characters. However, the target operated by the player is not limited to a human-type object such as the player character C1, and may be an object such as a vehicle or an aircraft. The enemy character is a non-player character whose movement cannot be directly controlled by the operation of the operation unit 22 by the player, and the CPU 11 controls the movement according to the situation.

仮想カメラ制御手段33は、仮想ゲーム空間40内に配置された仮想カメラCa(図3参照)の位置及び向きを制御する。該仮想カメラCaは、プレイヤキャラクタC1及び敵キャラクタを含む仮想ゲーム空間40の様子を撮影するものであり、撮影された画像(仮想ゲーム空間40を透視変換して二次元化した画像)は、ゲーム装置1のディスプレイ2に出力(表示)される。仮想カメラ制御手段33は、仮想カメラCa(視点)の位置および向きを、プレイヤキャラクタC1の少なくとも一部が撮影範囲に含まれるように、かつ、
プレイヤキャラクタC1を追従するように制御する。また、仮想カメラ制御手段33は、仮想カメラCaの位置および向きを、プレイヤによる操作部22を介してのカメラ操作(カメラの移動指示)に基づいても制御する(図4,5参照)。具体的には、仮想カメラ制御手段33は、仮想カメラCaの位置の変更先(更新先)の候補である候補位置を決定する「カメラ候補位置決定処理」を行い、更にこれに加えて、所定の場合には「カメラ位置補正処理」を行った上で、仮想カメラCaの位置を決定する。
The virtual camera control means 33 controls the position and orientation of the virtual camera Ca (see FIG. 3) arranged in the virtual game space 40. The virtual camera Ca captures the state of the virtual game space 40 including the player character C1 and the enemy character, and the captured image (the image that is two-dimensionalized through perspective transformation of the virtual game space 40) is a game. It is output (displayed) on the display 2 of the apparatus 1. The virtual camera control means 33 sets the position and orientation of the virtual camera Ca (viewpoint) so that at least a part of the player character C1 is included in the shooting range, and
Control is performed so as to follow the player character C1. The virtual camera control means 33 also controls the position and orientation of the virtual camera Ca based on a camera operation (camera movement instruction) via the operation unit 22 by the player (see FIGS. 4 and 5). Specifically, the virtual camera control means 33 performs a “camera candidate position determination process” for determining a candidate position that is a candidate for a change destination (update destination) of the position of the virtual camera Ca. In this case, after performing “camera position correction processing”, the position of the virtual camera Ca is determined.

ここで、仮想カメラの構成と、仮想カメラ制御手段33が行う「カメラ候補位置決定処理」とについて、図3〜図5を参照して説明する。なお、「カメラ位置補正処理」については、図8〜図15を用いて後に別途詳述する。   Here, the configuration of the virtual camera and the “camera candidate position determination process” performed by the virtual camera control means 33 will be described with reference to FIGS. The “camera position correction process” will be described later in detail with reference to FIGS.

図3〜図5は、仮想カメラCaに対するカメラ候補位置決定処理を説明すべく、仮想ゲーム空間40内に位置するプレイヤキャラクタC1及び仮想カメラCaを示す模式図である。このうち図3は、プレイヤキャラクタC1の移動に伴って仮想カメラCaの位置が変更(更新)される様子を側面視で示している。また、図4は、プレイヤが仮想カメラCaを移動させる操作をした場合に、停止しているプレイヤキャラクタC1に対して仮想カメラCaの上下方向位置が変更される様子を側面視で示している。図5は、プレイヤが仮想カメラCaを移動させる操作をした場合に、停止しているプレイヤキャラクタC1の回りに仮想カメラCaの位置が変更される様子を平面視で示している。   3 to 5 are schematic diagrams showing the player character C1 and the virtual camera Ca located in the virtual game space 40 in order to explain the camera candidate position determination process for the virtual camera Ca. Among these, FIG. 3 shows a side view of how the position of the virtual camera Ca is changed (updated) in accordance with the movement of the player character C1. FIG. 4 shows a side view of how the vertical position of the virtual camera Ca is changed with respect to the stopped player character C1 when the player performs an operation of moving the virtual camera Ca. FIG. 5 is a plan view showing a state in which the position of the virtual camera Ca is changed around the player character C1 that is stopped when the player performs an operation of moving the virtual camera Ca.

なお、図3〜図5は何れも、平坦な地面41上に切り立った崖が障害物(進入禁止領域)42として存在する仮想ゲーム空間40において、地面41上にプレイヤキャラクタC1が位置している様子を例示している。この地面41は、プレイヤキャラクタC1及び仮想カメラCaの何れもが移動可能な領域として設定されている(以下、「地面41」を適宜「移動可能領域41」とも称する)。また、障害物42は、プレイヤキャラクタC1及び仮想カメラCaの何れの進入も禁止される進入禁止領域として設定されている(以下、「障害物42」を適宜「進入禁止領域42」とも称する)。例えば切り立った崖の内方から仮想ゲーム空間40を撮影したような画像は、プレイヤに違和感を覚えさせる可能性があるため、仮想カメラCaがこのような画像を撮影することがないようにするのが好ましい。そのため、図3に示すように、仮想ゲーム空間40内には仮想カメラCaを進入させて撮影させるのを禁止する領域として、進入禁止領域42が設定されている。   3 to 5, the player character C <b> 1 is located on the ground 41 in the virtual game space 40 in which a cliff standing on the flat ground 41 exists as an obstacle (prohibited entry area) 42. The situation is illustrated. The ground 41 is set as an area where both the player character C1 and the virtual camera Ca can move (hereinafter, the “ground 41” is also referred to as “movable area 41” as appropriate). The obstacle 42 is set as an entry prohibition area where entry of either the player character C1 or the virtual camera Ca is prohibited (hereinafter, the “obstacle 42” is also referred to as an “entry prohibition area 42” as appropriate). For example, an image obtained by photographing the virtual game space 40 from the inside of a steep cliff may cause the player to feel uncomfortable, so that the virtual camera Ca does not photograph such an image. Is preferred. Therefore, as shown in FIG. 3, an entry prohibition area 42 is set in the virtual game space 40 as an area that prohibits the virtual camera Ca from entering and shooting.

移動可能領域41としては平坦な地面に限られず、所定の傾斜面を成す地面なども含まれる。また、進入禁止領域42としては切り立った崖に限られず、巨大な岩石や建物の壁などであってもよく、又は敵キャラクタ等の他のキャラクタであってもよい。また、移動可能領域及41及び進入禁止領域42は何れも、プレイヤキャラクタC1及び仮想カメラCaの夫々に対して別個に設定してもよい。更に、本実施の形態では、障害物42をプレイヤによって視認可能な所定の外観形状を有するオブジェクトとして描画し、進入禁止領域を当該障害物42の外観形状と同一領域に設定しているが、これに限られない。即ち、障害物42の外観形状と一致しない領域として、例えば障害物42より若干大きく又は小さく、進入禁止領域を設定してもよい。   The movable area 41 is not limited to a flat ground surface, but also includes a ground surface having a predetermined inclined surface. Further, the entry prohibition area 42 is not limited to a steep cliff, and may be a huge rock, a building wall, or another character such as an enemy character. Further, both the movable area 41 and the entry prohibition area 42 may be set separately for the player character C1 and the virtual camera Ca. Furthermore, in this embodiment, the obstacle 42 is drawn as an object having a predetermined appearance shape that can be visually recognized by the player, and the entry prohibition area is set to the same area as the appearance shape of the obstacle 42. Not limited to. That is, the entry prohibition region may be set as a region that does not match the appearance shape of the obstacle 42, for example, slightly larger or smaller than the obstacle 42.

次に、図3を参照して、まずは仮想カメラCaの構成(設定内容)について説明する。本ゲームにおいて仮想カメラCaは、視点51と、該視点51を含むように設定されたカメラ領域50とを有している。このうち視点51は、文字通り仮想カメラCaの視点であって、仮想カメラCaはこの視点51から仮想ゲーム空間40を撮影するように設定されている。カメラ領域50は、仮想カメラCaが障害物(進入禁止領域)42と重複するか否かの判定(いわゆる、「衝突判定」)を行う際に用いられる領域であり、本実施の形態では所定の半径rを有する球形状の領域として設定されている。   Next, the configuration (setting contents) of the virtual camera Ca will be described with reference to FIG. In this game, the virtual camera Ca has a viewpoint 51 and a camera area 50 set to include the viewpoint 51. Of these, the viewpoint 51 is literally the viewpoint of the virtual camera Ca, and the virtual camera Ca is set to shoot the virtual game space 40 from this viewpoint 51. The camera area 50 is an area used when determining whether or not the virtual camera Ca overlaps the obstacle (prohibition area) 42 (so-called “collision determination”). In the present embodiment, the camera area 50 is a predetermined area. It is set as a spherical region having a radius r.

また、図3において位置100にいるプレイヤキャラクタC1に対応する仮想カメラCaのように、カメラ領域50が進入禁止領域41から離れて位置している状態(以下、「離隔状態」ともいう)では、球形状のカメラ領域50は、視点51が中心50aとなるように設定されている。但し、離隔状態における視点51の位置を、カメラ領域50内において中心50a以外の位置に設定してもよい。また、カメラ領域50は球形状に限られず、多角形状など他の形状であってもよく、この場合にはその領域内の適宜位置に視点51を設定することができる。   In the state where the camera area 50 is located away from the entry prohibition area 41 (hereinafter, also referred to as “separated state”) like the virtual camera Ca corresponding to the player character C1 at the position 100 in FIG. The spherical camera region 50 is set so that the viewpoint 51 is the center 50a. However, the position of the viewpoint 51 in the separated state may be set to a position other than the center 50 a in the camera region 50. The camera area 50 is not limited to a spherical shape, and may be another shape such as a polygonal shape. In this case, the viewpoint 51 can be set at an appropriate position in the area.

仮想カメラCaの視点51は、プレイヤキャラクタC1を基準とする所定位置に設けられた注視点Xを基準とし、所定の位置に配置されている。即ち、本実施の形態では、地面41に対するプレイヤキャラクタC1の原点座標となる接地点Xから、プレイヤキャラクタC1の設定身長より高い所定の高さHの位置に注視点Xが設けられている。そして、注視点Xを通る水平線に対して所定の角度(仰角)A3を成し、且つ注視点Xから距離Rだけ離れた点XC3が、視点51の高さの初期位置として設定されている。また、水平方向に関しては、プレイヤキャラクタC1の背後(即ち、プレイヤキャラクタC1の視線の方向とは反対の方向)に視点51の初期位置が設定されている。すなわち、視点51は、プレイヤキャラクタC1の背後の斜め上方の所定距離離れた位置から、プレイヤキャラクタC1を基準にして設けられた注視点Xを向くように、初期位置が設定されている。図3では、プレイヤキャラクタC1の視線の方向(向き)を、プレイヤキャラクタC1を示すイラストに付した矢印の向きによって示している(図4,図5でも同様)。 Viewpoint 51 of the virtual camera Ca is the gazing point X A provided at a predetermined position relative to the player character C1 as a reference, it is placed in a predetermined position. That is, in this embodiment, the ground point X B that the origin position of the player character C1 with respect to the ground 41, the fixation point X A is provided at a position of a predetermined height H above the set height of the player character C1 . Then, at an angle (elevation angle) A3 with respect to the horizontal line passing through the fixation point X A, and the distance R apart points X C3 from the fixation point X A is set as the initial position of the height of the viewpoint 51 ing. Regarding the horizontal direction, the initial position of the viewpoint 51 is set behind the player character C1 (that is, the direction opposite to the direction of the line of sight of the player character C1). That is, the viewpoint 51, from a position a predetermined distance apart of obliquely upward behind the player character C1, so that faces the gaze point X A provided based on the player character C1, the initial position is set. In FIG. 3, the direction (orientation) of the line of sight of the player character C1 is indicated by the direction of the arrow attached to the illustration showing the player character C1 (the same applies to FIGS. 4 and 5).

なお、上述したようにカメラ領域50が進入禁止領域42から離れた離隔状態のときは、視点51はカメラ領域50の中心50aに位置しているが、カメラ領域50の少なくとも一部が進入禁止領域42と重複することで後述の「カメラ位置補正処理」が行われた場合には、上記にかかわらず、視点51はカメラ領域50内にて中心50aとは異なる位置に設定されることになる(詳しくは後述する)。そして、視点51が何れに位置する場合であっても、仮想カメラ制御手段33は、視点51を通って該視点51の向きに沿った軸線、即ち視軸52が、常に注視点Xを通るように制御している。 As described above, when the camera area 50 is separated from the entry prohibition area 42, the viewpoint 51 is located at the center 50 a of the camera area 50, but at least a part of the camera area 50 is an entry prohibition area. When the “camera position correction process” to be described later is performed by overlapping with 42, the viewpoint 51 is set at a position different from the center 50a in the camera area 50, regardless of the above. Details will be described later). Then, even if the viewpoint 51 is located in any virtual camera control means 33, the axis along the direction of the visual point 51 through the viewpoint 51, i.e. the visual axis 52 is always passing through the fixation point X B So that it is controlled.

次に、図3を参照して、仮想カメラ制御手段33が行う「カメラ候補位置決定処理」について、プレイヤキャラクタC1と共に移動するように仮想カメラCaの位置を変更する場合を例にして説明する。なお、この「カメラ候補位置決定処理」は、仮想カメラCaを移動させる際に、その視点51の位置の変更先の候補となる位置を決定する処理である。図3に示すように、プレイヤキャラクタC1が、位置100から、カメラ領域50が障害物42に重複しない位置101へ移動した場合、注視点Xは、プレイヤキャラクタC1が移動するのに伴って、接地点Xからの高さHを維持しつつ水平に移動する。そして、注視点Xの移動に伴って、上述した距離R,角度A3,及びプレイヤキャラクタC1の向きに対する水平位置を維持することで、注視点Xに対する相対位置を保って追従するように視点51を移動させた点を候補位置として決定し、その位置(座標)を取得することにより「カメラ候補位置決定処理」を終了する。 Next, the “camera candidate position determination process” performed by the virtual camera control unit 33 will be described with reference to FIG. 3 taking as an example a case where the position of the virtual camera Ca is changed so as to move together with the player character C1. The “camera candidate position determination process” is a process for determining a position that is a candidate for a change destination of the position of the viewpoint 51 when the virtual camera Ca is moved. As shown in FIG. 3, the player character C1 is, from the position 100, if the camera region 50 is moved to a position 101 which does not overlap with the obstacle 42, the fixation point X A is, as the player character C1 is moved, It moves horizontally while maintaining a height H from the ground point X B. Then, with the movement of the gazing point X A, the distance R as described above, the angle A3, and to maintain the horizontal position with respect to the direction of the player character C1, viewpoint to follow while maintaining the relative position with respect to the fixation point X A The point to which 51 is moved is determined as a candidate position, and the position (coordinates) is acquired to complete the “camera candidate position determination process”.

なお、上記のように、位置100から、カメラ領域50が障害物42と重複しない位置101へ、プレイヤキャラクタC1が移動する場合には、この候補位置に視点51の位置を変更し、該視点51を中心50aとするカメラ領域50を設定することで、仮想カメラCaの位置の変更が完了することとなる。従って、プレイヤが操作部22を操作してプレイヤキャラクタC1を移動させると、仮想カメラCaの位置もこれに追従して更新されるため、移動中のプレイヤキャラクタC1を含む仮想ゲーム空間40内の様子をディスプレイ2に表示させることができる。   As described above, when the player character C1 moves from the position 100 to the position 101 where the camera area 50 does not overlap the obstacle 42, the position of the viewpoint 51 is changed to this candidate position, and the viewpoint 51 By setting the camera region 50 with the center 50a as the center, the change of the position of the virtual camera Ca is completed. Accordingly, when the player operates the operation unit 22 to move the player character C1, the position of the virtual camera Ca is also updated following this, so that the state in the virtual game space 40 including the moving player character C1. Can be displayed on the display 2.

一方、プレイヤキャラクタC1が更に移動し、位置101から位置102へ到達した場合、上記と同様にして決定した候補位置に視点51を変更すると、該視点51を中心50aとするカメラ領域50は障害物(進入禁止領域)42と重複することとなる。従って、この状況のまま、候補位置にある視点51から撮影された画像をディスプレイ2に表示させると、障害物42内から見た画像が表示される場合があり、不自然である。そこで、本ゲームでは、これを解消するために後述の「カメラ位置補正処理」を行う。なお、このように位置100から位置101へ、及び、位置101から位置102へのプレイヤキャラクタC1の移動に伴う仮想カメラCaの位置の変更は、プレイヤによる操作部22への操作によりプレイヤキャラクタC1が移動した場合に限らず、敵キャラクタからの攻撃をプレイヤキャラクタC1が受けることで注視点Xが移動した場合などにも生じる。 On the other hand, when the player character C1 further moves and reaches the position 102 from the position 101, when the viewpoint 51 is changed to the candidate position determined in the same manner as described above, the camera area 50 having the viewpoint 51 as the center 50a becomes an obstacle. (Entry prohibited area) 42 and overlap. Therefore, if an image taken from the viewpoint 51 at the candidate position is displayed on the display 2 in this situation, an image viewed from within the obstacle 42 may be displayed, which is unnatural. Therefore, in this game, “camera position correction processing” described later is performed to solve this problem. Note that the change of the position of the virtual camera Ca accompanying the movement of the player character C1 from the position 100 to the position 101 and from the position 101 to the position 102 is performed by the player character C1 by the operation of the operation unit 22 by the player. not only when moving, the fixation point X a attacks from the enemy character by the player character C1 is subjected also occurs in a case where moving.

次に、図4を参照して、仮想カメラ制御手段33が行う「カメラ候補位置決定処理」について、プレイヤキャラクタC1に対して仮想カメラCaの上下方向位置を変更する場合を例にして説明する。図4に示すように、仮想カメラCaの視点51は、注視点Xを中心として上述した距離Rを半径とする円周C上の所定の地点に位置することができるようになっている。即ち、円周C上であって、注視点Xを通る水平線に対して所定の角度A1〜A5を成す5つの点XC1〜XC5に、視点51を選択的に配置できるようになっている。ここで、図4では点XC1は水平線より下方に位置し、その他の点XC2〜XC5は水平線より上方に位置するものを例示しているが、これに限られない。また、選択できる位置の個数も図4に示す例(5つ)に限定されない。 Next, the “camera candidate position determination process” performed by the virtual camera control unit 33 will be described with reference to FIG. 4 as an example in which the vertical position of the virtual camera Ca is changed with respect to the player character C1. As shown in FIG. 4, the viewpoint 51 of the virtual camera Ca is adapted to be able to position at a predetermined point on the circumference C R to the distance R as described above around the gazing point X A and radius . In other words, a circumferentially C R, note the perspective X 5 a point X to a predetermined angle A1~A5 respect to the horizontal line passing through the A C1 to X C5, to be able to selectively position the viewpoint 51 ing. In FIG. 4, the point X C1 is located below the horizontal line and the other points X C2 to X C5 are located above the horizontal line. However, the present invention is not limited to this. Further, the number of positions that can be selected is not limited to the example (five) shown in FIG.

点XC1〜XC5のうち角度A3を成す点XC3は、上述した視点51の初期位置である。従って、本ゲームでは、この初期位置の点XC3を基準として、下方の2点(XC1,XC2)及び上方の2点(XC4,XC5)の合計5段階に、視点51の上下方向位置を変更可能になっている。また、各点XC1〜XC5は、一定の半径Rの円周C上に設定されている必要はなく、例えば、各点のうち何れか一又は複数の点について、注視点Xからの距離が他の点と異なっていてもよい。 Of the points X C1 to X C5 , the point X C3 forming the angle A3 is the initial position of the viewpoint 51 described above. Therefore, in this game, with reference to the point X C3 at the initial position, the lower and upper points of the viewpoint 51 are divided into five stages, ie , the lower two points (X C1 and X C2 ) and the upper two points (X C4 and X C5 ) The direction position can be changed. Moreover, each point X C1 to X C5 does not need to be set on the circumference C R of constant radius R, for example, any one or a plurality of points of each point, the gaze point X A May be different from other points.

仮想カメラCaの位置を上下方向に変更する態様について具体的に説明する。図4に示すように、点XC3に仮想カメラCaの視点51が位置している状況で、プレイヤによって操作部22に対し所定の操作が行われると、点XC3に隣接する点XC2,XC4のうち、プレイヤの操作に応じた何れか一方の点を候補位置として決定し、その位置(座標)を取得することにより「カメラ候補位置決定処理」を終了する。なお、決定された候補位置に視点51を設定した場合に、カメラ領域50が障害物42と重複しない場合には、該候補位置へ視点51の位置が変更される。図4では、上方の点XC4に位置が変更された場合を白抜きの矢印で示している。そして、変更後の視点51を中心50aとしてカメラ領域50が設定されると共に、視点51がプレイヤキャラクタC1上の注視点Xに向けられることで、仮想カメラCaの位置の変更が完了する。なお、視点51の位置は、プレイヤによる仮想カメラCaの操作及びプレイヤキャラクタC1の情報(位置及び向きなど)に基づいて求められ、視点51の向きは視点位置及びプレイヤキャラクタC1の情報(位置)に基づく注視点Xにより求められる。 A mode in which the position of the virtual camera Ca is changed in the vertical direction will be specifically described. Figure 4 As shown in, in a situation where the virtual camera Ca viewpoint 51 is located at the point X C3, when a predetermined operation is performed with respect to the operation section 22 by the player, X C2 point adjacent to the point X C3, among X C4, determined as a candidate position either one of the points corresponding to the operation of the player to end the "camera candidate position determining process" by obtaining the position (coordinates). When the viewpoint 51 is set at the determined candidate position and the camera area 50 does not overlap with the obstacle 42, the position of the viewpoint 51 is changed to the candidate position. In FIG. 4, a case where the position is changed to the upper point XC4 is indicated by a white arrow. Then, the camera region 50 around 50a viewpoint 51 after the change is set, that the viewpoint 51 is directed to the fixation point X A of the player character C1, changes the position of the virtual camera Ca is completed. Note that the position of the viewpoint 51 is obtained based on the operation of the virtual camera Ca by the player and information (position and orientation, etc.) of the player character C1, and the orientation of the viewpoint 51 is based on the viewpoint position and the information (position) of the player character C1. determined by the fixation point X A-based.

視点51が点XC2にある場合も同様に、プレイヤの操作に応じて隣接する点XC1,XC3の何れか一方の点が候補位置として決定され、視点51が点XC4にある場合も同様に、プレイヤの操作に応じて隣接する点XC3,XC5の何れか一方の点が候補位置として決定される。そして、決定された候補位置に視点51を設定した場合に、カメラ領域50が障害物42と重複しない場合には、この候補位置に視点51の位置が変更される。更に、視点51が最下方の点XC1にある場合は、直上の点XC2が候補位置とされ、最上方の点XC5にある場合は、直下の点XC4が候補位置とされる。そして、これらの場合も、決定された候補位置に視点51を設定した場合に、カメラ領域50が障害物42と重複しない場合には、その候補位置に視点51の位置が変更され、該視点51を中心50aとしてカメラ領域50が設定されると共に、視点51が注視点Xに向けられることで、仮想カメラCaの位置の変更が完了する。 Similarly, when the viewpoint 51 is at the point X C2 , either one of the adjacent points X C1 and X C3 is determined as a candidate position according to the player's operation, and the viewpoint 51 is at the point X C4. Similarly, one of the adjacent points X C3 and X C5 is determined as a candidate position in accordance with the player's operation. When the viewpoint 51 is set at the determined candidate position and the camera area 50 does not overlap the obstacle 42, the position of the viewpoint 51 is changed to this candidate position. Further, when the viewpoint 51 is at the lowermost point X C1 , the point X C2 immediately above is set as the candidate position, and when it is at the uppermost point X C5 , the point X C4 immediately below is set as the candidate position. In these cases as well, when the viewpoint 51 is set at the determined candidate position, if the camera area 50 does not overlap the obstacle 42, the position of the viewpoint 51 is changed to the candidate position. with camera region 50 is set as the center 50a and that viewpoint 51 is directed to the fixation point X a, changing the position of the virtual camera Ca is completed.

従って、プレイヤは、操作部22を操作することによって仮想カメラCaの上下方向の位置を変更することができ、これに伴って視点51の向き(撮影角度)を変更することができる。そして、最下方の点XC1に近づくほど視点51は地面41に近づくと共に仰角が大きくなり、プレイヤキャラクタC1を下方から見上げるような画像が撮影される。逆に、最上方の点XC5に近づくほど視点51は地面から遠ざかって俯角が大きくなり、プレイヤキャラクタC1を上方から見下ろすような画像が撮影される。なお、このような仮想カメラCaの上下方向の位置の変更は、プレイヤキャラクタC1の移動中にも行うことができる。この場合には、図3を参照して説明した、プレイヤキャラクタC1の移動方向への仮想カメラCaの位置の変更と共に、上下方向の位置の変更を行う。 Therefore, the player can change the vertical position of the virtual camera Ca by operating the operation unit 22, and can change the orientation (shooting angle) of the viewpoint 51 accordingly. The closer the point X C1 is to the lowermost point, the closer the viewpoint 51 is to the ground 41 and the larger the elevation angle, and an image is taken that looks up at the player character C1 from below. On the contrary, the closer the point XC5 is to the uppermost point, the farther the viewpoint 51 is from the ground and the depression angle becomes larger, and an image is taken that looks down on the player character C1 from above. Note that such a change in the vertical position of the virtual camera Ca can also be performed while the player character C1 is moving. In this case, the position in the vertical direction is changed together with the change in the position of the virtual camera Ca in the moving direction of the player character C1 described with reference to FIG.

一方、図4に示すように、点XC3に視点51が位置する仮想カメラCaの近傍に障害物(進入禁止領域)42が存在する場合、仮想カメラCaを更に下方へ位置させるような操作がプレイヤによって行われると、点XC2が候補位置に設定されるが、この候補位置に視点51の位置を変更すると、更新後の視点51を中心50aとするカメラ領域50は障害物42と重複することとなる。従って、本ゲームでは、この場合にも後述の「カメラ位置補正処理」を行う。 On the other hand, as shown in FIG. 4, when there is an obstacle (prohibition area) 42 in the vicinity of the virtual camera Ca where the viewpoint 51 is located at the point XC3 , an operation for positioning the virtual camera Ca further downward is performed. When performed by the player, the point XC2 is set as a candidate position. When the position of the viewpoint 51 is changed to this candidate position, the camera area 50 centered on the updated viewpoint 51 and the center 50a overlaps the obstacle 42. It will be. Accordingly, in this game, the “camera position correction process” described later is also performed in this case.

次に、図5を参照して、仮想カメラ制御手段33が行う「カメラ候補位置決定処理」について、プレイヤキャラクタC1の回りに仮想カメラCaの位置を変更する場合を例にして説明する。図5に示すように、仮想カメラCaは、注視点Xを中心として所定の距離Rを半径とする円周C上の任意の地点に視点51を位置させることができるようになっている。この半径Rは、上述した仮想カメラCaの上下位置を定める角度A1〜A5によって特定され、具体的には、各角度での注視点Xと視点51とを結ぶ線分を、平面上(例えば、地面41上)に投影したときにできる線分の長さ寸法となっている。なお、図5の説明では便宜上、仮想カメラCaの視点51の上下位置が図4の点XC3にある場合を例とする。 Next, the “camera candidate position determination process” performed by the virtual camera control unit 33 will be described with reference to FIG. 5 taking as an example the case where the position of the virtual camera Ca is changed around the player character C1. As shown in FIG. 5, the virtual camera Ca can position the viewpoint 51 at an arbitrary point on the circumference C X with the predetermined distance R X as the radius around the gazing point X A. Yes. The radius R X, identified by angle A1~A5 defining the vertical position of the virtual camera Ca described above, specifically, a line segment connecting the gazing point X A and the viewpoint 51 at each angular, plane ( For example, it is the length dimension of a line segment formed when projected onto the ground 41). Incidentally, in the description of FIG. 5 for convenience, the vertical position of the virtual camera Ca viewpoint 51 as an example a case in point X C3 in FIG.

図5に示すように、円周C上の点XC31(初期位置)に仮想カメラCaの視点51が位置している状況で、プレイヤが操作部22に対して所定の操作を行うと、該操作に応じて仮想カメラCaは円周C上を移動させることができる。例えば、操作部22に含まれる十字ボタンの左右何れかが押圧操作されると、十字ボタンが操作されている方向に対応する方向へ円周Cに沿って移動した点を候補位置として決定し、その位置(座標)を取得することにより「カメラ候補位置決定処理」を終了する。そして、決定された候補位置に視点51を設定した場合に、カメラ領域50が障害物42と重複しない場合には、この候補位置に視点51の位置が変更される。位置が変更された結果、視点51が地点XC32に位置していたとすると、そこでの視点51を中心50aとしてカメラ領域50が設定されると共に、該視点51が注視点Xに向けられることで、仮想カメラCaの位置の変更が完了する。なお、仮想カメラCaの視点51の上下位置が、図4に示す他の点XC1,XC2,XC4,XC5にある場合も同様である。 As shown in FIG. 5, when the player performs a predetermined operation on the operation unit 22 in a situation where the viewpoint 51 of the virtual camera Ca is located at a point X C31 (initial position) on the circumference C X , In response to the operation, the virtual camera Ca can be moved on the circumference CX . For example, when either the left or right of the cross button included in the operation unit 22 is pressed, a point moved along the circumference C X in a direction corresponding to the direction in which the cross button is operated is determined as a candidate position. Then, the “camera candidate position determination process” is completed by acquiring the position (coordinates). When the viewpoint 51 is set at the determined candidate position and the camera area 50 does not overlap the obstacle 42, the position of the viewpoint 51 is changed to this candidate position. Results position is changed, if the viewpoint 51 is located at a point X C32, with the camera region 50 is set as the center 50a viewpoint 51 therein, by convergent point 51 is directed to the fixation point X A Then, the change of the position of the virtual camera Ca is completed. The same applies to the case where the vertical position of the viewpoint 51 of the virtual camera Ca is at the other points X C1 , X C2 , X C4 , X C5 shown in FIG.

従って、プレイヤは、操作部22を操作することによって、プレイヤキャラクタC1回りの仮想カメラCaの位置(換言すれば、注視点X回りの位置)を任意の位置に変更することができ、プレイヤキャラクタC1を任意の水平方向から撮影し、その画像をディスプレイ2にて表示させることができる。また、このような仮想カメラCaの位置の変更は、プレイヤキャラクタC1の移動中にも行うことができる。この場合には、図3を参照して説明したプレイヤキャラクタC1の移動方向への仮想カメラCaの位置の変更と共に、プレイヤキャラクタC1回りの位置の変更を行う。 Therefore, the player, by operating the operation section 22, (in other words, the fixation point X A around the position) position of the player character C1 around the virtual camera Ca can change at any position, the player character C1 can be taken from an arbitrary horizontal direction, and the image can be displayed on the display 2. Such a change in the position of the virtual camera Ca can also be performed while the player character C1 is moving. In this case, the position around the player character C1 is changed together with the change of the position of the virtual camera Ca in the moving direction of the player character C1 described with reference to FIG.

一方、図5に示すように、円周Cの一部が障害物(進入禁止領域)42と重複しており、プレイヤの操作によって候補位置が点XC33に決定された場合、この候補位置に視点51の位置を変更すると、変更後の視点51を中心50aとするカメラ領域50は障害物42と重複してしまう。従って、本ゲームではこの場合にも後述の「カメラ位置補正処理」を行う。 On the other hand, as shown in FIG. 5, when a part of the circumference CX overlaps with the obstacle (entry prohibition area) 42 and the candidate position is determined as the point XC33 by the operation of the player, this candidate position If the position of the viewpoint 51 is changed, the camera area 50 having the changed viewpoint 51 as the center 50a overlaps with the obstacle 42. Therefore, in this game, the “camera position correction process” described later is also performed in this case.

以上、図3〜図5を用いて説明したように、仮想カメラ制御手段33は、プレイヤキャラクタC1の移動があった場合(図3参照)や、プレイヤによる仮想カメラCaに対する移動操作があった場合(図4及び図5参照)に、仮想カメラCaの位置(座標)を変更するために、視点51の位置を変更する候補位置を決定すべく、「カメラ候補位置決定処理」を行う。そして、決定した候補位置に視点51の位置を変更すると、カメラ領域50が進入禁止領域42と重複してしまう場合には、後述の「カメラ位置補正処理」を行う。   As described above with reference to FIGS. 3 to 5, the virtual camera control means 33 is used when the player character C <b> 1 moves (see FIG. 3) or when the player performs a moving operation on the virtual camera Ca. In order to change the position (coordinates) of the virtual camera Ca (see FIGS. 4 and 5), a “camera candidate position determination process” is performed to determine a candidate position for changing the position of the viewpoint 51. When the position of the viewpoint 51 is changed to the determined candidate position, if the camera area 50 overlaps with the entry prohibition area 42, “camera position correction processing” described later is performed.

ここで、図2の説明に戻ると、禁止領域重複判定手段34は、仮想カメラCaのカメラ領域50が上述した進入禁止領域42と重複するか否かを判定するものである。本ゲームでは、このカメラ領域50と進入禁止領域42との重複の有無判定の結果に基づき、上記仮想カメラ制御手段33が仮想カメラCaに対して「カメラ位置補正処理」を実行する。   Here, returning to the description of FIG. 2, the prohibited region duplication determination unit 34 determines whether or not the camera region 50 of the virtual camera Ca overlaps the entry prohibited region 42 described above. In this game, the virtual camera control means 33 executes a “camera position correction process” for the virtual camera Ca based on the result of the presence / absence determination of the overlap between the camera area 50 and the entry prohibition area 42.

なお、本ゲームでは、プレイヤキャラクタC1の位置(地面41への接地点の位置)を基準(原点)とする座標系(ローカル座標系)に基づいて、注視点X、敵キャラクタ、候補位置、視点51、カメラ領域50、その中心50a、及び進入禁止領域42の境界(輪郭)の、各位置を取得している。但し、これに限られず、仮想ゲーム空間40に固定された座標系(ワールド座標系)に基づいて、これらの位置を取得するようにしてもよい。 In this game, based on a coordinate system (local coordinate system) with the position of the player character C1 (the position of the ground contact point on the ground 41) as a reference (origin), the gazing point X A , the enemy character, the candidate position, Each position of the boundary (contour) of the viewpoint 51, the camera area 50, its center 50a, and the entry prohibition area 42 is acquired. However, the present invention is not limited to this, and these positions may be acquired based on a coordinate system (world coordinate system) fixed in the virtual game space 40.

[フレーム毎の動作フロー]
ところで、上記でも触れたが、仮想カメラ制御手段33は、仮想カメラCaの位置を制御するに際し、「カメラ候補位置決定処理」及び「カメラ位置補正処理」を行う。これらの処理は、各フレームが生成される際に、他の処理と共に実行される。以下では、本ゲームにおいてフレーム毎に実行される一連の処理について概要を説明する。
[Operation flow for each frame]
As described above, the virtual camera control unit 33 performs “camera candidate position determination processing” and “camera position correction processing” when controlling the position of the virtual camera Ca. These processes are executed together with other processes when each frame is generated. Hereinafter, an outline of a series of processes executed for each frame in the game will be described.

図6は、フレーム毎に実行される処理の概要を示すフローチャートである。また、図7は、図6中のカメラ処理(ステップS3)の詳細を示すフローチャートである。図6に示すように、本ゲームでは、プレイヤキャラクタ処理(ステップS1)、敵キャラクタ処理(ステップS2)、カメラ処理(ステップS3)、及び描画処理(ステップS4)が、この順序でフレーム毎に実行される。   FIG. 6 is a flowchart showing an outline of processing executed for each frame. FIG. 7 is a flowchart showing details of the camera process (step S3) in FIG. As shown in FIG. 6, in this game, player character processing (step S1), enemy character processing (step S2), camera processing (step S3), and drawing processing (step S4) are executed for each frame in this order. Is done.

このうちプレイヤキャラクタ処理(ステップS1)では、プレイヤキャラクタC1に関してゲームの進行上で必要な各種の処理を行う。例えば、プレイヤにより、プレイヤキャラクタC1を動作させる操作入力が操作部22に対して行われた場合に、該操作入力に応じて、プレイヤキャラクタC1の動作後の位置及び姿勢等を示すデータを取得する。例えば、プレイヤがプレイヤキャラクタC1を歩行させるように操作部22を操作した場合には、歩行するプレイヤキャラクタC1が、次のフレームにてとるべき姿勢及び位置に関するデータを算出して取得する。このようなデータの取得は、主にキャラクタ制御手段32(図2参照)によって行われる。また、プレイヤが操作部22を操作していない場合であっても、例えば敵キャラクタからの攻撃を受けた反動でプレイヤキャラクタC1が移動する場合がある。従って、このようにしてプレイヤキャラクタC1が移動した場合も、移動後の位置及び姿勢等を示すデータを取得する。また、この他にも、プレイヤキャラクタC1が他のオブジェクトと衝突した場合に、該オブジェクトと重複することがないようにプレイヤキャラクタC1の位置を調整する処理や、ゲームの進行に伴って変化する体力やスタミナなど、プレイヤキャラクタC1のステータスを更新する処理などを行う。   Among these, in the player character process (step S1), various processes necessary for the progress of the game are performed on the player character C1. For example, when an operation input for moving the player character C1 is performed by the player on the operation unit 22, data indicating the position and posture after the operation of the player character C1 is acquired according to the operation input. . For example, when the player operates the operation unit 22 to walk the player character C1, the walking player character C1 calculates and acquires data on the posture and position to be taken in the next frame. Such data acquisition is mainly performed by the character control means 32 (see FIG. 2). Even if the player is not operating the operation unit 22, the player character C1 may move due to, for example, a reaction caused by an attack from an enemy character. Therefore, even when the player character C1 moves in this way, data indicating the position and posture after movement is acquired. In addition to this, when the player character C1 collides with another object, a process for adjusting the position of the player character C1 so as not to overlap with the object, or a physical strength that changes as the game progresses The process of updating the status of the player character C1, such as stamina, is performed.

敵キャラクタ処理(ステップS2)では、敵キャラクタに関してゲームの進行上で必要な各種の処理を行う。例えば、プレイヤキャラクタC1の動作や仮想ゲーム空間40内の周辺の状況(例えば、近くに設置された爆弾の爆発など)に応じて動作する敵キャラクタについて、その動作後の位置及び姿勢等を示すデータを取得する。例えば、敵キャラクタがプレイヤキャラクタC1に対して火炎を吐く動作をする場合には、敵キャラクタの位置及び姿勢を示すデータに加えて、火炎の形状及び位置を示すデータを算出して取得する。このようなデータの取得も、主にキャラクタ制御手段32によって行われる。なお、仮想カメラCaにより撮影される範囲内に敵キャラクタが存在しない場合には、敵キャラクタの位置を示すデータのみを取得すればよい。また、この他にも、他のオブジェクトと衝突した場合の敵キャラクタの位置を調整する処理や、ゲームの進行に伴って変化する体力などの敵キャラクタのステータスを更新する処理などを行う。   In the enemy character process (step S2), various processes necessary for the progress of the game are performed for the enemy character. For example, data indicating the position and posture after the action of an enemy character that moves according to the action of the player character C1 and the surrounding situation in the virtual game space 40 (for example, the explosion of a bomb installed nearby). To get. For example, when the enemy character performs an action of spitting a flame on the player character C1, in addition to data indicating the position and posture of the enemy character, data indicating the shape and position of the flame is calculated and acquired. Such data acquisition is also mainly performed by the character control means 32. If there is no enemy character within the range photographed by the virtual camera Ca, only the data indicating the position of the enemy character need be acquired. In addition, a process for adjusting the position of the enemy character when colliding with another object, a process for updating the status of the enemy character such as a physical strength that changes as the game progresses, and the like are performed.

カメラ処理(ステップS3)では、仮想カメラ制御手段33により、仮想カメラCaの位置を変更する処理を行う。即ち、図7に示すように、プレイヤによる仮想カメラCaを移動させる操作部22への操作、及び、プレイヤキャラクタC1の移動(位置情報及び向きなど)に基づき、図3〜図5で説明したようにして、カメラ候補位置決定処理を行い(ステップS11)、決定した候補位置の位置(座標)を取得する。   In the camera process (step S3), the virtual camera control means 33 performs a process of changing the position of the virtual camera Ca. That is, as illustrated in FIG. 7, as described with reference to FIGS. 3 to 5, based on the operation of the operation unit 22 for moving the virtual camera Ca by the player and the movement (position information and orientation) of the player character C <b> 1. Then, camera candidate position determination processing is performed (step S11), and the position (coordinates) of the determined candidate position is acquired.

次に、カメラ候補位置決定処理(ステップS11)を終えると、決定した候補位置に視点51を設定した場合に、該視点51を中心50aとするカメラ領域50が進入禁止領域42と重複することになるか否かを判定する。(ステップS12)。そして、進入禁止領域42と重複すると判定した場合(ステップS12:YES)は、後述の「カメラ位置補正処理」を行い(ステップS13)、補正後の視点51の位置を示すデータを取得する。なお、この「カメラ位置補正処理」は、仮想カメラCaを進入禁止領域42から出すと共に、仮想カメラCaの視野を可及的に広く確保するための処理であり、詳しくは後述する。   Next, when the camera candidate position determination process (step S11) is completed, when the viewpoint 51 is set at the determined candidate position, the camera area 50 having the viewpoint 51 as the center 50a overlaps the entry prohibition area 42. It is determined whether or not. (Step S12). If it is determined that the area does not overlap with the entry prohibition area 42 (step S12: YES), a “camera position correction process” described later is performed (step S13), and data indicating the position of the corrected viewpoint 51 is acquired. This “camera position correction process” is a process for taking the virtual camera Ca out of the entry prohibition area 42 and ensuring the field of view of the virtual camera Ca as wide as possible, and will be described in detail later.

一方、進入禁止領域42と重複しないと判定した場合(ステップS12:NO)、又はカメラ位置補正処理(ステップS13)を終えた場合は、仮想カメラCaの位置を決定する処理を行い(ステップS14)、このカメラ処理を終了する。即ち、ステップS12でNOの場合には、ステップS11で取得した候補位置を視点51の位置として決定する。また、ステップS13を経た場合には、そこでのカメラ位置補正処理により取得した視点51を中心とするカメラ領域50を設定する。また、決定された視点51の位置と注視点Xに基づいて、視点51の向きが決定される。 On the other hand, when it is determined that it does not overlap with the entry prohibition area 42 (step S12: NO), or when the camera position correction process (step S13) is completed, a process for determining the position of the virtual camera Ca is performed (step S14). This camera process is terminated. That is, in the case of NO in step S12, the candidate position acquired in step S11 is determined as the position of the viewpoint 51. If step S13 has been performed, a camera region 50 centered on the viewpoint 51 acquired by the camera position correction process is set. Further, based on the gaze point X A and determined position of the viewpoint 51, the orientation of the viewpoint 51 is determined.

以上のように、カメラ処理では、毎フレーム更新されたゲーム進行(位置及び向きなど)に応じてカメラ候補位置決定処理(ステップS11)と、必要に応じて更にカメラ位置補正処理(ステップS13)とを行うことで視点51を決定する。なお、既に説明した図3において、位置100〜102にいるプレイヤキャラクタC1に対応して示されているカメラ領域50の中心50aの位置は、上記ステップS11の処理により決定された候補位置の例である。また、図4の点XC1〜XC5及び図5の点XC31〜XC33についても、上記ステップS11の処理により決定された候補位置の例である。なお、毎フレーム更新する必要はなく、プレイヤキャラクタC1の移動、プレイヤによる仮想カメラCaの操作がなければ、上記ステップS11〜ステップS13を実行せず、前フレームの仮想カメラCaの位置を維持すればよい。 As described above, in the camera process, the camera candidate position determination process (step S11) is performed according to the game progress (position and orientation, etc.) updated every frame, and the camera position correction process (step S13) is further performed as necessary. To determine the viewpoint 51. Note that in FIG. 3 already described, the position of the center 50a of the camera area 50 shown corresponding to the player character C1 at the positions 100 to 102 is an example of the candidate position determined by the process of step S11. is there. Further, the points X C1 to X C5 in FIG. 4 and the points X C31 to X C33 in FIG. 5 are also examples of candidate positions determined by the process of step S11. Note that it is not necessary to update every frame. If there is no movement of the player character C1 and no operation of the virtual camera Ca by the player, the above steps S11 to S13 are not executed and the position of the virtual camera Ca in the previous frame is maintained. Good.

次に、図6のフローチャートの説明に戻り、上述したカメラ処理に続く描画処理(ステップS4)では、プレイヤキャラクタC1(仮想カメラCaの撮影範囲に敵キャラクタが存在する場合には、該敵キャラクタも)が存在する仮想ゲーム空間40を、仮想カメラCaにより撮影したときの画像データを生成し、これをディスプレイ2に出力する。より詳しく説明すると、この処理では、ステップS1,S2にて取得した位置及び姿勢となっているプレイヤキャラクタC1及び敵キャラクタが、仮想ゲーム空間40に位置する情景を、ステップS3により位置が変更された仮想カメラCaによって撮影したときの画像を示す画像データを生成する。   Next, returning to the description of the flowchart of FIG. 6, in the drawing process (step S <b> 4) following the camera process described above, if an enemy character exists in the shooting range of the virtual camera Ca, the enemy character is also displayed. Is generated by the virtual camera Ca and is output to the display 2. More specifically, in this process, the position of the scene in which the player character C1 and the enemy character in the position and posture acquired in steps S1 and S2 are located in the virtual game space 40 is changed in step S3. Image data indicating an image taken by the virtual camera Ca is generated.

[カメラ位置補正処理]
次に、図7のステップS13に示した「カメラ位置補正処理」の詳細について説明する。なお、前述したようにこのカメラ位置補正処理は、ステップS11で変更した候補位置に基づく仮想カメラCaのカメラ領域50が障害物42と重複することとなった場合(図7のステップS12:YES)に、該仮想カメラCaを進入禁止領域42から出すと共に、仮想カメラCaの視野を可及的に広く確保するための処理である。ここで、仮想カメラCaのカメラ領域50が障害物(進入禁止領域)42と重複する態様としては、図3〜図5に示したような様々のシチュエーションがあるが、何れの態様においても、同一のカメラ位置補正処理を行うことができる。
[Camera position correction processing]
Next, details of the “camera position correction process” shown in step S13 of FIG. 7 will be described. As described above, this camera position correction processing is performed when the camera area 50 of the virtual camera Ca based on the candidate position changed in step S11 overlaps the obstacle 42 (step S12 in FIG. 7: YES). In addition, this is a process for taking the virtual camera Ca out of the entry prohibition area 42 and securing the field of view of the virtual camera Ca as wide as possible. Here, as an aspect in which the camera area 50 of the virtual camera Ca overlaps with the obstacle (entrance prohibition area) 42, there are various situations as shown in FIGS. 3 to 5. The camera position correction process can be performed.

(実施の形態1)
図8は、実施の形態1に係るカメラ位置補正処理の態様を示す模式図である。ここで、図8中の(a)は、カメラ領域50が障害物(進入禁止領域)42と重複した状態を、(b)は、(a)の状態から、カメラ領域50を障害物42の外に移動させた位置に設定した状態を、(c)は、(b)の状態から、視点51をカメラ領域50内で候補位置に対して後方へ移動させた位置に設定した状態を、それぞれ示している。また、図9は、実施の形態1に係るカメラ位置補正処理の流れを示すフローチャートである。なお、図8では、仮想カメラCaの視点51が初期位置である点XC3に位置する状態で、カメラ領域50が障害物42と重複することになった場合(図7のステップS12:YES)について示しているが、視点51が他の位置にある場合も同様である。
(Embodiment 1)
FIG. 8 is a schematic diagram illustrating a camera position correction process according to the first embodiment. Here, (a) in FIG. 8 shows a state in which the camera area 50 overlaps with the obstacle (entry prohibited area) 42, and (b) shows the camera area 50 in the state of the obstacle 42 from the state (a). (C) shows the state set to the position moved to the outside, and (c) shows the state where the viewpoint 51 is set to the position moved backward relative to the candidate position in the camera area 50, respectively. Show. FIG. 9 is a flowchart showing the flow of the camera position correction process according to the first embodiment. In FIG. 8, when the camera area 50 overlaps the obstacle 42 in a state where the viewpoint 51 of the virtual camera Ca is located at the point X C3 that is the initial position (step S12 in FIG. 7: YES). The same applies to the case where the viewpoint 51 is at another position.

まず、図8(a)に示す状態は、上述した図3〜図5に示したシチュエーションなどにおいて、カメラ候補位置決定処理(図7のステップS11)により候補位置が決定され、その候補位置に仮に視点51を設定した場合に、該視点51を中心50aとするカメラ領域50が障害物42と重複する(図7のステップS12:YES)ことになる状態を示している。本実施の形態1では、この図8(a)に示す状態になる場合に、カメラ位置補正処理(図7のステップS14)として、図8(b),(c)に示す処理を実行する。即ち、該カメラ位置補正処理では、はじめに、図8(b)に示すように、図8(a)に示す位置から視軸52に沿って障害物42外へ移動させた所定の位置にカメラ領域50を設定する(図10のステップS21)。より具体的には、図8(a)に示す候補位置と注視点Xとを結ぶ視軸52に沿って、注視点Xに向かって障害物42に対して外方から接する位置まで移動させたときの移動後の位置に、カメラ領域50を設定する。なお、このようにして設定されたカメラ領域50の中心50aと注視点Xとの距離は、図8(a)に示す候補位置と注視点Xとの距離Rよりも小さい距離R1となっている。 First, in the state shown in FIG. 8A, the candidate position is determined by the camera candidate position determination process (step S11 in FIG. 7) in the situation shown in FIGS. When the viewpoint 51 is set, the camera area 50 having the viewpoint 51 as the center 50a overlaps the obstacle 42 (step S12 in FIG. 7: YES). In the first embodiment, when the state shown in FIG. 8A is obtained, the processing shown in FIGS. 8B and 8C is executed as camera position correction processing (step S14 in FIG. 7). That is, in the camera position correction process, first, as shown in FIG. 8B, the camera region is moved to a predetermined position moved from the position shown in FIG. 50 is set (step S21 in FIG. 10). More specifically, along the visual axis 52 connecting the gazing point X A and the candidate position shown in FIG. 8 (a), moved toward the fixation point X A against the obstacle 42 to a position in contact from the outside The camera area 50 is set at the position after the movement at the time of the movement. The distance between this way the center 50a of the camera region 50 which is set gazing point X A is a small distance R1 than the distance R between the candidate positions shown in FIG. 8 (a) and the fixation point X A ing.

次に、図8(c)に示すように、視点51を、図8(b)に示す設定後のカメラ領域50の中心50aから上記視軸52の延長線に沿って後方へ移動させた場合の所定位置に設定する(図9のステップS22)。即ち、ステップS21にて障害物42外に設定したカメラ領域50の位置は固定しておき、その中心50aから視軸52に沿って後方へ向かい、カメラ領域50の輪郭線上に至った点を、視点51の位置として設定(補正)する。これにより、図8(c)のように決定された視点51と注視点Xとの距離は、上記距離R1よりも大きい距離R2となる。そして、このステップS22の処理を実行することで、本実施の形態1に係るカメラ位置補正処理を終了し(図9,図7のステップS13参照)、この位置が仮想カメラCa(視点51)の位置として決定される(図7のステップS14)。そして、この決定された仮想カメラCa(視点51)の位置において撮影したときの画像がゲーム装置1のディスプレイ2に出力(表示)される。 Next, as shown in FIG. 8C, the viewpoint 51 is moved rearward along the extension line of the visual axis 52 from the center 50a of the set camera area 50 shown in FIG. 8B. (Step S22 in FIG. 9). That is, the position of the camera area 50 set outside the obstacle 42 in step S21 is fixed, and the point from the center 50a toward the rear along the visual axis 52 and reaching the contour line of the camera area 50 is It is set (corrected) as the position of the viewpoint 51. Thus, the distance between the viewpoint 51 which is determined as shown in FIG. 8 (c) and the fixation point X A is a distance greater R2 than the distance R1. Then, by executing the process of step S22, the camera position correction process according to the first embodiment is completed (see step S13 of FIGS. 9 and 7), and this position is the virtual camera Ca (viewpoint 51). The position is determined (step S14 in FIG. 7). Then, an image taken at the determined position of the virtual camera Ca (viewpoint 51) is output (displayed) on the display 2 of the game apparatus 1.

なお、上述のようにカメラ領域50を図8(b)の実線で示した位置に設定する処理では、図8(a)にて破線で示す位置から、図8(b)にて実線で示す位置まで、実際にカメラ領域50を移動させる必要はない。即ち、カメラ候補位置決定処理(図7のステップS11)によって決定された候補位置に視点51を「仮に」設定した場合に、図8(a)に示すようにカメラ領域50が設定される場合には、図8(a)に示す破線の位置にカメラ領域50を設定することなく、図8(b)の実線で示す位置にカメラ領域50を直接設定すればよい。同様に、上述のように視点51を図8(c)に示した位置に設定する処理では、図8(a)に示す候補位置から、図8(b)の中心50aの位置を経て、図8(c)に示す位置まで、実際に視点51を移動させる必要はない。即ち、カメラ候補位置決定処理(図7のステップS11)によって決定された候補位置に視点51を「仮に」設定した場合に、図8(a)に示すようにカメラ領域50が設定される場合には、上述した手順により取得される図8(c)に示す位置に、視点51を直接設定すればよい。   In the process of setting the camera area 50 at the position indicated by the solid line in FIG. 8B as described above, the position indicated by the broken line in FIG. 8A is indicated by the solid line in FIG. 8B. It is not necessary to actually move the camera area 50 to the position. That is, when the viewpoint 51 is set “provisionally” to the candidate position determined by the camera candidate position determination process (step S11 in FIG. 7), the camera area 50 is set as shown in FIG. The camera region 50 may be directly set at the position indicated by the solid line in FIG. 8B without setting the camera region 50 at the position indicated by the broken line shown in FIG. Similarly, in the process of setting the viewpoint 51 to the position shown in FIG. 8C as described above, the candidate position shown in FIG. 8A is passed through the position of the center 50a in FIG. It is not necessary to actually move the viewpoint 51 to the position shown in FIG. That is, when the viewpoint 51 is set “provisionally” to the candidate position determined by the camera candidate position determination process (step S11 in FIG. 7), the camera area 50 is set as shown in FIG. May be set directly at the position shown in FIG. 8C acquired by the above-described procedure.

以上のカメラ位置補正処理により、仮想カメラCaが障害物42内に入り込んで、障害物42内から撮影した画像がディスプレイ2に表示されてしまうのを回避することができる。また、仮想カメラCaを障害物42外へ出しつつも、そのカメラ領域50内における後方位置に視点51を設定しているため、プレイヤキャラクタC1によって仮想カメラCaの視界が大きく遮られるのを抑制し、極力広い視野を有する画像を撮影することができる。   With the camera position correction process described above, it is possible to avoid the virtual camera Ca entering the obstacle 42 and displaying an image taken from the obstacle 42 on the display 2. Further, since the viewpoint 51 is set at the rear position in the camera area 50 while the virtual camera Ca is moved out of the obstacle 42, the visual field of the virtual camera Ca is prevented from being largely blocked by the player character C1. An image having a wide field of view can be taken.

(実施の形態2)
図10は、実施の形態2に係るカメラ位置補正処理の態様を示す模式図である。ここで、図10(a),(b)は図8(a),(b)と同じであり、図10(c)は、図10(b)の状態からカメラ領域50を下方へ移動させた位置に設定した状態を、図10(d)は、図10(c)の状態から視点51をカメラ領域50内で後方へ移動させた位置に設定した状態を、それぞれ示している。また、図11は、実施の形態2に係るカメラ位置補正処理の流れを示すフローチャートである。なお、図10でも図8と同様に、仮想カメラCaの視点51が初期位置である点XC3に位置する状態で、カメラ領域50が障害物42と重複することになった場合(図7のステップS12:YES)について示しているが、視点51が他の位置にある場合も同様である。
(Embodiment 2)
FIG. 10 is a schematic diagram illustrating a camera position correction process according to the second embodiment. 10 (a) and 10 (b) are the same as FIGS. 8 (a) and 8 (b), and FIG. 10 (c) moves the camera area 50 downward from the state of FIG. 10 (b). FIG. 10D shows a state in which the viewpoint 51 is moved backward in the camera area 50 from the state of FIG. 10C, respectively. FIG. 11 is a flowchart showing the flow of the camera position correction process according to the second embodiment. 10, similarly to FIG. 8, when the camera area 50 overlaps the obstacle 42 in a state where the viewpoint 51 of the virtual camera Ca is located at the point X C3 which is the initial position (in FIG. 7). Step S12: YES), but the same applies when the viewpoint 51 is at another position.

まず、図10(a)に示す状態は、上述した図3〜図5に示したシチュエーションなどにおいて、カメラ候補位置決定処理(図7のステップS11)により候補位置が決定され、その候補位置に仮に視点51を設定した場合に、該視点51を中心50aとするカメラ領域50が障害物42と重複する(図7のステップS12:YES)ことになる状態を示している。本実施の形態2では、この図10(a)に示す状態になる場合に、カメラ位置補正処理(図7のステップS14)として、図10(b)〜(d)に示す処理を実行する。即ち、該カメラ位置補正処理では、はじめに、図10(b)に示すように、図10(a)に示す位置から視軸52に沿って障害物42外へ移動させた所定の位置にカメラ領域50の位置を仮に設定する(図11のステップS31)。より具体的には、図10(a)に示す候補位置と注視点Xとを結ぶ視軸52に沿って、注視点Xに向かって障害物42に対して外方から接する位置まで移動させたときの移動後の位置に、カメラ領域50を仮に設定する。なお、このようにして仮設定されたカメラ領域50の中心50aと注視点Xとの距離は、図10(a)に示す候補位置と注視点Xとの距離Rよりも小さい距離R1となっている。 First, in the state shown in FIG. 10A, the candidate positions are determined by the camera candidate position determination process (step S11 in FIG. 7) in the situations shown in FIGS. When the viewpoint 51 is set, the camera area 50 having the viewpoint 51 as the center 50a overlaps the obstacle 42 (step S12 in FIG. 7: YES). In the second embodiment, when the state shown in FIG. 10A is obtained, the processing shown in FIGS. 10B to 10D is executed as camera position correction processing (step S14 in FIG. 7). That is, in the camera position correction process, first, as shown in FIG. 10B, the camera region is moved to a predetermined position moved out of the obstacle 42 along the visual axis 52 from the position shown in FIG. The position of 50 is temporarily set (step S31 in FIG. 11). More specifically, along the visual axis 52 connecting the gazing point X A and the candidate position shown in FIG. 10 (a), moved toward the fixation point X A against the obstacle 42 to a position in contact from the outside The camera area 50 is provisionally set at the position after the movement when moved. Incidentally, the center 50a of the thus temporarily set camera area 50 distance between the gazing point X A is a candidate position shown in FIG. 10 (a) and the fixation point X A smaller distance R1 than the distance R of the It has become.

次に、ステップS31で障害物42外に仮設定したカメラ領域50(及び視点51)を、下方へ向かって所定距離だけ移動させた位置に、カメラ領域50の位置を正式に設定する(図12のステップS32)。この時点で、正式に設定したカメラ領域50の中心50aと注視点Xとの距離は、上述した距離R,R1よりも小さい距離R3となる。そして最後に、図11(d)に示すように、視点51を、図10(c)に示す正式に設定されたカメラ領域50の中心50aから上記視軸52の延長線に沿って後方へ移動させた場合の所定位置に設定する(図11のステップS33)。即ち、ステップS32にて正式に設定されたカメラ領域50はその位置は固定しておき、その中心50aから視軸52に沿って後方へ向かい、カメラ領域50の輪郭線上に至った点を、視点51の位置として設定する。この結果、設定された視点51と注視点Xとの距離は、上記距離R3よりも大きい距離R4となる。そして、このステップS33の処理を実行することで、本実施の形態2に係るカメラ位置補正処理を終了し(図11,図7のステップS13参照)、この位置が仮想カメラCa(視点51)の位置として決定される(図7のステップS14)。そして、この決定された仮想カメラCa(視点51)の位置において撮影したときの画像がゲーム装置1のディスプレイ2に出力(表示)される。 Next, the position of the camera area 50 is formally set to a position where the camera area 50 (and the viewpoint 51) temporarily set outside the obstacle 42 in step S31 is moved downward by a predetermined distance (FIG. 12). Step S32). At this point, the distance between the center 50a and the fixation point X A in camera area 50 which is set formally becomes smaller distance R3 than the distance R, R1 described above. Finally, as shown in FIG. 11 (d), the viewpoint 51 is moved rearward along the extension line of the visual axis 52 from the center 50a of the formally set camera area 50 shown in FIG. 10 (c). The predetermined position in the case of being made is set (step S33 in FIG. 11). That is, the position of the camera area 50 formally set in step S32 is fixed, and the point from the center 50a toward the rear along the visual axis 52 and reaching the contour line of the camera area 50 is defined as the viewpoint. The position 51 is set. As a result, the distance between the gazing point X A and viewpoint 51 is set, the greater the distance R4 than the distance R3. Then, by executing the process of step S33, the camera position correction process according to the second embodiment is completed (see step S13 of FIGS. 11 and 7), and this position is the virtual camera Ca (viewpoint 51). The position is determined (step S14 in FIG. 7). Then, an image taken at the determined position of the virtual camera Ca (viewpoint 51) is output (displayed) on the display 2 of the game apparatus 1.

ここで、カメラ領域50を図10(c)に示す位置に正式に設定する上記ステップS32の処理について更に詳しく説明する。図12は、実施の形態2のカメラ位置補正処理において、カメラ領域50を正式に設定する図11のステップS32の処理を説明するための模式図であり、図13は、この処理の流れを示すフローチャートである。   Here, the process of step S32 for officially setting the camera area 50 at the position shown in FIG. 10C will be described in more detail. FIG. 12 is a schematic diagram for explaining the process of step S32 of FIG. 11 for officially setting the camera area 50 in the camera position correction process of the second embodiment. FIG. 13 shows the flow of this process. It is a flowchart.

図12では、はじめに注視点Xが点Pで示す位置にある状態から、プレイヤキャラクタC1の移動によって点Pへ移動した場合を例示している。そしてこの場合、注視点Xが点Pに位置するときには、仮想カメラCaは、障害物42にカメラ領域50が外方から接することとなる点Pに中心50a及び視点51が位置している状態となっているが、注視点Xが点Pへ移動した結果、カメラ候補位置決定処理(図7のステップS11)により、障害物42とカメラ領域50とが重複することとなる点Pに視点51の候補位置が設定されたものとする。なお、点Pを通る水平面と点Pから下ろした垂線との交点を点Pとする。また、注視点Xが点Pにある場合の仮想カメラCaの視点51の位置である点Pは、カメラ位置補正処理が施されていないものとし、この点P及び点P間の距離は上述した距離Rとなっている。 In Figure 12, from the state in the position shown by the fixation point X A is the point P B at the beginning, which exemplifies the case of moving the point P C by the movement of the player character C1. And in this case, when the gazing point X A is positioned at the point P B, the virtual camera Ca is a camera region 50 to the obstacle 42 is located the center 50a and the viewpoint 51 to P D point at which the contact from the outside While in a state where there fixation point results X a is moved to the point P C, the camera candidate position determination process (step S11 in FIG. 7), that the obstacle 42 and the camera region 50 is to be duplicated Assume that the candidate position of the viewpoint 51 is set to PE. Note that the intersection of the perpendicular dropped from the horizontal plane and the point P D passing through the point P B and the point P A. Also, P D point is the position of the viewpoint 51 of the virtual camera Ca when fixation point X A is at point P B is intended to camera position correction processing has not been performed, between the point P B and the point P D Is the distance R described above.

このように、プレイヤキャラクタC1の移動によって設定された候補位置(点P)に視点を設定すると、カメラ領域50が障害物42と重複することとなる場合、上述したように、まず、点Pに位置する候補位置と点Pに位置する注視点Xとを結ぶ視軸52(点P及び点Pを結ぶ直線)に沿って、カメラ領域50を障害物42外へ移動させて障害物42に外方から接するように仮設定する。すなわち、点Pに中心50aが位置するようにカメラ領域50を仮設定する(図11のステップS31参照)。なお、このときの点P及び点P間の距離は、上述した距離R1(<R)となっている。 As described above, when the viewpoint is set at the candidate position (point P E ) set by the movement of the player character C1, the camera region 50 overlaps the obstacle 42, as described above, first, the point P along the visual axis 52 connecting the fixation point X a located in the candidate position and the point P C located E (straight line connecting the point P C and the point P E), moving the camera region 50 to the obstacle 42 outside Temporarily set to contact the obstacle 42 from the outside. That is, temporarily sets the camera region 50 so that the center 50a is positioned at the point P F (see step S31 in FIG. 11). Incidentally, P C and the distance between points P F point at this time is the distance R1 and (<R) described above.

これ以後、図11のステップS32の詳細である図13のフローチャートに示す処理が行われる。即ち、仮想カメラ制御手段33は、点P及び点P間の距離DABに対する点P及び点P間の距離DACの比率K1を算出する(ステップS41)。そして、この比率K1が所定の最大値KMAXよりも大きいか否かを判定する(ステップS42)。この最大値KMAXは1より小さい値を適宜設定することができ、例えば、0.7とすることができる。ステップS42にて、比率K1が最大値KMAXよりも大きいと判定した場合(ステップS42:YES)は、ステップS41で算出した値に代えて最大値KMAXを比率K1の値とする(ステップS43)。 Thereafter, the process shown in the flowchart of FIG. 13 which is the detail of step S32 of FIG. 11 is performed. That is, the virtual camera control unit 33 calculates the distance D AC ratio K1 between points P point to the distance D AB between A and the point P B P A and the point P C (step S41). Then, it is determined whether or not the ratio K1 is larger than a predetermined maximum value K MAX (step S42). The maximum value K MAX can be appropriately set to a value smaller than 1, for example, 0.7. If it is determined in step S42 that the ratio K1 is greater than the maximum value K MAX (step S42: YES), the maximum value K MAX is used as the value of the ratio K1 instead of the value calculated in step S41 (step S43). ).

ステップS42にて比率K1が最大値KMAX以下であると判定した場合(ステップS42:NO)、又はステップS43を終えた場合は、次に示す式
比率K2=比率K1*(1−e)
によって比率K2(<1)を算出する(ステップS44)。ここで、式中のeは1より小さい所定の値であり、点Pに基準点50aが位置するカメラ領域50を下方へどれだけ移動させるかを決定する1つの要素である。このeの値は適宜設定することができ、例えば、0.02とすることができる。
When it is determined in step S42 that the ratio K1 is equal to or less than the maximum value K MAX (step S42: NO), or when step S43 is completed, the following formula is shown: ratio K2 = ratio K1 * (1-e)
To calculate the ratio K2 (<1) (step S44). Here, an e is smaller than 1 predetermined value in the formula is one factor that determines whether to move much the camera region 50 reference point 50a to the point P F is positioned downward. The value of e can be set as appropriate, for example, 0.02.

次に、点P及び点P間の距離DAFに対して上記比率K2を乗じることにより、距離DAGを算出する(ステップS45)。なお、比率K2が1より小さい値であるから、この距離DAGは距離DAFより小さいものとなる。そして、中心50aが点Pに仮設定されているカメラ領域50の位置を、点Pから距離DAGだけ上方の点Pに中心50aが位置するように下方へ移動させた位置に正式に設定する(ステップS46)。これにより、図13に示す処理が終了すると共に、図11のステップS32に示した処理が終了する。なお、本実施の形態2に係るカメラ位置補正処理では、この後、図11のステップS33の処理を実行する。即ち、正式に設定されたカメラ領域50の中心50aから、ここに視点51がある場合の視軸52(点P及び点Pを結ぶ直線)に沿って後方へ向かい、カメラ領域50の輪郭線上に至った点Pを、視点51の位置として設定する。 Then, by multiplying the ratio K2 for the distance D AF between points P A and the point P F, and calculates the distance D AG (step S45). Since the ratio K2 is a value smaller than 1, this distance DAG is smaller than the distance DAF . The formal position of the camera region 50 center 50a is temporarily set to the point P F, the position is moved downward so that the center 50a from the point P A distance D AG only above the point P G is located (Step S46). As a result, the process shown in FIG. 13 ends, and the process shown in step S32 of FIG. 11 ends. In the camera position correction process according to the second embodiment, the process of step S33 in FIG. 11 is performed thereafter. That is, the center 50a of the camera region 50 which is formally set, here directed back along the viewing axis 52 (a straight line connecting the points P C and the point P G) in the case where there is a viewpoint 51, the outline of the camera region 50 the P H point reached on the line is set as the position of the viewpoint 51.

なお、図8にて説明したのと同様に、カメラ領域50を図10(c)の実線で示した位置に設定する処理では、図10(a)にて破線で示す位置から、図10(c)にて実線で示す位置まで、実際にカメラ領域50を移動させる必要はない。即ち、図12において、カメラ領域50は、点Pに中心50aが位置する状態から、点Pに中心50aが位置する状態へ、直接的に位置を変更して設定すればよい。同様に、視点51を図10(d)に示した位置に設定する処理では、図10(a)に示す候補位置から、図10(b),(c)に示す中心50aの位置を経て、図10(d)に示す位置まで、実際に視点51を移動させる必要はない。即ち、図12において、点Pから点Pへ、直接的に視点51の位置を変更して設定すればよい。 As described with reference to FIG. 8, in the process of setting the camera region 50 at the position indicated by the solid line in FIG. 10C, the position indicated by the broken line in FIG. It is not necessary to actually move the camera area 50 to the position indicated by the solid line in c). That is, in FIG. 12, a camera area 50, from the state where the center 50a is positioned at the point P D, to the state which is located the center 50a to the point P G, may be set by changing the direct position. Similarly, in the process of setting the viewpoint 51 to the position shown in FIG. 10D, from the candidate position shown in FIG. 10A through the position of the center 50a shown in FIGS. 10B and 10C, It is not necessary to actually move the viewpoint 51 to the position shown in FIG. That is, in FIG. 12, from point P D to the point P H, may be set by changing the position of the direct-view 51.

以上に説明した実施の形態2に係るカメラ位置補正処理によれば、プレイヤキャラクタC1の移動に伴って仮想カメラCaが障害物42内に進入することになる場合であっても、仮想カメラCa(カメラ領域50及び視点51)を障害物42外へ移動させるため、障害物42内から撮影した画像がディスプレイ2に表示されてしまうのを回避することができる。また、仮想カメラCaを障害物42外へ出しつつも、そのカメラ領域50内における後方位置に視点51を設定しているため、プレイヤキャラクタC1によって仮想カメラCaの視界が大きく遮られるのを抑制し、極力広い視野を有する画像を撮影することができる。更に、実施の形態1の場合に比べて視点51の位置をより低く設定するため、仮想ゲーム空間40をより遠くまで見渡した画像を撮影することができ、プレイヤの視野を広げることができる。   According to the camera position correction process according to the second embodiment described above, even if the virtual camera Ca enters the obstacle 42 as the player character C1 moves, the virtual camera Ca ( Since the camera region 50 and the viewpoint 51) are moved out of the obstacle 42, it is possible to avoid an image captured from within the obstacle 42 from being displayed on the display 2. Further, since the viewpoint 51 is set at the rear position in the camera area 50 while the virtual camera Ca is moved out of the obstacle 42, the visual field of the virtual camera Ca is prevented from being largely blocked by the player character C1. An image having a wide field of view can be taken. Furthermore, since the position of the viewpoint 51 is set lower than in the case of the first embodiment, an image overlooking the virtual game space 40 can be taken, and the player's field of view can be expanded.

なお、上記点Pから点Pへの視点51の位置の変更設定は、1フレームで完結させなくてもよく、点Pと点Pとの間の一又は複数の点を経由するように、複数のフレームを用いて行うようにしてもよい。この場合、上記点Pから、点P,点Pを経て、点Pに至るように、視点51の位置をフレーム毎に順次設定していくようにしてもよい。更に、視点51を上記点Pから点Pに変更設定し、その後、点Pから点Pへ至る間を、一又は複数の点を経由するように複数のフレームを用いて変更設定するようにしてもよい。 Incidentally, change setting position of the viewpoint 51 from the point P D to the point P H may not to complete in 1 frame, through one or more points between the point P D and the point P H As described above, a plurality of frames may be used. In this case, from the point P D, via the point P F, the point P G, as from the point P H, the position of the viewpoint 51 may be sequentially set for each frame. Furthermore, the viewpoint 51 and change settings to point P F from the point P D, then, between extending from the point P F to the point P H, change setting by using a plurality of frames so as to pass through one or more points You may make it do.

(実施の形態3)
図14は、実施の形態3に係るカメラ位置補正処理を説明するための模式図である。なお、カメラ領域50を障害物42と重複しないように該障害物42の外に設定するまでは、実施の形態1にて説明した処理(図8(a),(b),図9のステップS21参照)と同様であるのでその説明は省略し、ここでは、図8(b)に示す状態の後、視点51を設定する態様について説明する。
(Embodiment 3)
FIG. 14 is a schematic diagram for explaining a camera position correction process according to the third embodiment. Until the camera area 50 is set outside the obstacle 42 so as not to overlap with the obstacle 42, the processing described in the first embodiment (steps in FIGS. 8A, 8B, and 9). Since this is the same as (see S21), the description thereof is omitted. Here, a mode in which the viewpoint 51 is set after the state shown in FIG. 8B will be described.

図14に示す例では、カメラ領域50には、その中心50aに対し、該中心50aに視点51を位置させた場合の該視点51の向き(基準点50aから注視点Xへ向かう方向)とは反対側に、半円形状の後側領域60が設定されている。そして、本実施の形態3に係るカメラ位置補正処理では、視点51を、この後側領域60内の任意の位置に設定することとしている。 In the example shown in FIG. 14, the camera region 50, with respect to the center 50a, the orientation of the convergent point 51 in the case where to position the viewpoint 51 to the central 50a (a direction from the reference point 50a to the fixation point X A) On the opposite side, a semicircular rear region 60 is set. In the camera position correction process according to the third embodiment, the viewpoint 51 is set at an arbitrary position in the rear region 60.

このように視点51の位置を設定することにより、障害物42内に入り込んだ仮想カメラCaにより撮影された画像がディスプレイ2に表示されてしまうのを回避しつつ、プレイヤキャラクタC1によって仮想カメラCaの視界が大きく遮られるのを抑制し、広い視野を有する画像を撮影することができる。なお、仮想カメラCaの視界を極力広く確保するためには、後側領域60の円弧状の輪郭線部分において、視軸52の延長線が交差する点、即ち、実施の形態1の図8(c)を用いて説明したのと同様の位置に、視点51を設定するのが好ましい。また、仮想ゲーム空間40をより遠くまで見渡した画像を撮影するためには、後側領域60を視軸52の延長線により上下分割した場合の下側の領域に、視点51を設定することが好ましい。   By setting the position of the viewpoint 51 in this way, the player character C1 sets the position of the virtual camera Ca while avoiding the image taken by the virtual camera Ca entering the obstacle 42 from being displayed on the display 2. It is possible to capture an image having a wide field of view by suppressing the field of view from being largely blocked. In order to secure the field of view of the virtual camera Ca as wide as possible, the extension line of the visual axis 52 intersects in the arc-shaped contour portion of the rear region 60, that is, FIG. It is preferable to set the viewpoint 51 at the same position as described with reference to c). In addition, in order to capture an image of the virtual game space 40 that is viewed farther, the viewpoint 51 may be set in a lower area when the rear area 60 is divided vertically by an extension line of the visual axis 52. preferable.

(実施の形態4)
図15は、実施の形態4に係るカメラ位置補正処理を説明するための模式図である。なお、本実施の形態4においても、カメラ領域50を障害物42と重複しないように該障害物42の外に設定するまでは、実施の形態1にて説明した処理(図8(a),(b),図9のステップS21参照)と同様であるのでその説明は省略し、ここでは、図8(b)に示す状態の後、視点51を設定する態様について説明する。
(Embodiment 4)
FIG. 15 is a schematic diagram for explaining camera position correction processing according to the fourth embodiment. Also in the fourth embodiment, the processing described in the first embodiment (FIG. 8A, FIG. 8A) until the camera area 50 is set outside the obstacle 42 so as not to overlap the obstacle 42. Since it is the same as (b) and step S21 in FIG. 9), the description thereof will be omitted. Here, a mode in which the viewpoint 51 is set after the state shown in FIG. 8B will be described.

図15に示す例では、カメラ領域50の中心50aと注視点Xとを結ぶ直線が、カメラ領域50の輪郭線を成す円周61と交わる点のうち、注視点Xから遠い方の点が交点62として設定されている。そして、本実施の形態4に係るカメラ位置補正処理では、上記円周61上であって、中心50a及び交点62を結ぶ線分63に対し、中心50aの回りに+90°〜−90°(反時計回り方向を正とする)の範囲内の角度となる任意の位置に、視点51を設定することとしている。 In the example shown in FIG. 15, a straight line connecting the center 50a of the camera region 50 and the gazing point X A is, among the points of intersection with the circumferential 61 forming the outline of the camera region 50, towards a point distant from the fixation point X A Is set as the intersection 62. In the camera position correction process according to the fourth embodiment, the line segment 63 connecting the center 50a and the intersection point 62 on the circumference 61 is + 90 ° to −90 ° (reverse) around the center 50a. The viewpoint 51 is set at an arbitrary position having an angle within a range of (a clockwise direction is positive).

このように視点51の位置を設定することにより、障害物42内に入り込んだ仮想カメラCaにより撮影された画像がディスプレイ2に表示されてしまうのを回避しつつ、プレイヤキャラクタC1によって仮想カメラCaの視界が大きく遮られるのを抑制し、広い視野を有する画像を撮影することができる。なお、仮想カメラCaの視界を極力広く確保するためには、交点62、即ち、実施の形態1の図8(c)を用いて説明したのと同様の位置に、視点51を設定するのが好ましい。また、仮想ゲーム空間40をより遠くまで見渡した画像を撮影するためには、線分63に対する角度が0°〜90°の範囲内になる位置のうち、より角度が大きくなる位置に、視点51を設定することが好ましい。   By setting the position of the viewpoint 51 in this way, the player character C1 sets the position of the virtual camera Ca while avoiding the image taken by the virtual camera Ca entering the obstacle 42 from being displayed on the display 2. It is possible to capture an image having a wide field of view by suppressing the field of view from being largely blocked. In order to secure the field of view of the virtual camera Ca as wide as possible, the viewpoint 51 is set at the intersection 62, that is, the same position as described with reference to FIG. 8C of the first embodiment. preferable. Further, in order to capture an image overlooking the virtual game space 40, the viewpoint 51 is set at a position where the angle is larger among the positions where the angle with respect to the line segment 63 is in the range of 0 ° to 90 °. Is preferably set.

(その他の実施の形態)
ところで、以上の説明では、注視点XがプレイヤキャラクタC1の上方の所定位置に固定的に設けられていることとしているが、これに限られない。例えば、カメラ領域50が障害物42と重複することとなった場合には、プレイヤキャラクタC1の真上の位置から、障害物42に対して離隔する方向へ注視点Xの位置を移動させてもよい。この場合、カメラ領域50の中心50aから障害物42の境界までの距離に応じて、注視点Xを移動させる距離を異ならせることができる。また、このように注視点Xの位置をプレイヤキャラクタC1の真上の位置から移動させる場合、移動後の注視点Xの位置を採用して、上述した実施の形態1〜4に係るカメラ位置補正処理を行えばよい。
(Other embodiments)
Incidentally, in the above description, the gaze point X A is although the fact that fixedly provided at a predetermined position above the player character C1, not limited to this. For example, if the camera region 50 becomes overlap with obstacles 42 from the position directly above the player character C1, by moving the position of the gazing point X A in the direction of away from the obstacle 42 Also good. In this case, in accordance with the distance from the center 50a of the camera region 50 to the boundary of the obstacle 42, it is possible to vary the distance to move the gazing point X A. Also, when moving in this way the position of the focus point X A from the position directly above the player character C1, adopts the position of the gazing point X A after movement, according to the first to fourth embodiments described above camera A position correction process may be performed.

また、注視点Xの位置はプレイヤキャラクタC1の上方に限られず、プレイヤキャラクタC1を基準とする他の所定位置、例えば、プレイヤキャラクタC1の足元の位置(即ち、プレイヤキャラクタC1の原点座標である点X)に設定されていてもよい。更に、注視点XはプレイヤキャラクタC1を基準として位置決めされず、視点51から所定距離の位置に設定され、視点51を中心にしてプレイヤの操作によって自由に視点51の向きを変更できるような仮想カメラCaの制御においても、本発明を適用することができる。また、プレイヤの操作によっては、仮想カメラCaの位置や向きを変更することができないようなゲームにおいても、本発明を適用することができる。 The position of the fixation point X A is not limited to above the player character C1, other predetermined position relative to the player character C1, for example, the position of the feet of the player character C1 (i.e., the origin coordinates of the player character C1 Point X B ) may be set. Furthermore, the gaze point X A is not positioned player character C1 as a reference, it is set from the viewpoint 51 to the position of a predetermined distance, virtual that can freely change the orientation of the viewpoint 51 by the operation of the player about the viewpoint 51 The present invention can also be applied to control of the camera Ca. Further, the present invention can also be applied to a game in which the position and orientation of the virtual camera Ca cannot be changed by a player's operation.

本発明は、仮想カメラが障害物内に入り込んでしまうのを回避しつつ、仮想カメラによって極力広い視野を有する画像を撮影することができるゲームプログラム、及びゲーム装置を提供することができる。   The present invention can provide a game program and a game apparatus that can capture an image having a wide field of view with the virtual camera while avoiding the virtual camera from entering the obstacle.

1 ゲーム装置
5a ゲームプログラム
30 制御部
31 ゲーム空間生成手段
32 キャラクタ制御手段
33 仮想カメラ制御手段
34 禁止領域重複判定手段
50 カメラ領域
50a 中心
51 視点
52 視軸
C1 プレイヤキャラクタ
Ca 仮想カメラ
注視点
DESCRIPTION OF SYMBOLS 1 Game device 5a Game program 30 Control part 31 Game space production | generation means 32 Character control means 33 Virtual camera control means 34 Forbidden area duplication determination means 50 Camera area 50a Center 51 View point 52 Visual axis C1 Player character Ca Virtual camera X A Gaze point

Claims (6)

コンピュータを、
仮想のゲーム空間を生成するゲーム空間生成手段、
前記ゲーム空間を撮影すべく、少なくとも該ゲーム空間内の仮想カメラの視点の位置及び向きを制御し、ゲームの進行に応じて該仮想カメラの視点を設定するための候補位置を算出する仮想カメラ制御手段、及び
前記ゲーム空間内に設定された前記仮想カメラの進入禁止領域に、前記候補位置を領域内に含むように設定されたカメラ領域の少なくとも一部が重複したか否かを判定する禁止領域重複判定手段、として機能させ、
前記仮想カメラ制御手段は、
前記カメラ領域が前記進入禁止領域と重複していない場合には、前記候補位置を前記視点の位置として決定する一方、
前記カメラ領域の少なくとも一部が前記進入禁止領域と重複している場合には、前記候補位置を含む前記カメラ領域を前記進入禁止領域外に設定すると共に、該カメラ領域内において前記候補位置に対し前記視点の向きとは反対側の領域の所定位置を、前記視点の位置として決定するよう構成されていることを特徴とするゲームプログラム。
Computer
Game space generation means for generating a virtual game space;
Virtual camera control that controls at least the position and orientation of the viewpoint of the virtual camera in the game space to capture the game space, and calculates a candidate position for setting the viewpoint of the virtual camera according to the progress of the game A prohibition area for determining whether at least a part of the camera area set to include the candidate position in the area is included in the entry prohibition area of the virtual camera set in the game space Function as duplication judgment means,
The virtual camera control means includes
If the camera area does not overlap with the entry prohibition area, the candidate position is determined as the viewpoint position,
When at least a part of the camera area overlaps with the entry prohibition area, the camera area including the candidate position is set outside the entry prohibition area, and the candidate position is set within the camera area. A game program configured to determine a predetermined position in an area opposite to the direction of the viewpoint as the position of the viewpoint.
前記仮想カメラ制御手段は、前記ゲーム空間内に設定された注視点を前記仮想カメラの視点の視軸が通るように、該視点の向きを制御することを特徴とする請求項1に記載のゲームプログラム。   2. The game according to claim 1, wherein the virtual camera control unit controls the orientation of the viewpoint so that the visual axis of the viewpoint of the virtual camera passes through the gazing point set in the game space. program. 前記注視点は、前記ゲーム空間内で動作するプレイヤキャラクタを基準とする所定位置に配置され、該プレイヤキャラクタに伴って移動するよう設定されていることを特徴とする請求項2に記載のゲームプログラム。   The game program according to claim 2, wherein the gazing point is arranged at a predetermined position based on a player character that moves in the game space, and is set so as to move with the player character. . 前記仮想カメラ制御手段は、前記カメラ領域の少なくとも一部が前記進入禁止領域と重複していると判定された場合は、前記候補位置を含む前記カメラ領域を、前記候補位置及び注視点を結ぶ直線に沿って前記進入禁止領域外へ、前記カメラ領域が該進入禁止領域に隣接するまで移動させた後の位置に設定することを特徴とする請求項1乃至3の何れかに記載のゲームプログラム。   If it is determined that at least a part of the camera area overlaps the entry prohibition area, the virtual camera control means connects the camera area including the candidate position to the straight line connecting the candidate position and the gazing point. 4. The game program according to claim 1, wherein the game program is set to a position after the camera area is moved to the position where the camera area is adjacent to the entry prohibition area. 前記仮想カメラ制御手段は、前記候補位置を含む前記カメラ領域を、前記直線に沿って前記進入禁止領域外へ移動させた位置から更に所定距離だけ下方へ移動させた後の位置に設定することを特徴とする請求項4に記載のゲームプログラム。   The virtual camera control means sets the camera area including the candidate position to a position after moving further downward by a predetermined distance from the position moved outside the entry prohibition area along the straight line. The game program according to claim 4, wherein the game program is characterized. 請求項1乃至5の何れかに記載のゲームプログラムを記録したプログラム記憶部、及び、該プログラム記憶部に記憶されたゲームプログラムを実行するコンピュータ、を備えることを特徴とするゲーム装置。   A game apparatus comprising: a program storage unit that records the game program according to claim 1; and a computer that executes the game program stored in the program storage unit.
JP2014092688A 2014-04-28 2014-04-28 Game program and game device Pending JP2014184300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014092688A JP2014184300A (en) 2014-04-28 2014-04-28 Game program and game device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014092688A JP2014184300A (en) 2014-04-28 2014-04-28 Game program and game device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2010207351A Division JP5539133B2 (en) 2010-09-15 2010-09-15 GAME PROGRAM AND GAME DEVICE

Publications (1)

Publication Number Publication Date
JP2014184300A true JP2014184300A (en) 2014-10-02

Family

ID=51832426

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014092688A Pending JP2014184300A (en) 2014-04-28 2014-04-28 Game program and game device

Country Status (1)

Country Link
JP (1) JP2014184300A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017184982A (en) * 2016-04-05 2017-10-12 株式会社カプコン Game program and game system
US10675539B2 (en) 2015-10-14 2020-06-09 Square Enix Co., Ltd. Game program and game system
JP2021535806A (en) * 2018-12-05 2021-12-23 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Virtual environment observation methods, devices and storage media

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005100184A (en) * 2003-09-25 2005-04-14 Genki Kk Three-dimensional image processor, three-dimensional image processing method and program
WO2007129477A1 (en) * 2006-05-09 2007-11-15 Sega Corporation Image processing device and image processing program
JP2009087277A (en) * 2007-10-03 2009-04-23 Square Enix Holdings Co Ltd Image-generating device, image-generating program, image-generating program recording medium, and image-generating method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005100184A (en) * 2003-09-25 2005-04-14 Genki Kk Three-dimensional image processor, three-dimensional image processing method and program
WO2007129477A1 (en) * 2006-05-09 2007-11-15 Sega Corporation Image processing device and image processing program
JP2009087277A (en) * 2007-10-03 2009-04-23 Square Enix Holdings Co Ltd Image-generating device, image-generating program, image-generating program recording medium, and image-generating method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6015027996; '「ゼルダの伝説 時のオカリナ 実況プレイ Vol:46」' [online] , 20150706 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10675539B2 (en) 2015-10-14 2020-06-09 Square Enix Co., Ltd. Game program and game system
JP2017184982A (en) * 2016-04-05 2017-10-12 株式会社カプコン Game program and game system
JP2021535806A (en) * 2018-12-05 2021-12-23 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Virtual environment observation methods, devices and storage media
JP7191210B2 (en) 2018-12-05 2022-12-16 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Virtual environment observation method, device and storage medium

Similar Documents

Publication Publication Date Title
WO2018092774A1 (en) Simulation system, processing method, and information storage medium
JP5800473B2 (en) Information processing program, information processing apparatus, information processing system, and information processing method
JP5161256B2 (en) Program, information storage medium, and image generation apparatus
US8262477B2 (en) Information storage medium, game device, and method of controlling game device
JP6681352B2 (en) Information processing system, information processing program, information processing device, information processing method, game system, game program, game device, and game method
JP4673570B2 (en) Image generation apparatus, image display method, and program
JP4792878B2 (en) Competitive video game control program
JP7058034B2 (en) Game processing program, game processing method, and game processing device
JP2012059011A (en) Program, information storage medium and image generation device
US9345972B2 (en) Information storage medium, image generation system, and image generation method
JP5425881B2 (en) GAME DEVICE, GAME DEVICE CONTROL METHOD, AND PROGRAM
JP2010017395A (en) Program, information storage medium, and game machine
JP2015154219A (en) image generation system and program
US20120306869A1 (en) Game device, image display device, stereoscopic image display method and computer-readable non-volatile information recording medium storing program
JP5539133B2 (en) GAME PROGRAM AND GAME DEVICE
JP2019046120A (en) Method executed by computer to provide virtual experience, program and computer
JP2004337305A (en) Game apparatus, game control program, and recording medium with the program recorded thereon
JP2014184300A (en) Game program and game device
JP6273243B2 (en) Apparatus, method, and program for interacting with objects in virtual reality space
JP2019000138A (en) Game program, game device, and server device
JP6313937B2 (en) Game program and game system
JP2012215934A (en) Program, information storage medium, terminal, and server
JP6122047B2 (en) GAME PROGRAM AND GAME DEVICE
JP2015221068A (en) Game program
JP6588942B2 (en) GAME PROGRAM, GAME DEVICE, AND SERVER DEVICE

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150714

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150911

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20151104