With reference to
As shown in
The game apparatus main body 5 has a built-in communication unit 6 (
On the game apparatus main body 5, a flash memory 38 (
The controller 7 wirelessly transmits transmission data such as operation information or the like to the game apparatus main body 5 having the built-in communication unit 6, using the technology of Bluetooth (registered trademark) or the like. The controller 7 is operation means for mainly operating a player object or the like appearing in a game space displayed on a display screen of the monitor 2. The controller 7 includes a housing which is small enough to be held by one hand and a plurality of operation buttons (including a cross key, a stick and the like) exposed on a surface of the housing. As described later in detail, the controller 7 also includes an imaging information calculation section 74 (
As shown in
The GPU 32 performs image processing based on an instruction from the CPU 30. The GPU 32 includes, for example, a semiconductor chip for performing calculation processing necessary for displaying 3D graphics. The GPU 32 performs the image processing using a memory dedicated for image processing (not shown) or a part of the storage area of the main memory 33. The GPU 32 generates game image data and a movie to be displayed on the monitor 2 using such memories, and outputs the generated data or movie to the monitor 2 via the memory controller 31 and the video I/F 37 as necessary.
The main memory 33 is a storage area used by the CPU 30, and stores a game program or the like necessary for processing performed by the CPU 30 as necessary. For example, the main memory 33 stores a game program, various types of data or the like read from the optical disc 4 by the CPU 30. The game program, the various types of data or the like stored on the main memory 33 are executed by the CPU 30.
The DSP 34 processes sound data or the like generated by the CPU 30 during the execution of the game program. The DSP 34 is connected to the ARAM 35 for storing the sound data or the like. The ARAM 35 is used when the DSP 34 performs predetermined processing (e.g., storage of the game program or sound data already read). The DSP 34 reads the sound data stored on the ARAM 35 and outputs the sound data to the speaker 2a included in the monitor 2 via the memory controller 31 and the audio I/F 39.
The memory controller 31 comprehensively controls data transfer, and is connected to the various I/Fs described above. As described above, the communication unit 6 receives transmission data from the controller 7 and outputs the transmission data to the CPU 30. The communication unit 6 also transmits transmission data which is output from the CPU 30 to the communication section 75 of the controller 7. The video I/F 37 is connected to the monitor 2. The audio I/F 39 is connected to the speaker 2a built in the monitor 2, such that the sound data read by the DSP 34 from the ARAM 35 or sound data directly output from the disc drive 40 is output through the speaker 2a. The disc I/F 41 is connected to the disc drive 40. The disc drive 40 reads data stored at a predetermined reading position of the optical disc 4 and outputs the data to a bus of the game apparatus main body 5 or the audio I/F 39.
With reference to
As shown in
At the center of a front part of a top surface of the housing 71, a cross key 72a is provided. The cross key 72a is a cross-shaped four-direction push switch. The cross key 72a includes projecting operation portions corresponding to the four directions (front, rear, right and left) and arranged at an interval of 90 degrees. The player selects one of the front, rear, right and left directions by pressing one of the operation portions of the cross key 72a. Through an operation on the cross key 72a, the player can, for example, instruct a direction in which a player character or the like appearing in a virtual game world is to move or select one of a plurality of alternatives.
The cross key 72a is an operation section for outputting an operation signal in accordance with the above-described direction input operation performed by the player, but such an operation section may be provided in another form. For example, the operation section may include four push switches provided in a cross arrangement, and output an operation signal in accordance with the push switch which has been pressed. The operation section may further include a center switch provided at the intersection of the cross in addition to the four push switches. Alternatively, the cross key 72a may be replaced with an operation section which includes an inclinable stick (so-called joystick) projecting from the top surface of the housing 71 and outputs an operation signal in accordance with the inclining direction of the stick. Still alternatively, the cross key 72a may be replaced with an operation section which includes a disc-shaped member horizontally slidable and outputs an operation signal in accordance with the sliding direction of the disc-shaped member. Still alternatively, the cross key 72a may be replaced with a touch pad.
Rearward to the cross key 72a on the top surface of the housing 71, a plurality of operation buttons 72b through 72g are provided. The operation buttons 72b through 72g are each an operation section for outputting a respective operation signal when the player presses ahead thereof. For example, the operation buttons 72b through 72d are assigned functions of a first button, a second button, and an A button. The operation buttons 72e through 72g are assigned functions of a minus button, a home button and a plus button, for example. The operation buttons 72b through 72g are assigned various functions in accordance with the game program executed by the game apparatus main body 5. In the exemplary arrangement shown in
Forward to the cross key 72a on the top surface of the housing 71, an operation button 72h is provided. The operation button 72h is a power switch for remote-controlling the power of the game apparatus main body 5 to be on or off. The operation button 72h also has a top surface thereof buried in the top surface of the housing 71, so as not to be inadvertently pressed by the player.
Rearward to the operation button 72c on the top surface of the housing 71, a plurality of LEDs 702 are provided. The controller 7 is assigned a controller type (number) so as to be distinguishable from the other controllers 7. For example, the LEDs 702 are used for informing the player of the controller type which is currently set to the controller 7 that he/she is using. Specifically, when the controller 7 transmits the transmission data to the communication unit 6, one of the plurality of LEDs corresponding to the controller type is lit up.
On the top surface of the housing 71, sound holes for outputting a sound from a speaker (speaker 706 in
On a bottom surface of the housing 71, a recessed portion is formed. The recessed portion is formed at a position at which an index finger or middle finger of the player is located when the player holds the controller 7 with one hand in the state where a front surface of the controller 7 is directed toward the markers 8L and 8R. On a slope surface of the recessed portion, an operation button 72i is provided. The operation button 72i is an operation section acting as, for example, a B button.
On the front surface of the housing 71, an imaging element 743 (see
In order to give a specific description below, a coordinate system which is set for the controller 7 will be defined. As shown in
With reference to
As shown in
As shown in
On the bottom main surface of the substrate 700, a vibrator 704 is attached. The vibrator 704 is, for example, a vibration motor or a solenoid. The vibrator 704 is connected to the microcomputer 751 via lines provided on the substrate 700 or the like, and turns the microcomputer 751 on or off in accordance with vibration data transmitted from the game apparatus main body 5. The controller 7 is vibrated by an actuation of the vibrator 704, and the vibration is conveyed to the player holding the controller 7. Thus, a so-called vibration-responsive game is realized. Since the vibrator 704 is provided slightly forward with respect to the center of the housing 71, the housing 71 held by the player is largely vibrated. Thus, the player easily senses the vibration.
With respect to
As shown in
The imaging information calculation section 74 includes the infrared filter 741, the lens 742, the imaging element 743 and the image processing circuit 744. The infrared filter 741 allows only infrared light to pass therethrough, among light incident on the front surface of the controller 7. The lens 742 collects the infrared light which has passed through the infrared filter 741 and outputs the infrared light to the imaging element 743. The imaging element 743 is a solid-state imaging device such as, for example, a CMOS sensor or a CCD. The imaging element 743 takes an image of the infrared light collected by the lens 742. Accordingly, the imaging element 743 takes an image of only the infrared light which has passed through the infrared filter 741 for generating image data. The image data generated by the imaging element 743 is processed by the image processing circuit 744. Specifically, the image processing circuit 744 processes the image data obtained from the imaging element 743, detects an area thereof having a high brightness, and outputs the processing result data representing the coordinate set of the detected position and size of the area to the communication section 75. The imaging information calculation section 74 is fixed to the housing 71 of the controller 7. The imaging direction of the imaging information calculation section 74 can be changed by changing the direction of the housing 71.
The acceleration sensor 701 included in the controller 7 is preferably a three-axial acceleration sensor. The three-axial acceleration sensor 701 detects a linear acceleration in each of three directions, i.e., an up-down direction (Y-axis direction shown in
The acceleration detection means used for the acceleration sensor 701 can detect only an acceleration along a straight line corresponding to each of the axes of the acceleration sensor 701 (linear acceleration). Namely, a direct output from the acceleration sensor 701 is a signal indicating the linear acceleration (static or dynamic) along each of one, two or three axes thereof. Hence, the acceleration sensor 701 cannot directly detect a physical property such as, for example, a motion along a nonlinear path (e.g., an arc path), rotation, revolution, angular displacement, inclination, position or posture.
Nonetheless, those skilled in the art would easily understand from the description of this specification that further information on the controller 7 can be estimated or calculated (determined) by executing additional processing on an acceleration signal which is output from the acceleration sensor 701. For example, when a static acceleration (gravitational acceleration) is detected, an inclination of the object (controller 7) with respect to the gravitational vector can be determined by performing calculations based on the inclination angle and the detected acceleration, using the output from the acceleration sensor 701. By combining the acceleration sensor 701 with the microcomputer 751 (or another processor included in the game apparatus main body 5 such as the CPU 30) in this manner, the inclination, posture or position of the controller 7 can be determined. Similarly, when the controller 7 including the acceleration sensor 701 is dynamically accelerated by a hand of the player, various motions and/or positions of the controller 7 can be calculated by processing an acceleration signal generated by the acceleration sensor 701. In another embodiment, the acceleration sensor 701 may include a built-in signal processing device, or another type of dedicated processing device, for executing desired processing on an acceleration signal which is output from the built-in acceleration detection means, before the signal is output to the microcomputer 751. For example, when the acceleration sensor 701 is for detecting a static acceleration (e.g., a gravitational acceleration), the built-in or dedicated processing device may convert the detected acceleration signal to a corresponding inclination angle (or another preferable parameter). The parameter indicating the acceleration detected by the acceleration sensor 701 is output to the communication section 75.
In another embodiment, a gyrosensor having a built-in rotation element or vibration element maybe used as a motion sensor for detecting a motion of the controller 7. One exemplary MEMS gyrosensor usable in this embodiment is available from Analog Devices, Inc. Unlike the acceleration sensor 701, a gyrosensor can directly sense a rotation (or an angular rate) around an axis of at least one gyro element built therein. Since a gyrosensor and an acceleration sensor are fundamentally different from each other, either sensor may be selected in accordance with the use. An output signal from the selected sensor needs to be processed in a manner appropriate to the selected sensor.
Specifically, when a gyrosensor is used for calculating an inclination or a posture, instead of an acceleration sensor, significant changes are made. More specifically, when a gyrosensor is used, an inclination value is initialized before the detection is started. The angular rate data which is output from the gyrosensor is integrated. Next, an inclination change amount is calculated from the initialized inclination value. In this case, the calculated inclination corresponds to the angle. By contrast, when an acceleration sensor is used, the inclination is calculated by comparing the value of a gravitational acceleration component of each axis with a predetermined reference value. Therefore, the calculated inclination can be represented with a vector. Even without initialization, an absolute direction detected by the acceleration detection means can be obtained. As for the nature of the value calculated as an inclination, the value calculated using a gyrosensor is an angle whereas the value calculated using an acceleration sensor is a vector. Therefore, when a gyrosensor is used instead of an acceleration sensor, the inclination data needs to be converted as predetermined in consideration of the differences between the two devices. The characteristics of a gyrosensor are known to those skilled in the art as well as the basic differences between two devices, and will not be further described in this specification. A gyrosensor is advantageous in directly sensing a rotation, whereas an acceleration sensor is advantageous in generally having a higher cost efficiency when applied to a controller as used in this embodiment.
The communication section 75 includes the microcomputer 751, a memory 752, the wireless module 753, and the antenna 754. The microcomputer 751 controls the wireless module 753 for wirelessly transmitting the transmission data, while using the memory 752 as a storage area during processing. The microcomputer 751 also controls the operation of the sound IC 707 and the vibrator 704 in accordance with the data transmitted from the game apparatus main body 5 to the wireless module 753 via the antenna 754. The sound IC 707 processes sound data or the like transmitted from the game apparatus main body 5 via the communication section 75. The microcomputer 751 actuates the vibrator 704 in accordance with, for example, the vibration data (e.g., a signal for turning the vibrator 704 on or off) transmitted from the game apparatus main body 5 via the communication section 75.
Data from the controller 7 including an operation signal (key data) from the operation section 72, acceleration signals in the three axial directions (X-axis, Y-axis and Z-axis direction acceleration data) from the acceleration sensor 701, and the processing result data from the imaging information calculation section 74 are output to the microcomputer 751. The microcomputer 751 temporarily stores the input data (key data, X-axis, Y-axis and Z-axis direction acceleration data, and the processing result data) in the memory 752 as transmission data which is to be transmitted to the communication unit 6. The wireless transmission from the communication section 75 to the communication unit 6 is performed at a predetermined time interval. Since game processing is generally performed at a cycle of 1/60 sec., the wireless transmission needs to be performed at a cycle of a shorter time period. Specifically, the game processing unit is 16.7 ms ( 1/60 sec.), and the transmission interval of the communication section 75 structured using the Bluetooth (registered trademark) technology is 5 ms. At the transmission timing to the communication unit 6, the microcomputer 751 outputs the transmission data stored in the memory 752 as a series of operation information to the wireless module 753. The wireless module 753 uses, for example, the Bluetooth (registered trademark) technology to radiate the operation information from the antenna 754 using a carrier wave of a predetermined frequency. Thus, the key data from the operation section 72, the X-axis, Y-axis and Z-axis direction acceleration data from the acceleration sensor 701, and the processing result data from the imaging information calculation section 74 are transmitted from the controller 7. The communication unit 6 of the game apparatus main body 5 receives the carrier wave signal, and the game apparatus main body 5 demodulates or decodes the carrier wave signal to obtain the series of operation information (the key data, the X-axis, Y-axis and Z-axis direction acceleration data, and the processing result data) Based on the obtained operation information and the game program, the CPU 30 of the game apparatus main body 5 performs the game processing. In the case where the communication section 75 is structured using the Bluetooth (registered trademark) technology, the communication section 75 can have a function of receiving transmission data which is wirelessly transmitted from other devices.
Before describing specific processing performed by the game apparatus main body 5, an overview of a game playable by the game apparatus main body 5 will be described. As shown in
In order to provide a specific description, Xs, Ys and Zs axes perpendicular to one another are defined as follows for a space in which the monitor 2 is installed and the player holding the controller 7 is existent. Specifically, the Xs axis runs in a horizontal direction connecting the player and the monitor 2, and a direction from the player toward the monitor 2 is a positive Xs-axis direction. The Ys axis runs in a horizontal direction perpendicular to the Xs axis, and a rightward direction for the player facing the display screen of the monitor 2 is a positive Ys-axis direction (in
The player gives operation information (specifically, X-, Y-and Z-axis direction acceleration data) from the controller 7 to the game apparatus main body 5 by moving the controller 7 up, down, right or left or inclining the controller 7 from the upright state in accordance with the image displayed on the monitor 2. The player also gives the operation information from the controller 7 to the game apparatus main body 5 by swinging the controller 7 right and left. For example, as shown in
As shown in
The player character PC holds the bat object BO, and is located on the field which is set in the virtual game space. In accordance with the motion of the player inclining or moving the controller 7, the position or posture of the bat object BO is shifted and thus the manner in which the player character PC holds up the bat object BO is changed. In accordance with the motion of the player swinging the controller 7 right and left, the player character PC swings the bat object BO. Namely, as the player holding the controller 7 performs an operation of moving the controller 7, the player character PC is displayed as performing an operation of holding up or swinging the bat object BO in a similar manner. Thus, the player enjoys a virtual game as if he/she was playing baseball while holding the controller 7 as a baseball bat.
For example, when the player moves the controller 7 rightward or leftward from the upright state, the bat object BO immediately moves in the virtual game space in accordance with such a motion of the controller 7. When the player inclines the controller 7 from the upright state, the bat object BO is inclined at a predetermined ratio in accordance with the inclination angle of the controller 7. Namely, the bat object BO immediately moves in response to the rightward or leftward movement of the controller 7, whereas gradually inclining in a delayed manner in response to the inclining motion of the controller 7. Generally in the real world, when it is attempted to move an elongate member having a certain weight with one end thereof being held or to change the inclination angle thereof with one end thereof being held, the end moves immediately but the other end moves in a delayed manner. For example, the player can quickly change the inclination angle of the controller 7. However, if the inclination angle of the bat object BO was changed as quickly in response to the change in the inclination angle of the controller 7, the player character PC would appear as if it was holding a lightweight elongate member. This would look unrealistic to the player. The inclination angle of the controller 7 is changed by a subtle motion of the hand of the player holding the controller 7. If the bat object BO reacted to this change with a high responsiveness, the motion of the bat object BO would appear unnatural even though the bat object BO is intended to be moved in compliance with the player operating the controller 7. In this embodiment, when the controller 7 is moved rightward or leftward, or inclined, one end (support position) of the bat object BO moves in immediate response to the motion of the controller 7, but the other end is moved or inclined in a delayed manner so as to gradually follow the motion of the one end. Therefore, the object representing the baseball bat can be drawn as moving or inclining naturally. Thus, a baseball game reflecting the motions applied by the player to the controller 7 can be presented.
When the player swings the controller 7 right and left, the player character PC immediately starts a motion of swinging the bat object BO in accordance with the swing motion of the controller 7. Specifically, the bat object BO, which is shifted in the position or posture in response to the motion of the controller 7 as described above, is swung as if to hit the ball thrown by the opponent player to an arbitrary position. Along a swing trajectory of the bat object BO, neither the swing start point nor a point in the middle of the swing (e.g., a ball hitting point or a point at which the bat object BO reaches a vertical plane on which the ball is present) is fixed. Therefore, when motion data on the bat object BO being swung is prepared for each trajectory, an infinite number of motion data is needed. As described later in detail, according to the present invention, one piece of reference motion data is prepared and is corrected in accordance with the swing start point and the point in the middle of the swing, to represent the motion of the bat object BO being swung.
With reference to
In
A position and an inclination angle of the bat object BO, corresponding to the position and the inclination angle of the controller 7 which stands still upright with the front surface thereof being directed upward (see
A movable range is provided as a range in which the point PO can move in the virtual game space. The movable range has a predetermined width in the positive and negative x-axis directions (x-axis direction movable width wx described later), and a predetermined width in the positive and negative z-axis directions (z-axis direction movable width wz described later), with respect to the reference position. In this embodiment, a maximum movable range of the point PO (i.e., the maximum value/minimum value of the movable range along the x axis and the z axis) is provided in correspondence with the maximum value of acceleration detectable by the acceleration sensor 701 (e.g., 2 G for each axis). The output value from the acceleration sensor 701 is scaled to the movable range, and thus the post-movement coordinate set of the point PO in the x-y-z coordinate system is calculated. For example, the width of the movable range in the x-axis and z-axis directions with respect to the reference position is set at length 3 in the virtual game space. The acceleration in the Y-axis direction detected by the acceleration sensor 701 is made to correspond to the movement of the point PO in the x-axis direction, and the acceleration in the X-axis direction detected by the acceleration sensor 701 is made to correspond to the movement of the point PO in the z-axis direction. Where the maximum value of acceleration detectable by the acceleration sensor 701 is 2 G, the detected acceleration in the Y-axis direction is multiplied by 1.5 to scale the position of the point PO in the x-axis direction to the movable range. The detected acceleration in the X-axis direction is multiplied by 1.5 to scale the position of the point PO in the z-axis direction to the movable range. In
An inclinable range is provided as a range in which the bat object BO can incline in the virtual game space. The inclinable range has a predetermined angle in the positive and negative x-axis directions, and a predetermined angle in the positive and negative z-axis directions, with respect to the reference inclination angle (i.e., the positive y-axis direction). The bat object BO is drawn as inclining in the x-axis direction using the acceleration in the Y-axis direction detected by the acceleration sensor 701, and is drawn as inclining in the z-axis direction using the acceleration in the X-axis direction detected by the acceleration sensor 701. As described later, the game apparatus main body 5 calculates a target inclination for the bat object BO within the movable range, using the X-axis and Y-axis direction acceleration data which is output from the controller 7. Then, the game apparatus main body 5 draws the bat object BO with the inclination angle being changed by a predetermined ratio (e.g., 10%) from the current inclination angle toward the target inclination. In
Next, with reference to
As shown in
For example, when the opponent pitcher makes a motion of throwing the ball object Ba, a prospected trajectory T along which the ball object Ba will move in the virtual game space is calculated. The intersection of the reach determination plane M and the prospected trajectory T is calculated as a ball reach point Cp.
The ball reach point Cp is a target position for swinging the bat object BO. Specifically, when the player character PC swings the bat object BO and hits the ball object Ba on the reach determination plane M, namely hits the ball at a position where the bat object BO is vertical with respect to the opponent pitcher, the bat object BO is swung such that a predetermined position in the bat object BO (e.g., the core of the bat) contacts the ball object Ba (bat object BOe in
As described above, the swing start state of the bat object BO varies in accordance with the posture of the controller 7 held by the player (bat object BOi in
Next, the game processing executed by the game system 1 will be described in detail. With reference to
As shown in
The acceleration data Da is included in a series of operation information transmitted from the controller 7 as transmission data. The acceleration data Da includes X-axis direction acceleration data Da1, Y-axis direction acceleration data Da2, and Z-axis direction acceleration data Da3, each of which is detected by the acceleration sensor 701 as a component of each of X-, Y-, and Z-axes. The communication unit 6 included in the game apparatus main body 5 receives acceleration data included in the operation information which is transmitted from the controller 7 at a predetermined interval of, for example, 5 ms, and stores the acceleration data in a buffer (not shown) in the communication unit 6. Then, the acceleration data is read in units of a frame, which is a game processing interval, and thus the acceleration data Da in the main memory 33 is updated. In this embodiment, the acceleration data Da may be updated into the latest acceleration data transmitted from the controller 7. Alternatively, acceleration data of a predetermined number of previous frames may be stored.
The movable width data Db represents the width in which the point PO (support position; see
The controller inclination data Dd represents the direction of inclination of the controller 7 which is calculated using the acceleration data Da. The object inclination target data De represents the inclination target for the bat object BO, in the virtual game space in the hold-up motion, with respect to the point PO. The object inclination target data De is represented by, for example, a directional vector. The object inclination data Df represents an angle at which the bat object BO is drawn as inclining in the virtual game space in the hold-up motion, with respect to the point PO. The object inclination data Df is represented by, for example, a directional vector. The object inclination change data Dg represents a shift of the inclination of the bat object BO in the hold-up motion, and is represented by, for example, a shift vector representing a shift of the directional vector.
The reference motion data Dh is used as reference of a motion of swinging the bat object BO from the swing start point to the swing termination point. The reference motion data Dh represents, for example, positions of the bat object BO during the swing from the swing start point to the swing termination point (e.g., the trajectory of the support position PO from the swing start point to the swing termination point), and inclinations of the bat object BO during the swing from the swing start point to the swing termination point (e.g., a directional vector change representing the inclination change of bat object BOr from the swing start point to the swing termination point). The loop counter Di represents the time counted as time passes from the swing start point to the swing termination point of the bat object BO.
The initial difference coordinate set data Dj represents a difference between (a) the coordinate set of support position POri at the swing start point of bat object BOr in the reference motion data Dh and (b) the coordinate set of support position POi of bat object BO in the hold-up motion. The initial difference inclination data Dk represents a difference between (a) the directional vector representing an inclination of bat object BOr at the swing start point in the reference motion data Dh and (b) the directional vector representing an inclination of bat object BO in the hold-up motion.
The ball reach point coordinate set data Dl represents the coordinate set of the ball reach point Cp (see
The final difference coordinate set data Do represents a difference between (a) the coordinate set of support position POre when bat object BOr is on the reach determination plane M in the reference motion data Dh and (b) the coordinate set of support position POe. The final difference inclination data Dp represents a difference between (a) the directional vector representing an inclination of bat object BOr when bat object BOr matches the reach determination plane M in the reference motion data Dh and (b) the directional vector representing an inclination of bat object BOe calculated based on the ball reach point Cp.
The current frame difference coordinate set data Dq represents a difference between (a) the coordinate set of support position POr of bat object BOr in the reference motion data Dh in the current frame and (b) the coordinate set of the support position PO of the bat object BO displayed in the current frame. The current frame difference inclination data Dr represents a difference between (a) the directional vector representing an inclination of bat object BOr in the reference motion data Dh in the current frame and (b) the directional vector representing an inclination of the bat object BO displayed in the current frame.
The image data Ds includes, for example, player character image data Ds1 and object image data Ds2. The image data Ds is used for locating the player character PC and the bat object BO in the virtual game space to generate a game image.
With reference to
When the game apparatus main body 5 is turned on, the CPU 30 of the game apparatus main body 5 executes a start program stored on a boot ROM (not shown) to initialize the elements including the main memory 33. The game program stored on the optical disc 4 is read to the main memory 33, and thus the CPU 30 starts executing the game program. The flowcharts shown in
With reference to
Next, the CPU 30 executes support position calculation processing (step 52), and advances the processing to the next step. Hereinafter, with reference to
Referring to
Next, the CPU 30 calculates a z-axis direction movable width wz based on the X-axis direction acceleration data Da1 obtained in step 51 (step 62). Then, the CPU 30 stores the calculated z-axis direction movable width wz in the main memory 33 as the z-axis direction movable width data Db2, and advances the processing to the next step. For example, where the maximum value of acceleration detectable by the acceleration sensor 701 is 2 G and the width of the movable range in the x-axis and z-axis directions with respect to the reference position is length 3, the CPU 30 calculates the z-axis direction movable width wz by multiplying the acceleration data represented by the X-axis direction acceleration data Da1 by 1.5.
Next, the CPU 30 calculates a support position coordinate set in accordance with the calculated x-axis direction movable width wx and z-axis direction movable width wz (step 63). Then, the CPU 30 stores the calculated support position coordinate set in the main memory 33 as the support position coordinate set data Dc, and terminates the processing in this subroutine. For example, where the coordinate set of the reference position in the virtual game space is (x0, y0, z0), the CPU 30 sets the support position coordinate set at (x0+wz, y0, z0+wz).
With reference to
Now, it is assumed that the controller 7, which is in a state of standing upright with the top surface being directed in the negative Ys-axis direction and the front surface being directed in the positive Zs-axis direction (controller 7b represented by the dashed line in
By the above-described operation, the support position coordinate set is scaled using the x-axis direction movable width ws calculated based on the Y-axis direction acceleration data. For example, the support position, which is at the position corresponding to the upright state, is moved in the positive x-axis direction in accordance with the acceleration in the positive Y-axis direction described above (is moved from the position of point POb to the position of the point PO in
Returning to
Referring to
The CPU 30 calculates an inclination target for the bat object BO in accordance with the inclination of the controller 7 calculated in step 71 (step 72; see
Next, the CPU 30 calculates an inclination change representing a shift of the current object inclination toward the inclination target by a predetermined ratio (step 73; see
Next, the CPU 30 calculates a new object inclination based on the inclination change calculated in step 73 (step 74). Then, the CPU 30 stores the calculated object inclination in the main memory 33 as the object inclination data Df, and terminates the processing in this subroutine.
With reference to
In this manner, the bat object BO is drawn as inclining in the virtual game space in accordance with the inclination of the controller 7, like in the case of the movement of the support position (point PO). For example, if the bat object BO was drawn reflecting the above inclination target as it is, the bat object BO would be drawn as inclining in immediately response to the inclination of the controller 7, i.e., as bat object BOty represented by the dashed line in
As described above, the inclinable range is set for the bat object BO. Therefore, it is necessary to accommodate the object inclination within the inclinable range during any of steps 72 through 74. For example, in step 72, the CPU 30 may set, as the inclination target, a direction in the inclinable range which is closest to the direction in the virtual game space converted from the inclination of the controller 7. In step 73 or 74, the CPU 30 may calculate an inclination change or a new object inclination such that the object inclination is accommodated within the inclinable range.
Returning to
Next, the CPU 30 determines whether or not the player has made an operation of starting a motion of swinging the bat (step 55). For example, the operation of starting the motion of swinging the bat is performed by the player swinging the controller 7 right and left. In this case, the CPU 30 can determine whether or not the player has started swinging the controller 7 by determining whether or not the magnitude of the acceleration in the positive Z-axis direction which is output from the acceleration sensor 701 is equal to or greater than a predetermined value. When it is determined that the player has not made an operation of starting the motion of swinging the bat, the CPU 30 returns the processing to step 51 to repeat the above-described processing. By contrast, when it is determined that the player has made an operation of starting the motion of swinging the bat, the CPU 30 advances the processing to step 56.
In step 56, the CPU 30 executes swing processing and then terminates the processing in the flowchart in
Referring to
Referring to
Referring to
The CPU 30 calculates a difference between support position POri in the reference motion data Dh and current support position POi as an initial difference coordinate set, and stores the result in the initial difference coordinate set data Dj. For example, the initial difference coordinate set is represented by a difference in each of the x coordinate, the y coordinate and the z coordinate between support position POri and support position POi in the virtual game space. The CPU 30 also calculates a difference between the object inclination of bat object BOri in the reference motion data Dh and the object inclination of current bat object BOi as an initial difference inclination, and stores the result in the initial difference inclination data Dk. For example, the initial difference inclination is represented by a directional vector in the virtual game space.
Next, the CPU 30 determines whether or not the coordinate set of the ball reach point Cp (see
In step 96, the CPU 30 calculates the coordinate set of the ball reach point Cp and stores the result in the ball reach point data Dl. Then, the CPU 30 advances the processing to step 98. Specifically, as shown in
In step 97, the CPU 30 stores a predetermined reference position in the ball reach point coordinate set data Dl as the ball reach point coordinate set, and advances the processing to step 98. For example, the CPU 30 sets, as the reference position, a point on the reach determination plane M which is, for example, the exact center of the strike zone in the baseball game.
In step 98, the CPU 30 calculates the reach point coordinate set of the support position PO and the reach point inclination of the bat object BO, and stores the respective results in the support position reach point coordinate set data Dm and the object reach point inclination data Dn. Then, the CPU 30 advances the processing to the next step. Hereinafter, with reference to
Referring to
On the reach determination plane M, a high-low determination line L which is parallel to the x axis is set. The high-low determination line L is the border representing the lower limit for the bat object BO which is level-swung (swung horizontally) by the player character PC. The high-low determination line L is set at the height of, for example, the armpit of the player character PC or the vicinity thereof.
In the case where the ball reach point Cp is set on the reach determination plane M at a height equal to or above the high-low determination line L (ball reach points Cp1 through Cp3 in
In the case where the ball reach point Cp is set on the reach determination plane M at a height below the high-low determination line L (ball reach points Cp4 and Cp5 in
Next, the CPU 30 calculates the final difference coordinate set of the support position PO (step 99) and the final difference inclination of the bat object BO (step 100), and then terminates the processing in this subroutine. Hereinafter, with reference to
Referring to
The CPU 30 calculates a difference between support position POre in the reference motion data Dh and support position POe corresponding to the ball reach point Cp as a final difference coordinate set, and stores the result in the final difference coordinate set data Do. For example, the final difference coordinate set is represented by a difference in each of the x coordinate, the y coordinate and the z coordinate between support position POre and support position POe in the virtual game space. The CPU 30 also calculates a difference between the object inclination of bat object BOre in the reference motion data Dh and the object inclination of bat object BOe corresponding to the ball reach point Cp as a final difference inclination, and stores the result in the final difference inclination data Dp. For example, the final difference inclination is represented by a directional vector in the virtual game space.
Returning to
Referring to
Difference coordinate set=initial difference coordinate set+(final difference coordinate set−initial difference coordinate set)×Fn/Fa
The calculated difference coordinate set of the support position PO is stored in the current frame difference coordinate set data Dq. In the expression, the initial difference coordinate set is the difference value stored in the initial difference coordinate set data Dj regarding each of the x coordinate, the y coordinate and the z coordinate. The final difference coordinate set is the difference value stored in the final difference coordinate set data Do regarding each of the x coordinate, the y coordinate and the z coordinate. Fn is the frame number of the current frame. As the action which is the target of the correction and drawing processing proceeds frame to frame, the frame number is incremented. The frame number is 0 at the start of the action. Fa is the total number of frames, which is the number of frames from the start to the termination of the action. For example, the total frame number is the number of frames from the swing start until the bat object BO reaches the reach determination plane M, or the number of frames from when the bat object BO is located on the reach determination plane M until the swing termination.
Next, the CPU 30 calculates the difference inclination of the bat object BO in the current frame (step 103), and advances the processing to the next step. Specifically, the difference inclination of the bat object BO is represented as a directional vector in the virtual game space and is calculated by the following expression.
Difference inclination=initial inclination+(final inclination−initial inclination)×Fn/Fa
The calculated difference inclination of the bat object BO is stored in the current frame difference inclination data Dr. In the expression, the initial difference inclination is the directional vector stored in the initial difference inclination data Dk. The final difference inclination is the directional vector stored in the final difference inclination data Dp. Fn is the frame number of the current frame, and Fa is the total number of frames, as described above regarding step 102.
Next, the CPU 30 corrects the reference motion data Dh in the current frame using the difference coordinate set calculated in step 102 and the difference inclination calculated in step 103, and creates motion data for the current frame (step 104). Then, the CPU 30 draws the player character PC swinging the bat object BO, using the motion data created in step 104 (step 105), and terminates the processing in this subroutine. Thus, the bat object BO is displayed while the differences in the display position and the inclination of the bat object BO to be actually drawn, with respect to the reference display position and the reference inclination, are gradually changed as time passes from the differences at the start of the correction until the differences at the termination of the correction.
Returning to
In step 85, the CPU 30 executes second swing initial processing, and advances the processing to the next step. With reference to
Referring to
Returning to
Next, the CPU 30 adds “1” to the count value of the loop counter Di (step 87), and determines whether or not the count value has reached a predetermined value (step 88). As the predetermined value, the number of times that the processing in step 86 is repeated from when the bat object BO is located on the reach determination plane M until the swing termination is used. When it is determined that the count value has reached the predetermined value, the CPU 30 terminates the swing processing. By contrast, when it is determined that the count value has not reached the predetermined value, the CPU 30 returns the processing to step 86 to repeat the processing.
In order to give a specific description, an exemplary swing of the bat object BO displayed by the above-described swing processing will be described with reference to
In the above-described swing processing, correction and drawing processing is executed in two stages. The first stage is a first swing in which the swing start point of the bat object BO is the correction start point and a point in the middle of the swing is the correction termination point. The second stage is a second swing in which the point in the middle of the swing is the correction start point and the swing termination point is the correction termination point. At the swing start point, the differences in the support position and the inclination between the bat object BOr at the swing start point in the reference motion data Dh and the bat object BO corresponding the hold-up motion made by the player are calculated, and are respectively set as the initial difference coordinate set and the initial difference inclination in the first swing (arrow c1). At the point in the middle of the swing, the differences in the support position and the inclination between the bat object BOr matching the reach determination plane M in the reference motion data Dh and the bat object BO on the reach determination plane M corresponding to the ball reach point Cp are calculated, and are respectively set as the final difference coordinate set and the final difference inclination in the first swing (arrow c2). In the first swing, the differences from the display position and the inclination in the reference motion data Dh to the display position and the inclination of the bat object BO to be actually drawn are gradually changed as time passes from the initial difference coordinate set and the initial difference inclination to the final difference coordinate set and the final difference inclination. Thus, the swing motion of the bat object BO is obtained.
In the second swing, the final difference coordinate set and the final difference inclination in the first swing (arrow c2) are respectively used as the initial difference coordinate set and the initial difference inclination in the second swing. At the swing termination point, the difference between support position POr of the bat object BOr at the swing termination point in the reference motion data Dh and the support position PO of the bat object BO is set to 0 as the final difference coordinate set in the second swing. The final difference inclination in the first swing is used as the final difference inclination in the second swing (arrow c3). In the second swing also, the differences from the display position and the inclination in the reference motion data Dh to the display position and the inclination of the bat object BO to be actually drawn are gradually changed as time passes from the initial difference coordinate set and the initial difference inclination to the final difference coordinate set and the final difference inclination. Thus, the swing motion of the bat object BO is obtained.
As described above, the game apparatus main body 5 in this embodiment, when an input operation is made using the controller 7 including an acceleration sensor 701, draws the bat object BO using only the output from the acceleration sensor 701. In the drawing processing, the bat object BO is displayed while the differences in the display position and the inclination of the bat object BO to be actually drawn, with respect to the reference display position and the reference inclination (reference motion data Dh), are gradually changed as time passes from the differences at the start of the correction until the differences at the termination of the correction. The display positions and inclinations of the bat object BO displayed at the correction start point and the correction termination point have a certain degree of freedom in accordance with the operation state of the player. Using one piece of motion data, highly free correction can be performed. The start coordinate set from which the bat object BO starts moving and the coordinate set in the middle of the movement can be set freely. Therefore, the moving trajectory of the bat object BO can be corrected highly freely while being along the reference trajectory. In addition, the posture (inclination) of the bat object BO when the bat object BO starts moving and the posture in the middle of the movement can be set. Therefore, the correction can be performed in consideration of the inclination of the bat object BO in addition to the position thereof. As a result, the bat object BO can be corrected so as to appear to move more naturally than the case where the correction is performed using only the coordinate set of the position of the bat object BO. According to the present invention, the bat object BO can be corrected at a high degree of freedom so as to appear to move naturally and thus more realistically.
In the above embodiment, one point PO is provided in a lower part of the bat object BO to represent the position of the bat object BO. The swing motion of the bat object BO is defined by the support position PO and a directional vector representing the inclination of the bat object BO. The swing motion of the bat object BO may be set in a different manner. For example, a plurality of points which represent the position of the bat object BO may be provided in the bat object BO, and the position and the inclination angle thereof may be set by the plurality of points. Specifically, a point PA is provided in an upper part of the bat object BO in addition to the point PO in the lower part of the bat object BO. The inclination of the bat object BO is defined by the coordinate set of the point PA in the virtual game space. In this case, the difference inclination may be calculated by using the shift in the point PA. Thus, the present invention is applicable to the case of defining the position and inclination of the object by the coordinate sets of two points. In this case, the bat object BO is displayed while the differences between the plurality of display positions as reference and the plurality of display positions of the bat object BO to be actually drawn are gradually changed as time passes from the differences at the start of the correction until the differences at the termination of the correction. The data representing the object inclination, for example, a directional vector, is not corrected.
Alternatively, for an object which can be determined in terms of the position and the state in the virtual game space by one point representing the position of the object (e.g., an object of a point-symmetric shape or an object having a fixed inclination), the correction and drawing processing may be executed on this one point. In this case, the object is displayed while the difference between one display position as reference and the display position of the object to be actually drawn is gradually changed as time passes from the difference at the start of the correction until the difference at the termination of the correction.
Still alternatively, the correction and drawing processing may be executed using only the object inclination. In this case, the object is displayed while the difference between the inclination as reference and the inclination of the object to be actually drawn is gradually changed as time passes from the difference at the start of the correction until the difference at the termination of the correction. Data representing the position of the object, such as a coordinate set or the like, is not corrected.
The above-described correction and drawing processing is executed in two stages. The first stage is a first swing in which the swing start point of the bat object BO is the correction start point and a point in the middle of the swing is the correction termination point. The second stage is a second swing in which the point in the middle of the swing is the correction start point and the swing termination point is the correction termination point. The final difference coordinate set at the correction termination point in the second swing is set to 0 (specifically, 0,0,0). Alternatively, the initial difference coordinate set at the correction start point may be equal to the final difference coordinate set in the second swing (i.e., the difference coordinate set used in step 104 is always the same) In the above embodiment, the final difference inclination at the correction termination point in the second swing is equal to the initial difference inclination in the second swing. As a result, the difference inclination used in step 104 is always the same. Alternatively, the final difference inclination in the second swing may be 0 (specifically, the magnitude of the directional vector may be 0).
In the above game example, the baseball bat is processed using three-axial acceleration data which is output from the controller 7. The present invention is applicable to other types of games. For example, the present invention is applicable to a game in which the player character handles some type of object (specifically, an elongate object such as a sword, bamboo sword, or rod), or a game in which the object is moved in the virtual game space, needless to say. In the above embodiment, the game apparatus main body 5 for determining the movement or inclination of the controller 7 is included in the game system 1. The present invention is applicable to an information processing apparatus such as a general personal computer, which is operated by an input device including an acceleration sensor. Various types of processing can be executed based on determination results on an input device. For example, an object displayed by the information processing apparatus may be moved in accordance with the determined motion or inclination of the input device.
In the above embodiment, the acceleration sensor 701 included in the controller 7 is a three-axial acceleration sensor for detecting and outputting an acceleration as a component of each of three axial directions perpendicular to one another. The present invention can be realized with an acceleration sensor for detecting and outputting an acceleration in each of at least two axial directions perpendicular to each other. For example, an acceleration sensor for detecting and outputting an acceleration component of each of two axial directions (X- and Y-axis directions) (see
The present invention can still be realized with an acceleration sensor for detecting and outputting an acceleration in only one axial direction. For example, an acceleration sensor for detecting and outputting an acceleration component in the Y-axis direction (see
As described above, the present invention can be realized by using a gyrosensor as a sensor for detecting the motion of the controller 7. When a gyrosensor is used, the inclination value is initialized before the detection is started. For example, the player presses an operation section 72 while keeping the controller 7 at a predetermined posture or keeps the controller 7 at the posture displayed on the monitor 2. Thus, the output of the gyrosensor in that state is initialized. After the detection is started, the angular rate data which is output from the gyrosensor is integrated, and a change amount in the inclination is calculated from the initialized inclination value. In this case, the calculated inclination corresponds to the angle.
For example, in the scaling in step 61, the change amount in the inclination around the X-axis direction, which is obtained from the gyrosensor, is used. The change amount is scaled to the movable range of the x-axis direction (−3 to +3) to calculate the x-axis direction movable width wx. In the scaling in step 62, the change amount in the inclination around the Z-axis direction, which is obtained from the gyrosensor, is used. The change amount is scaled to the movable range of the z-axis direction (−3 to +3) to calculate the z-axis direction movable width wz. In step 71, the change amount in the inclination around each of the X-, Y-and Z-axis directions, which is obtained from the gyrosensor, is used to calculate the current inclination of the controller 7. Instep 55, the determination on whether or not the player performed an operation to start a motion of swinging the bat can be made by determining whether or not the magnitude of the angular rate represented by the angular rate data around the Y-axis direction, which is output from the gyrosensor, is equal to or greater than a predetermined value.
In the above description, the controller 7 and the game apparatus main body 5 communicate each other wirelessly. Alternatively, the controller 7 and the game apparatus main body 5 may be electrically connected to each other via a cable. In this case, the cable connected to the controller 7 is connected to a connection terminal of the game apparatus main body 5.
The shape of the controller 7, and the shape, number, position or the like of the operation sections 72 provided in the controller 7 are merely exemplary, and may be altered without departing from the scope of the present invention. The position of the imaging information calculation section 74 in the controller 7 (the light incident opening of the imaging information calculation section 74) does not need to be on the front surface of the housing 71, and may be on another surface as long as light can enter from the outside of the housing 71.
A game program according to the present invention may be provided to the game apparatus main body 5 via an external storage medium such as the optical disc 4 or the like, via a wired communication line, or wirelessly. The game program may be stored on a nonvolatile storage medium in the game apparatus main body 5 in advance. The information storage medium for storing the game program maybe a CD-ROM, a DVD, a similar optical disc-shaped storage medium or a nonvolatile semiconductor memory.
A storage medium having a game program stored thereon and a game apparatus according to the present invention, when an input operation is made using an input device including an acceleration sensor, allow an object drawn using the input device to be corrected at a high degree of freedom so as to appear to move naturally, and are useful for a device or a program for drawing an object in accordance with a motion of a game controller or the like.
While the invention has been 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.
Number | Date | Country | Kind |
---|---|---|---|
2006-229325 | Aug 2006 | JP | national |