DESCRIPTION OF THE PREFERRED EMBODIMENTS
An application program for a car racing game according to a preferred embodiment of the present invention will be described while referring to the accompanying drawings.
FIG. 1 shows the construction of an application program 10 a of the present invention according to the present embodiment. The application program 10 a is stored on a CD-ROM 10 . The application program 10 a includes a main menu subprogram 10 b, a free driving subprogram 10 c, a race start determining subprogram 10 d, a car racing subprogram 10 e, a race winner determining subprogram 10 f, and an end-of-race processing subprogram 10 g.
FIG. 2 is a block diagram showing the configuration of a game machine 100 . The game machine 100 includes a game console 101 , a controller 104 for inputting control signals into the game console 101 , a TV monitor 102 for displaying the game, and speakers 103 .
The game console 101 includes a central processing unit (CPU) 111 having a ROM for storing control commands and a RAM serving as the work area; an input interface 112 for providing interface with the controller 104 ; a RAM 113 serving as an internal memory for storing the application program and capable of saving the data even when the power is shut off; a CD-ROM drive 114 capable of reading the CD-ROM 10 ; a video processor 115 for outputting image data stored by the CPU 111 to the TV monitor 102 ; a D/A converter 116 and an encoder 117 for generating video signals from the data transmitted from the video processor 115 ; an audio processor 118 for outputting audio data stored by the CPU 111 to the speakers 103 ; and a D/A converter 119 for generating audio signals from the data transmitted from the audio processor 118 .
The controller 104 is provided with at least a steering wheel 1 , an accelerator 2 , a brake 3 , a side-brake 4 , a reverse gear 5 , and a passing function 6 serving as signal input means for operating a car. The controller 104 also includes a start/pause button 104 a; as well as a shift up button 7 , a shift down button 8 , and a change view button 9 for adjusting the display.
The CD-ROM 10 storing the application program of the present invention is inserted into the CD-ROM drive 114 . The application program 10 a stored on the CD-ROM 10 is loaded into the RAM 113 . The RAM 113 includes a backup battery or the like to maintain stored data when the power is turned off.
When power to the game machine 100 is turned on, the game machine 100 starts up and displays a title on the TV monitor 102 after a fixed time has elapsed. At this time, the user presses the start/pause button 104 a to display a screen for selecting a racing mode. The game machine 100 determines whether a memory card, file, or the like required for playing the selected racing mode is available and displays the results of this determination. If the memory card, file, or the like is available, data for the racing mode is loaded.
When the application program 10 a is selected as the racing mode, a main menu window 11 with a file of the main menu subprogram 10 b is displayed. Also, the main menu window 11 is displayed when the user presses the start/pause button 104 a to continue a game that had been paused and when the window is loaded while the game is paused from a memory card inserted in an expansion slot.
An example of the main menu window 11 , as shown in FIG. 3 , includes a car data selection 11 a that enables the player to select a new car, change the player's name, and the like; a car shop selection lib for purchasing or selling parts; a tune-up selection lie for purchasing, replacing, or testing out parts; an opponents selection 11 c for viewing data on opposing cars controlled by the game machine 100 ; an options selection lid for setting various options regarding the game system and controller; and a race selection 11 f for entering the racecourse.
Choosing the race selection 11 f executes the free driving subprogram 10 c shown in FIG. 1 and displays the player's car driving unrestrictedly on a predetermined racecourse. The player controls the movement of the car with the controller 104 while watching the TV monitor 102 and searches for opposing cars. Here, the game machine 100 serves as the opposing player or players, controlling one or two opposing cars, for example.
While the player is searching for opposing cars, the player's car may close within passing distance of another car or an opposing car may approach the player's car from behind. The race start determining subprogram 10 d starts a race from a point on the racecourse when agreement to race between the two cars has been established. An agreement to race is established when the player passes an opposing car and is passed in return or when an opposing car passes the player from behind and the player passes that opposing car in return. In the present embodiment, this passing exchange is the method used to signal intent to race between the player and an opposing car. However, it is also possible to signal intent to race by flashing one's hazard lights instead of by passing, or by using either one or the other method.
Once the race begins, the car racing subprogram 10 e is executed. At this time, the race is conducted with the player and opponent attempting to pass each other on the racecourse. The race winner determining program 10 f determines the winner of the race, as described below.
At the beginning of the first race, each player has points SP that are initialized to a prescribed value. These points SP are necessary for starting and continuing races. The points SP are adjusted at prescribed periods by calculating the leading and trailing cars and the distance therebetween. A predetermined value corresponding to the distance between cars is subtracted from the points SP of the trailing car. A player wins when the points SP of the opponent reach 0 first. The game ends when one player's points SP reach 0. As described above, one feature of the racing game is that the starting point and finishing point are not fixed. The racecourse can have a loop form or can diverge into parallel branches, for example. However, a race ends if cars separate from each other during a race at a split in the road.
After the race ends, the end-of-race processing subprogram 10 g is executed to display the results of the race and show or save a replay of the race. At this time, the player can choose whether to return to the free driving mode, return to the main menu, or end the game.
Next, the race winner determining subprogram 10 f will be described in greater detail.
To begin with, the leading and trailing cars are determined and the distance between the cars is calculated at prescribed periods. These prescribed periods can be either one frame ({fraction (1/60)} seconds) for displaying images on the TV monitor 102 or an integral multiple of one frame.
A subtraction value is calculated every frame in the former case and subtracted from the trailing player's points SP, thereby enabling a simple calculation. The subtraction value is smaller when the distance between cars is shorter and larger when the distance between cars is longer. To achieve this, a prescribed length behind the leading car is divided into a plurality of sections, three in this example, each having a primary curve representing the subtraction value in relation to distance from the leading car.
When the trailing car is within the first section, that is the section nearest the leading car, the subtraction value for the distance between cars in this section is calculated using the primary curve having the smallest growth rate. When the trailing car is within the second section behind the leading car, the subtraction value is determined by a primary curve connected to the end of the first primary curve and having a growth rate equal to the mean of those for the primary curves of the first and third sections. When the trailing car is within the third section behind the leading car, the subtraction value is calculated based on a primary curve connected to the end of the second primary curve and having the highest growth rate. This example is illustrated in FIG. 4 .
In the graph of FIG. 4 , the x-axis represents the distance n extending backward from the rear of the leading car, while the y-axis represents the subtraction value G. The units for the distance n are denoted by an integer divided by 50 centimeters, for example.
Subtraction values in the graph are represented by the curves a, b, and c. No value is subtracted when n 0. In the first section, in which 1<n<30, the subtraction value increases in relation to the distance n as shown by the primary curve a. In the second section, in which 31<n<110, the subtraction value increases in relation to the distance n as shown by the primary curve b, wherein the primary curve b increases at a higher ratio than the primary curve a in the first section. In the third section, in which 111<n201, the subtraction value is fixed at a maximum value. The subtraction values are subtracted from the points SP in real-time for each frame.
Points can be subtracted from the points SP for other reasons than the positions of and distance between cars. For example, points can be subtracted when a car contacts or collides with a wall or another car. Consequently, a racecourse containing many twists and turns cannot be won by speed alone.
In this case, the force of collision in a direction perpendicular to a wall or car collided with is calculated at prescribed periods. A value proportional to this collision force is subtracted from the points SP. As described above, the prescribed period is one frame ({fraction (1/60)} seconds) of images displayed on the TV monitor 102 . In the example shown in FIG. 5 , a car 14 having a mass m (kg) and traveling at a velocity v (m/s) collides with a wall 13 (or another car) while moving at an angle thereto. The force of collision in this case is calculated at each frame according to Equation (1) below.
Force of collision ( ) m ( v sin ) 2 (1)
The subtraction value is calculated according to the product of the force of collision and a prescribed proportional constant R. This subtraction value is subtracted from the points SP at each frame in real-time.
The subtraction value G and the proportional constant R corresponding to the distance n in FIG. 4 can be adjusted to regulate the value per unit time that is subtracted from the points SP based on the distance between cars and the value per unit time that is subtracted due to contact or collision with objects. A large proportional constant R will cause the points SP to drop sharply in the event of a collision. Similarly, larger subtraction values G in sections having a larger distance n will cause the points SP to drop abruptly as the leading car pulls farther away from the trailing car.
A race display screen 12 , shown in FIG. 6 , is displayed on the TV monitor 102 in real-time in order to indicate the points SP for both the player and opponent. As shown in the drawing, the race display screen 12 includes an SP gauge 12 a disposed on the left side for indicating the player's points SP and an SP gauge 12 c disposed on the right side for indicating the opponent's points SP. The black areas in the SP gauge 12 a and SP gauge 12 c represent the points that have been subtracted, while the white areas represent a remaining SP 12 b and a remaining SP 12 d for the player and opponent, respectively. In this example, the remaining SP 12 d is larger than the remaining SP 12 b, indicating that the opposing player has the advantage.
EXPLANATION OF NUMBERS IN DRAWINGS
1 steering wheel
2 accelerator
3 brake
4 side brake
5 reverse gear
6 passing function
7 shift up button
8 shift down button
9 change view button
10 CD-ROM
10 a application program
10 b main menu program
10 c free driving subprogram
10 d race start determining subprogram
10 e car racing subprogram
10 f race winner determining program
10 g end-of-race processing subprogram
11 main menu window
12 race display screen
12 a player's SP gauge
12 b player's remaining SP
12 c opponent's SP gauge
12 d opponent's remaining SP
13 wall
14 bicycle
100 game machine
101 game console
102 TV monitor
103 speakers
104 controller
104 a start/pause button
111 CPU
112 input interface
113 ram
114 cd-rom drive
115 , 118 video processor
116 , 119 D/A converter
117 encoder