Game program and game apparatus

A forward direction line is set on a course, in a virtual game world, on which a player object is allowed to move. An advancing direction at a current position of the player object is determined based on the forward direction line. The advancing direction is determined as a direction in which the player object advances so as to control a movement of a player character in accordance with an acceleration instruction, and a leftward-rightward movement instruction from a player. Consequently, it is possible to assist the player in controlling a direction in which an object operated by the player moves.

CROSS REFERENCE TO RELATED APPLICATION

The disclosure of Japanese Patent Application No. 2006-130777, filed on May 9, 2006, is incorporated herein by reference.

FIELD

The technology herein relates to a game program and a game apparatus for moving a player object in a virtual game world in accordance with an operation performed by a player.

BACKGROUND AND SUMMARY

Japanese Laid-Open Patent Publication No. 2004-236799 (hereinafter, referred to as Patent Document 1) discloses that, when an object operated by a player goes around a curve, a movement speed of the object is corrected in accordance with a position of the object on the curve. For example, when the object is on an inner curve, the movement speed thereof is corrected so as to be increased. On the other hand, when the object is on an outer curve, the movement speed thereof is corrected so as to be reduced. Thus, when a speed at which the object approaches the curve is too high and therefore the object is likely to slide off the course at the curve, the movement speed thereof is automatically reduced. Consequently, the object is able to go around the curve without sliding off the course.

However, in the technique disclosed in Patent Document 1, the speed is corrected whereas a moving direction is never corrected.

Therefore, certain example embodiments provide a game program and a game apparatus capable of subsidiarily determining a moving direction of an object operated by a player.

Certain example embodiments have the following features to attain the object mentioned above. The reference numerals in the parentheses are provided to indicate an exemplary correspondence with the drawings in order to aid in understanding certain example embodiments and are not intended to limit, in any way, the scope of the present invention.

A computer-readable storage medium according to certain example embodiments has stored thereon a game program for moving a player object in a virtual game world in accordance with an operation performed by a player. The game program causes a computer (31) of a game apparatus (3) to function as follows:

display control means (S36) for displaying the player object on a screen of a display device (2);

advancing direction determination means (S18) for determining, by using data (43) used for determining an advancing direction of the player object set in the virtual game world, the advancing direction at a current position of the player object in the virtual game world, the advancing direction representing a direction in which the player object advances;

advance instruction detection means for detecting for an advance instruction inputted by the player using an input device (6) for advancing the player object; and

advancing movement control means (S20, S28, S30) for moving or accelerating, in accordance with the advance instruction from the player having been detected by the advance instruction detection means, the player object in the advancing direction having been determined by the advancing direction determination means.

Here, the “data used for determining an advancing direction” is predetermined data for determining, in the virtual game world, the advancing direction at one of positions or in one of areas in the virtual game world. The “data used for determining an advancing direction” may be direction data (direction vector) representing a direction in the virtual game world, a plural pieces of positional data representing a plurality of positions associated with each other in the virtual game world (in this case, the plurality of positions represented by the plural pieces of positional data are connected to each other so as to represent a direction), or a predetermined equation for determining the direction vector. Such data is set for each of the positions or each of the areas in the virtual game world. Further, such data may be set for some of the positions or some of the areas, and for each of the remaining other positions, data for a position, among said some of the positions, adjacent to said each of the remaining other positions may be used, and for each of the remaining other areas, data for an area, among said some of the areas, adjacent to said each of the remaining other areas may be used. Further, for the remaining other positions or the remaining other areas, approximation or interpolation may be used. The “advancing direction” represents, for example, a course direction in a game, such as a race game, for allowing a player object to advance along the course in the virtual game world.

The orientation (attitude) of the character may not necessarily correspond to the advancing direction of the character.

Further, the game program stored in the computer-readable storage medium according to certain example embodiments may cause the computer to further function as follows:

leftward-rightward movement direction determination means (S18) for determining, by using the data used for determining the advancing direction, a leftward-rightward movement direction at the current position of the player object in the virtual game world, the leftward-rightward movement direction representing one of a left direction and a right direction in which the player object moves;

leftward-rightward movement instruction detection means for detecting for a leftward-rightward movement instruction inputted by the player using the input device for moving the player object in one of the left direction and the right direction; and

leftward-rightward movement control means (S22, S28, S30) for moving or accelerating, in accordance with the leftward-rightward movement instruction from the player having been detected by the leftward-rightward movement instruction detection means, the player object in the leftward-rightward movement direction having been determined by the leftward-rightward movement direction determination means.

Further, the data used for determining the advancing direction may contain coordinate values (60) of a plurality of control points, in the virtual game world, which are arranged in sequence. The advancing direction determination means may determine the advancing direction in accordance with at least a first vector from a first control point which is nearest to the current position of the player object among the plurality of control points to a second control point, among the plurality of control points, which immediately precedes or immediately follows, in the sequence, the first control point.

Further, the advancing direction determination means may determine the advancing direction by using a second vector from the second control point to a third control point, among the plurality of control points, immediately preceding or immediately following the second control point in the sequence.

Here, the control points represent data which are arranged in sequence starting with the control point nearest to the position of the player object in the virtual game world at a predetermined time (for example, a time at which a game starts or a time at which a predetermined condition is satisfied). When the control points are arranged in sequence of a first control point (the control point nearest to the position of the player object at the predetermined time), a second control point, a third control point, . . . , the second control point follows the first control point in the sequence.

Furthermore, a control point which is first in the sequence may be nearest, among the plurality of control points, to a point (start point) at which the player object is positioned in the virtual game world when a game is started, and the advancing direction determination means may determine the advancing direction by using a vector obtained based on at least two vectors including the first vector from the first control point to the second control point immediately following the first control point in the sequence, and a second vector from the second control point to a third control point immediately following the second control point in the sequence.

Here, the advancing direction determination means may determine, as the advancing direction, a vector obtained as an average (or weighted average) of the first vector and the second vector. Further, another vector (a third vector from the third control point to a fourth control point immediately following the third control point in the sequence) may be used.

Moreover, a fourth vector from the first control point to a fifth control point immediately preceding the first control point in the sequence may be used.

Further, a course on which the player object is allowed to move is set in the virtual game world, and the plurality of control points may be set on the course.

Moreover, the display control means may generate, by using a virtual camera set in the virtual game world, a game image including the player object, and the game program stored in the computer-readable storage medium according to certain example embodiments causes the computer to further function as follows,

virtual camera control means (S34) for determining, in accordance with the advancing direction at a point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance, a direction in which the virtual camera is oriented so as to pick up an image.

“A predetermined distance” may not be necessarily “constant”, and may be changed each time, for example, the course is changed or each time an area set in the course is changed.

Further, “a point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance” may be, for example, a point obtained by moving forward a position on the forward direction line corresponding to the current position of the player object along the forward direction line by a predetermined distance, or a point obtained by moving, by a predetermined distance (which may be a constant distance, or a distance based on a current movement speed), a position on the forward direction line corresponding to the current position of the player object in the advancing direction in which the player object is currently advancing or the moving direction in which the player object is currently moving. “The advancing direction at a point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance” is obtained by subjecting, to a similar process performed by the advancing direction determination means, the aforementioned “point which follows the current position of the player object and is distanced from the current position of the player object by a predetermined distance”.

Further, the game apparatus may include a first operation section (6R) and a second operation section (6L), and the advance instruction detection means may detect that the first operation section and the second operation section are alternately operated, and the leftward-rightward movement instruction detection means may detect that one of the first operation section and the second operation section is solely operated.

Here, the advance instruction detection means detects that the first operation section and the second operation section are alternately operated. On the other hand, the leftward-rightward movement instruction detection means detects that one of the first operation section and the second operation section is solely operated (“solely” is used for a case where one of the first and the second operation sections is operated one time or one of the first and the second operation sections is continuously operated). For example, operation histories of the first operation section and the second operation section are stored in a memory of the game apparatus (when a plurality of the operation histories are stored, the operation histories are stored in orderly sequence). When the first operation section is operated (or each time the first operation section is operated), whether the first operation section has been operated for an immediately preceding time or the second operation section has been operated for an immediately preceding time is determined, and when the first operation section has been operated for the immediately preceding time, it is determined that the first operation section is solely operated, and when the second operation section has been operated for the immediately preceding time, it is determined that the first operation section and the second operation are alternately operated. On the other hand, when the second operation section is operated, whether the first operation section has been operated for an immediately preceding time or the second operation section has been operated for an immediately preceding time is determined, and when the second operation section has been operated for the immediately preceding time, it is determined that the second operation section is solely operated, and when the first operation section has been operated for the immediately preceding time, it is determined that the first operation section and the second operation section are alternately operated. When the first operation section and the second operation section are not operated for a predetermined time period, the operation history information having been stored may be cleared. In this case, an operation performed for the first time after the operation history information has been cleared may be determined as a start of a new series of operations. When the first operation section or the second operation section is operated at a start of a series of operations, the player object may be moved forward, the player object may be moved in the right or left direction, or the player object may not be moved. Further, when the first operation section is continuously operated three or more times, it may be determined that the first operation section is solely operated. The same can be said for the second operation section. Furthermore, when the first operation section and the second operation section are alternately and continuously operated three or more times, it may be determined that the first operation section and the second operation section are alternately operated. Moreover, when another operation section (a third operation section) is provided in addition to the first operation section and the second operation section, the determination may be made regardless of the third operation section having been operated or the determination may be made in consideration the third operation section having been operated. For example, the first operation section, the third operation section, and the second operation section are operated in order, respectively. In this case, when the determination is made regardless of the third operation section having been operated, it is determined that the first operation section and the second operation section are alternately operated, and when the determination is made in consideration of the third operation section having been operated, the first operation section and the second operation section are not alternately operated.

Further, another computer-readable storage medium according to certain example embodiments has stored thereon a game program for moving a player object in a virtual game world in accordance with an operation performed by a player. The game program causes a computer (31) of a game apparatus (3) to function as follows:

display control means (S36) for displaying the player object on a screen of a display device (2);

leftward-rightward movement direction determination means (S18) for determining, by using data (43) used for determining a leftward-rightward movement direction of the player object set in the virtual game world, the leftward-rightward movement direction at a current position of the player object in the virtual game world, the leftward-rightward movement direction representing one of a left direction and a right direction in which the player object moves;

leftward-rightward movement instruction detection means for detecting for a leftward-rightward movement instruction inputted by the player using an input device (6) for moving the player object in one of the left direction and the right direction; and

leftward-rightward movement control means (S22, S28, S30) for moving or accelerating, in accordance with the leftward-rightward movement instruction from the player having been detected by the leftward-rightward movement instruction detection means, the player object in the leftward-rightward movement direction having been determined by the leftward-rightward movement direction determination means.

Here, the “data used for determining a leftward-rightward movement direction” is predetermined data for determining, in the virtual game world, the leftward-rightward movement direction at a position or an area in the virtual game world. The “data used for determining a leftward-rightward movement direction” may be direction data (direction vector) representing a direction in the virtual game world, a plural pieces of positional data representing a plurality of positions associated with each other in the virtual game world (in this case, the plurality of positions represented by the plural pieces of positional data are connected to each other so as to represent a direction), or a predetermined equation for determining the direction vector. Further, the “data used for determining a leftward-rightward movement direction” may be data representing the advancing direction. In this case, the leftward-rightward movement direction determination means determines the leftward-rightward movement direction based on the data representing the advancing direction. For example, the “leftward-rightward movement direction” represents a left-right direction relative to the course direction in a game, such as a race game, for allowing a player object to advance along the course in the virtual game world. The “leftward-rightward movement direction” is typically a direction perpendicular to the course direction. Further, the “leftward-rightward movement direction” may form a predetermined angle (excluding zero degree) with the course direction. Preferably, the leftward movement direction and the rightward movement direction may be symmetrical with respect to the course direction, or the leftward movement direction and the rightward movement direction may be aligned in straight line.

The other computer-readable storage medium according to certain example embodiments has stored thereon a game program for moving a player object in a virtual game world in accordance with an operation performed by a player. The game program causes a computer (31) of a game apparatus (3) to function as follows:

display control means (S36) for displaying the player object on a screen of a display device (2);

orthogonal movement direction determination means (S18) for determining, by using data (43) used for determining an orthogonal movement direction of the player object set in the virtual game world, the orthogonal movement direction at a current position of the player object in the virtual game world, the orthogonal movement direction representing a direction orthogonal to an advancing direction representing a direction in which the player object advances;

orthogonal movement instruction detection means for detecting for an orthogonal movement instruction inputted by the player using an input device (6) for moving the player object in the orthogonal movement direction; and

orthogonal movement control means (S22, S28, S30) for moving or accelerating, in accordance with the orthogonal movement instruction from the player having been detected by the orthogonal movement instruction detection means, the player object in the orthogonal movement direction having been determined by the orthogonal movement direction determination means.

Here, the “orthogonal movement direction” represents a direction orthogonal to the advancing direction (for example, the course direction). For example, the “orthogonal movement direction” may be the left-right direction relative to the advancing direction, or may be the upward-downward direction relative to the advancing direction.

A game apparatus according to certain example embodiments executes a game for moving a player object in a virtual game world in accordance with an operation performed by a player, and comprises the following means:

display control means (31, S36) for displaying the player object on a screen of a display device (2);

advancing direction determination means (31, S18) for determining, by using data (43) used for determining an advancing direction of the player object set in the virtual game world, the advancing direction at a current position of the player object in the virtual game world, the advancing direction representing a direction in which the player object advances;

advance instruction detection means (31) for detecting for an advance instruction inputted by the player using an input device (6) for advancing the player object; and

advancing movement control means (31, S20, S28, S30) for moving or accelerating, in accordance with the advance instruction from the player having been detected by the advance instruction detection means, the player object in the advancing direction having been determined by the advancing direction determination means.

Another game apparatus according to certain example embodiments executes a game for moving a player object in a virtual game world in accordance with an operation performed by a player, and comprises the following means:

display control means (31, S36) for displaying the player object on a screen of a display device (2);

leftward-rightward movement direction determination means (31, S18) for determining, by using data (43) used for determining a leftward-rightward movement direction of the player object set in the virtual game world, the leftward-rightward movement direction at a current position of the player object in the virtual game world, the leftward-rightward movement direction representing one of a left direction and a right direction in which the player object moves; and

leftward-rightward movement instruction detection means (31) for detecting for a leftward-rightward movement instruction inputted by the player using an input device (6) for moving the player object in one of the left direction and the right direction; and

leftward-rightward movement control means (31, S22, S28, S30) for moving or accelerating, in accordance with the leftward-rightward movement instruction from the player having been detected by the leftward-rightward movement instruction detection means, the player object in the leftward-rightward movement direction having been determined by the leftward-rightward movement direction determination means.

The other game apparatus according to certain example embodiments executes a game for moving a player object in a virtual game world in accordance with an operation performed by a player, and comprises the following means:

display control means (31, S36) for displaying the player object on a screen of a display device (2);

orthogonal movement direction determination means (31, S18) for determining, by using data (43) used for determining an orthogonal movement direction of the player object set in the virtual game world, the orthogonal movement direction at a current position of the player object in the virtual game world, the orthogonal movement direction representing a direction orthogonal to an advancing direction representing a direction in which the player object advances;

orthogonal movement instruction detection means (31) for detecting for an orthogonal movement instruction inputted by the player using an input device (6) for moving the player object in the orthogonal movement direction; and

orthogonal movement control means (31, S22, S28, S30) for moving or accelerating, in accordance with the orthogonal movement instruction from the player having been detected by the orthogonal movement instruction detection means, the player object in the orthogonal movement direction having been determined by the orthogonal movement direction determination means.

According to certain example embodiments, it is possible to subsidiarily determine a moving direction of an object operated by a player.

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

DETAILED DESCRIPTION

Hereinafter, a game system according to an embodiment will be described with reference to the drawings.

FIG. 1is an external view showing a configuration of the game system according to the embodiment. As shown inFIG. 1, a game system1comprises a television2, a game apparatus body3, and a conga controller6, and has mounted thereon a DVD-ROM4and a memory card5. The DVD-ROM4and the memory card5are mounted on the game apparatus body3in a removable manner. The conga controller6is connected, by a communication cable, to any of four controller port connectors provided on the game apparatus body3. The television2is connected to the game apparatus body3by an AV cable or the like. Note that, the game apparatus body3and the controller6may communicate with each other by radio communication.

The conga controller6is provided with a microphone6M and three switches: a start button6S; a right strike surface6R; and a left strike surface6L. As described herein below, a player can control a movement of a character in a virtual game world by hitting the right strike surface6R or the left strike surface6L.

Note that, a commonly used controller7as shown inFIG. 2may be used instead of the conga controller6. The controller7is provided with a plurality of switches such as a start button7S, an A button7A, an R button7R and an L button7L.

The DVD-ROM4fixedly stores a game program, game data and the like. The DVD-ROM4is mounted on the game apparatus body3when the player plays a game. Here, instead of the DVD-ROM4, an external storage medium such as a CD-ROM, an MO, a memory card, a ROM cartridge or the like may be used as means for storing the game program and the like.

The game apparatus body3reads the game program stored in the DVD-ROM4, and then performs a process in accordance with the read game program.

The television2displays, on a screen, image data outputted from the game apparatus body3.

The memory card5has a rewritable storage medium, e.g., a flash memory, as a backup memory for storing data such as saved data of the game.

FIG. 3is a block diagram showing an internal configuration of the game apparatus body3. Hereinafter, each component of the game system1will be described in more detail with reference toFIG. 3.

As shown inFIG. 3, the game apparatus body3comprises a CPU31, a work memory32, an external memory interface (I/F)33, a controller interface (I/F)34, a video RAM (VRAM)35, a graphics processing unit (GPU)36and an optical disc drive37.

In order for the game to start, the optical disc drive37drives the DVD-ROM4mounted on the game apparatus body3, and then the game program stored in the DVD-ROM4is loaded into the work memory32. The game starts when the CPU31executes the program in the work memory32. After the game starts, the player plays the game by using the conga controller6. In accordance with an operation performed by the player, the conga controller6outputs operation data to the game apparatus body3. The operation data outputted from the conga controller6is supplied to the CPU31via the controller I/F34. The CPU31performs a game process based on inputted operation data. The GPU36is used for image data generation and the like performed in the game process.

The GPU36performs, for coordinates of a solid model of an object or figure (e.g., an object comprised of polygons) placed in a three-dimensional virtual game world, arithmetic processing (e.g., rotation, scaling and deformation of the solid model, and coordinate transformation from a world coordinate system to a camera coordinate system or a screen coordinate system). Further, the GPU36generates a game image by writing, based on a predetermined texture, color data (RGB data) of each pixel of a solid model projected on the screen coordinate system into the VRAM35. The GPU36thus generates the game image to be displayed on the television2, and outputs the game image to the television2as necessary. Although the present embodiment shows a hardware configuration in which a memory dedicated for image processing (VRAM35) is separately provided, other memory configurations may be provided. For example, a UMA (Unified Memory Architecture) system, in which a part of the work memory32is used as a memory for image processing, may be used.

The work memory32stores various programs and pieces of data loaded from the DVD-ROM4. These pieces of data include, for example, data, which is related to polygons comprising a three-dimensional model placed in the virtual game world, and a texture used for coloring the polygons.

FIG. 4shows an exemplary game image displayed on the screen of the television2. While certain example embodiments may apply to a race game, other embodiments may be applied to any type of game.

On the screen of the television2, a race course set in the virtual game world, a player character to be operated by a player, and obstacles and coins placed on the race course are displayed. The player uses the conga controller6to operate the player character such that the number of times the player character hits against the obstacles is minimized, the number of coins the player character obtains is maximized, and the player character reaches a goal as quickly as possible.

A player is allowed to input, by using the conga controller6, instructions such as an acceleration instruction, a rightward movement instruction, a leftward movement instruction, and a deceleration instruction.

It is possible to input the acceleration instruction when the right strike surface6R and the left strike surface6L of the conga controller6are alternately hit repeatedly. When the acceleration instruction is inputted, the character accelerates forward (that is, in the direction (hereinafter, referred to as “advancing direction”) in which the character advances). At this time, the faster the right strike surface6R and the left strike surface6L are alternately hit repeatedly (for example, as the number of times per second the right strike surface6R and the left strike surface6L are alternately hit repeatedly is increased), the greatly the character is accelerated.

It is possible to input the rightward movement instruction when the right strike surface6R of the conga controller6is repeatedly hit. When the rightward movement instruction is inputted, the character moves in the right direction (in the right direction relative to the advancing direction of the character). At this time, the faster a player repeatedly hits the right strike surface6R, the faster the character moves in the right direction.

It is possible to input the leftward movement instruction when the left strike surface6L of the conga controller6is repeatedly hit. When the leftward movement instruction is inputted, the character moves in the left direction (in the left direction relative to the advancing direction of the character). At this time, the faster a player repeatedly hits the left strike surface6L, the faster the character moves in the left direction.

It is possible to input the deceleration instruction when the right strike surface6R and the left strike surface6L of the conga controller6are long-pressed for more than a predetermined time period. When the deceleration instruction is inputted, the character decelerates.

In the present embodiment, as shown inFIG. 5, a forward direction line is set along the race course in the virtual game world, and the advancing direction of the character is updated, as necessary, so as to continue to be parallel to the forward direction line. When a player inputs the acceleration instruction described above, a component representing a forward speed of the character has its magnitude increased. Similarly, when a player inputs the deceleration instruction described above, a component representing a forward speed of the character has its magnitude reduced. The forward direction line may be set such that one forward direction line is branched into a plurality of forward direction lines as shown inFIG. 18, or a plurality of forward direction lines are merged into one forward direction line as shown inFIG. 19.

The right direction for the character is the rightward direction relative to the advancing direction of the character, and is also perpendicular to the advancing direction of the character. When a player inputs the rightward movement instruction described above, the character moves in the right direction. When a player inputs the leftward movement instruction described above, the character moves in the direction opposite to the right direction.

As described above, in the present embodiment, the advancing direction of the character is updated as necessary so as to continue to be parallel to the forward direction line. Therefore, when the character goes around a curve, the player does not need to take into consideration the current moving direction of the character and is allowed to easily move the character toward the inner curve (for example, toward the vicinity of the course right line) or toward the outer curve (for example, toward the vicinity of the course left line) by simply inputting the rightward movement instruction or the leftward movement instruction. In particular, in a conventional race game, when a steering wheel is too sharply turned on a curve, the character may be turned toward the direction perpendicular to the course direction or toward the direction opposite to the course direction. In this case, it is troublesome to turn and move the character in a correct direction again. However, according to the present embodiment, such a state can be avoided, thereby greatly enhancing the controllability.

Hereinafter, an operation performed by the game apparatus body3according to the present embodiment will be described in detail.

FIG. 6shows a memory map of the work memory32. The work memory32stores a game program40, game image data41, race course data42, forward direction line data43, control point data44, and character control data45.

The game image data41includes data for a character image and data for a background image, and is used for generating a game image to be displayed on the screen of the television2.

The race course data42represents a shape of a race course in the virtual game world.

The forward direction line data43, representing the forward direction line shown inFIG. 5, is read from the DVD-ROM4and stored in the work memory32when the game is played. In the present embodiment, the forward direction line is defined by a collection of a plurality of control points (for example, P1, P2, P3, P4, P5arranged in sequence as shown inFIG. 13, and P1is a first control point (that is, a control point nearest to a start point) in the sequence) arranged in sequence. Although the plurality of control points represent discrete data, interpolation among the plurality of control points is performed using a spline curve as necessary so as to obtain the continuous smooth forward direction line.

FIG. 7shows a specific example of the forward direction line data43. InFIG. 7, the forward direction line data43contains the number of control points50, three-dimensional coordinates of the respective control points51, normal vectors of the respective control points52, and branch information53. The number of control points is, for example, 200 to 300 for each course. Further, each of the control points has the normal vector set therefor. The normal vector, representing a slope of the course at each of the control points, is a unit vector representing an upward direction which is perpendicular to the traveling surface. The branch information53represents a branching point (control point P12shown inFIG. 18) and a merging point (control point P33shown inFIG. 19) of the forward direction line.

InFIG. 6, when the game is started, the control point data44is set, for each of the control points, based on the forward direction line data43.

FIG. 8shows a specific example of the control point data44. InFIG. 8, the control point data44includes, for each of the control points, three-dimensional coordinates60, a forward direction vector61, an upward direction vector62, a right direction vector63, a curve rate64, and an accumulated distance from a start point65.

Further, the control points are arranged in sequence. This is not shown. For example, the sequence in which the control points are stored in a memory is the same as the sequence in which the control points are arranged. Each of the control points may have set therefor data representing its turn in the sequence, or may have set therefor information representing the control point immediately following said each of the control points.

The forward direction vector61, the upward direction vector62, and the right direction vector63are used to determine the advancing direction of the character, the right direction for the character, or the like as described above.

The forward direction vector61is a unit vector representing a direction in which the forward direction line extends from each of the control points. In other words, the forward direction vector61is a unit vector representing a direction of a line tangent to the forward direction line at each of the control points or a direction similar to the direction of the line tangent to the forward direction line. In the present embodiment, for example, the forward direction vector61of the control point P3shown inFIG. 13is obtained as an average between a unit vector representing a direction to the control point P3from the control point P2immediately preceding the control point P3and a unit vector representing a direction from the control point P3to the control point P4immediately following the control point P3. The forward direction vector61and the like may be previously calculated and stored in the DVD-ROM4, or may be calculated based on the three-dimensional coordinates of the control point when the game is started, or may be calculated as necessary during the game. InFIG. 13, the point Pc represents a current position of the character.

The upward direction vector62is the same as the normal vector52of the corresponding one of the control points.

The right direction vector63is a unit vector which represents the right direction relative to the advancing direction and is perpendicular to the forward direction vector61and the upward direction vector62of each of the control points. The right direction vector63is determined based on the forward direction vector61and the upward direction vector62.

The curve rate64represents a curvature (that is, a curvature of the course) of the forward direction line at each of the control points. In the present embodiment, for example, the curve rate64of the control point P3shown inFIG. 13represents a relative angle between the vector from the control point P2to the control point P3and the vector from the control point P3to the control point P4. Therefore, when a certain one of the control points has the curve rate64of zero, the forward direction line represents a straight line at the certain one of the control points. The larger the absolute value of the curve rate64is, the shaper curve the forward direction line of the control point represents.

The accumulated distance from a start point65represents a distance (a path) to each of the control points from a start point on the course in the virtual game world.

InFIG. 6, the character control data45is used to control a movement and an attitude of the character in the virtual game world. The character control data45is updated as necessary while the game is being played.

FIG. 9shows a specific example of the character control data45. InFIG. 9, the character control data45includes a current position70, an advancing direction vector71, an upward direction vector72, a right direction vector73, a curve rate74, an accumulated distance from a start point75, a current position of the character on the forward direction line76, an internal speed77, a leftward-rightward movement input value78, an advance vector79, a leftward-rightward movement vector80, an inertial vector81, a gravitational vector82, and a movement vector83.

The current position70, represented as three-dimensional coordinates, indicates a current position of the character in the virtual game world.

The advancing direction vector71is a unit vector representing a direction in which the character advances as described above, as shown inFIG. 11. The advancing direction vector71of the character is determined by interpolation based on the forward direction vector61of each of two control points adjacent to the current position of the character. Here, the two control points adjacent to the current position of the character correspond to the control point which is nearest to the current position of the character, on the course, among the control points preceding the current position of the character, and the control point which is nearest to the current position of the character, on the course, among the control points following the current position of the character. The interpolation will be described below in detail.

The upward direction vector72is a unit vector representing the upward direction relative to the character as shown inFIG. 11. The upward direction vector72for the character is determined by interpolation based on the upward direction vector62of each of the two control points adjacent to the current position of the character in a similar manner to that for the advancing direction vector71.

The right direction vector73is a unit vector representing the right direction relative to the character as described above, as shown inFIG. 11. The right direction vector73for the character is determined by interpolation based on the right direction vector63of each of the two control points adjacent to the current position of the character in a similar manner to that for the advancing direction vector71.

The curve rate74represents a curvature (that is, a curvature of the course) of the forward direction line at the current position of the character. The curve rate74is determined by interpolation based on the curve rate64of each of the two control points adjacent to the current position of the character in a similar manner to that for the advancing direction vector71.

The accumulated distance from the start point75represents a distance (a path) to the current position of the character from the start point of the course in the virtual game world. In the present embodiment, the distance (path) from the start point of the course in the virtual game world to the current position of the character on the forward direction line76described below is determined as the accumulated distance from the start point75.

The current position of the character on the forward direction line76represents a position, on the forward direction line, corresponding to the current position70of the character. For example, as shown inFIG. 13, the current position of the character on the forward direction line76is determined as a position obtained by projecting, onto the forward direction line, the current position70of the character in the direction perpendicular to the forward direction line.

The internal speed77is a scalar value representing a magnitude of a movement speed of the character. The internal speed77is increased or reduced depending on a topography, or the acceleration instruction or the deceleration instruction from the player.

The leftward-rightward movement input value78is a scalar value representing a magnitude of a speed at which the character moves in the right direction. The leftward-rightward movement input value78is a positive value based on the rightward movement instruction from the player or a negative value based on the leftward movement instruction from the player.

The advance vector79, the leftward-rightward movement vector80, the inertial vector81, and the gravitational vector82are used to determine, in each frame, a destination (that is, a moving direction and a moving distance) to which the character is moved.

The advance vector79has the same direction as the advancing direction vector71of the character as shown inFIG. 12, and has a magnitude based on the internal speed77.

The leftward-rightward movement vector80has the same direction as the right direction vector73of the character or the direction opposite to the direction of the right direction vector73, as shown inFIG. 12. The direction of the leftward-rightward movement vector80depends on a sign of the leftward-rightward movement input value78. When the leftward-rightward movement input value78is positive (that is, a player inputs the rightward movement instruction), the leftward-rightward movement vector80has the same direction as the right direction vector73of the character. When the leftward-rightward movement input value78is negative (that is, a player inputs the leftward movement instruction), the leftward-rightward movement vector80has the direction opposite to the direction of the right direction vector73of the character. The leftward-rightward movement vector80has a magnitude based on an absolute value of the leftward-rightward movement input value78.

The inertial vector81has the same direction as the right direction vector73of the character or the direction opposite to the direction of the right direction vector73of the character as shown inFIG. 12. The inertial vector81is used to move, toward the outside of the curve, the character going around the curve by using centrifugal force. The direction of the inertial vector81depends on a sign of the curve rate74included in the character control data. When the sign of the curve rate74represents a right-hand curve, the inertial vector81has the direction opposite to the direction of the right direction vector73of the character. When the sign of the curve rate74represents a left-hand curve, the inertial vector81has the same direction as the right direction vector73of the character.

The gravitational vector82has the same direction as the upward direction vector72of the character or the direction opposite to the direction of the upward direction vector72of the character as shown inFIG. 12. The gravitational vector82is used to cause the character to fly at the same height (the height in the virtual game world) as that of the forward direction line. The direction of the gravitational vector82depends on a larger/smaller relationship between the height of the current position70of the character and the height of the current position of the character on the forward direction line76. When the current position70of the character has a greater height than the current position of the character on the forward direction line76, the gravitational vector82has the direction opposite to the direction of the upward direction vector73of the character. When the current position70of the character has a smaller height than the current position of the character on the forward direction line76, the gravitational vector82has the same direction as the upward direction vector73of the character.

The movement vector83is a vector obtained by combining the advance vector79, the leftward-rightward movement vector80, the inertial vector81, and the gravitational vector82. Based on the movement vector83, the current position70of the character is updated in each frame as necessary.

The virtual camera control data46shown inFIG. 6represents data (such as a virtual camera position, a sight point, an attitude and an angle of view) used to control a virtual camera positioned in the virtual game world so as to generate the game image. The virtual camera control data46is updated as necessary in accordance with the movement of the character.

Hereinafter, with reference to a flow chart shown inFIG. 10, a flow of a process performed by the CPU31based on the game program40will be described.

InFIG. 10, when execution of the game program40is started, the CPU31initially sets, based on the forward direction line data43, the control points represented by the control point data44, as described above, in step S10.

In step S12, an initial game image is displayed based on the game image data41and the race course data42. At this time, each of parameters included in the character control data45is set so as to have an initial value.

In step S14, the control point nearest to the character among the control points preceding the character (that is, at the side of the start point on the course) is determined based on the current position70of the character and the three-dimensional coordinates60of each of the control points included in the control point data44. For example, when the current position of the character corresponds to a point Pc shown inFIG. 13, the control point nearest to and preceding the character corresponds to the control point P3.

In step S16, the control point nearest to the character among the control points following the character (that is, at the side of the goal point on the course) is determined based on the current position70of the character and the three-dimensional coordinates60of each of the control points included in the control point data44. For example, when the current position of the character corresponds to the point Pc shown inFIG. 13, the control point nearest to and following the character corresponds to the control point P4.

Various methods for determining the control points in step S14and step S16may be provided. One of the various methods is as follows. For example, the control point (control point P3in an example shown inFIG. 13) nearest to the current position Pc of the character is obtained. An inner product of the forward direction vector (Xf3, Yf3, Zf3) (refer toFIG. 14) of the control point P3and the three-dimensional coordinates (X3, Y3, Z3) of the control point P3is subtracted from the inner product of the forward direction vector (Xf3, Yf3, Zf3) of the control point P3and the current position (Xc, Yc, Zc) of the character. Depending on whether the subtraction result represents a positive value or a negative value, whether the control point P3precedes or follows the character is determined. In the example shown inFIG. 13, the result of the subtraction based on the two inner products represents a positive value, and therefore the control point P3is determined as the control point nearest to and preceding the character, and the control point P4immediately following the control point P3is determined as the control point nearest to and following the character.

Further, in step S14and step S16, the control point nearest to the current position70of the character may be determined based on “the control point nearest to the character” having been used for an immediately preceding time. Specifically, for example, each time “the control point nearest to the character” is determined, information representing “the control point nearest to the character” is stored in the work memory32of the game apparatus body3. When “the control point nearest to the character” is to be determined, the control points in the vicinity of (or following) “the control point nearest to the character” which has been used for the immediately preceding time are used as potential control points, and “the control point nearest to the character” may be determined from among the potential control points. For example, a distance between the current position70of the character and each of the control points following “the control point nearest to the character” having been used for the immediately preceding time is sequentially calculated. When the distance between the current position70of the character and a certain control point among the control points following “the control point nearest to the character” having been used for the immediately preceding time becomes greater than the distance between the current position70of the character and a control point immediately preceding the certain control point, the control point immediately preceding the certain control point is determined as “the control point nearest to the character”.

In step S18, based on the control point data44representing each of the two control points having been determined in step S14and step S16, the advancing direction vector71, the upward direction vector72, the right direction vector73, the curve rate74and the accumulated distance from the start point75for the character are determined.

The advancing direction vector71of the character is determined through the interpolation based on the forward direction vectors61of each of the two control points having been determined in step S14and step S16. A specific example of the method for determining the advancing direction vector71of the character will be described with reference toFIG. 14.

Firstly, a position of the character between the two control points P3and P4is determined. Specifically, a distance Db and a distance Df shown inFIG. 14are obtained. The distance Db represents a distance to the character relative to the control point P3in the direction represented by the forward direction vector (Xf3, Yf3, Zf3) of the control point P3. The distance Db is calculated by subtracting the inner product of the forward direction vector (Xf3, Yf3, Zf3) of the control point P3and the three-dimensional coordinates (X3, Y3, Z3) of the control point P3from the inner product of the forward direction vector (Xf3, Yf3, Zf3) of the control point P3and the current position (Xc, Yc, Zc) of the character. The distance Df represents a distance to the character relative to the control point P4in the direction represented by the forward direction vector (Xf4, Yf4, Zf4) of the control point P4. The distance Df is calculated by subtracting the inner product of the forward direction vector (Xf4, Yf4, Zf4) of the control point P4and the current position (Xc, Yc, Zc) of the character from the inner product of the forward direction vector (Xf4, Yf4, Zf4) of the control point P4and the three-dimensional coordinates (X4, Y4, Z4) of the control point P4.

Next, a weighted average of the forward direction vectors of the two control points P3and P4is obtained based on the distances Db and Df so as to obtain the advancing direction vector71of the character. Specifically, the advancing direction vector71of the character is calculated as ((Xf3, Yf3, Zf3).times.Db+(Xf4, Yf4, Zf4).times.Df)/(Db+Df). That is, the forward direction vector61of the control point which is the nearer to the character of the two control points P3and P4exerts a greater influence on the advancing direction vector71of the character.

The interpolation described above allows the direction of the advancing direction vector71of the character to smoothly vary in accordance with the movement of the character, thereby enabling improved control of the movement of the character in a natural manner.

The aforementioned method for determining the advancing direction vector71of the character is only an example. The advancing direction vector71of the character may be determined in a simplified manner or a complicated manner as compared to the aforementioned method. For example, the forward direction vector of the control point P3nearest to the character may be determined as the advancing direction vector71of the character. In another exemplary method, the advancing direction vector71of the character may be determined based on the forward direction vectors of three or more control points. In still another exemplary method, a line tangent to the forward direction line at the current position of the character on the forward direction line76is detected, and the advancing direction vector71of the character may be determined so as to represent the direction of the line tangent to the forward direction line.

The upward direction vector72, the right direction vector73, and the curve rate74of the character may be determined in a similar manner. That is, the upward direction vector72of the character is obtained as a weighted average of the upward direction vectors of the two control points P3and P4based on the distances Db and Df. The right direction vector73of the character is obtained as a weighted average of the right direction vectors of the two control points P3and P4based on the distances Db and Df. The curve rate74is obtained as a weighted average of the curve rates of the two control points P3and P4based on the distances Db and Df.

The accumulate distance from the start point75is obtained by adding the distance Db to the accumulated distance from the start point65representing an accumulated distance from the start point to the control point P3. The accumulated distance from the start point75may be obtained by subtracting the distance Df from the accumulated distance from the start point65representing an accumulated distance from the start point to the control point P4.

In step S20, the advance vector79is determined. Specifically, the internal speed77is updated, and a vector having a magnitude represented by the internal speed77having been updated, and a direction represented by the advancing direction vector71of the character is set as the advance vector79. An exemplary method for updating the internal speed77according to the present embodiment is as follows. A magnitude of the movement vector83determined in an immediately preceding frame is determined as the internal speed77. Thereafter, when the acceleration instruction is inputted by a player, the internal speed77is increased, and when the deceleration instruction is inputted by a player, the internal speed77is reduced. At this time, the increased amount of the internal speed77or the reduced amount of the internal speed77may be determined in accordance with a speed at which the strike surface is repeatedly hit as described above. As described above, the magnitude of the advance vector79is determined based on the magnitude of the movement vector83having been determined in the immediately preceding frame, and therefore, unlike in the conventional art, it is possible to prevent the character going around a curve from accelerating or decelerating in an unnatural manner.

Further, when the acceleration instruction is not inputted by a player, the internal speed may not be reduced, that is, a value of the internal speed having been obtained in the immediately preceding frame may be maintained.

In step S22, the leftward-rightward movement vector80is determined. Specifically, the leftward-rightward movement input value78is updated, and a vector having a magnitude represented by the leftward-rightward movement input value78having been updated, and a direction represented by the right direction vector73of the character is set as the leftward-rightward movement vector80. An exemplary method for updating the leftward-rightward movement input value78according to the present embodiment is as follows. When the rightward movement instruction is inputted by a player, the leftward-rightward movement input value78is set as a positive value, and when the leftward movement instruction is inputted by a player, the leftward-rightward movement input value78is set as a negative value. At this time, the absolute value of the leftward-rightward movement input value78may be determined depending on a speed at which the strike surface is repeatedly hit as described above.

In step S24, the inertial vector81is determined. Specifically, a vector having a magnitude based on a value of the curve rate74, and the same direction as the right direction vector73of the character or a direction opposite to the direction of the right direction vector73of the character as described above is set as the inertial vector81. That is, the vector to be set as the inertial vector81has a direction opposite to the direction of the right direction vector73of the character when the character goes around a right-hand curve, and has the same direction as the right direction vector73of the character when the character goes around a left-hand curve.

In step S26, the gravitational vector82is determined. Specifically, a vector having a predetermined magnitude and a direction based on a larger/smaller relationship between the height of the current position70of the character and the height of the current position of the character on the forward direction line76is set as the gravitational vector82. Here, the predetermined magnitude may be constant, or depend on the height difference.

In step S28, the movement vector83is determined. Specifically, a vector obtained by combining the advance vector79, the leftward-rightward movement vector80, the inertial vector81, and the gravitational vector82, which are determined in steps S20, S22, S24, and S26, respectively, is set as the movement vector83. The movement vector83may be corrected in consideration of influences of topography (ascending slope or friction), and air resistance.

In step S30, the current position70of the character is updated based on the movement vector83having been determined in step S28. Specifically, the current position70is updated so as to move the character over a distance represented by the movement vector83in a direction represented by the movement vector83.

In the present embodiment, the direction represented by the movement vector may be referred to as “moving direction” and the direction represented by the advancing direction vector or the advance vector may be referred to as “advancing direction”.

In step S32, an attitude of the character is determined. The attitude of the character may be determined based on the advancing direction vector71of the character, the upward direction vector72, and the right direction vector73or may be determined regardless of these vectors. For example, when a player inputs the rightward movement instruction, the character may be sloped to the right so as not to be influenced by the upward direction vector72of the character.

In step S34, the virtual camera control data46is updated based on the current position70of the character. In a conventional typical race game, the virtual camera is positioned so as to pick up an image of the character from therebehind. However, in the present embodiment, a relative position of the virtual camera to the current position of the character is changed depending on the forward direction line.

Specifically, as shown inFIGS. 15 and 16, orientation of the virtual camera is updated, as necessary, so as to continue to be parallel to the forward direction (that is, the direction of the line tangent to the forward direction line) at a point distanced from the current position (more specifically, the current position of the character on the forward direction line) of the character by a predetermined distance d in the course forward direction. Therefore, for example, when the character is going around a blind curve as shown inFIG. 16, the virtual camera has its orientation updated so as to provide a view beyond the curve. Therefore, a player can control the character while confirming the view beyond the curve, thereby improving the controllability. The orientation of the virtual camera may be updated, as necessary, so as to continue to be parallel to the forward direction vector61of the control point following, by a predetermined number of control points, the control point nearest to the character, instead of the forward direction at the point distanced from the current position of the character by the predetermined distance d. The position of the virtual camera is determined based on the current position of the player character. For example, the virtual camera is positioned so as to be distanced from the current position (or, a position which is distanced from the current position of the player character by a predetermined distance (for example, a position which is distanced from the current position of the player character in the forward direction or the moving direction by a predetermined distance)) of the player character by a predetermined distance in the direction opposite to the direction corresponding to the orientation of the virtual camera having been determined as described above.

Further, the relative angle θ of the virtual camera to the advancing direction of the character may be changed depending on the curvature of the forward direction line at either the current position (more specifically, the current position on the forward direction line) of the character or a point following the current position of the character by a predetermined distance as shown inFIG. 17, instead of controlling the position and the orientation of the virtual camera based on the forward direction indicated by the forward direction line. Further, the relative angle .theta. of the virtual camera to the advancing direction of the character may be changed depending on the curve rate74.

In step S36, the game image is updated based on the current position70of the character having been updated in step S30, the attitude of the character having been determined in step S32, and the virtual camera control data46having been updated in step S34. The process is returned to step S14.

The process of steps S14, S16, S18, S20, S22, S24, S26, S28, S30, S32, S34, and S36described above is repeated in a predetermined cycle (for example, every 1/60 seconds), so as to display, on the screen of the television2, the state of the character moving on the course in accordance with the instruction from a player.

As described above, according to the present embodiment, the advancing direction of the character is automatically corrected so as to continue to be parallel to the forward direction indicated by the forward direction line. Therefore, when the character goes around a curve, a player is allowed to appropriately move the character by performing a simple operation without considering the current moving direction of the character. For example, in a conventional race game, when a player fails to appropriately control the character in accordance with the curvature of the curve, the character is moved toward the inside or the outside of the course, thereby causing the character to easily slide off the course. However, according to the present embodiment, even when a player fails to control the character, the character is prevented from moving toward the inside or the outside of the course, thereby preventing the character from easily sliding off the course.

Further, the advancing direction of the character is automatically corrected as described above, and therefore it is unnecessary for a player to repeatedly hit the strike surfaces of the conga controller6when the character goes around a sharp curve, thereby enabling a player poor at repeatedly hitting the strike surfaces to easily operate the character.

Moreover, according to the present embodiment, when the character goes around a curve, the movement speed of the character is basically maintained, and therefore a player is able to enjoy running through the course at a high movement speed without worrying about sliding off the course. In particular, even when the character runs a complicated course including a lot of curves, it is unnecessary to reduce the movement speed each time the character goes around the curve, thereby allowing a player to constantly enjoy running the course at the high movement speed with excitement. Further, the operation inputted by the player also influences the moving direction of the player object, and therefore it is possible to represent the technique of the player in the game, whereby the operation corrected by the computer does not deprive the player of the enjoyment and excitement provided by the game.

As described above, the forward direction line may be branched or the forward direction lines may be merged. For example, when the forward direction line is branched as shown inFIG. 18, the control point P12representing the branching point may have set therefor the forward direction vector61, the upward direction vector62, the right direction vector63, and the curve rate64for each of a route, from the control point P12, including the control point P13and a route, from the control point P12, including the control point P20. When the route in which the character is to travel is determined, the advancing direction vector71of the character, the upward direction vector72and the like may be determined based on the forward direction vector61, the upward direction vector62, the right direction vector63, and the curve rate64corresponding to the route in which the character is to travel. An exemplary method for determining the route in which the character is to travel is as follows. The control point (the control point P13in an example shown inFIG. 18) which is the nearer, to the current position Pc of the character, of the two control points P13and P20each of which immediately follows the control point P12representing the branching point may be determined as a point included in the route in which the character is to travel. One of the route including the control point P13and the route including the control point P20may be active depending on whether or not the game state data satisfies a predetermined condition (for example, by using, as a switch, a gimmick and the like in the course).

The forward direction line is not necessarily provided along the course. For example, the forward direction line (P40→P41→P33) as shown inFIG. 19may be provided. In this case, even when a player fails to operate the character and therefore the character strands at the position Pc shown inFIG. 19, the advancing direction of the character is automatically changed to the direction of the control point P33based on the forward direction line (P40→P41→P33). Therefore, the player is allowed to easily move the player character to a favorable position by simply inputting the acceleration instruction and the leftward movement instruction for slightly moving the player character in the left direction.

While certain example embodiments have described in detail, the foregoing description is in all aspects illustrative and not restrictive. It is understood that numerous other modifications and variations can be devised without departing from the scope of the invention