Game apparatus, game controlling method and storage medium for determining a terrain based on a distribution of collision positions

A non-limiting example game system includes a game apparatus, and a terminal device and a television are connected to the game apparatus. A game image to be displayed on the television is an image that various kinds of objects arranged in a virtual space are imaged by a virtual camera. A determination object of a three-dimensional shape in a traveling direction of a player object is sequentially moved from a start position that differs for each time to a target position that is decided according to a predetermined rule, and terrain (inclination and height of the ground) in the traveling direction of the player object based on a principal component analysis of a plurality of positions that the determination object collides with a terrain object is determined.

CROSS REFERENCE OF RELATED APPLICATION

The disclosure of Japanese patent application No. 2016-115873 filed on Jun. 10, 2016 is incorporated by reference.

FIELD

This application describes a game apparatus, a game controlling method, and a storage medium, which produces a game image to be displayed on a display.

SUMMARY

It is a primary object of an embodiment(s) is to provide a novel game apparatus, game controlling method and storage medium.

Moreover, it is another object of the embodiment(s) is to provide a game apparatus, game controlling method and storage medium, capable of determining terrain automatically.

A first embodiment is a game apparatus, comprising a terrain arrangement portion, a character movement control portion, a calculation portion, a terrain determination portion, and a game processing portion. The terrain arrangement portion is configured to arrange terrain objects in a virtual space. The terrain object is also called, for example, a background object, and means various kinds of objects such as a flat plane, a hill (slope), a floor, a wall, a cliff, a tree, etc. The character movement control portion is configured to move a character object in the virtual space based on an operation of a player. The calculation portion is configured to calculate collision positions that a plurality of determination regions having a three-dimensional shape collide with the terrain object respectively in case that the determination regions are moved in directions that are respectively decided according to predetermined rules from a plurality of positions that are relatively set from a position of the character object. However, it is unnecessary to actually move the determination regions in the virtual space, and it is determined whether the determination regions collide with the terrain object on the assumption that the determination regions are moved, and the collision positions are calculated (acquired) in a case of colliding. The terrain determination portion is configured to determine, based on a distribution of a plurality of collision positions, terrain of the terrain object within a predetermined range from the position of the character object. The game processing portion is configured to perform predetermined game processing according to terrain that is determined by the terrain determination portion. For example, an animation of the character object is changed according to the terrain. Moreover, a movement speed of the character object is changed. Furthermore, display of a graphical user interface for selecting an action to be performed by the character object is controlled.

According to the first embodiment, since terrain of the terrain object is determined based on the collision positions that a plurality of determination regions collide with the terrain object, it is possible to automatically determine terrain without storing motion data in a polygon constituting the terrain object.

A second embodiment is the game apparatus according to the first embodiment, wherein the determination regions have a spherical shape.

According to the second embodiment, since the determination region has a spherical shape, it is sufficient to only determine whether a terrain object exists at a position corresponding to a length of a radius of the determination region in a path that the determination region moves, for example, and therefore, determination processing is simple.

A third embodiment is the game apparatus according to the first embodiment, wherein the character movement control portion is configured to further control a direction of the character object based on an operation of the player. The calculation portion is configured to calculate collision position in case of moving the determination region from start position that is set in association with the position of the character object toward target position that is decided to a side of the traveling direction of the character object.

According to the third embodiment, since terrain in the traveling direction of the character object is determined automatically, it is possible to perform predetermined processing appropriately.

A fourth embodiment is the game apparatus according to the third embodiment, wherein the calculation portion is configured to respectively calculate collision positions in case of respectively moving the plurality of determination regions by deciding, based on the collision position that is calculated in association with a predetermined determination region, a next target position for the determination region to a side of the traveling direction of the character object.

According to the fourth embodiment, since a next target position in the traveling direction of the character is decided by using a previous collision position of the determination region, it is possible to decide a target position appropriately according to a change of the terrain. Therefore, it is possible to accurately determine terrain.

A fifth embodiment is the game apparatus according to the fourth embodiment, wherein the calculation portion is configured to decide a position as a next target position for the determination region, the position being a position that is further shifted from a position that the determination region is moved by a first predetermined amount from the collision position in a direction opposite to a normal direction of the terrain object at the collision position, by a second predetermined amount in a direction perpendicular to the direction of the normal and in the traveling direction of the character object.

A sixth embodiment is the game apparatus according to the fourth embodiment, wherein the calculation portion is configured to decide a position as a next target position for the determination region, the position being a position that is further shifted from a position that a determination object is moved by a first predetermined amount from the collision position in a direction perpendicular to a direction of a normal of the terrain object at the collision position and in the traveling direction of the character object, by a second predetermined amount in a vertically downward direction.

A seventh embodiment is the game apparatus according to the fifth embodiment, wherein the normal direction is recalculated based on an outer product of the normal direction of the terrain object and a just beside direction of the traveling direction of the character object.

According to the seventh embodiment, even when the character object is standing on a slope inclined in the lateral direction with respect to the traveling direction, a deviation can be eliminated and the target position can be set toward the traveling direction.

An eighth embodiment is the game apparatus according to the first embodiment, wherein the terrain determination portion is configured to calculate at least an inclination of the terrain based on a distribution of a plurality of collision positions. The game processing portion is configured to perform the game processing that controls the character object so as to perform an animation according to the inclination of the terrain that is determined by the terrain determination portion.

According to the eighth embodiment, since the character object is displayed with the animation according to the inclination of the terrain, it is possible to eliminate as much as possible a sense of discomfort in a movement of the character object.

A ninth embodiment is the game apparatus according to the eighth embodiment, wherein the terrain determination portion is configured to perform a principal component analysis of the distribution of the plurality of collision positions so as to calculate the inclination of the terrain based on the principal component analysis.

According to the ninth embodiment, since the inclination of the terrain is calculated based on the principal component analysis, it is possible to easily estimate approximate terrain.

A tenth embodiment is the game apparatus according to the eighth embodiment, wherein the terrain determination portion is configured to calculate a regression line based on the distribution of the plurality of collision positions so as to calculate the inclination of the terrain from the regression line.

According to the tenth embodiment, it is also possible to know the inclination of the terrain by evaluating the regression line.

An eleventh embodiment is the game apparatus according to the third embodiment, wherein the calculation portion is configured to determine, when a processing result in a case of moving the determination region toward a target position from a start position satisfies a predetermined condition, whether there is the terrain that is looked down from the character object in the traveling direction of the character object. For example, it is determined whether a cliff or a wall exists (is arranged) in the traveling direction of the character object so that the character object looks down.

According to the eleventh embodiment, it is possible to determine whether the terrain that is looked down from the character object is arranged as needed.

A twelfth embodiment is the game apparatus according to the eleventh embodiment, wherein the calculation portion is configured to decide, when there is no position that collides with the terrain in a case of moving the determination region toward the target position from the start position, the target position as a next start position for the determination region and a next target position for the determination region in downward direction from the next start position for the determination region.

A thirteenth embodiment is the game apparatus according to the twelfth embodiment, wherein the calculation portion is configured to perform first determination processing that determines a side of the terrain to be looked down when there is no position that collides with the terrain in a case of moving the determination region toward the next target position from the next start position for the determination region.

A fourteenth embodiment is the game apparatus according to the eleventh embodiment, wherein the calculation portion is configured to perform second determination processing that determines a side of the terrain to be looked down when a positional relation with the character object among a plurality of collision positions calculated in a case of moving a plurality of determination regions has a predetermined relationship.

A fifteenth embodiment is a game controlling method in a game apparatus comprising a terrain arrangement portion that arrange terrain objects in a virtual space and a character movement control portion that moves a character object in the virtual space based on an operation of a player, comprising steps of: (a) calculating collision positions that a plurality of determination regions having a three-dimensional shape collide with the terrain object relatively in case that the determination regions are moved in directions that are respectively decided according to predetermined rules from a plurality of positions that are relatively set from a position of the character object; (b) determining terrain of the terrain object within a predetermined range from the position of the character object based on a distribution of the plurality of collision positions; and (c) performing predetermined game processing according to terrain that is determined in the step (b).

A sixteenth embodiment is a non-transitory storage medium storing a game program to be executed by a computer, wherein the game program causes one or more processors to perform: a terrain arrangement step arranging terrain objects in a virtual space; a character movement control step moving a character object in the virtual space based on an operation of a player; a calculation step calculating collision positions that a plurality of determination regions having a three-dimensional shape collide with the terrain object relatively in case that the determination regions are moved in directions that are respectively decided according to predetermined rules from a plurality of positions that are relatively set from a position of the character object; a terrain determination step determining terrain of the terrain object within a predetermined range from the position of the character object based on a distribution of a plurality of collision positions, terrain of the terrain object; and a game processing step performing predetermined game processing according to terrain that is determined in the terrain determination step.

Also in the fifteenth and sixteenth embodiments, like the first embodiment, it is possible to automatically determine terrain.

The above described objects and other objects, features, aspects and advantages of the embodiments will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

DETAILED DESCRIPTION OF NON-LIMITING EXAMPLE EMBODIMENTS

In the following, a non-limiting example game system10according to an embodiment with reference to drawings. The game system10shown inFIG. 1includes a stationary game apparatus12and a portable terminal device14. Moreover, the game system10includes a stationary display device16typified by a television receiver or the like (hereinafter, referred to as “television”), and a game apparatus12and the television16are connected to each other via a connection cord. The game system10performs game processing in the game apparatus12based on a game operation using the terminal device14, and displays a game image obtained by the game processing on the television16and/or the terminal device14.

Although illustration is omitted, an optical disk is detachably inserted into the game apparatus12, which is an example of an information storage medium that is used interchangeably for the game apparatus12concerned. An information processing program (an application program typically like a game program) to be executed in the game apparatus12is stored in the optical disk. The game apparatus12performs information processing (game processing) by reading and executing the information processing program recorded in the optical disk.

The television16displays a game image obtained by the game processing performed in the game apparatus12. The television16has a speaker16a(FIG. 2), and the speaker16aoutputs a game sound obtained as a result of the above-described game processing.

In addition, in another embodiment, the game apparatus12and the stationary display may be integrated with each other. Moreover, communication between the game apparatus12and the television16may be wireless communication.

The terminal device14transmits or receives data to or from the game apparatus12at least. A user (player) can use the terminal device14while moving the terminal device14with his/her hand, or arranging the terminal device14at a free position. The terminal device14comprises an operation portion such as a touch panel56, an analog stick58and an operation button60, and a display portion such as an LCD62. It is possible to perform communication with the game apparatus12by wireless communication using technology of Bluetooth (registered trademark), for example. However, the terminal device14and the game apparatus12may be connected with each other by a cable. The terminal device14receives from the game apparatus12data of an image (game image, for example) that is produced in the game apparatus12, and displays the received image on the LCD62. Moreover, the terminal device14transmits operation data representing content of an operation that is performed on its own machine to the game apparatus12.

FIG. 2is a block diagram showing non-limiting example electric structure of the game apparatus12. The game apparatus12has a CPU20, a system LSI22, an external main memory26, a ROM/RTC28, an AV-IC36, etc.

By executing the game program recorded in the optical disk, the CPU20performs the game processing, and functions as a game processor. The CPU20is connected to the system LSI22. The external main memory26, the ROM/RTC28and the AV-IC36are connected to this system LSI22in addition to the CPU20. The system LSI22performs processing such as control of data transfer between respective components connected to the system LSI22, producing an image to be displayed, acquiring data from an external information processing apparatus, and so on.

A volatile external main memory26is a memory for storing a game program read from the optical disk, a game program read from the flash memory24and various kinds of data, and used as a working area and a buffer area for the CPU20. The ROM/RTC28has a ROM (so called a boot ROM) in which a program for starting the game apparatus12is incorporated, and a clock circuit (RTC) for counting time.

In addition, the program data, texture data, etc. read from the optical disk are written in an internal main memory22edescribed later or the external main memory26.

An input/output processor (I/O processor)22a, GPU22b, DSP22c, VRAM22dand the internal main memory22eare provided in the system LSI22. Although illustration is omitted, these components22a-22eare connected to each other by an internal bus.

The GPU22bforms a part of a drawing portion, and produces image data according to a graphics command (drawing instruction) from the CPU20. However, data such as polygon data, texture data, etc. read from the main memory (22e,26) are stored in the VRAM22d, and the GPU22bproduces image data using the data. In this embodiment, the game apparatus12produces image data of the game image to be displayed on the television16(hereinafter, called “game image for television”).

The DSP22cfunctions as an audio processor, and produces sound data using sound data and sound wave form (tone) data stored in the internal main memory22eand the external main memory26. In addition, in this embodiment, the game apparatus12produces sound data of the game sound to be output from the speaker16aof the television16(hereinafter, called “game sound for television”).

As described above, data of image and sound to be output on the television16(including sound effect, music, etc.) out of the images and sounds produced in the game apparatus12are read by the AV-IC36. The AV-IC36outputs, via an AV connector38, the read image data to the television16, and the read sound data to the speaker16athat is incorporated in the television16, whereby an image is displayed on the television16and a sound or voice is output from the speaker16a.

The input/output processor22aperforms transmission and reception of data with the components connected to the same, or performs download of data from external information processing apparatus. Moreover, the input/output processor22ais connected to the flash memory24and a codec LSI30. Furthermore, the codec LSI30is connected to a terminal communication module32, and an antenna34is connected to the terminal communication module32.

By executing the game program, the CPU20reads data stored in the flash memory24so as to utilize by the game program. The flash memory24may store with save data (result data or intermediate data) of the game that is played using the game apparatus12in addition to data transmitted or received between the game apparatus12and external information processing apparatus.

In addition, although illustration is omitted, the input/output processor22acan be connected to a network such as the Internet with using a network communication module so as to communicate (transmit and receive data) with the external information processing apparatus (other game apparatuses or various servers, etc., for example) connected to the network.

Moreover, the game apparatus12can transmit and receive data to and from the terminal device14. When transmitting data to the terminal device14, the input/output processor22aoutputs the data to be transmitted to the codec LSI30. The codec LSI30performs predetermined compression processing to the data that is sent from the input/output processor22a. The terminal communication module32performs wireless communication with the terminal device14. Therefore, data compressed by the codec LSI30is transmitted to the terminal device14by the terminal communication module32via the antenna34. In this embodiment, the codec LSI30compresses data with using highly efficient compression technology such as H264 standard, for example.

Moreover, the game apparatus12can receive (accept) various kinds of data from the terminal device14. In this embodiment, the terminal device14transmits operation data, image data and sound data. Each data transmitted from the terminal device14is received by the terminal communication module32via the antenna34. Here, the image data and the sound data from the terminal device14are subject to the same compression processing as the data that is transmitted from the game apparatus12to the terminal device14.

Therefore, the image data and the sound data are sent to the codec LSI30from the terminal communication module32, and subjected to extension processing by the codec LSI30to be output to the input/output processor22a.

On the other hand, because the operation data from the terminal device14is little data amount compared with the image data and the sound data, there is no need to subject the compression processing to the operation data. Moreover, the operation data may be or may not be encrypted as necessary. The operation data is output to the input/output processor22avia the codec LSI30after the same is received by the terminal communication module32. The input/output processor22astores (temporarily stores) the data that is received from the terminal device14into the buffer area of the internal main memory22eor the external main memory26.

In addition, there is no necessity that the structure of the game apparatus12is limited. For example, it is also possible to have structure capable of connecting with expansion devices.

FIG. 3is a block diagram showing non-limiting example electric structure of the terminal device14. As shown inFIG. 3, the terminal device14comprises, in addition to the structure shown inFIG. 1, a user interface controller (UI controller)50, a touch panel controller54, a codec LSI52, a speaker66, a sound IC64, a microphone68, a wireless module70, an antenna72and a flash memory74. These electronic components are mounted on an electronic circuit board, and accommodated within a housing.

The UI controller50is a circuit for controlling inputs and outputs of data to various kinds of input-and-output portions. This UI controller50is connected to the touch panel controller54, the analog stick58and the operation button60. Moreover, the UI controller50is connected to the codec LSI52.

The touch panel controller54is a circuit that is connected to the touch panel56to control the touch panel56. The touch panel controller54produces touch position data of a predetermined format based on a signal from the touch panel56, and outputs the touch position data to the UI controller50. The touch position data represents coordinates of a position (touch position) at which an input is performed on an input face of the touch panel56.

The analog stick58outputs to the UI controller50stick data representing a direction and amount that a stick portion operated by a finger of the user is slid (inclined). Moreover, the operation button60outputs to the UI controller50operation button data representing an input situation (depressed or not) to various kinds of operation buttons or key switches.

The UI controller50outputs to the codec LSI52operation data that includes the touch position data, the stick data and the operation button data received from the above-described respective components.

The codec LSI52is a circuit that performs compression processing to data to be transmitted to the game apparatus12, and extension processing to data transmitted from the game apparatus12. The LCD62, the sound IC64, the wireless module70and the flash memory74are connected to the codec LSI52. Moreover, the codec LSI52includes a CPU52aand an internal memory52b.

The antenna72is connected to the wireless module70, and the wireless module70transmits transmission data to the game apparatus12via the antenna72. The wireless module70has the same function as the terminal communication module32of the game apparatus12. As described above, the operation data, the image data and the sound data are included in the transmission data to be transmitted to the game apparatus12from the terminal device14.

In addition, although the terminal device14of this embodiment is provided with an operation portions such as the touch panel56, the analog stick58and the operation button60, in another embodiment, it may be structure having another operation portion instead of these operation portions or together with these operation portions. For example, at least one of a magnetic sensor, an acceleration sensor and a gyro sensor may be provided as a sensor for calculating a motion (including a position and/or attitude or a change in position and/or attitude) of the terminal device14.

Moreover, although the terminal device14is configured to have a camera and the microphone68, in another embodiment, the terminal device14does not need to have the camera and the microphone68, or may have one of them only.

The game apparatus12that is an example of information processing apparatus also functions also as an image processing apparatus, and produces and outputs (displays) image data. Briefly describing, the GPU22bperforms modeling of various kinds of objects in a three-dimensional virtual space under instructions of the CPU20. That is, various kinds of objects are produced or arranged in the virtual space, whereby a certain sight (scene) can be produced. An image that this scene is imaged by the virtual camera (viewed from a viewpoint) is displayed on the television16(monitor). Describing specific image processing, a scene is first produced in the three-dimensional virtual space (world coordinate system), and the scene produced in the virtual space is converted (perspective transformation) into a coordinate system captured from the virtual camera (camera coordinate system). For example, an image viewed from the viewpoint is perspective-projected on a virtual screen. Next, clipping and hidden-surface-removal processing are performed. Subsequently, by applying shading, brightness (shade) of an object surface is expressed. Furthermore, by applying shadowing, a shadow caused by the object is expressed. Then, texture mapping is performed. A two-dimensional image is thus produced (drawn) and two-dimensional image data corresponding to the produced two-dimensional image is output to the television16via the AV-IC36and the AV connector38. Producing two-dimensional image data from three-dimensional data is called rendering.

FIG. 4shows a non-limiting example game screen100of a virtual game of this embodiment. In this game screen100, a character object (player object102) and a terrain object104are included. Although omitted inFIG. 4, in the game screen100(virtual space), other character objects such as an enemy object and item objects are also included.

The player object102performs, according to an operation of a player, arbitrary actions such as changing a direction in the virtual space, moving in the virtual space, using an item like arms and so on. Therefore, for example, the player object102may fight with an enemy object, and may acquire an item object. Moreover, an enemy object is a non-player object, and the non-player object performs, according to control of a computer (CPU20) irrespective of an operation of the player, arbitrary actions such as moving in the virtual space, etc. The terrain object104is called also a background object etc., and an object of terrain arranged in the virtual space. In this embodiment, the terrain means flat ground, uneven ground, hill (slope), floor, tree, grass, flower, building, stairway, cave, cliff, wall (step difference), etc.

As described above, the virtual space of this embodiment is a three-dimensional virtual space, and a world coordinate system is set to this virtual space. For example, a two-dimensional plane (horizontal plane) and a position in a horizontal direction in the virtual space are expressed by an X-axis and a Y-axis of the world coordinate system, and a position in a height direction in the virtual space is expressed by a Z-axis of the world coordinate system.

In such a game apparatus12, an animation when the player object102moves is changed according to terrain, or an action is selected according to terrain around the player object102.

For example, since an animation when the player object102moves (runs, walks, etc.) on the flat ground, an animation when the player object102goes up a hill and an animation when the player object102goes down a hill are different from each other, it needs to appropriately select an animation according to terrain and display the player object102.

For example, when moving on the flat ground, the player object102walks upright or runs with a slight forward tilted posture. Moreover, when going up a hill, the player object102walks with a forward tilted posture or runs with a forward tilted posture, and an angle of the forward tilted posture is changed according to a gradient of the hill. Furthermore, when going down a hill, the player object102walks with a backward tilted posture or runs with a backward tilted posture, or when a gradient of the hill is large, the player object102slides down or goes down while gripping the ground (slope) of the hill. Furthermore, when moving up or down along a wall, a cliff or a tree, the player object102gets climbing up or down with gripping a wall side, a cliff side or the tree.

Moreover, when the player object102goes up a hill or goes down a hill, it is necessary to change a movement speed of the player object102according to a gradient (size of inclination) of the hill. Moreover, when terrain is changed from a hill to the relatively flat ground (horizontal plane), it is necessary to appropriately change an animation before and after the change.

Furthermore, when there is a cliff or wall looked up by the player object102in a traveling direction of the player object102, a graphical user interface (GUI) for allowing the player to select whether to go up the cliff or wall must be displayed. This is also the same in a case where there is a tree in front of the player object102. Furthermore, when there is a cliff or wall looked down by the player object102in a traveling direction of the player object102, a GUI for allowing the player to select whether to go down the cliff or wall must be displayed.

In a general game apparatus12, a control code including an action code indicating an action to be performed by the player object102, a type code indicating a type of a terrain polygon, etc. are stored in advance corresponding to a polygon constituting the terrain object104, and by referring to the stored control code, an animation of the player object102is changed or a GUI for allowing the player object102to select going up or going down the cliff or wall (action of the player object102) is displayed.

However, when storing the above-described control code corresponding to a polygon that constitutes a terrain object104, a storing work is troublesome, and if a game field (map) produced in a virtual space is comparatively large, it requires a lot of labor and a work cost. Moreover, a memory capacity becomes huge. Moreover, in such a case, there is a problem that it cannot deal with moving terrain. For example, when a large tree is standing, it can be determined that there is a wall in the traveling direction of the player object102; however, when this tree collapses, it is impossible to determine that there is no wall in the traveling direction of the player object102.

Then, in this embodiment, terrain in the traveling direction of the player object102is determined according to a predetermined algorithm. That is, an inclination and a height of the ground in the traveling direction of the player object102are calculated. Moreover, in the traveling direction of the player object102, presence or absence of a cliff (wall) looked down by the player object102is determined.

In this specification, when a comparatively low wall or step (step difference) that the player object102can climb over exists in front of the player object102, or when there is a cliff, wall or tree looked up by the player object102, it will be described simply that there is a wall in front (traveling direction) of the player object102. Moreover, when a cliff or wall looked down from the player object102exists (is arranged) in front of the player object102, it will be described simply that there is a cliff in front (traveling direction) of the player object102.

Moreover, in this specification, the traveling direction means a direction that the player object102is moving, a direction that the player object102or a face of the player object102is turned to when the player object102is stopping, or a direction that the player object102should move due to restrictions of the game, etc.

However, as described later, when determining terrain, there is a case where a traveling direction is estimated based on a position where a determination object120collides with the terrain object104.

For example, a method of determining terrain when the player object102moves on the slightly undulating ground will be described with reference toFIG. 5-FIG. 7. Although described specifically in the following, an object120for determining terrain (hereinafter, called “determination object120”) has a sphere shape in a three-dimensional virtual space. However, since each ofFIG. 5-FIG. 7(the same can be also applied to other drawings) is a view that the player object102is viewed from a right side direction, the determination object120is indicated by a circle.

In this embodiment, the determination object120is cast or thrown the predetermined number of times except for cliff side determination processing and expanded cliff side determination processing both described later. Hereinafter, to calculate the collision position when the determination object120is moved in order to determine terrain is referred to as “cast (ing)”. Moreover, a start position when casting the determination object120differs at every time. Furthermore, although the determination object120is cast toward a target position from a start position, a target position of a first time is fixedly decided with respect to a start position of a first time, and a target position of a second and subsequent time is decided basically based on at least a collision position of the last time.

FIG. 5Ashows a start position Pm(m=1, 2, 3, 4, 5) for the determination object120that is set to the player object102. It should be noted that a variable m indicates the number of times and an order of casting the determination object120. As described above, each of the start positions P1-P5is relatively set in advance from a position (foot position, for example) of the player object102. For example, according to a stature of the player object102, a size of the determination object120and a total number of times that the determination object120is cast, the start positions P1-P5are set in an order that the player object102goes from a bottom toward a top.

In this embodiment, the stature of the player object102in the virtual space is set as 180 cm, a diameter of the determination object120is set to about a size of a waist of the player object102(diameter is 60 cm), the total number of times of casting the determination object120is set as 5 (five) times, and a start position P1of a first time is set at a position about 40 cm high from a position of the foot (back of the foot) of the player object102. Other start positions P2-P5are set so as to be moved upward by a radius of the determination object120from the start position P1of the first time. However, a position that each of the start positions P1-P5is set is an example, and it does not need to be limited.

A reason why the start positions P1-P5are thus set is that it is necessary, in this embodiment, to move or shift the determination object120is moved at each time so as to gradually move away from the position near the feet of the player object102toward the traveling direction.

In the following drawings, the start position for the determination object120is the center of a circle shown by Pm, and the target position for the determination object120is a center of the circle shown by Qm, and a position of the determination object120in case that the determination object120collides with (surface of) the terrain object104is the center of a circle shown by Rm. However, a position that the determination object120collides with the terrain object104(hereinafter, called a “collision position”) is a position (point) that an outer circumferential surface of the determination object120and a surface (here, the ground) of the terrain object104contact to each other, and is indicated by Cm. Moreover, in examples shown inFIG. 5B-FIG. 7B, for simplicity, a case where the determination object120is cast 3 (three) times.

As shown inFIG. 5B, at a first time, a target position (end position) Q1is decided with respect to a start position P1that is decided in advance for the player object102, and the determination object120is cast (moved) toward the target position Q1from the start position P1. However, it is unnecessary to actually move the determination object120, and if it is determined that the determination object120collides, thereafter, it does not need to perform calculation for moving the determination object120to the target position Qm.

At the first time, the target position Q1is set according to a predetermined rule (a first rule) with respect to the start position P1. Specifically, the first time target position Q1is set to a position that is shifted from the start position P1by a predetermined distance d1downward by a predetermined angle θ (theta) from the traveling direction of the player object102. In this embodiment, the predetermined angle θ (theta) and the predetermined distance d1are decided in advance based on a simulation (experiment) result etc.

In case of moving or casting the determination object120to the target position Q1from the start position P1, it is determined whether the determination object120collides with (surface of) the terrain object104. If it is determined that the determination object120collides with the terrain object104, a three-dimensional coordinate of a collision position C1shown inFIG. 5Band its related information will be stored in the memory (22e,26). Hereinafter, the same is true in case that the determination object120collides with the terrain object104.

However, whether the determination object120collides with the terrain object104is determined by determining whether a shape (polygon) of the determination object120is contact with a shape (polygon) of the terrain object104.

Moreover, the related information is a normal vector of the polygon constituting the terrain object104at the collision position C1(other collision positions Cmare the same), and surface information of the polygon. The surface information is set as needed, and is information on whether to prohibit the player object102from gripping the surface of the terrain object104, for example. Depending on the content of the game, there is a case where it is desired to make the player object102not grip the surface of the terrain object104due to the progress of the game. For example, when the player object102moves on a gentle slope, it is unnatural that the player object102is displayed with an animation that the player object102goes up with gripping the slope, so there is a case where it is desirable to avoid such animation. Moreover, there is a case where it is desired simply to make the player object102not grip the surface of the terrain object104. Accordingly, by setting the surface information, it is possible to avoid an animation that it is desired to avoid according to the game effect.

If the memory (22e,26) is stored with the three-dimensional coordinate of the collision position C1and its related information, a second target position Q2of a second time for the determination object120is decided according to a predetermined rule (a second rule different from the first rule) based on this collision position C1. That is, in this embodiment, a target position Qmof a second and subsequent time for the determination object120is decided based on the collision position Cm−1of the last time.

However, as described in detail later, in case that the determination object120does not collide with the terrain object104, in order to determine whether a wall (step difference) of about a stature (height) of the player object102exists in the traveling direction of the player object102, a target position Qmis decided according to a predetermined rule (a third rule). Otherwise, in case that the determination object120does not collide with the terrain object104, in order to determine whether determination processing for determining whether a cliff exists in the traveling direction of the player object102is to be performed, a target position Qmis decided according to a predetermined rule (a fourth rule).

As shown inFIG. 6A, when deciding a target position Q2of a second time for the determination object120, a normal vector n of the ground extending from the collision position C1is acquired first. The normal vector n is previously stored in association with the polygon constituting the terrain object104in advance, and a normal vector n corresponding to a polygon including the collision position C1is acquired. In addition, a normal vector n can also be calculated as a direction orthogonally intersecting a polygon. When storing in advance, it is also possible to dare to store a direction not orthogonally intersecting a polygon as a normal vector.

In addition, in order to intelligibly show the normal vector n and a vector n′ opposite to the normal vector n (hereinafter, referred to as “reverse vector”), a length (size) of each vector is indicated with a length about the diameter of the determination object120in the drawings; however, in fact, the normal vector n is a unit vector whose magnitude is 1 (one). However, a size of the normal vector n is a size in the virtual space.

Next, the reverse vector n′ is calculated, and a position that is shifted from an end of the reverse vector n′ by a predetermined distance d2in a direction that is perpendicular to the reverse vector n′ and toward the traveling direction of the player object102is decided as a next target position Q2. The predetermined distance d2is also a value that is experientially decided by a simulation etc., like the predetermined distance d1.

When the next target position Q2is decided, the determination object120is cast toward the target position Q2from the start position P2of the second time. As shown inFIG. 6B, the determination object120collides with the terrain object104(ground) at a position R2. As described above, a next target position Q3is decided based on this collision position C2.

As shown inFIG. 7A, in deciding a target position Q3of a third time for the determination object120, a reverse vector n′ in a direction opposite to the normal vector n of the ground extending from the collision position C2that is acquired as the related information is calculated. Then, a position that is shifted from an end of the reverse vector n′ by the predetermined distance d2in a direction that is perpendicular to the reverse vector n′ and toward the traveling direction of the player object102is decided as a next target position Q3.

However, when deciding a target position Qmof a third and subsequent time, as described later, except a case where the determination object120is moved from an additional start position Pmtoward an additional target position Qm, the traveling direction that is estimated from the one before last collision position Cm−2and the last collision position Cm−1. Specifically, the estimated traveling direction is a direction indicated by a vector that the one before last collision position Cm−2(here, collision position C1) is a start point and the last collision position Cm−1(here, collision position C2) is an end point.

A reason why the traveling direction that is thus estimated is used is that the traveling direction at the current position of the player object102and the traveling direction when the player object102advances may change according to a change in the terrain.

When the next target position Q3is decided, the determination object120is cast toward the target position Q3from the start position P3of the third time. As shown inFIG. 7B, the determination object120collides with the terrain object104(ground) at a position R3.

Although omitting illustration and description, for a fourth and five times as well, target positions Q4and Q5are similarly decided based on last collision positions C3and C4, and the determination object120is cast from each of start positions P4and P5, and collision positions C4and C5are obtained.

If the determination object120is cast the predetermined number of times, based on all the detected collision positions (C1, C2, C3, C4, C5), the inclination and the height of the ground in the traveling direction of the player object102can be calculated. In this embodiment, as shown inFIG. 8, assuming that there is a two-dimensional plane that an axis extending in the traveling direction of the player object102is an X-axis and an axis extended toward the above of the player object102is a Y-axis, all the detected collision positions (C1, C2, C3, C4, C5) are projected (plotted) onto this two-dimensional plane. The inclination (angle) of the ground is calculated from these plotted two-dimensional point information.

In this embodiment, a principal component analysis in an X component and a Y component of the plotted points (collision positions) are evaluated. In addition, the principal component analysis is originally a method for replacing multivariate data with lower dimensional information, thereby to interpret data so as to become a new index. In order to evaluate a principal component, it may decide a linear line that passes through the center of gravity G of a plurality of plotted points and that makes minimum a square sum of distances from each point to this linear line. If a first principal component and a second principal component are obtained as a result of the principal component analysis, as for each of the plotted points, an index of a principal component score (Px, Py) can be obtained. When the first principal component is set as a horizontal axis, the second principal component is set as a vertical axis, and a point that the axis of the first principal component and the axis of the second principal component intersect is set an origin point, this principal component score (Px, Py) represents each of the points being projected on the above-described two-dimensional plane with the axis of the first principal component and the axis of the second principal component as a reference.

Moreover, it is known that the inclination a for each of the two-dimensional points is acquirable when performing the principal component analysis on the data of the points. Mathematically, principal component analysis results are obtained by performing eigenvalue decomposition on a variance-covariance matrix. The inclination a is an inclination of a primary function (y=ax+b) calculated by the principal component analysis, and as shown by Equation 1, can be evaluated as a ratio of respective principal component scores. Here, a range of the inclination a is −1 or more and 1 or less (−1≤a≤1).
inclinationa=Px/Py[Equation 1]

As understood from Equation 1, when the principal component score Py is 0 (zero), the inclination a cannot be calculated because divergence occurs. In this case, since only the principal component score Px is high, it is possible to determine that the inclination a is near horizontal. Inversely, when the principal component score Px is near 0 (zero) and only the principal component score Py is high, it is possible to determine that the inclination a is near vertical.

For example, if the inclination a is less than 0.2, it is determined that terrain is the flat ground. Moreover, if the inclination a is 0.3 or more and less than 0.5, it is determined that terrain is a gentle uphill. Furthermore, if the inclination a is 0.5 or more 0.5 and less than 0.8, it is determined that terrain is a steep uphill. Moreover, if the inclination a is 0.8 or more, it is determined that terrain is a wall. However, when the inclination a indicates a negative value, it is determined that terrain is a downhill or that terrain is a wall or cave slanting toward the player object102.

In addition, when it is determined that there is a cliff in the traveling direction of the player object102to be described later, if the inclination a is a positive numeral value, it is determined that a cliff side is eroded at a side of the player object102, and if the inclination a is a negative numeral value, it is determined that terrain is a shape close to a precipitous cliff or a steep downhill.

Moreover, a point that a linear line passing through the center of gravity G of a plurality of points plotted by the inclination a intersects the Y-axis is an intercept b. The intercept b indicates a height of the ground with respect to the player object102. However, in fact, since the collision position Cmis stored, it is possible to know the height of the ground by the Z coordinate of the collision position Cm.

Thus, from the principal component analysis, an average inclination (angle) at the time of expressing the ground (surface of the terrain object104) with a single slope can be evaluated. However, since what calculated by the principal component analysis is a linear line, for example, when evaluating an extremely long distribution profile, it may be considerably different from an actual inclination (angle). Therefore, a method according to this embodiment should be applied to a short section (within a predetermined range from the position of the player object102) of about several meters in the virtual space. The number of times of casting the determination object120, the predetermined distance d1and the predetermined distance d2are set so that such a condition can be satisfied.

Moreover, the second principal component can be used to determine how much the evaluated inclination a can be considered to be “linear line”. By this second principal component, it is possible to know dispersion with respect to the inclination a, that is, a degree of unevenness of the ground.

FIG. 9Ais an illustration view for explaining setting of the target positions Qmand the collision positions Cmof the determination object120when terrain with a flat surface is determined, andFIG. 9Bis an illustration view for explaining setting of the target positions Qmand the collision positions Cmof the determination object120when a comparatively steep uphill is determined. Moreover,FIG. 10is an illustration view for explaining setting of the target positions Qmand the collision positions Cmof the determination object120when it is determined that there is a vertical wall in the traveling direction of the player object102. Furthermore,FIG. 11is an illustration view for explaining setting of the target positions Qmand the collision positions Cmof the determination object120when it is determined that there is a wall slanting to a side of the player object102in the traveling direction of the player object102.

Since the collision positions Cmare located in a line along the flat ground when the player object102exists on the flat ground as shown inFIG. 9A, the target positions Qmare also located in a line along the ground. However, as described above, the target position Q1of the first time is decided obliquely downward in the traveling direction of the player object102according to the first rule, and in the second and subsequent time, the target position Qm+1is set based on the reverse vector n′ of the normal vector n at the collision position Cmaccording to the second rule, and therefore, the target position Qmis set at a position buried in the ground. This is true inFIG. 9B.

When the player object102exists on the flat ground but there is an uphill slope in a forward direction as shown inFIG. 9B, the collision positions Cmare located in line along a flat plane in a place near the player object102and if separating from the player object102, the collision positions Cmare located in line along the slope. Since the collision positions C1and C2are on the flat ground surface, the target positions Q2and Q3are set so as to be along this ground. Since the collision positions C3and C4are on the slope surface, the target positions Q4and Q5are set so as to be along this slope.

As described above, when deciding the target positions Q3-Q5of the third and subsequent times, a direction indicated by a vector that the one before last collision position Cm−2is a start point and the last collision position Cm−1is an end point is estimated as the traveling direction. Therefore, as shown inFIG. 9B, the target positions Q3-Q5are decided so as to move diagonally upward along the uphill slope as viewed from the player object102.

When the player object102exists on the flat ground but there is a wall looked up by the player object102in a forward direction as shown inFIG. 10, the collision positions Cmare located in line along a flat plane in a place near the player object102and if separating from the player object102, the collision positions Cmare located in line along a cliff side (wall side). Since the collision positions C1and C2are on the flat ground surface, the target positions Q2and Q3are set so as to be along this ground. Since the collision positions C3and C4are on the cliff side (wall side), the target positions Q4and Q5are set so as to be along this side (wall side).

As described above, when deciding target positions Q3-Q5of the third and subsequent times, a direction indicated by a vector that the one before last collision position Cm−2is a start point and the last collision position Cm−1is an end point is estimated as the traveling direction. Therefore, as shown inFIG. 10, the target positions Q4and Q5are decided so as to move diagonally upward along the vertical wall as viewed from the player object102.

When the player object102exists on the flat ground surface but there is a cliff (wall) that is looked up by the player object102and slants toward the player object102in a forward direction as shown inFIG. 11, the collision positions Cmare located in line along a flat plane in a place near the player object102and if separating from the player object102, the collision positions Cmare located in line along a cliff side (wall side). Since the collision positions C1and C2are on the flat ground surface, the target positions Q2and Q3are set so as to be along this ground. Since the collision positions C3and C4are on the cliff side (wall side), the target positions Q4and Q5are set so as to be along this side (wall side).

As described above, when deciding target positions Q3-Q5of the third and subsequent times, a direction indicated by a vector that the one before last collision position Cm−2is a start point and the last collision position Cm−1is an end point is estimated as the traveling direction. Therefore, as shown inFIG. 11, the target positions Q4and Q5are decided so as to move diagonally upward along the wall slanting toward the player object102as viewed from the player object102.

As shown inFIG. 12, when there is a comparatively low wall (step difference) in the traveling direction of the player object102, the collision position C1is located on the flat ground surface in a place near the player object102and the collision position C2exists on the wall side. In case that the determination object120is cast for the third time, this determination object120does not collide with the terrain object104.

In such a case, as shown inFIG. 13, the current target position (here, the third time target position Q3) is decided as an additional start position P4, and a position that is shifted vertically upward from the additional start position P4by the predetermined distance d3(in this embodiment, a stature (height) of the player object) is decided as an additional target position Q4. That is, the target position Q4is decided according to the third rule.

A reason why the additional start position P4and the additional target position Q4are thus decided is that, when a hole is formed in a part of the wall or there is unevenness on the wall side, for example, it should be determined whether the wall continues further upward in case that the determination object120at the previous time did not collide with the terrain object104. Moreover, it is because since the direction that determination object120was cast at the last time is upward direction (diagonally upward), it can be estimated that there is terrain such as a wall or uphill (slope) in front (traveling direction) of the player object102.

As shown also inFIG. 13, here, since there is a wall lower than the player object102ahead of the player object102, the determination object120that is cast toward the additional target position Q4from the additional start position P4does not collide with the terrain object104.

In such a case, as shown inFIG. 14, a next start position P5is decided above the start position P3at the last time by approximately the diameter (in this embodiment, diameter) of the determination object120excluding the additional start position P4, a position that is shifted by a predetermined distance obliquely downward from the start position P5in the traveling direction is decided as a next target position Q5. Here, like a case where the target position Q1of the first time is decided, the target position Q5is decided at a position that is shifted by the predetermined distance d1obliquely downward by a predetermined angle θ (theta).

As shown also inFIG. 14, if the determination object120is cast toward the target position Q5from the start position P5, as indicated by the collision position C5, the determination object120collides with a side of an uppermost part of the wall, for example.

That is, as a result of casting the determination object120five times, the collision positions C1, C2and C5are acquired. As a result of conducting the principal component analysis from these collision positions C1, C2and C5, it can be realized that there is a wall or uphill with the inclination a in front of the player object102. Moreover, since the height of the terrain can be known from the three-dimensional coordinate of each of the collision positions C1, C2and C5, finally, it can be realized that there is a low wall or a short uphill.

In addition, instead of the principal component analysis, a regression line may be evaluated. In this case, an inclination of the regression line is determined as an inclination of the ground. However, since the regression line is expressed as a primary function only by a least squares method, it is impossible to evaluate a correlation when a plurality of points (collision positions) are arranged in line horizontally or vertically, and therefore, there is a case where it cannot correctly determine the inclination of the ground. Moreover, when the points of X and Y vary, the regression line approaches the horizontal in its inclination, and therefore, if being subjected to linear line approximation, the determined inclination of the ground becomes gentler than the inclination (shape) of the actual ground.

Moreover, in the above-described description, although a target position of a next time for the determination object120is decided using the normal vector n of the ground at the collision position Cmif the determination object120collides with the terrain object104, in fact, the normal vector n is recalculated in order to correct a positional deviation due to an inclination in a direction intersecting the traveling direction of the player object102(left and right direction).

For example,FIG. 15AandFIG. 15Bare illustration views showing an example of a virtual space when the ground slants in the direction intersecting the traveling direction of the player object102. However,FIG. 15Ais an illustration view that the virtual space is viewed from the above the player object102, andFIG. 15Bis an illustration view that the virtual space is viewed from the back of the player object102.

In addition,FIG. 15AandFIG. 15Bshow only the determination object120at the time of colliding with the terrain object104. This is true inFIG. 16AandFIG. 16B.

InFIG. 15AandFIG. 15B, the player object102stands perpendicular to the ground that slants so as to rise from the left to the right with respect to the traveling direction. When determining the inclination of the ground in the traveling direction of the player object102, as described above, the determination object120is cast toward the target position Qmthat is decided from the start position Pmof each time. Here, since the ground slants in a direction intersecting the traveling direction of the player object102, the determination object120collides with the ground at a slightly deviated point (here, diagonally right lower point) rather than at a point of the lowest end.

Therefore, if deciding a target position Qm+1of a next time using the normal vector n of the ground at the collision position Cm, the determination object120becomes to be cast toward a position deviated from the traveling direction of the player object102. Moreover, as shown also inFIG. 15AandFIG. 15B, such deviation from the traveling direction is accumulated as the number of times of casting the determination object120increases.

As described above, when performing the principal component analysis, since a plurality of detected collision positions Cm(points) are projected onto the two-dimensional plane that is virtually provided in the traveling direction of the player object102, the above-described positional deviation may be absorbed; however, in order to determine (detect) an exact inclination in the traveling direction of the player object102, the normal vector n is recalculated.

Specifically, the normal vector n is recalculated according to Equation 2. Here, Vx is a direction vector of a just beside direction (in this embodiment, right direction) of the player object102, Vt is a tangent vector of the ground at the collision position, and nris a recalculated (corrected) normal vector. In addition, in Equation 2, “x” means an cross (outer) product. Moreover, the recalculated normal vector nris normalized. That is, the normal vector nris converted into a unit vector that a size is 1 (one).
Vt=n×Vx
nr=Vt×Vx[Equation 2]

By using the normal vector nrthat is obtained by thus recalculating (correcting) the normal vector n, even when the player object102exists on the ground that slants in a direction intersecting the traveling direction as shown inFIG. 16AandFIG. 16B, the target position Qmcan be set without deviation from the traveling direction of the player object102. Therefore, it is possible to determine terrain in the traveling direction of the player object102accuracy.

Next, a cliff side determination will be described. As described above, since the determination object120is moved from the start position P1downwardly by a predetermined angle θ (theta), when the player object102exists in a position so as to look down on a cliff or a position looking down a steep downhill, it is thought that the determination object120does not collide with the terrain object104(ground). Furthermore, when the player object102exists in a position with steep ups and downs, the determination object120may not collide with the terrain object104similarly. Therefore, cliff side determination processing is performed as described below.

In addition, in the cliff side determination processing (expanded cliff side determination processing described later is the same), a deciding method of a start position Pmand a target position Qmdiffers from a case of determining other terrain, as described in the following.

FIG. 17-FIG. 19are illustration views for explaining a non-limiting example method of performing determination on whether there is a cliff in the traveling direction of the player object102(cliff side determination). However, in an example shown inFIG. 17-FIG. 19, a case where the determination object120of a first time does not collide with the terrain object104(ground) will be explained.

In addition, even in a second and subsequent times, when the number of times of casting the determination object120does not reach a predetermined number of times, if the determination object120that is cast downward (obliquely downward) does not collide with the terrain object104, similar cliff side determination is performed.

As shown inFIG. 17A, as described above, in the first time, a position that is moved downward by a predetermined distance d1and a predetermined angle θ (theta) from the traveling direction of the player object102with respect to the start position P1for the determination object120decided in advance is decided as the target position Q1. In an example shown inFIG. 17A, in case that the determination object120is cast toward the target position Q1from the start position P1, the determination object120does not collide with the terrain object104(ground).

In this case, in order to determine whether processing that determines whether a cliff is provided in the traveling direction of the player object102(cliff side determination processing) is to be performed, the target position Q1is further decided as an additional start position P2, and an additional target position Q2is decided in a position that is shifted from the additional start position P2downward (just below direction) by a predetermined distance d3(in this embodiment, a stature (height) of player object10). That is, the target position Q2is decided according to a fourth rule.

As shown inFIG. 17B, in case that the determination object120is cast toward the additional target position Q2from the additional start position P2, the determination object120does not collide with the terrain object104. In such a case, it is determined that the cliff side determination processing is to be performed, and the cliff side determination processing is started.

Although illustration is omitted, if the determination object120collides with the terrain object104(ground) in case that the determination object120is cast toward the additional target position Q2from the additional start position P2, the cliff side determination processing is not performed. In this case, if the number of times of casting the determination object120does not reach the predetermined number of times, a next target position Qm+1is decided based on the normal vector n of the ground at the collision position Cm, and the determination object120is cast from a next start position Pm+1toward the next target position Qm+1.

If the cliff side determination processing is started, as shown inFIG. 18A, the last target position Q2is decided as a start position Paof a first time in the cliff side determination processing, and a target position Qaof a first time is decided to a position that is shifted by a predetermined distance d4in a direction opposite to the traveling direction of the player object102.

As shown inFIG. 18B, at the first time, the determination object120that is cast toward the target position Qafrom the start position Pacollides with the surface of the terrain object104(cliff side) as indicated by the position Ra. However, the start position Pa, the target position Qaand the position Raare centers of circles indicated by reference numerals. This is true for start positions Pb-Pd, target positions Qb-Qdand positions Rb-Rdall described later.

If the determination object120collides with the cliff side, as shown inFIG. 19A, a start position Pbof a second time in the cliff side determination processing is decided between the start position P2and the start position Paof the first time. That is, the start position Pbis decided to a position that is shifted by a half of the stature of the player object102from the start position P2downward. Moreover, a target position Qbof a second time is decided to a position that is shifted by the predetermined distance d4in a direction opposite to the traveling direction.

As shown inFIG. 19B, in the second time, the determination object120cast toward the target position Qbfrom the start position Pbcollides with the surface of the terrain object104(cliff side), as indicated by the position Rb.

Thus, if the determination object120collides with the surface of the terrain object104at the position Raand the position Rb, it is determined that there is a cliff looked down from the player object102in the traveling direction of the player object102.

In such cliff side determination processing, it is determined whether the determination object120collides with the terrain object104by moving the determination object120in a direction opposite to the traveling direction of the player object102below the current position of the player object102.

However, since an inclination of the cliff cannot be known only by this determination result, it is impossible to determine terrain is a steep downhill or a cliff eroded at a side of the player object102. Therefore, even when the cliff side determination processing is performed, the collision position Cmof the determination object120is conducted to the principal component analysis, and terrain that is determined as a cliff is further classified into any one of a precipitous cliff, a steep downhill and a cliff eroded in a side of the player object102.

Therefore, if the surface information included in the related information prohibits gripping the ground when it is determined that there is a steep downhill, the player object102is displayed so as to be slip down. Moreover, if the surface information included in the related information does not prohibit to grip the ground when it is determined that there is a step downhill or a precipitous cliff, the player object102is displayed so as to descend a steep slope or a cliff while gripping the steep slope or a cliff side. Furthermore, if the surface information included in the related information prohibits gripping the ground when terrain is a cliff eroded at a side of the player object102, it is controlled that the player object102cannot descend a steep slope or a cliff. Moreover, if the player object102falls off a cliff in such a case, a mistake occurs, a game over occurs, or the remaining number of the player object102is subtracted by 1 (one).

FIG. 20-FIG. 22illustrate a non-limiting example method for determining a cliff that is slightly different from the cliff illustrated inFIG. 17-FIG. 19in their forms, and such a method will be described. In order to distinguish from the cliff side determination ofFIG. 17-FIG. 19, in the following, cliff side determination ofFIG. 20-FIG. 22is called “expanded cliff side determination”. The cliff shown inFIG. 20-FIG. 22is different from the cliff illustrated inFIG. 17-FIG. 19in a point that a top surface of the cliff is a slightly downhill in the traveling direction of the player object102.

FIG. 20Ashows a position R5that the determination object120collides in a final time after the determination object120is cast the predetermined number of times (in this embodiment, 5 (five) times). In this embodiment, after the determination object120is cast the predetermined number of times, it is determined whether a height (Z coordinate) of the position R5that the determination object120collides with the terrain object104in the final time is lower than a height (Z coordinate) of a position (foot position) of the player object102by a predetermined distance h or more. The predetermined distance h is a value that the developer of the game etc. decided.

If the height of the position R5is lower than the height of the foot position of the player object102but a difference H therebetween is less than the predetermined distance h, expanded cliff side determination processing is not performed. Therefore, terrain is determined based on a result of the principal component analysis of the collision positions C1-C5obtained in case that the determination object120is previously cast the predetermined number of times.

On the other hand, if the height of the position R5is lower than the height of the foot position of the player object102and the difference H therebetween is equal to or more than the predetermined distance h, the expanded cliff side determination processing is performed. If the expanded cliff side determination processing is started, the position R5that the determination object120collides with the terrain object104in the final time in case that the determination object120is cast the predetermined number of times is decided as a start position Paof a first time in the expanded cliff side determination processing. Moreover, a position that is shifted by a predetermined distance d5in the traveling direction from this start position Pais decided as a target position Qaof a first time. Then, the determination object120is cast toward the target position Qafrom the start position Pa.

In case that the determination object120collides with the terrain object104between the start position Paand the target position Qa, it is determined that terrain is not a cliff, and the expanded cliff side determination processing is ended. In such a case, it is thought that the ground has steep ups and downs and thus there is a comparatively large hole or recess in the traveling direction of the player object102, for example.

On the other hand, since it is thought that there is a downhill or a cliff in the traveling direction of the player object102in case that the determination object120does not collide with the terrain object104between the start position Paand the target position Qa, the target position Qais decided as a next start position Pb. Processing after the start position Pbis decided is the same as the processing after the processing in a case of casting of the determination object120in the second time shown inFIG. 17B. Therefore, subsequent processing will be briefly explained.

If the next start position Pbis decided, a target position Qbis decided at a position that is shifted downward (just below direction) by the predetermined distance (stature of player object102). On a cliff as shown inFIG. 20-FIG. 22, even if the determination object120is cast toward the target position Qbfrom the start position Pb, the determination object120does not collide with the terrain object104(ground).

In this case, as shown inFIG. 21A, the target position Qbis decided as a next start position Pc, and a next target position Qcis decided at a position that is shifted by a predetermined distance d4in a direction opposite to the traveling direction. As shown inFIG. 21B, the determination object120cast toward the target position Qcfrom the start position Pccollides with a cliff side, as indicated by the position Rc.

If the determination object120collides with the cliff side as shown inFIG. 21B, as shown inFIG. 22, a next start position Pais decided between the start position Pband the start position Pc. Moreover, the target position Qdis decided at a position that is shifted by approximately the predetermined distance d4in a direction opposite to the traveling direction.

As shown inFIG. 22, the determination object120that is cast toward the target position Qdfrom the start position Pdcollides with the cliff side, as indicated by the position Rd.

Thus, if the determination object120collides with the terrain object104at the position Rcand the position Rd, in the traveling direction of the player object102, it is determined that there is a cliff looked down by the player object102at a point a little down the hill in the traveling direction of the player object102.

FIG. 23shows a non-limiting example memory map300of the main memory (22e,26) of the game apparatus12shown inFIG. 2. As shown inFIG. 23, the main memory (22e,26) includes a program storage area302and a data storage area304. Information processing programs, such as a game program are stored in the program storage area302. For example, a game program is partly or entirely read from an optical disk at a proper timing after a power supply is turned on of the game apparatus12, and stored in the main memory (22e,26).

In addition, in replace with the optical disk, a game program may be acquired from a flash memory24or an external information processing apparatus of the game apparatus12(via Internet). Moreover, a part of programs included in a game program may be stored in advance in the game apparatus12.

In this embodiment, the game program is constituted by a main processing program310, an image producing program312, an image display program314, a terrain determination program316, a sound producing program318, a sound output program320, an operation detection program322, etc.

The main processing program310is a program for performing processing (entire processing inFIG. 25) of a main routine of a virtual game. The image producing program312is a program for producing a game image for television with using image producing data334including polygon data, texture data, etc. Moreover, the image producing program312decides and reproduces animations of character objects, such as the player object102etc. according to terrain that is determined according to the terrain determination program316described later.

The image display program314is a program for outputting the image data of the game image for television produced according to the image producing program312to the AV-IC36so as to display the game image for televisions on the television16.

The terrain determination program316is a program for determining terrain in a traveling direction of the player object102. An animation of the player object102produced (reproduced) according to the image producing program312is decided with using this determination result.

The sound producing program318is a program for producing, by the DSP22c, a game sound for television under instructions of the CPU20. The sound output program320is a program for outputting sound data of a game sound for television produced according to the sound producing program318to the AV-IC36so as to output the game sound for television from the speaker16aof the television16.

The operation detection program322is a program for detecting (receiving) operation data included in transmission data that is input (transmitted) from the terminal device14.

In addition, a communications program, a backup program, etc. are also stored in the program storage area302.

FIG. 24is an illustration view showing non-limiting example specific contents of the data storage area304shown inFIG. 23.

In the data storage area304, reception data330, the transmission data332, the image producing data334, terrain information data336, animation data338, collision position data340, related information data342, terrain determination data344, etc. are stored. Moreover, an upward direction flag346, a cliff side determination effective flag348, a flag of condition for regarding as cliff350, a near cliff flag352, etc. are provided in the data storage area304.

The reception data330is various kinds of data received from the terminal device14. The reception data330includes operation data. The operation data is data indicative of an operation of the player to the terminal device14, and as described above, it includes operation button data, stick data and touch position data. However, the operation data may be any data as long as it represents the operation of the player who operates the terminal device14, and may include only one of the above-described data. The operation data is transmitted from the terminal device14and acquired in the game apparatus12, and is stored in the main memory (22e,26).

In addition, the operation data may be stored in the main memory (22e,26) the predetermined number sequentially from the newest data (data acquired at the last).

The transmission data332is various kinds of data to be transmitted to the terminal device14. The image producing data334is data required in order to produce an image, such as polygon data, texture data, etc. The terrain information data336is data of a normal vector respectively corresponding to polygons constituting the terrain object104and surface information that are set to respective polygons. The data of a normal vector is data about a vector perpendicular to the surface of the terrain object104. The surface information is information that is set in the polygon constituting a wall surface or a cliff side, and indicates whether to prohibit the player object102from gripping.

The animation data338is data about an animation of character objects (moving image object), such as the player object102, an enemy object, etc. In this embodiment, the animation data338includes data about an animation that is produced in advance for each action about each of the character objects.

The collision position data340is data about a position that is determined to collide with the terrain object104in case that the determination object120is cast toward a target position. However, since the determination object120is cast a plural of number of times and a start position and a target position differ for each time, data of for each collision position are stored in the data storage area304in identifiable manner.

The related information data342is data of a normal vector and data of ground information of a polygon constituting the terrain object104at the collision position Cm, and stored in association with data of the collision position Cm.

The terrain determination data344is data about terrain that is determined by the terrain determination processing according to the terrain determination program316, i.e., in this embodiment, data about inclination and height of a surface of the terrain object104in the traveling direction of the player object102.

The upward direction flag346is a flag for determining whether a direction that the determination object120is to be moved is upward. The upward direction flag346is turned on when a direction that the determination object120is to be moved upward, and turned off when a direction that the determination object120is to be moved downward. In this embodiment, a case where a direction that the determination object120is to be moved horizontal is included in a case of upward direction. However, a case where a direction that the determination object120is to be moved horizontal may be included in a case of downward direction.

The cliff side determination effective flag348is a flag for determining whether processing that determines whether there is a cliff looked down by the player object102is to be performed. The cliff side determination effective flag348is turned on in case that the determination object120does not collide with the terrain object104in a case where the determination object120is cast downward toward the target position in the terrain determination processing, and is turned off otherwise.

The flag of condition for regarding as cliff350is a flag for determining whether a condition that there is a cliff looked down by the player object102is satisfied. The flag of condition for regarding as cliff350is turned on when the condition that there is a cliff looked down by the player object102is satisfied, and is turned off otherwise. As described later, it is determined that the condition for regarding as cliff is satisfied when it is determined that there is a cliff in the cliff side determination processing.

The near cliff flag352is a flag for determining whether there is a cliff that is looked down by the player object102beyond a downhill in the traveling direction of the player object102. The near cliff flag352is turned on when a cliff that is looked down by the player object102exists beyond a downhill in the traveling direction of the player object102, and is turned off otherwise.

Although illustration is omitted, the data storage area304is stored with other data such as sound data, sound wave form data, etc., and provided with other flags and counters (timers) required for execution of a game program.

FIG. 25is a flow chart about non-limiting example entire processing by the CPU20provided in the game apparatus12shown inFIG. 2. In addition, it is pointed-out in advance that processing in respective steps in the flow chart shown inFIG. 25(also inFIG. 26described later) are mere examples, and if the same result is acquired, an order of the respective steps may be changed. Moreover, in this embodiment, basically, it is assumed that the CPU20executes the processing of each step of the flowcharts shown inFIGS. 25 and 26; however, some steps may be executed by a processor(s) or a dedicated circuit(s) other than the CPU20.

If the power supply of the game apparatus12is turned on, prior to executing the entire processing, the CPU20executes a boot program stored in a boot ROM not shown, whereby respective units such as the main memory (22e,26) can be initialized. Then, the game program stored in the optical disk is read into the main memory (22e,26), and execution of the game program concerned is started by the CPU20.

As shown inFIG. 25, if the entire processing is started, the CPU20performs initial processing in a step S1. In the initial processing, for example, the CPU20constructs a virtual game space for producing and displaying the game image150, arranges respective characters or objects such as the player object102appearing in this virtual space in initial positions, and arranges respective background objects such as the terrain object104etc. being arranged (existing) in this virtual space in predetermined positions. Furthermore, the initial processing is also processing that the CPU20sets initial values of various parameters to be used in the game processing.

Subsequently, the CPU20acquires various kinds of data transmitted from the terminal device14in a step S3, and performs game control processing in a step S5. For example, the CPU20moves the player object102or/and causes the player object102to perform an arbitrary action according to the operation data. Moreover, the CPU20moves an enemy object or/and causes the enemy object to perform an arbitrary action, without following the operation data. Furthermore, the CPU20determines victory and defeat or ranking of the player object102, or/and determines the game clear or game over.

In a next step S7, the CPU20and the GPU22bperform processing of producing the game image for television to be displayed on the television16. Briefly describing, the CPU20and the GPU22bread the data indicating a result of the game control processing of the step S5from the main memory (22e,26), and read data required in order to produce the game image from the VRAM22dto produce the game image for television. When producing the game image for television, for example, under instructions of the CPU20, the GPU22barranges the player object102to a current position in the virtual space, and arranges a non-player character such as an enemy object. Furthermore, the GPU22barranges (produces) the terrain object104(background object) according to the current position of the player object102. Moreover, an animation of the player object102determined based on the terrain that is determined in the terrain determination processing performed in parallel with the entire processing and the surface information acquired in the terrain determination processing is reproduced. Therefore, a certain scene (sight) is produced, and an image (imaged image) viewing the scene from a virtual camera is produced as the game image for television.

Subsequently, in a step S9, the CPU20produces a game sound for television to be output to the speaker16aof the television16. That is, the CPU20causes the DSP22cto produce the game sound according to a result of the game control processing of the step S5.

Subsequently, the CPU20outputs data to the television16in a step S11. Specifically, the CPU20sends to the AV-IC36the image data of the game image for television stored in the VRAM22d, and the sound data of the game sound for television produced in the step S9by the DSP22c.

Then, in a step S13, the CPU20determines whether the game is to be ended. Determination in the step S13is performed, for example, based on whether the game is over or whether the player gives an instruction to stop the game. It is possible to determine whether the game is over based on whether the physical strength value of the player object102becomes 0 (zero), for example.

If “NO” is determined in the step S13, that is, if the game is not to be ended, the process returns to the step S3. On the other hand, if “YES” is determined in the step S13, that is, if ending the game, the entire processing is terminated.

FIG. 26is a flow chart of non-limiting example terrain determination processing by the CPU20performed in parallel with the entire processing shown inFIG. 25. It should be noted that this terrain determination processing is performed repeatedly (for each frame) during the entire processing is performed.

As shown inFIG. 26, if the terrain determination processing is started, the CPU20decides a traveling direction of the player object102from a current position thereof in a step S101. As described above, a direction that the player object102faces is usually a traveling direction when the player object102is moving or stopping; however, there is a case where a direction other than the direction that the player object102faces may be the traveling direction dependent on terrain.

In a subsequent step S103, terrain surface information acquisition processing (seeFIG. 27-FIG. 29) described later is performed. In a next step S105, the collision positions Cmare mapped (projected) on a two-dimensional plane (XY plane ofFIG. 8) in front of the player object102. Subsequently, in a step S107, processing of the principal component analysis about the collision positions Cmthat are mapped on the two-dimensional plane is performed, and in a step S109, a primary function about an inclination of terrain based on a result of the principal component analysis processing is calculated. Terrain is determined in a step S111, and the terrain determination processing is ended.

In this step S111, the CPU20determines an inclination (angle of slope) of the ground in the traveling direction of the player object102based on an inclination a of the primary function, and determines a height of the ground in the traveling direction of the player object102based on the collision position Cm. These determination methods are as described above.

Moreover, in the step S111, if the flag of condition for regarding as cliff350is turned on, the CPU20determines that the terrain is a precipitous cliff, a steep downhill or a cliff eroded in a side of the player object102according to the inclination a. Furthermore, if the near cliff flag352is turned on, the CPU20determines that there is a cliff beyond a slope (downhill) that is determined by the inclination a in the traveling direction of the player object102.

FIG. 27-FIG. 29are flow charts of non-limiting example terrain surface information acquisition processing shown in the step S103ofFIG. 26. If the terrain surface information acquisition processing is started, the CPU20sets an initial value of a variable i (i=1) in a step S151as shown inFIG. 27. It should be noted that the variable i is a variable for counting the number of times that the determination object120is cast (moved) toward the target position (end position) from the start position. Although illustration is omitted, various flags (346-352) are also initialized (turned off) here.

In a next step S153, a start position P1and a target position Q1are set (decided) based on a current position of the player object102. As described above, the start position P1of the determination object120is decided in advance with respect to the position (foot position) of the player object102, and according to the first rule, the target position Q1is set to a position that is shifted by the predetermined distance d1downward by the predetermined angle θ (theta) in the traveling direction of the player object102.

Subsequently, it is determined, in a step S155, whether the determination object120is cast the predetermined number of times. Here, it is determined whether the variable i exceeds a maximum value (in this embodiment, 5 (five)). If “YES” is determined in the step S155, that is, if the determination object120is cast the predetermined number of times, the process proceeds to a step S187ofFIG. 29described later. If “NO” is determined in the step S155, that is, if the number of times of casting the determination object120does not reach the predetermined number of times, the determination object120is cast (moved) toward the target position Qmfrom the start position Pm.

In a next step S159, it is determined whether the determination object120collides with the terrain object104. Here, determination on whether the determination object120collides with a shape (polygon) of the terrain object104(usual collision determination) is performed. In the following, this is true about a case where it is determined whether the determination object120collides with the terrain object104.

If “NO” is determined in the step S159, that is, if the determination object120does not collide with the terrain object104, the process proceeds to a step S173shown inFIG. 29. On the other hand, if “YES” is determined in the step S159, that is, if the determination object120collides with the terrain object104, a collision position Cm(three-dimensional coordinate) and related information are stored in a step S161. Here, corresponding to identification information of the i-th determination object120, the collision position data340including (being added with) data of the collision position Cm(three dimensional coordinate) that the determination object120collides with the terrain object104is stored (overwritten) in the data storage area304of the main memory (22e,26). Similarly, corresponding to identification information of the i-th determination object120, data of a normal vector of the terrain and data of the surface information at the collision position Cmthat the determination object120collides with the terrain object104are acquired from the terrain information data336, and the related information data342including (being added with) the acquired data is stored (overwritten) in the data storage area304of the main memory (22e,26).

In a next step S163, a next target position Qmis decided based on the collision position Cm−1and the normal vector nrof the ground (or a wall side). However, as described above, when deciding the target position Qmof the third and subsequent times, the traveling direction of the player object102is estimated in a direction indicated by a vector that the one before last collision position Cm−2is a start point and the last collision position Cm−1is an end point. Moreover, as described above, the normal vector nris a vector that is recalculated (corrected) based on the outer product of the direction vector Vx of a just beside direction (right direction) with respect to the traveling direction of the player object102and the normal vector n of the actual ground.

As shown inFIG. 28, in a subsequent step S165, it is determined whether the target position Qmcalculated in the step S163is above than the start position Pmof the next time for the determination object120. Here, the CPU20determines whether the Z coordinate of the target position Qmof the next time for the determination object120is equal to or larger than the Z coordinate of the start position P1of the next time for the determination object120.

If “YES” is determined in the step S165, that is, if the target position Qmis above than the start position Pm, the upward direction flag346is turned on in a step S167, and the process proceeds to a step S171. If “NO” is determined in the step S165, that is, if the target position Qmis below the start position Pm, the upward direction flag346is turned off in a step S169, and the process proceeds to a step S171. In the step S171, the variable i is incremented by 1 (one) (i=i+1), and the process returns to the step S155shown inFIG. 27. That is, it is determined whether the determination object120of the next time collides with the terrain object104.

As described above, in case that it is determined that the determination object120does not collide with the terrain object104in the step S159, as shown inFIG. 29, it is determined whether the upward direction flag346is turned on in the step S173. That is, when it is determined that the determination object120does not collide with the terrain object104, it is determined whether a direction that the determination object120is cast is an upward direction.

If “YES” is determined in the step S173, that is, if the upward direction flag346is turned on, in a step S175, the additional (next) target position Qm+1is set upward (just above) the current target position Qmby the predetermined distance d3(in this embodiment, the stature (height) of the player object102), and the determination object120to the target position Qm+1is cast from the additional start position Pm+1, and the process proceeds to a step S179. It should be noted that the additional start position Pm+1is the current target position Qm.

On the other hand, if “NO” is determined in the step S173, that is, if the upward direction flag346is turned off, in a step S177, the additional (next) target position Qm+1is set downward (just below) the current target position Qmby the predetermined distance d3(in this embodiment, the stature (height) of the player object102), and the determination object120is cast to the target position Qm+1from the additional start position Pm+1, and the process proceeds to the step S179. It should be noted that the additional start position Pm+1is the current target position Qm.

Then, in the step S179, it is determined whether the determination object120collides with the terrain object104. If “YES” is determined in the step S179, the process returns to the step S161shown inFIG. 27. If “NO” is determined in the step S179, it is determined whether the upward direction flag346is turned on.

If “YES” is determined in the step S181, in a step S185, the next start position (here, the start position Pm+2) is decided above the last start position (here, the start position Pm) by the diameter of the determination object120excluding the additional start position (here, the start position Pm+1), and the next target position (here, the target position Rm+2) obliquely downward ahead from the next start position Pm+2is decided, and the process returns to the step S155. If “NO” is determined in the step S181, the cliff side determination effective flag348is turned on in a step S183, and it is determined, in the step S187, whether the cliff side determination effective flag348is turned on.

If “YES” is determined in the step S187, that is, if the cliff side determination effective flag348is turned on, the process returns to the terrain determination processing after performing the cliff side determination processing (seeFIG. 30) described later in a step S189. On the other hand, if “NO” is determined in the step S187, that is, if the cliff side determination effective flag348is turned off, it is determined, in a step S191, whether there is the ground downward from the foot of the player object102by the predetermined distance h or more. More specifically, the CPU20determines whether there is the collision position Cmthat is lower than the foot of the player object102and the distance H from the foot is equal to or larger than the predetermined distance h among the collision positions Cmdetected by casting the determination object120the predetermined number of times.

If “NO” is determined in the step S191, that is, if there is not the ground below the foot of the player object102by the predetermined distance h or more, the process returns to the terrain determination processing. On the other hand, if “YES” is determined in the step S191, that is, if there is the ground below the foot of the player object102by the predetermined distance h or more, the process returns to the terrain determination processing after the expanded cliff side determination processing (seeFIG. 31andFIG. 32) described later is performed.

FIG. 30is a flow chart showing non-limiting example cliff side determination processing in the step S189ofFIG. 29. As shown inFIG. 30, if the cliff side determination processing is started, in a step S301, the CPU20casts the determination object120from the target position that is decided at the last of the terrain surface information acquisition processing in a direction opposite to the traveling direction.

In a next step S303, it is determined whether the determination object120collides with the terrain object104. If “NO” is determined in the step S303, the cliff side determination processing is ended, and the process returns to the terrain surface information acquisition processing. On the other hand, if “YES” is determined in the step S303, the collision position Cmand the related information are stored in a step S305, and in a step S307, the determination object120is cast from an intermediate position between the start position and the target position in case that the determination object120is cast downward in a direction opposite to the traveling direction.

Then, it is determined, in a step S309, whether the determination object120collides with the terrain object104. If “NO” is determined in the step S309, the process returns to the terrain surface information acquisition processing while determining that there is no cliff in the traveling direction of the player object102. If “YES” is determined in the step S309, it is determined that there is a cliff in the traveling direction of the player object102, and the process returns to the terrain surface information acquisition processing after the flag of condition for regarding as cliff350is turned on in a step S311.

FIG. 31andFIG. 32are flow charts showing non-limiting example expanded cliff side determination processing in the step S193ofFIG. 29. As shown inFIG. 31, when the expanded cliff side determination processing is started, the CPU20casts the determination object120from a ground contact position existing below the player object102by the predetermined distance to the traveling direction in a step S351. Specifically, the CPU20decides a start position Paof a first time in the expanded cliff side determination processing to the collision position Cmthat is lower than the foot of the player object102and the difference H from the foot is equal to or larger than the predetermined distance h among the collision positions Cmdetected by casting the determination object120the predetermined number of times. Moreover, a position that is shifted by the predetermined distance d5in the traveling direction from this start position Paas a target position Qa. Then, the determination object120is cast toward the target position Qafrom the start position Pa.

In a next step S353, it is determined whether the determination object120collides with the terrain object104. If “YES” is determined in the step S353, it is determined that no cliff exists in the traveling direction of the player object102, and the expanded cliff side determination processing is ended, and the process returns to the terrain surface information acquisition processing. On the other hand, if “NO” is determined in the step S353, in a step S355, the determination object120is cast downward by the determined distance from the target position Qain case that the determination object120is cast horizontally. That is, the target position Qais decided as a start position Pbof a second time, and a position that is shifted by the predetermined distance d3downward (just below) from the start position Pbis decided as a target position Qb. Then, the determination object120is cast toward the target position Qbfrom the start position Pb.

Furthermore, it is determined whether the determination object120collides with the terrain object104in a step S357. If “YES” is determined in the step S357, as shown inFIG. 32, the process returns to the terrain surface information acquisition processing. If “NO” is determined in the step S357, in a step S359, the determination object120is cast in a direction opposite to the traveling direction from the target position that the determination object120did not collides at the last. That is, the target position Qbis decided as a start position Pcof a third time, and a position that is shifted from this start position Pcby the predetermined distance d4in a direction opposite to the traveling direction is decided as a target position Qc. Then, the determination object120is cast toward the target position Qcfrom the start position Pc.

In a subsequent step S361, it is determined whether the determination object120collides with the terrain object104. If “NO” is determined in the step S361, the process returns to the terrain surface information acquisition processing. On the other hand, if “YES” is determined in the step S361, in a step S363shown inFIG. 32, the determination object120is cast from an intermediate position between the start position and the target position in case that the determination object120is cast downward in a direction opposite to the traveling direction. That is, the intermediate position between the start position Pband the target position Qbis decided as the start position Pd, and a position that is shifted from the start position Pdby the predetermined distance d4in a direction opposite to the traveling direction is decided as the target position Qd. Then, the determination object120is cast toward the target position Qdfrom the start position Pd.

Then, it is determined, in a step S365, whether the determination object120collides with the terrain object104. If “NO” is determined in the step S365, the process returns to the terrain surface information acquisition processing. On the other hand, if “YES” is determined in the step S365, the process returns to the terrain surface information acquisition processing after the near cliff flag352is turned on in a step S367.

According to this embodiment, positions that the determination object collides with the terrain object are detected by casting the determination object sequentially in the traveling direction of the player object toward the target position of the first time decided in advance and the target positions decided thereafter according to the predetermined rule, and an inclination and a height of the ground are calculated based on a plurality of collision positions, and therefore, it is possible to appropriately decide an animation of a character object such as the player object according to the terrain in the traveling direction of the player object, and to appropriately display a GUI for deciding an action of the character object.

Moreover, according to this embodiment, since the inclination of the terrain is calculated, it is not necessary to store inclination information of the terrain corresponding to each polygon constituting the terrain. Therefore, a work cost can be reduced and a memory capacity is not increased.

In addition, although the determination object120of a shape of a ball is used in this embodiment, a shape of the determination object120may be another three dimensional shape. For example, a determination object120in a shape of an oval sphere or regular polyhedron may be used.

Moreover, when deciding the next target position Qm, calculation is made by using the reverse vector n′ of the normal vector n at the last collision position Cm−1in this embodiment, it does not need to be limited to this. In another method, a next target position Qmmay be decided at a position that is shifted from a position that is shifted by a predetermined distance L1and perpendicular to the normal vector n at the last time collision position Cm−1in the traveling direction of the player object102by a predetermined distance L2vertically downward. In addition, the predetermined distances L1and L2are experientially decided in advance by a simulation etc.

Furthermore, the structure of the game system shown in this embodiment is merely an example, and it does not need to be limited to this, and it is possible to adopt other structure. For example, it is also applicable to a portable game apparatus. Moreover, it is applicable to a desktop PC that is connected with a monitor, a notebook PC, a tablet PC or a smartphone, each having a game function.

Furthermore, in this embodiment, the image processing is performed on the game image for television, but the image processing may be performed on the game image to be displayed on the terminal device.

Moreover, specific numerical values and game screens (virtual space) shown in this embodiment are mere examples and can be appropriately changed according to actual products.

Although certain example systems, methods, storage media, devices and apparatuses have been described herein, it is to be understood that the appended claims are not to be limited to the systems, methods, storage media, devices and apparatuses disclosed, but on the contrary, are intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.