Information processing program, information processing system, and information processing method
The system enables natural and efficient follower character movement by using stored footprints and shortcuts to avoid obstacles, addressing the issues of unnatural movement and prolonged catch-up times in existing game technologies.
Patent Information
- Application Number
- JP2024189941
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-09
- Estimated Expiration
- 2042-10-05
AI Technical Summary
Existing methods for controlling the movement of a follower character in games result in unnatural movements and prolonged time to catch up with the player character due to tracing unnecessary movements and obstacles.
Implementing a system where a follower character moves along stored footprints of the player character, with the ability to determine passable routes and use shortcuts, switching between slot and footprint tracking modes to avoid obstacles and reduce catch-up time.
The system allows the follower character to move naturally and efficiently catch up with the player character by utilizing passable routes and shortcuts, reducing time and enhancing movement appearance.
Smart Images

Figure 2025003702000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to information processing in which a first object moves in a virtual space and at least one second object moves in accordance with the movement of the first object. [Background technology]
[0002] Conventionally, games in which a player character is followed by another following character are known. Furthermore, in such games, when the following character is left behind by the player character because it gets caught on an obstacle such as a terrain, a method is known in which the following character moves so as to follow the path (footprints) taken by the player character (for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2005-287757 A Summary of the Invention [Problem to be solved by the invention]
[0004] The above technology allows the following character to follow the movement path of the player character, which is likely to be moved to avoid obstacles, and therefore can move the following character while avoiding obstacles. However, since the technology only follows the movement path of the player character, it also follows unnecessary movements of the player character. By following such unnecessary movements, the following character may take a long time to catch up with the player character, or the following character may appear to move unnaturally.
[0005] Therefore, an object of the present disclosure is to provide an information processing program, an information processing system, and an information processing method that can move a specified character close to the player character in a shorter time with a movement that appears natural in information processing that controls the movement of the specified character to follow the player character. [Means for solving the problem]
[0006] In order to achieve the above object, for example, the following configuration example can be given.
[0007] (Configuration 1) Configuration 1 is an information processing program that causes a computer of an information processing device to execute information processing in which a first object moves in a virtual space and at least one second object moves according to the movement of the first object, and causes the computer to function as a first object movement control means, a footprint coordinate storage means, a shortcut storage means, and a second object movement control means. The first object movement control means controls the movement of the first object to first object coordinates, which are coordinates in the virtual space, based on an operation input. The footprint coordinate storage means repeatedly acquires footprint coordinates, which are coordinates based on the first object coordinates, multiple times in association with the movement control of the first object, and stores the footprint coordinates in chronological order. The shortcut storage means determines whether a route connecting a first footprint coordinate among the multiple footprint coordinates acquired by the footprint coordinate storage means and a second footprint coordinate stored later in the chronological order than the first footprint coordinate is passable, and when it is determined that the route is passable, stores information identifying the route in association with the first footprint coordinate. The second object movement control means controls the movement of the second object so as to chronologically trace the footprint coordinates acquired by the footprint coordinate acquisition means, and further, if a route determined to be passable exists for a given footprint coordinate, controls the movement of the second object so as to pass through that route.
[0008] According to the above configuration, the movement trajectory of the first object is stored as footprints. Also, the second object is moved so as to trace the movement trajectory of the first object. Then, when tracing the movement trajectory, if there is a passable path from one footprint to another footprint, the second object can be moved using the path. This makes it possible to shorten the time it takes for the second object to catch up with the first object while allowing the second object to behave naturally in information processing in which the second object moves following the first object.
[0009] (Configuration 2) In configuration 2, in the above configuration 1, the shortcut storage means may determine whether or not a straight line route connecting the footprint coordinates is passable.
[0010] According to the above configuration, it is determined whether a straight route can be used as a shortcut route. When the shortcut route is used, the user moves in a straight line, which can further reduce travel time.
[0011] (Configuration 3) Configuration 3 is the same as configuration 1 or 2 above, in which, when there are multiple second footprint coordinates that are determined to be passable from the first footprint coordinates, the shortcut storage means may store information identifying a route to the latest second footprint coordinate in chronological order in association with the first footprint coordinate.
[0012] According to the above configuration, when multiple paths to other footprints are found for a certain footprint, the path to the footprint that is closer to the first object can be used, thereby further shortening the time to catch up with the first object.
[0013] (Configuration 4) In a fourth aspect of the present invention, in the third aspect, the shortcut storage means may determine, for each predetermined frame, whether or not a route connecting each of the plurality of first footprint coordinates and a predetermined number of second footprint coordinates is passable.
[0014] (Configuration 5) In a fifth aspect of the present invention, in the fourth aspect, the shortcut storage means may change the predetermined number in accordance with a processing load.
[0015] According to the above configuration, the process relating to the route determination can be executed more efficiently according to the processing load at each time.
[0016] (Configuration 6) In configuration 6, in the above configuration 1, the information processing program may further cause the computer to function as a following movement control means for controlling the following movement of the second object so that the second object moves toward movement target coordinates based on the first object coordinates, a detection means for detecting that the second object cannot reach the movement target coordinates during the following movement control, and a footprint following movement control means for movement controlling the second object so that the second object moves toward one of the footprint coordinates when the detection means detects that the second object cannot reach the movement target coordinates. Then, after the footprint following movement control means has controlled the movement of the second object to reach one of the footprint coordinates, the second object movement control means may control the movement of the second object so that the second object follows the footprint coordinates in time series.
[0017] According to the above configuration, the second object is normally caused to move in a manner that directly follows the first object, but when the progress is impeded by an obstacle or the like during the following movement, the second object is caused to move in a manner that traces the movement path of the first object operated by the user to avoid the obstacle. Therefore, even if the progress is impeded, the second object can be moved close to the first object by taking a path that avoids the obstacle or the like.
[0018] (Configuration 7) In configuration 7, in configuration 6, the detection means may determine that the second object cannot reach the movement target coordinates when the coordinates of the second object do not change for a predetermined time or more, or when it is detected that the second object continues to collide with an obstacle object for a predetermined time or more.
[0019] (Configuration 8) In configuration 8, in configuration 6, when it is detected that the second object cannot reach the movement target coordinates, the footprint following movement control means may control the movement of the second object so that the second object moves toward the latest footprint coordinates that are within a predetermined range from the coordinates of the second object.
[0020] According to the above configuration, the most recent footprint is selected from among the footprints within a predetermined range, so that the robot can move in a manner that traces the path of the first object, starting from the footprint closest to the first object. This can further reduce the time it takes to catch up with the first object.
[0021] (Configuration 9) Configuration 9 is such that, in the above configuration 1, the shortcut storage means does not treat the last footprint coordinate stored and the footprint coordinate stored just before that among the multiple footprint coordinates acquired by the footprint coordinate storage means as first footprint coordinates, and does not determine whether the route to the second footprint coordinate is passable or not.
[0022] According to the above configuration, it is possible to omit processing for footprints for which it is not necessary to search for the route, thereby reducing the processing load. q Effect of the Invention
[0023] According to this embodiment, when a second object is moved so as to follow a first object, the second object can be made to move in a natural manner, and the time it takes for the second object to catch up with the first object can be shortened. [Brief description of the drawings]
[0024] [Figure 1] FIG. 1 shows an example of a state in which a left controller 3 and a right controller 4 are attached to a main unit 2. [Diagram 2] FIG. 1 shows an example of a state in which the left controller 3 and the right controller 4 are removed from the main unit 2. [Diagram 3] Six-sided views showing an example of the main unit 2 [Figure 4] Six-sided diagram showing an example of the left controller 3 [Diagram 5] Six-sided diagram showing an example of the right controller 4 [Figure 6] A block diagram showing an example of the internal configuration of the main unit 2. [Figure 7] A block diagram showing an example of the internal configuration of the main unit 2, the left controller 3, and the right controller 4. [Figure 8] FIG. 1 is a schematic diagram showing an example of a formation according to the present embodiment; [Figure 9] FIG. 1 is a schematic diagram showing an example of a formation according to the present embodiment; [Figure 10] A diagram to explain the relationship between slots and sub-characters [Figure 11] A diagram for explaining movement control by footprints [Figure 12] A diagram for explaining movement control by footprints [Figure 13] A diagram for explaining movement control by footprints [Figure 14] FIG. 1 is a diagram for explaining shortcut control. [Figure 15] FIG. 1 is a diagram for explaining shortcut control. [Figure 16] FIG. 1 is a diagram for explaining shortcut control. [Figure 17] FIG. 1 is a diagram for explaining shortcut control. [Figure 18] FIG. 1 is a diagram for explaining shortcut control. [Figure 19] FIG. 1 is a diagram for explaining shortcut control. [Figure 20] A memory map showing an example of various data stored in the DRAM 85. [Figure 21] An example of the data structure of footprint management data [Figure 22] A flowchart showing details of the game processing according to the present embodiment. [Diagram 23] Flowchart showing details of leader movement control process [Figure 24]Flowchart showing details of shortcut creation process [Diagram 25] Flowchart showing details of shortcut creation process [Figure 26] Flowchart showing details of sub-character movement control processing [Figure 27] Flowchart showing details of sub-character movement control processing DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] An embodiment will be described below.
[0026] First, a game system according to an example of this embodiment will be described. An example of the game system 1 in this embodiment includes a main unit (information processing device; in this embodiment, it functions as a game device main unit) 2, a left controller 3, and a right controller 4. The left controller 3 and the right controller 4 are detachable from the main unit 2. In other words, the game system 1 can be used as an integrated device by attaching the left controller 3 and the right controller 4 to the main unit 2. In addition, the game system 1 can also be used as a separate unit from the main unit 2, the left controller 3, and the right controller 4 (see FIG. 2). Below, the hardware configuration of the game system 1 of this embodiment will be described, and then the control of the game system 1 of this embodiment will be described.
[0027] Fig. 1 is a diagram showing an example of a state in which a left controller 3 and a right controller 4 are attached to a main unit 2. As shown in Fig. 1, the left controller 3 and the right controller 4 are each attached to and integrated with the main unit 2. The main unit 2 is a device that executes various processes (e.g., game processes) in the game system 1. The main unit 2 includes a display 12. The left controller 3 and the right controller 4 are devices that include an operation unit that allows the user to perform input.
[0028] Fig. 2 is a diagram showing an example of a state in which the left controller 3 and the right controller 4 have been removed from the main unit 2. As shown in Figs. 1 and 2, the left controller 3 and the right controller 4 are detachable from the main unit 2. In the following, the left controller 3 and the right controller 4 may be collectively referred to as "controller."
[0029] Fig. 3 is a six-sided view showing an example of the main unit 2. As shown in Fig. 3, the main unit 2 includes a substantially plate-shaped housing 11. In this embodiment, the main surface of the housing 11 (in other words, the front surface, i.e., the surface on which the display 12 is provided) is generally rectangular in shape.
[0030] The shape and size of the housing 11 are arbitrary. As an example, the housing 11 may be of a size that is portable. Furthermore, the main unit 2 alone or an integrated device in which the left controller 3 and the right controller 4 are attached to the main unit 2 may be a portable device. Furthermore, the main unit 2 or the integrated device may be a handheld device. Furthermore, the main unit 2 or the integrated device may be a portable device.
[0031] 3, the main unit 2 includes a display 12 provided on a main surface of a housing 11. The display 12 displays an image generated by the main unit 2. In this embodiment, the display 12 is a liquid crystal display (LCD). However, the display 12 may be any type of display device.
[0032] The main unit 2 also includes a touch panel 13 on the screen of the display 12. In this embodiment, the touch panel 13 is of a type that allows multi-touch input (for example, a capacitive type). However, the touch panel 13 may be of any type, and may be of a type that allows single-touch input (for example, a resistive film type).
[0033] The main unit 2 includes a speaker (i.e., speaker 88 shown in FIG. 6) inside the housing 11. As shown in FIG. 3, speaker holes 11a and 11b are formed in the main surface of the housing 11. The output sound of the speaker 88 is output from these speaker holes 11a and 11b, respectively.
[0034] The main unit 2 also has a left side terminal 17, which is a terminal through which the main unit 2 performs wired communication with the left controller 3, and a right side terminal 21 through which the main unit 2 performs wired communication with the right controller 4.
[0035] As shown in FIG. 3, the main unit 2 includes a slot 23. The slot 23 is provided on the upper side of the housing 11. The slot 23 has a shape that allows a predetermined type of storage medium to be attached thereto. The predetermined type of storage medium is, for example, a storage medium (e.g., a dedicated memory card) dedicated to the game system 1 and the same type of information processing device. The predetermined type of storage medium is used, for example, to store data used in the main unit 2 (e.g., application save data, etc.) and / or programs executed in the main unit 2 (e.g., application programs, etc.). The main unit 2 also includes a power button 28.
[0036] The main unit 2 includes a lower terminal 27. The lower terminal 27 is a terminal through which the main unit 2 communicates with the cradle. In this embodiment, the lower terminal 27 is a USB connector (more specifically, a female connector). When the all-in-one device or the main unit 2 alone is placed on the cradle, the game system 1 can display images generated and output by the main unit 2 on a stationary monitor. In this embodiment, the cradle also has a function of charging the all-in-one device or the main unit 2 alone that is placed on it. The cradle also has a function of a hub device (more specifically, a USB hub).
[0037] FIG. 4 is a six-sided view showing an example of the left controller 3. As shown in FIG. 4, the left controller 3 includes a housing 31. In this embodiment, the housing 31 has a vertically long shape, that is, a shape that is long in the up-down direction in FIG. 4 (z-axis direction shown in FIG. 4). The left controller 3 can also be held in a vertically long orientation when removed from the main unit 2. The housing 31 has a shape and size that allows it to be held in one hand, particularly the left hand, when held in a vertically long orientation. The left controller 3 can also be held in a horizontally long orientation. When the left controller 3 is held in a horizontally long orientation, it may be held with both hands.
[0038] The left controller 3 includes a left analog stick (hereinafter, referred to as the left stick) 32, which is an example of a directional input device. As shown in FIG. 4, the left stick 32 is provided on the main surface of the housing 31. The left stick 32 can be used as a directional input unit capable of inputting a direction. By tilting the left stick 32, the user can input a direction according to the tilt direction (and input a magnitude according to the tilt angle). Note that the left controller 3 may include a cross key or a slide stick capable of slide input, instead of an analog stick, as the directional input unit. In addition, in this embodiment, an input can be made by pressing the left stick 32.
[0039] The left controller 3 includes various operation buttons. The left controller 3 includes four operation buttons 33 to 36 (specifically, a right button 33, a down button 34, an up button 35, and a left button 36) on the main surface of the housing 31. Furthermore, the left controller 3 includes a record button 37 and a - (minus) button 47. The left controller 3 includes a first L button 38 and a ZL button 39 on the upper left of the side of the housing 31. The left controller 3 also includes a second L button 43 and a second R button 44 on the side of the housing 31 that is attached when the left controller 3 is attached to the main unit 2. These operation buttons are used to give instructions according to various programs (for example, OS programs and application programs) executed on the main unit 2.
[0040] In addition, the left controller 3 is equipped with a terminal 42 that enables the left controller 3 to communicate with the main unit 2 via wire.
[0041] FIG. 5 is a six-sided view showing an example of the right controller 4. As shown in FIG. 5, the right controller 4 includes a housing 51. In this embodiment, the housing 51 has a vertically long shape, that is, a shape that is long in the up-down direction in FIG. 5 (z-axis direction shown in FIG. 5). The right controller 4 can also be held in a vertically long orientation when removed from the main unit 2. The housing 51 has a shape and size that allows it to be held in one hand, particularly the right hand, when held in a vertically long orientation. The right controller 4 can also be held in a horizontally long orientation. When the right controller 4 is held in a horizontally long orientation, it may be held with both hands.
[0042] The right controller 4, like the left controller 3, is provided with a right analog stick (hereinafter, referred to as the right stick) 52 as a direction input unit. In this embodiment, the right stick 52 has the same configuration as the left stick 32 of the left controller 3. The right controller 4 may be provided with a cross key or a slide stick capable of slide input, instead of an analog stick. The right controller 4, like the left controller 3, is provided with four operation buttons 53 to 56 (specifically, an A button 53, a B button 54, an X button 55, and a Y button 56) on the main surface of the housing 51. The right controller 4 further includes a + (plus) button 57 and a home button 58. The right controller 4 is provided with a first R button 60 and a ZR button 61 on the upper right of the side surface of the housing 51. The right controller 4 is provided with a second L button 65 and a second R button 66, like the left controller 3.
[0043] In addition, the right controller 4 is equipped with a terminal 64 for enabling the right controller 4 to communicate with the main unit 2 via wire.
[0044] Fig. 6 is a block diagram showing an example of the internal configuration of main unit 2. In addition to the configuration shown in Fig. 3, main unit 2 includes components 81-91, 97, and 98 shown in Fig. 6. Some of these components 81-91, 97, and 98 may be mounted on an electronic circuit board as electronic components and housed in housing 11.
[0045] The main unit 2 includes a processor 81. The processor 81 is an information processing unit that executes various types of information processing executed in the main unit 2, and may be composed of only a CPU (Central Processing Unit), or may be composed of a SoC (System-on-a-chip) including multiple functions such as a CPU function and a GPU (Graphics Processing Unit) function. The processor 81 executes various types of information processing by executing an information processing program (e.g., a game program) stored in a storage unit (specifically, an internal storage medium such as a flash memory 84, or an external storage medium inserted in the slot 23, etc.).
[0046] The main unit 2 includes a flash memory 84 and a dynamic random access memory (DRAM) 85 as examples of internal storage media built into the main unit 2. The flash memory 84 and the DRAM 85 are connected to the processor 81. The flash memory 84 is a memory used mainly for storing various data (which may be programs) saved in the main unit 2. The DRAM 85 is a memory used for temporarily storing various data used in information processing.
[0047] The main device 2 includes a slot interface (hereinafter abbreviated as "I / F") 91. The slot I / F 91 is connected to the processor 81. The slot I / F 91 is connected to the slot 23, and reads and writes data from and to a predetermined type of storage medium (e.g., a dedicated memory card) inserted in the slot 23 in response to an instruction from the processor 81.
[0048] The processor 81 appropriately reads and writes data from and to the flash memory 84, DRAM 85, and each of the above storage media to execute the above information processing.
[0049] The main unit 2 includes a network communication unit 82. The network communication unit 82 is connected to the processor 81. The network communication unit 82 communicates with an external device via a network (specifically, wireless communication). In this embodiment, the network communication unit 82 connects to a wireless LAN and communicates with an external device using a method conforming to the Wi-Fi standard as a first communication mode. The network communication unit 82 also performs wireless communication with other main units 2 of the same type using a predetermined communication method (for example, communication using a unique protocol or infrared communication) as a second communication mode. Note that the wireless communication using the second communication mode enables wireless communication with other main units 2 located within a closed local network area, and realizes a function that enables so-called "local communication" in which data is transmitted and received by directly communicating between multiple main units 2.
[0050] The main unit 2 includes a controller communication unit 83. The controller communication unit 83 is connected to the processor 81. The controller communication unit 83 performs wireless communication with the left controller 3 and / or the right controller 4. Any communication method may be used between the main unit 2 and the left controller 3 and right controller 4, but in this embodiment, the controller communication unit 83 performs communication with the left controller 3 and the right controller 4 in accordance with the Bluetooth (registered trademark) standard.
[0051] The processor 81 is connected to the left terminal 17, the right terminal 21, and the lower terminal 27. When the processor 81 performs wired communication with the left controller 3, it transmits data to the left controller 3 via the left terminal 17 and receives operation data from the left controller 3 via the left terminal 17. When the processor 81 performs wired communication with the right controller 4, it transmits data to the right controller 4 via the right terminal 21 and receives operation data from the right controller 4 via the right terminal 21. When the processor 81 performs communication with the cradle, it transmits data to the cradle via the lower terminal 27. Thus, in this embodiment, the main unit 2 can perform both wired communication and wireless communication with the left controller 3 and the right controller 4. When the main unit 2 alone or an integrated device with the left controller 3 and the right controller 4 attached to the main unit 2 is attached to the cradle, the main unit 2 can output data (e.g., image data and audio data) to a stationary monitor or the like via the cradle.
[0052] Here, the main unit 2 can communicate with a plurality of left controllers 3 simultaneously (in other words, in parallel). The main unit 2 can also communicate with a plurality of right controllers 4 simultaneously (in other words, in parallel). Therefore, a plurality of users can simultaneously input to the main unit 2 using each set of left controllers 3 and right controllers 4. As an example, a first user can input to the main unit 2 using a first set of left controllers 3 and right controllers 4, while a second user can input to the main unit 2 using a second set of left controllers 3 and right controllers 4.
[0053] The main device 2 includes a touch panel controller 86, which is a circuit that controls the touch panel 13. The touch panel controller 86 is connected between the touch panel 13 and the processor 81. The touch panel controller 86 generates data indicating, for example, the position where a touch input has been performed based on a signal from the touch panel 13, and outputs the data to the processor 81.
[0054] The display 12 is also connected to the processor 81. The processor 81 displays on the display 12 an image generated (for example, by executing the above-mentioned information processing) and / or an image acquired from the outside.
[0055] The main unit 2 includes a codec circuit 87 and speakers (specifically, a left speaker and a right speaker) 88. The codec circuit 87 is connected to the speaker 88 and the audio input / output terminal 25, and is also connected to the processor 81. The codec circuit 87 is a circuit that controls the input and output of audio data to and from the speaker 88 and the audio input / output terminal 25.
[0056] The main unit 2 includes a power control unit 97 and a battery 98. The power control unit 97 is connected to the battery 98 and the processor 81. Although not shown, the power control unit 97 is also connected to each unit of the main unit 2 (specifically, each unit that receives power from the battery 98, the left terminal 17, and the right terminal 21). The power control unit 97 controls the supply of power from the battery 98 to each of the above-mentioned units based on instructions from the processor 81.
[0057] Furthermore, battery 98 is connected to lower terminal 27. When an external charging device (e.g., a cradle) is connected to lower terminal 27 and power is supplied to main unit 2 via lower terminal 27, battery 98 is charged with the supplied power.
[0058] Fig. 7 is a block diagram showing an example of the internal configuration of the main unit 2, the left controller 3, and the right controller 4. Note that details of the internal configuration of the main unit 2 are omitted in Fig. 7 because they are shown in Fig. 6.
[0059] The left controller 3 includes a communication control unit 101 that communicates with the main unit 2. As shown in FIG. 7, the communication control unit 101 is connected to each component including the terminal 42. In this embodiment, the communication control unit 101 can communicate with the main unit 2 by both wired communication via the terminal 42 and wireless communication not via the terminal 42. The communication control unit 101 controls the communication method by which the left controller 3 communicates with the main unit 2. That is, when the left controller 3 is attached to the main unit 2, the communication control unit 101 communicates with the main unit 2 via the terminal 42. Also, when the left controller 3 is detached from the main unit 2, the communication control unit 101 performs wireless communication with the main unit 2 (specifically, the controller communication unit 83). The wireless communication between the controller communication unit 83 and the communication control unit 101 is performed according to, for example, the Bluetooth (registered trademark) standard.
[0060] The left controller 3 also includes a memory 102, such as a flash memory. The communication control unit 101 is configured with, for example, a microcomputer (also called a microprocessor), and executes firmware stored in the memory 102 to perform various processes.
[0061] The left controller 3 includes buttons 103 (specifically, buttons 33 to 39, 43, 44, and 47). The left controller 3 also includes a left stick 32. Each button 103 and left stick 32 repeatedly outputs information relating to an operation performed on the button 103 and left stick 32 to the communication control unit 101 at an appropriate timing.
[0062] The left controller 3 includes an inertial sensor. Specifically, the left controller 3 includes an acceleration sensor 104. The left controller 3 also includes an angular velocity sensor 105. In this embodiment, the acceleration sensor 104 detects the magnitude of acceleration along three predetermined axes (for example, the x, y and z axes shown in FIG. 4). The acceleration sensor 104 may detect acceleration in one or two axial directions. In this embodiment, the angular velocity sensor 105 detects angular velocity around three predetermined axes (for example, the x, y and z axes shown in FIG. 4). The angular velocity sensor 105 may detect angular velocity around one or two axes. The acceleration sensor 104 and the angular velocity sensor 105 are each connected to the communication control unit 101. The detection results of the acceleration sensor 104 and the angular velocity sensor 105 are repeatedly output to the communication control unit 101 at appropriate timing.
[0063] The communication control unit 101 acquires information related to the input (specifically, information related to the operation, or the detection results by the sensors) from each input unit (specifically, each button 103, left stick 32, each sensor 104 and 105). The communication control unit 101 transmits operation data including the acquired information (or information obtained by performing a specified process on the acquired information) to the main unit 2. The operation data is repeatedly transmitted once every specified time. The interval at which the information related to the input is transmitted to the main unit 2 may or may not be the same for each input unit.
[0064] By transmitting the above operation data to the main unit 2, the main unit 2 can obtain the input performed on the left controller 3. That is, the main unit 2 can determine the operations on the buttons 103 and the left stick 32 based on the operation data. In addition, the main unit 2 can calculate information regarding the movement and / or attitude of the left controller 3 based on the operation data (specifically, the detection results of the acceleration sensor 104 and the angular velocity sensor 105).
[0065] The left controller 3 is equipped with a power supply unit 108. In this embodiment, the power supply unit 108 has a battery and a power control circuit. Although not shown, the power control circuit is connected to the battery and to each part of the left controller 3 (specifically, each part that receives power from the battery).
[0066] As shown in FIG. 7, the right controller 4 includes a communication control unit 111 that communicates with the main unit 2. The right controller 4 also includes a memory 112 that is connected to the communication control unit 111. The communication control unit 111 is connected to each component including the terminal 64. The communication control unit 111 and the memory 112 have the same functions as the communication control unit 101 and the memory 102 of the left controller 3. Therefore, the communication control unit 111 can communicate with the main unit 2 by both wired communication via the terminal 64 and wireless communication (specifically, communication in accordance with the Bluetooth (registered trademark) standard) that does not go through the terminal 64, and controls the method of communication that the right controller 4 uses with the main unit 2.
[0067] The right controller 4 has input units similar to those of the left controller 3. Specifically, it has buttons 113, a right stick 52, and inertial sensors (an acceleration sensor 114 and an angular velocity sensor 115). These input units have the same functions as those of the left controller 3, and operate in the same manner.
[0068] The right controller 4 is equipped with a power supply unit 118. The power supply unit 118 has the same functions as the power supply unit 108 of the left controller 3, and operates in the same manner.
[0069] [Outline of game processing in this embodiment] Next, an outline of the operation of the game processing executed by the game system 1 according to this embodiment will be described. In the game executed in this embodiment, the user plays by moving a character in a virtual game space using the controller. In addition to the character operated by the user (hereinafter referred to as the leader character), the game space also contains a plurality of characters (hereinafter referred to as sub-characters) whose movements are controlled by the processor 81 based on a predetermined algorithm. The movements of these sub-characters are controlled so that they follow the leader character in a predetermined formation.
[0070] Figure 8 shows how a leader character and multiple sub-characters following it move in formation. In reality, however, they do not move in such a neat formation as shown in Figure 8, and since each sub-character's movement is controlled individually, the formation may look like that shown in Figure 9 due to differences in movement speed between sub-characters and the effects of the terrain. Note that if a sufficient amount of time has passed since the leader character stopped moving, the sub-characters will basically stop in the position shown in Figure 8.
[0071] [About moving sub-characters] Next, the movement control of the sub-character as described above will be explained. In this embodiment, the sub-character basically moves toward the position of the "slot" determined based on the position and orientation of the leader character. However, if the sub-character gets stuck on the terrain during the movement, it is controlled to follow the "footprints" of the leader character and move toward the position of the leader character. Below, an overview of the movement control using the "slot" (slot mode) and the movement control using the "footprints" (footprint following mode) will be explained.
[0072] [About movement control by slots] First, an overview of movement control in the slot mode will be described. In this embodiment, a plurality of movement target points are set in the game space as the slots. Then, one slot is assigned to each sub-character, and each sub-character is moved toward the corresponding slot. Each slot is set around the leader character as a position and direction reference. For example, the slot is placed on the opposite side to the direction (advance direction) of the leader character. Also, when the leader character moves or changes its direction (changes its posture) in the game space, the coordinates of each slot are changed accordingly. Therefore, when the leader character moves, each slot also moves accordingly.
[0073] Next, the relationship between each slot and each sub-character will be described. Each sub-character is individually associated with a slot number that is a movement target point. For example, sub-character number 1 is associated with slot number 1, sub-character number 2 is associated with slot number 2, and sub-character number 3 is associated with slot number 3. As a result, as shown in FIG. 10, a sub-character with sub-character number 1 (hereinafter simply referred to as sub-character 1) moves toward slot 1, sub-character 2 moves toward slot 2, and sub-character 3 moves toward slot 3. In the example of FIG. 10, the character number is equal to the slot number, but this is merely an example, and the correspondence may be set arbitrarily.
[0074] As described above, each sub-character moves toward its associated slot, and thus moves through the game space in a predetermined formation following the leader character.
[0075] [About controlling movement by footprints] Next, an outline of the movement control in the footprint following mode will be described. When each sub-character moves in the game space in the above-mentioned movement control in the slot mode, as shown in FIG. 11, the progress of the sub-character may be impeded by an obstacle such as a wall. In the example of FIG. 11, the sub-character 7 tries to move toward the slot 7, but since there is an obstacle (terrain) between the sub-character 7 and the slot 7, the sub-character 7 cannot follow the leader character in this state. When the sub-character collides with an obstacle in this way, in this embodiment, the sub-character stops moving toward the slot and controls its movement so that it follows the path of the leader character. This is because as long as the sub-character follows the path of the leader character, its path will not be blocked by an obstacle.
[0076] In this embodiment, the path traveled by the leader character is managed as a "footprint." Specifically, the current position of the leader character (coordinates in a spatial coordinate system) is accumulated as the leader character's "footprint" at a predetermined timing in sequence. More specifically, the footprint is stored once per predetermined frame (e.g., once per 10 frames). The data stored at this time (hereinafter referred to as footprint data) includes a time stamp at that time and the coordinates of the leader character.
[0077] In this embodiment, if the leader character is not at a certain distance from the footprint when 10 frames have passed since the previous footprint was stored, the new footprint is not stored. This prevents the accumulation of meaningless footprint data, and allows the storage area to be used effectively. Since it is impossible to store footprint data infinitely, footprint data older than a certain amount must be deleted from the storage area. For example, when the number of accumulated footprint data reaches a certain number or more, the oldest (i.e., the smallest frame number) among the accumulated footprint data may be deleted from the storage area when storing new footprint data. Hereinafter, each footprint stored as the footprint data is called "footprint Ni". i is a positive integer, and the number increases in order from the oldest footprint in chronological order. For example, if there are five accumulated footprints, they are called footprint N1, footprint N2, ... footprint N5 in chronological order.
[0078] As described above, when a sub-character's path is blocked by an obstacle, the newest footprint among footprints present within a predetermined range centered on the sub-character is set as the movement target of the blocked sub-character. For example, as shown in Fig. 12, when a sub-character 7 hits a wall, the movement target is changed to footprint N4, which is the newest footprint among footprints N2, N3, and N4 within the predetermined range.
[0079] Thereafter, when the sub-character 7 reaches the footprint of the movement target, the movement target is changed to a newer footprint than the footprint. In the example of FIG. 12 above, when the sub-character 7 reaches footprint N4, the movement target of the sub-character 7 is changed to footprint N5 as shown in FIG. 13. Furthermore, when the sub-character 7 reaches footprint N5, the movement target of the sub-character 7 is changed to footprint N6. By repeating this, the sub-character 7 can follow the movement trajectory of the leader character and follow the leader character.
[0080] While the sub-character is following the movement trajectory of the leader character (i.e., while following the footprints), the distance between the current coordinates of the sub-character and the coordinates of the slot corresponding to that sub-character is determined. Then, when the sub-character approaches within a certain distance of the corresponding slot, the movement target of the sub-character is changed from the footprints to the slot. In other words, the movement control is switched from the footprint following mode to the slot mode. As a result, each sub-character finally moves toward the slot corresponding to it, and can follow the leader character at its original position.
[0081] [About shortcut movement control] In the footprint following mode, the movement control of following the footprints described above does not block the path of the leader character, but on the other hand, if the leader character makes a useless movement (for example, a movement trajectory that is a roundabout path), the footprints of the useless movement will also be followed. Therefore, it takes time to catch up with the leader character. In addition, from the viewpoint of the appearance and appearance of the movement of the sub-character, the movement of the sub-character following the footprints of the leader character may look unnatural depending on the situation. Therefore, in this embodiment, when a certain footprint is reached, the presence or absence of a shortcut to another footprint closer to the current position of the leader character is determined from the footprint. If a shortcut to another footprint is found, the movement target is further controlled to be changed to the shortcut destination.
[0082] An overview of the control using the above shortcut will be described. Here, an example will be described in which there are five footprints as shown in FIG. 14 as the accumulated footprints. In FIG. 14, footprints N1 to N5 are shown in chronological order from the oldest to the newest. In this embodiment, for each footprint, a shortcut from the footprint to the footprint that is passable on a straight path and is closest to the leader character among the footprints that follow in chronological order is calculated, and information on the shortcut is stored in association with the footprint. Specifically, a process (hereinafter, ray casting) is performed in which a straight line (ray) is cast from the footprint to each of the other footprints that are newer than the footprint in chronological order, starting from the oldest footprint in chronological order. If the ray reaches the other footprint without hitting an obstacle on the way, the ray cast is treated as successful (passable), and if it does not reach the other footprint, the ray cast is treated as unsuccessful (impassable). Then, information on the shortcut to the newest footprint among the other footprints for which the ray cast was successful is stored. In this embodiment, when calculating such a shortcut, raycasting for footprints adjacent in time series (footprints located next in time series) is omitted, since there is no point in calculating a shortcut for such footprints.
[0083] An example of shortcut calculation is shown in Fig. 15 to Fig. 17. Fig. 15 is an example of shortcut calculation when footprint N1 in Fig. 14 is used as a reference. In this case, raycasting is omitted for footprint N2, which is the next footprint after footprint N1, and raycasting is performed from footprint N1 to footprint N3, from footprint N1 to footprint N4, and from footprint N1 to footprint N5. As a result, all of them are successful, but information indicating a shortcut to footprint N5, which is closest to the leader character, is ultimately stored in association with footprint N1.
[0084] 16 is an example of shortcut calculation when footprint N2 is used as a reference. In this case, raycasting is omitted for footprint N3, which is the next footprint after footprint N2. Raycasting is then performed from footprint N2 to footprint N4, and from footprint N2 to footprint N5. As a result, all are successful, but information indicating a shortcut to footprint N5, which is closest to the leader character, is stored in association with footprint N2.
[0085] 17 is an example of shortcut calculation when footprint N3 is used as a reference. In this case, raycasting is omitted for footprint N4, which is the next footprint after footprint N3. As a result, only raycasting is performed from footprint N3 to footprint N5. If the result is successful, information indicating a shortcut to footprint N5 is stored in association with footprint N3.
[0086] Note that there is no point in calculating a shortcut between footprints N4 and N5, since they are adjacent to each other. Therefore, there is no need to calculate a shortcut when N4 is used as a reference. Also, since N5 is the most recent footprint, there is no shortcut destination. Therefore, in the examples of Figs. 14 to 17 above, only footprints N1 to N3 are ultimately subject to the process of calculating a shortcut.
[0087] As described above, the presence or absence of a shortcut is determined for each footprint, and if there is, the information on the footprint at the shortcut's destination is stored. Then, when the sub-character is moving along footprints and reaches a footprint with a shortcut, the footprint at the shortcut's destination is set as the movement destination for the next movement destination. In other words, the sub-character moves in a shortcut-like manner without following footprints. On the other hand, if the footprints that have been reached do not have a shortcut, the next newest footprint in the time series is set as the movement destination. In other words, in this case, the movement of following footprints continues.
[0088] Based on the calculation examples of shortcuts shown in Figs. 14 to 17, examples of the movement path of the sub-character using shortcuts are shown in Figs. 18 and 19. Fig. 18 shows an example when there is no obstacle, and Fig. 19 shows an example when there is an obstacle. In the case of Fig. 18, shortcut information to footprint N5 is stored in footprint N1. Therefore, when the sub-character reaches footprint N1, the next movement target is footprint N5. As a result, the movement path of the sub-character is a movement path of footprint N1 → footprint N5. On the other hand, in the case of Fig. 19 where there is an obstacle, for footprints N1 and N2, the ray cast to each of the other footprints has ended in failure due to the presence of the obstacle. That is, the situation is that the shortcut information is not stored in footprints N1 and N2. On the other hand, the situation is that the shortcut information to footprint N5 is stored in footprint N3. In this case, the movement path is such that after the sub-character reaches footprint N1, the sub-character moves so as to follow the footprints from footprint N2 to N3. Then, when the sub-character reaches footprint N3, it moves to footprint N5 based on the shortcut information stored in footprint N3. In other words, the movement path of the sub-character is footprints N1→N2→N3→N5.
[0089] In this manner, in this embodiment, the movement of the sub-character is controlled using the slots and footprints, and when the movement is controlled using footprints, the movement is also controlled using the shortcuts as described above. This allows the sub-character to catch up with the leader character more quickly. Also, from the viewpoint of appearance, it is possible to express the sub-character moving (attempting to catch up) to the position of the leader character with a more natural behavior.
[0090] [Details of the game processing in this embodiment] Next, the game processing in this embodiment will be described in more detail with reference to Figures 20 to 27. Note that the following mainly describes the processing related to the movement control of the sub-character as described above, and detailed descriptions of other aspects of the game processing will be omitted.
[0091] [About data usage] First, various data used in this game processing will be described. Fig. 20 is a memory map showing an example of various data stored in the DRAM 85 of the main unit 2. At least a game program 301, leader character data 302, sub-character data 305, slot management data 311, slot correspondence data 314, footprint management data 315, processing target footprint information 316, and operation data 317 are stored in the DRAM 85 of the main unit 2.
[0092] The game program 301 is a program for executing the game processing in this embodiment.
[0093] The leader character data 302 is data relating to the leader character. The leader character data 302 includes leader coordinates indicating the coordinates of the current position of the leader character, and a posture vector of the leader character.
[0094] The sub-character data 305 is data related to the sub-characters. In the sub-character data 305, sub-character coordinates, a footprint following flag, a target footprint, and a last reached footprint are stored for each sub-character. The sub-character coordinates are the coordinates of the current position of the sub-character. The footprint following flag is a flag for indicating whether the movement control of the sub-character is a control for moving the sub-character toward the slot (slot movement mode) or a control for moving the sub-character toward a specific footprint (footprint following mode). When it is on, it indicates the footprint following mode, and when it is off, it indicates the slot movement mode. The target footprint is information on the footprint that is the movement target, and the last reached footprint is information that identifies the latest footprint among footprints that have already been reached.
[0095] The slot management data 311 is data for managing the above-mentioned slots. The slot management data 311 stores slot coordinates for each slot.
[0096] The slot correspondence data 314 is data that defines the correspondence between each slot and each sub-character.
[0097] The footprint management data 315 is data for managing the footprints. FIG. 21 shows an example of the data configuration of the footprint management data 315. The footprint management data 315 is data with a list structure, and includes multiple footprint data. In this embodiment, a case where up to 10 pieces of footprint data (footprint N1 to footprint N10) are stored as the footprint management data 315 will be described as an example. Of course, the number of footprint data to be stored is not limited to this, and a configuration may be made to store more footprint data. Each footprint data includes at least a footprint coordinate, a time stamp, a provisional shortcut, and shortcut calculation information. The footprint coordinate is the coordinate of the footprint in the virtual space. The time stamp is information indicating the date and time when the footprint was recorded. Note that a frame number may be used instead of the time stamp. The provisional shortcut and shortcut calculation information are working data used in the shortcut generation process described later. The shortcut calculation information is information indicating the footprint that last executed a raycast from a certain footprint, and the provisional shortcut is information indicating the latest footprint among the footprints that have successfully performed a raycast.
[0098] Returning to Fig. 20, the processing target footprint information 316 is information indicating the footprint Ni to be processed in the current frame in the shortcut creation process described later. More specifically, it is information for identifying the footprint from which the ray is cast when the above ray cast is executed. It is assumed that "footprint N1" is set as the initial value.
[0099] The operation data 317 is data obtained from the controller operated by the user, that is, data indicating the operation content performed by the user.
[0100] [Details of the processing performed by Processor 81] Next, the game processing in this embodiment will be described in detail. In this embodiment, one or more processors read and execute the above program stored in one or more memories, thereby realizing the flowchart shown below. Note that this flowchart is merely an example of the processing process. Therefore, the processing order of each step may be changed as long as the same result is obtained. In addition, the values of the variables and the threshold values used in the determination step are merely examples, and other values may be adopted as necessary.
[0101] Fig. 22 is a flowchart showing details of the game processing according to this embodiment. Note that the processing loop of steps S2 to S6 in Fig. 22 is repeatedly executed for each frame.
[0102] [Preparation] First, in step S1, processor 81 executes a game preparation process for preparing to start a game. In this process, a virtual three-dimensional space including a game field is constructed, and various objects such as a terrain object, a leader character, and a sub-character are arranged. Then, a game image is generated by capturing an image of the virtual space in which the various objects are arranged with a virtual camera, and the image is output to a stationary monitor or the like. In addition, various data used in the following processes are also initialized. Specifically, the footprint tracking flag is set to OFF. In addition, footprint N1 is set in the processing target footprint information 316. In addition, a footprint timer starts counting. The footprint timer is a timer for storing footprint data every 10 frames.
[0103] [Leader character movement control process] Next, in step S2, processor 81 acquires operation data 317. Next, in step S3, processor 81 performs leader movement control processing. Fig. 23 is a flowchart showing details of the leader movement control processing. In Fig. 23, first, in step S11, processor 81 updates the leader coordinates and posture vector based on the operation content indicated by operation data 317, thereby controlling the movement of the leader character.
[0104] Next, in step S12, processor 81 determines whether or not the count value of the footprint timer has exceeded a predetermined value. In this embodiment, the predetermined value is 10 frames. If the result of the determination is that the count value has not exceeded 10 frames (NO in step S12), the process proceeds to step S16, which will be described later.
[0105] On the other hand, if it has exceeded 10 frames (YES in step S12), in step S13, processor 81 determines whether or not the distance between the current coordinates of the leader character and the coordinates of the latest footprint is equal to or greater than a predetermined value. The coordinates of the latest footprint may be obtained from the footprint with the most recent time stamp among the multiple footprint data included in footprint management data 315. If the result of this determination is that the distance is not equal to or greater than the predetermined value (NO in step S13), processing proceeds to step S16, which will be described later.
[0106] On the other hand, if the result of the determination in step S13 above is that the distance is equal to or greater than the predetermined value (YES in step S13), then in step S14 processor 81 stores the current coordinates and current timestamp of the leader character as new footprint data in footprint management data 315. If ten pieces of footprint data are already stored in footprint management data 315, the new footprint data is overwritten in the area storing the footprint data with the oldest timestamp.
[0107] Next, in step S15, the processor 81 resets the footprint timer and starts counting again.
[0108] Next, in step S16, processor 81 performs shortcut creation processing. In this processing, the above-mentioned ray cast is performed from each footprint stored at this point to other footprints, and processing is performed to determine and store the presence or absence of a shortcut.
[0109] [Shortcut creation process] 24 and 25 are flowcharts showing the details of the shortcut creation process. In the following description, when "footprint Ni (or target footprint Ni)" is mentioned, it means the footprint from which the ray is cast in the ray cast. Also, the footprint to which the ray is cast from footprint Ni is called "footprint Nj" (j is a positive integer). Also, information indicating the next footprint of target footprint Ni described below is set as the initial value of footprint Nj.
[0110] In FIG. 24, first, in step S21, the processor 81 sets a variable "ray cast execution count" to 0. This variable is for counting the number of times the above-mentioned ray cast is executed in the processing for one frame. In this embodiment, in consideration of the fact that the above-mentioned ray cast processing generally involves a high processing load, a limit is set on the number of times ray cast is executed in the processing for one frame. In this embodiment, a case in which the number of times (hereinafter referred to as the upper limit number of times) is up to two times will be described as an example.
[0111] In this embodiment, the number of times that a ray is cast from footprint Ni to other footprints in the process related to one frame (hereinafter, the number of times each footprint is executed) is "once". That is, the case where a ray is cast from footprint Ni to other footprints once, and then the process proceeds to cast a ray from footprint Ni+1, the next footprint of footprint Ni, to other footprints, is illustrated. Note that this only means that a ray is cast from footprint Ni only once in one process, and since the shortcut creation process is repeatedly executed across frames, as described later, ultimately, a ray is cast from footprint Ni to multiple footprints (all footprints recorded after footprint Ni). In other embodiments, it goes without saying that the number of times each footprint is executed may be two or more. For example, a process related to one frame may be performed such that a ray is cast from footprint Ni to two or more other footprints.
[0112] By setting the upper limit number of raycasts in one frame (2 times) and the number of times each footprint is executed (1 time), the shortcut judgment for all footprints stored in the footprint management data 315 is performed for multiple frames. For example, in the case of this embodiment, in a process related to a certain frame, a raycast is executed from footprint N1 to footprint N3, and a raycast is executed from footprint N2 to footprint N4. Then, in a process related to the next frame, a raycast is executed from footprint N3 to footprint N5, and a raycast is executed from footprint N4 to footprint N6. After that, raycast is executed once for each footprint for each frame, for a total of two times. Also, for example, if the upper limit number is set to six and the number of times each footprint is set to two, raycast is executed twice for each of footprints N1, N2, and N3 in a certain frame, and twice for each of footprints N4, N5, and N6 in the next frame. Since the determination of whether or not there are shortcuts as described above does not require real-time performance, by not determining whether there are shortcuts for all footprints in one frame of processing, but by making the determination over multiple frames of processing, it is possible to efficiently determine whether or not there are shortcuts while reducing the processing load.
[0113] Next, in step S22, the processor 81 determines a footprint Ni to be processed (hereinafter, the processing target footprint Ni). Specifically, the processor 81 sets the footprint Ni indicated in the processing target footprint information 316 as the processing target footprint Ni.
[0114] Next, in step S23, the processor 81 judges whether the above-mentioned processing target footprint Ni corresponds to the latest footprint or the footprint immediately before that among the footprint data stored in the footprint management data. If the result of the judgment is that it corresponds (YES in step S23), in step S24, the processor 81 determines the footprint N1 as the processing target footprint Ni. This is to eliminate unnecessary processing since there is no point in calculating a shortcut for such footprints. For example, if the data of footprints N1 to N10 are stored in chronological order at a certain point in time, there is no need to calculate shortcuts for footprints N9 and N10 since there are no shortcuts for them. In this case, for example, footprints N1 to N8 are processed over four frames, and in the next frame, footprints N9 and N10 are skipped and the processing target is returned to footprint N1. That is, in the fifth frame, the shortcut creation processing is performed for footprints N1 and N2.
[0115] On the other hand, if the result of the above determination is not applicable (NO in step S23), the process of step S24 is skipped.
[0116] Once the processing target footprint Ni is determined, a footprint to which a ray is cast from the processing target footprint Ni is specified, and ray casting processing is performed. Specifically, first, in step S25, the processor 81 acquires the footprint Nj stored in the shortcut calculation information of the processing target footprint Ni. That is, it acquires information on the footprint to which the ray was cast last in the processing related to the previous frame.
[0117] Next, in step S26, the processor 81 determines whether the footprint Nj is the latest footprint. If the footprint Nj is the latest footprint, it means that shortcut calculation from the footprint Ni to other footprints has already been completed. If the footprint Nj is not the latest footprint (NO in step S26), the processor 81 identifies the footprint Nj+1 that is the next footprint of the footprint Nj in step S27. Then, the processor 81 executes a ray cast from the footprint to be processed to the footprint Nj+1.
[0118] 25, the processor 81 adds 1 to the variable "number of times raycasts are performed." Furthermore, the processor 81 stores information on the footprint that will become the footprint Nj+1 in the shortcut calculation information of the processing target footprint Ni.
[0119] Next, in step S30, processor 81 determines whether or not the ray cast failed, i.e., whether or not the ray collided with an obstacle along the way. If the result of this determination is that there was no collision with an obstacle (the ray cast was successful) (NO in step S30), then in step S31 processor 81 stores information about the footprint that will become footprint Nj+1 in the temporary shortcut of the footprint to be processed. Then, processing proceeds to step S32. On the other hand, if there was a collision with an obstacle (the ray cast failed) (YES in step S30), the processing of step S31 is skipped and processing proceeds to the next step.
[0120] Returning to FIG. 24, on the other hand, if the result of the determination in step S26 above is that footprint Nj is the latest footprint (YES in step S26), then in step S28, processor 81 determines whether the contents of the shortcut calculation information of all footprints in footprint management data 315 are the latest footprints. In other words, it determines whether shortcut calculation has been completed for all footprints Ni. If the result of this determination is that all footprints are not the latest footprints (NO in step S28), processing proceeds to step S32 described below. On the other hand, if all footprints are the latest footprints (YES in step S28), processor 81 ends the shortcut creation processing.
[0121] When the above-mentioned ray cast processing is completed, then in step S32 of FIG. 28, the processor 81 sets (updates) the next footprint (footprint Ni+1) of the current footprint Ni to be processed as the next footprint to be processed.
[0122] Next, in step S33, processor 81 determines whether or not the variable "raycast execution count" has reached a predefined upper limit (twice in this example). If the result of this determination is that the upper limit has not yet been reached (NO in step S33), the process returns to step S23 and is repeated. On the other hand, if the upper limit has been reached (YES in step S33), processor 81 ends the shortcut creation process.
[0123] Returning to FIG. 23, when the shortcut creation process is completed, the processor 81 ends the leader movement control process.
[0124] [Sub-character movement control processing] Returning to Fig. 22, when the leader movement control process is completed, processor 81 then executes sub-character movement control process in step S4. Figs. 26 and 27 are flowcharts showing details of the sub-character movement control process. In Fig. 26, first, in step S51, processor 81 calculates the position of each of the slots. For example, processor 81 calculates the coordinates of each slot based on the relative coordinates of each slot defined in advance, and the leader coordinates and posture vector.
[0125] Next, in step S52, processor 81 determines one sub-character to be the target of the process described below. In other words, the process of steps S53 to S66 described below is repeated in sequence the number of times corresponding to the number of sub-characters.
[0126] Next, in step S53, processor 81 determines whether the footprint following flag of the sub-character determined as the processing target (hereinafter referred to as the processing target character) is on or not. If the result of this determination is that the flag is off (NO in step S53), movement control using the slot is performed (slot mode). Specifically, first, in step S54, processor 81 moves the processing target character a predetermined distance in the direction of the slot associated with the processing target character.
[0127] Next, in step S55, processor 81 determines whether the processing target character is in a "stuck state". The "stuck state" is a state in which the processing target character's progress toward the slot is hindered by an obstacle such as the terrain, as shown in FIG. 11 above. In this embodiment, whether the processing target character is in a stuck state is determined, for example, as follows. First, if the coordinates of the processing target character have not changed for a predetermined time or more (despite the above-mentioned movement control being performed), the processing target character is determined to be in a stuck state. Also, if the processing target character has collided (bumped into) an obstacle such as the terrain for a predetermined time or more, the processing target character is determined to be in a stuck state. Also, regarding the determination of the predetermined time, a counter for counting these times may be prepared for each sub-character, and the value may be compared with a predetermined comparison value. If the determination result is that the processing target character is not in a "stuck state" (NO in step S55), the processing proceeds to step S58 described below.
[0128] On the other hand, if the character is "stuck" (YES in step S55), in step S56, processor 81 sets the newest footprint among the footprints that exist within a predetermined range centered on the current position of the character being processed as the target footprint.
[0129] Next, in step S57, processor 81 sets the footprint following flag of the processing target character to ON. As a result, the movement control of the processing target character will be in footprint following mode from the next frame. Then, the process proceeds to step S58, which will be described later.
[0130] On the other hand, if the result of the determination in step S53 above is that the footprint following flag of the processing target character is on (YES in step S53), movement control using the footprints is performed (footprint following mode). Specifically, in step S59 of Fig. 27, processor 81 calculates the direction of the target footprints as viewed from the current position of the processing target character, and then processor 81 moves the processing target character a predetermined distance in the calculated direction.
[0131] Next, in step S60, processor 81 determines whether or not the character to be processed has reached the target footprint as a result of the movement of the character to be processed in step S59 above. If the result of this determination is that the character has not reached the target footprint (NO in step S60), the process proceeds to step S65 described below.
[0132] On the other hand, if it has been reached (YES in step S60), processor 81 stores information indicating the target footprint as the "latest reached footprint" of the processing target character. Specifically, processor 81 reads the timestamp of the footprint data corresponding to the target footprint from footprint management data 315, and stores it as the "latest reached footprint" of the processing target character.
[0133] Next, in step S62, processor 81 determines whether or not the reached target footprint has a shortcut. Specifically, it determines whether or not information on a footprint that is a shortcut destination is set in the temporary shortcut of the target footprint. If the result of the determination indicates that a shortcut exists (YES in step S62), processor 81 sets the footprint that is the shortcut destination as the target footprint in step S63. Then, the process proceeds to step S65.
[0134] On the other hand, if the result of the determination in step S62 above is that no shortcut is set for the reached target footprint (NO in step S62), in step S64, processor 81 extracts the footprint with the next most recent timestamp after the most recently reached footprint (the footprint that comes next in chronological order) from the multiple footprints stored in footprint management data 315. Then, processor 81 sets the extracted footprint as the next target footprint.
[0135] Next, in step S65, processor 81 determines whether the distance from the current position of the processing target character to the target slot is equal to or less than a predetermined value. As a result, if it is equal to or less than the predetermined value (YES in step S65), processor 81 turns off the footprint following flag of the processing target character in step S66 so that the processing target character will move toward the target slot in the next frame onwards. On the other hand, if it is not equal to or less than the predetermined value (NO in step S65), the processing of step S66 is skipped. Then, processing proceeds to step S58.
[0136] Returning to FIG. 26, next, in step S58, processor 81 determines whether the above processing has been completed for all sub-characters. As a result, if unprocessed sub-characters remain (NO in step S58), the process returns to step S52, and the next character to be processed is determined from among the unprocessed sub-characters, and the same processing is repeated. On the other hand, if the processing has been completed for all sub-characters (YES in step S58), the sub-character movement control processing ends.
[0137] [Game image output processing] Returning to FIG. 22, once the sub-character movement control process is completed, then in step S5, processor 81 generates and outputs a game image reflecting the above process.
[0138] Next, in step S6, processor 81 determines whether or not the game end condition is satisfied, and if not satisfied (NO in step S6), the process returns to step S2 and the process is repeated. If the condition is satisfied (YES in step S6), the game process ends.
[0139] This concludes the detailed description of the game processing according to this embodiment.
[0140] Thus, in this embodiment, the movement of the sub-character is basically controlled in the slot movement mode, but if the progress is impeded by an obstacle, the control is switched to the footprint following mode. Furthermore, when moving in the footprint following mode, the above-mentioned shortcut control from one footprint to another is also used. This makes it possible to shorten the time it takes for the sub-character to catch up with the leader character when moving in the footprint following mode. Also, it is possible to express the sub-character moving in a more natural manner.
[0141] The processing of the above embodiment is applicable even when there is only one sub-character, but is particularly useful in game processing when there are many sub-characters. That is, when controlling the movement of many sub-characters individually so that they follow a leader character, the movement control using the footprints and shortcuts as described above can be performed with less processing load, more efficiently, and with natural behavior.
[0142] As described above, in this embodiment, in the shortcut creation process, the footprints Ni to be processed are processed in a loop (after processing up to footprint N8, processing next is footprint N1). Therefore, even if a footprint has once had its shortcut destination determined, it is repeatedly processed thereafter to determine whether a shortcut can be created closer to the leader character, and it becomes possible to create a shortcut based on the latest footprint status.
[0143] [Variations] In the above embodiment, a process of casting a straight line from one footprint to another footprint (called Line Trace) has been described as an example of raycasting. In another embodiment, a process of casting a sphere instead of a straight line may be performed as the raycasting process. In this case, the radius of the sphere may be the same as the radius of the sub-character or a value slightly larger than the radius. This allows a more accurate determination of whether or not a shortcut is possible. That is, since a determination is made with a wider range than in the case of a straight line, it is possible to prevent a situation in which the sub-character gets caught on an obstacle and is prevented from progressing while moving from one footprint to another footprint by a shortcut. In addition, when performing raycasting using such a sphere, the path used as a shortcut is not limited to a straight path, and a curved path may be used within an area determined based on the diameter of the sphere.
[0144] In the above embodiment, an example was given in which the footprint coordinates of the footprint data are simply set as the target footprint in the footprint tracking mode. In addition, for example, the target coordinates may be set to be coordinates obtained by slightly offsetting the footprint coordinates of the footprint data. In this case, the offset coordinates may be within a range where it can be determined that a "stuck state" will not occur based on the fact that the leader object has actually passed through.
[0145] In addition, in the above example of the shortcut creation process, the order of ray casting from one footprint to another is chronologically from oldest to newest. That is, when casting a ray from footprint N1, ray casting is performed in the order of footprints N3, N4, N5, etc. In other embodiments, ray casting may be performed in order from newest footprints. For example, when casting a ray from footprint N1, ray casting may be performed in the order of footprints N10, N9, N8, etc. Once a footprint that can be shortcutted is found, subsequent calculation processing becomes unnecessary, which may be more efficient in a situation where the latest footprint is not updated frequently.
[0146] In the above embodiment, the shortcut creation process is executed every frame. The execution interval of the shortcut creation process is not limited to this, and in other embodiments, the shortcut creation process may be executed every predetermined number of frames, such as every 5 frames or every 10 frames.
[0147] In the above embodiment, the number of times raycast is executed in a process related to one frame is set to the upper limit number. In other embodiments, the upper limit number may be changed according to the processing load at that time. For example, in a certain frame, raycast is executed with the upper limit number set to 2, but if the processing load in another frame is low and there is a margin of processing capacity, the upper limit number may be set to 4 or 5 times, etc., in the process related to that frame, and the number of times raycast is executed may be dynamically increased. The level of the processing load may be determined, for example, according to the number of objects (polygons) to be drawn in that frame. Similarly, the number of times each footprint is executed may be changed according to the processing load at that time.
[0148] In the above embodiment, the case where a series of processes related to the game process is executed by a single main unit 2 has been described. In another embodiment, the series of processes may be executed in an information processing system consisting of a plurality of information processing devices. For example, in an information processing system including a terminal device and a server device capable of communicating with the terminal device via a network, a part of the series of processes may be executed by the server device. Furthermore, in an information processing system including a terminal device and a server device capable of communicating with the terminal device via a network, a main part of the series of processes may be executed by the server device, and a part of the processes may be executed by the terminal device. In the above information processing system, the server system may be composed of a plurality of information processing devices, and the processes to be executed on the server side may be shared and executed by the plurality of information processing devices. Also, a so-called cloud gaming configuration may be used. For example, the main unit 2 may be configured to send operation data indicating a user's operation to a predetermined server, and various game processes may be executed in the server, and the execution results may be streamed to the main unit 2 as video and audio. [Explanation of symbols]
[0149] 1. Game System 2. Main Unit 3 Left Controller 4 Right Controller 81 Processor 84 Flash Memory 85 DRAM
Claims
1. An information processing program that causes a computer of an information processing device to execute information processing in which a first object moves in a virtual space and at least one second object moves in accordance with the movement of the first object, The computer, a first object movement control means for controlling movement of the first object to a first object coordinate, which is a coordinate in the virtual space, based on an operation input; a footprint coordinate storage means for repeatedly acquiring footprint coordinates, which are coordinates based on the first object coordinates, a plurality of times in association with movement control of the first object, and storing the footprint coordinates in chronological order; a determining means for determining, for each of the plurality of footprint coordinates acquired by the footprint coordinate storage means, whether or not a route connecting the one footprint coordinate and a footprint coordinate stored chronologically later than the one footprint coordinate is passable; a shortcut storage means for storing information identifying at least one of the routes determined by the determination means to be passable, in association with each of the plurality of footprint coordinates; a second object movement control unit that controls the movement of the second object based on the plurality of footprint coordinates and information specifying the path; The determination means is Further determining whether a route connecting the one footprint coordinate and a footprint coordinate stored later in the time series than the one footprint coordinate stored later in the time series is passable; determining whether a route connecting footprint coordinates stored later in the time series with the one footprint coordinate is passable before determining whether a route connecting footprint coordinates stored later in the time series with the one footprint coordinate is passable; Information processing program.
2. 2. The information processing program according to claim 1, wherein said determining means determines whether or not a straight line route connecting said footprint coordinates is passable.
3. 2. The information processing program according to claim 1, wherein the shortcut storage means stores information specifying a route to a chronologically latest footprint coordinate among routes determined by the determination means to be passable for the one footprint coordinate.
4. The information processing program further causes the computer to a tracking movement control means for controlling the tracking movement of the second object so as to move toward a movement target coordinate based on the coordinates of the first object; a detection means for detecting that the second object cannot reach the movement target coordinates during the following movement control; when it is detected by the detection means that the second object cannot reach the movement target coordinates, the second object is caused to function as a footprint following movement control means for controlling the movement of the second object so as to move toward one of the footprint coordinates; The information processing program according to claim 1, wherein the second object movement control means controls the movement of the second object so as to trace the footprint coordinates in a time series after the second object is movement-controlled by the footprint following movement control means to reach one of the footprint coordinates.
5. the detection means determines that the second object cannot reach the movement target coordinates when the coordinates of the second object do not change for a predetermined time or more, or when it is detected that the second object continues to collide with an obstacle object for a predetermined time or more. The information processing program according to claim 4.
6. The information processing program according to claim 4, wherein the footprint following movement control means, when it is detected that the second object cannot reach the movement target coordinates, controls the movement of the second object so that the second object moves toward the latest footprint coordinates that are within a predetermined range from the coordinates of the second object.
7. An information processing system that executes information processing in which a first object moves in a virtual space and at least one second object moves in accordance with the movement of the first object, a first object movement control means for controlling movement of the first object to a first object coordinate, which is a coordinate in the virtual space, based on an operation input; a footprint coordinate storage means for repeatedly acquiring footprint coordinates, which are coordinates based on the first object coordinates, a plurality of times in association with movement control of the first object, and storing the footprint coordinates in chronological order; a determining means for determining, for each of the plurality of footprint coordinates acquired by the footprint coordinate storage means, whether or not a route connecting the one footprint coordinate and a footprint coordinate stored chronologically later than the one footprint coordinate is passable; a shortcut storage means for storing information identifying at least one of the routes determined by the determination means to be passable, in association with each of the plurality of footprint coordinates; a second object movement control means for controlling the movement of the second object based on the plurality of footprint coordinates and information specifying the path, The determination means is Further determining whether a route connecting the one footprint coordinate and a footprint coordinate stored later in the time series than the one footprint coordinate stored later in the time series is passable; determining whether a route connecting footprint coordinates stored later in the time series with the one footprint coordinate is passable before determining whether a route connecting footprint coordinates stored later in the time series with the one footprint coordinate is passable; Information processing system.
8. An information processing method for causing a computer of an information processing device to execute information processing in which a first object moves in a virtual space and at least one second object moves in accordance with the movement of the first object, The computer includes: Based on an operation input, the first object is moved and controlled to a first object coordinate, which is a coordinate in the virtual space; repeatedly acquiring footprint coordinates, which are coordinates based on the first object coordinates, in association with the movement control of the first object, and storing the footprint coordinates in chronological order; determining whether or not a route connecting one of the acquired footprint coordinates with a footprint coordinate stored chronologically later than the one footprint coordinate is passable for each of the acquired footprint coordinates; storing information identifying at least one of the routes determined to be passable in association with each of the plurality of footprint coordinates; controlling the movement of the second object based on the plurality of footprint coordinates and information specifying the path; In determining whether the route is passable, Further determining whether a route connecting the one footprint coordinate and a footprint coordinate stored later in the time series than the one footprint coordinate stored later in the time series is passable; determining whether a route connecting footprint coordinates stored later in the time series with the one footprint coordinate is passable before determining whether a route connecting footprint coordinates stored later in the time series with the one footprint coordinate is passable; Information processing methods.
Citation Information
Patent Citations
Video game device and recording medium in which program is stored
JP2001000742A
Game device, and game program
JP2005287757A
Video game processing device, video game processing method, and video game processing program
JP2007244536A
Information processing program, control method for information processing apparatus, the information processing apparatus, and information processing system
JP2014233536A