Game program, game system, game device and game processing method
The game program and system dynamically update voxel data to enable destruction and flattening of terrain, enhancing gameplay freedom and reducing visual discomfort through controlled density adjustments and mesh recalculations.
Patent Information
- Application Number
- JP2024011598
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-01-30
AI Technical Summary
Existing image generation systems for games using voxels do not allow for objects to be freely deformed, such as through destruction or flattening, limiting the degree of freedom in gameplay.
A game program and system that updates voxel data to enable destruction and flattening of terrain based on user input, adjusting voxel densities to simulate deformation and generate polygon meshes dynamically.
Enables high-degree freedom in gameplay by allowing terrain to be freely destroyed and flattened, while minimizing loss of terrain features and reducing visual discomfort through controlled density adjustments and mesh recalculations.
Smart Images

Figure 2025113075000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a game program, a game system, a game device, and a game processing method capable of generating an image using voxel data.
Background Art
[0002] Conventionally, there has been an image generation system that creates character voxels based on imaging information and generates polygon mesh information to display a game image (see, for example, Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] However, the image generation system disclosed in Patent Document 1 uses voxels for a game for the use of imaging information, and it is not assumed that objects generated from the voxels can be freely deformed.
[0005] Therefore, an object of the present invention is to provide a game program, a game system, a game device, and a game processing method that can perform a game by deforming an object generated from voxels with a high degree of freedom by enabling destruction, flattening, etc. of the object by a user's operation.
Means for Solving the Problems
[0006] In order to achieve the above object, the present invention can adopt, for example, the following configurations.
[0007] One configuration example of the game program of the present invention is executed on a computer of an information processing apparatus. The game program causes the computer to hold voxel data including at least a density indicating the degree to which an object occupies the space defined by each voxel for each voxel included in a voxel space arranged in a virtual space, thereby storing volume data representing the shape of the terrain in the virtual space in a storage medium. Based on a user's operation input, the player character is moved on the terrain. In response to a first instruction based on the operation input, a destruction action of destroying the terrain is performed on the player character. When the destruction action hits the terrain, the voxel data is updated so that the density indicating the absence of the terrain is set for the voxels included in a first range set at a position based on the position of the player character. In response to a second instruction based on the operation input, a flattening action of flattening the terrain is performed on the player character. In response to the flattening action, the density of the voxel data is updated so that the surface shape of the terrain approaches a plane set based on the position of the player character for the voxels included in a second range set at a position based on the position of the player character. Based on the volume data, at least a polygon mesh representing the surface of the terrain is drawn to generate an image of the virtual space.
[0008] According to the above, while the terrain generated from voxels can be freely destroyed in response to the user's operation, the terrain can be flattened and leveled, and the game can be played with a high degree of freedom by deforming the terrain.
[0009] Also, according to the above flattening action, for the voxels included on one side with respect to the plane, while increasing the density of the voxels with a density equal to or higher than the reference value, among the voxels with a density lower than the reference value, the density of one adjacent voxel adjacent in one direction or the density obtained by interpolating the densities of a plurality of adjacent voxels is increased for the voxels with a density equal to or higher than the reference value. For the voxels included on the other side with respect to the plane, while decreasing the density of the voxels with a density lower than the reference value, among the voxels with a density equal to or higher than the reference value, the density of one adjacent voxel adjacent in the other direction or the density obtained by interpolating the densities of a plurality of adjacent voxels is decreased for the voxels with a density lower than the reference value.
[0010] According to the above, it is possible to suppress the loss of terrain features when flattening the ground.
[0011] Also, the above one direction may be the reverse direction of the normal vector of the plane, and the above other direction may be the direction of the normal vector of the plane.
[0012] According to the above, it is possible to easily perform a flattening process using the normal vector of the plane.
[0013] Also, the above one direction may be the downward direction of the virtual space, and the above other direction may be the upward direction of the virtual space.
[0014] According to the above, by expanding the lower part of the plane and contracting the upper part of the plane, a flattening process that approaches the plane becomes possible.
[0015] Also, the above plane may be a horizontal plane in the virtual space.
[0016] According to the above, it is possible to flatten the terrain horizontally in the virtual space.
[0017] Also, the above plane may be a plane passing through the position where the player character touches the terrain.
[0018] According to the above, flattening can be achieved closer to the placement position of the player character.
[0019] Also, the above plane may have an inclination corresponding to the inclination of the terrain at the position of the player character.
[0020] According to the above, flattening can be achieved corresponding to the inclination of the terrain at the placement position of the player character.
[0021] Also, the above computer may be made to perform a display that shakes the surface of the terrain by changing the positions of the vertices of the polygon mesh for a predetermined period according to the flattening action.
[0022] According to the above, by performing flattening while producing an effect of shaking the terrain surface, it is possible to suppress the visual discomfort with respect to the change of the terrain.
[0023] Also, the above voxel data may include data indicating the hardness or material of an object within the space defined by the voxel. In this case, the above computer may further perform an update of the density based on the flattening action for the voxels within the second range that satisfy a predetermined condition with respect to the hardness or material.
[0024] According to the above, flattening can be achieved according to the hardness or material of the object.
[0025] Also, the above computer may further generate a polygon mesh by an algorithm that determines the vertex positions of the polygon based on the voxel data between the voxels defined inside the terrain and the voxels defined outside the terrain based on the density, and recalculate the vertices of the polygon mesh in the range including at least the voxels whose voxel data has been updated based on the occurrence of the destruction action or the flattening action.
[0026] According to the above, the processing load can be reduced by limiting the recalculation of the vertices of the polygon mesh to the range including the voxels whose voxel data has been updated.
[0027] Further, the present invention may be implemented in the form of a game system, a game device, or a game processing method.
Advantages of the Invention
[0028] According to the present invention, while freely destroying the terrain generated from voxels in response to a user's operation, it is possible to flatten and level the terrain, and the terrain can be deformed with a high degree of freedom to play the game.
Brief Description of the Drawings
[0029]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Embodiments for Carrying Out the Invention
[0030] Next, a game system according to an example of the present embodiment will be described. An example of the game system 1 in the present embodiment includes a main body device (information processing device; functioning as a game device main body in the present embodiment) 2, a left controller 3, and a right controller 4. The left controller 3 and the right controller 4 are each detachable from the main body device 2. That is, the game system 1 can be used as a device in which the left controller 3 and the right controller 4 are each attached to the main body device 2 and integrated. Further, the game system 1 can also be used with the main body device 2, the left controller 3, and the right controller 4 separated (see FIG. 2). Hereinafter, the hardware configuration of the game system 1 of the present embodiment will be described, and then the control of the game system 1 of the present embodiment will be described.
[0031] FIG. 1 is a diagram showing an example of a state in which the left controller 3 and the right controller 4 are attached to the main body device 2. As shown in FIG. 1, the left controller 3 and the right controller 4 are each attached to the main body device 2 and integrated. The main body device 2 is a device that executes various processes (for example, game processes) in the game system 1. The main body device 2 includes a display 12. The left controller 3 and the right controller 4 are devices provided with operation units for the user to input.
[0032] FIG. 2 is a diagram showing an example of a state in which the left controller 3 and the right controller 4 are each removed from the main body device 2. As shown in FIGS. 1 and 2, the left controller 3 and the right controller 4 are detachable from the main body device 2. Note that hereinafter, the left controller 3 and the right controller 4 may be collectively referred to as a "controller".
[0033] FIG. 3 is a six-sided view showing an example of the main body device 2. As shown in FIG. 3, the main body device 2 includes a substantially plate-shaped housing 11. In the present embodiment, the main surface of the housing 11 (in other words, the front surface, that is, the surface on which the display 12 is provided) is generally rectangular.
[0034] Incidentally, the shape and size of the housing 11 are arbitrary. As an example, the housing 11 may be of a portable size. Further, the main body device 2 alone or the integrated device with the left controller 3 and the right controller 4 attached to the main body device 2 may be a portable device. Also, the main body device 2 or the integrated device may be a hand-held device. Further, the main body device 2 or the integrated device may be a transportable device.
[0035] As shown in FIG. 3, the main body device 2 includes a display 12 provided on the main surface of the housing 11. The display 12 displays an image generated by the main body device 2. In the present embodiment, the display 12 is a liquid crystal display device (LCD). However, the display 12 may be any type of display device.
[0036] Further, the main body device 2 includes a touch panel 13 on the screen of the display 12. In the present embodiment, the touch panel 13 is of a type capable of multi-touch input (for example, a capacitance type). However, the touch panel 13 may be of any type, for example, a type capable of single-touch input (for example, a resistive film type).
[0037] The main body device 2 includes a speaker (that is, the 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. Then, the output sound of the speaker 88 is output from these speaker holes 11a and 11b, respectively.
[0038] Further, the main body device 2 includes a left terminal 17 which is a terminal for the main body device 2 to perform wired communication with the left controller 3, and a right terminal 21 for the main body device 2 to perform wired communication with the right controller 4.
[0039] As shown in FIG. 3, the main body device 2 includes a slot 23. The slot 23 is provided on the upper surface of the housing 11. The slot 23 has a shape that can accommodate a storage medium of a predetermined type. The storage medium of the predetermined type is, for example, a storage medium dedicated to the game system 1 and information processing devices of the same type (for example, a dedicated memory card). The storage medium of the predetermined type is used, for example, to store data (such as save data of an application, etc.) used in the main body device 2 and / or a program (such as an application program, etc.) executed by the main body device 2. Also, the main body device 2 includes a power button 28.
[0040] The main body device 2 includes a lower terminal 27. The lower terminal 27 is a terminal for the main body device 2 to communicate with the cradle. In the present embodiment, the lower terminal 27 is a USB connector (more specifically, a female connector). When the integrated device or the main body device 2 alone is placed on the cradle, the game system 1 can display an image generated and output by the main body device 2 on a stationary monitor. Also, in the present embodiment, the cradle has a function of charging the placed integrated device or the main body device 2 alone. Further, the cradle has a function of a hub device (specifically, a USB hub).
[0041] 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 the present embodiment, the housing 31 has a vertically long shape, that is, a shape that is long in the vertical direction (that is, the y-axis direction shown in FIGS. 1 and 4). The left controller 3 can also be gripped in a vertically long orientation when removed from the main body device 2. The housing 31 has a shape and size that can be gripped with one hand, particularly the left hand, when gripped in a vertically long orientation. Also, the left controller 3 can be gripped in a horizontally long orientation. When the left controller 3 is gripped in a horizontally long orientation, it may be gripped with both hands.
[0042] The left controller 3 is provided with an analog stick 32. As shown in FIG. 4, the analog stick 32 is provided on the main surface of the housing 31. The analog stick 32 can be used as a direction input unit capable of inputting directions. The user can input a direction according to the tilting direction (and an input of a magnitude according to the tilted angle) by tilting the analog stick 32. Note that the left controller 3 may be provided with a cross key or a slide stick capable of slide input, etc. instead of the analog stick as the direction input unit. Also, in the present embodiment, it is possible to input by pressing the analog stick 32.
[0043] The left controller 3 is provided with various operation buttons. The left controller 3 is provided with four operation buttons 33 to 36 (specifically, a right direction button 33, a down direction button 34, an up direction button 35, and a left direction button 36) on the main surface of the housing 31. Further, the left controller 3 is provided with a recording button 37 and a -(minus) button 47. The left controller 3 is provided with a first L button 38 and a ZL button 39 at the upper left of the side surface of the housing 31. Also, the left controller 3 is provided with a second L button 43 and a second R button 44 on the side surface of the housing 31 on the surface that is attached when the left controller 3 is attached to the main body device 2. These operation buttons are used to give instructions according to various programs (for example, an OS program or an application program) executed by the main body device 2.
[0044] Also, the left controller 3 is provided with a terminal 42 for the left controller 3 to perform wired communication with the main body device 2.
[0045] 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 the present embodiment, the housing 51 has a vertically long shape, that is, a shape that is long in the vertical direction. The right controller 4 can also be held in a vertically long orientation when removed from the main body device 2. The housing 51 has a shape and size that can be held with one hand, particularly the right hand, when held in a vertically long orientation. Further, 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.
[0046] Similar to the left controller 3, the right controller 4 includes an analog stick 52 as a direction input unit. In the present embodiment, the analog stick 52 has the same configuration as the analog stick 32 of the left controller 3. Further, instead of the analog stick, the right controller 4 may be provided with a cross key or a slide stick capable of slide input. Also, similar to the left controller 3, the right controller 4 includes 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. Furthermore, the right controller 4 includes a + (plus) button 57 and a home button 58. Also, the right controller 4 includes a first R button 60 and a ZR button 61 on the upper right side of the side surface of the housing 51. Also, similar to the left controller 3, the right controller 4 includes a second L button 65 and a second R button 66.
[0047] Further, the right controller 4 includes a terminal 64 for the right controller 4 to perform wired communication with the main body device 2.
[0048] FIG. 6 is a block diagram showing an example of the internal configuration of the main body device 2. The main body device 2 includes each of the components 81 to 91, 97, and 98 shown in FIG. 6 in addition to the configuration shown in FIG. 3. Some of these components 81 to 91, 97, and 98 may be mounted on an electronic circuit board as electronic components and housed in the housing 11.
[0049] The main body device 2 includes a processor 81. The processor 81 is an information processing unit that executes various information processes to be executed in the main body device 2. For example, it may be composed of only a CPU (Central Processing Unit), or may be composed of a SoC (System-on-a-chip) including a plurality of functions such as a CPU function and a GPU (Graphics Processing Unit) function. The processor 81 executes various information processes by executing an information processing program (for example, a game program) stored in a storage unit (specifically, an internal storage medium such as a flash memory 84 or an external storage medium mounted on the slot 23).
[0050] As an example of an internal storage medium built in the main body device 2, the main body device 2 includes a flash memory 84 and a DRAM (Dynamic Random Access Memory) 85. The flash memory 84 and the DRAM 85 are connected to the processor 81. The flash memory 84 is mainly a memory used to store various data (which may be a program) stored in the main body device 2. The DRAM 85 is a memory used to temporarily store various data used in information processing.
[0051] The main body 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 to and from a predetermined type of storage medium (for example, a dedicated memory card) mounted on the slot 23 in accordance with an instruction from the processor 81.
[0052] The processor 81 appropriately reads and writes data between the flash memory 84 and the DRAM 85 and the respective storage media described above, and executes the above-described information processes.
[0053] The main body device 2 includes a network communication unit 82. The network communication unit 82 is connected to the processor 81. The network communication unit 82 communicates (specifically, wirelessly communicates) with an external device via a network. In the present embodiment, the network communication unit 82 connects to a wireless LAN and communicates with an external device by a method compliant with the Wi-Fi standard as a first communication mode. Further, the network communication unit 82 performs wireless communication with other main body devices 2 of the same type by a predetermined communication method (for example, communication by a proprietary protocol or infrared communication) as a second communication mode. Note that the wireless communication by the second communication mode enables wireless communication with other main body devices 2 arranged within a closed local network area, and realizes a function enabling so-called "local communication" in which data is transmitted and received by direct communication between a plurality of main body devices 2.
[0054] The main body device 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. The communication method between the main body device 2 and the left controller 3 and the right controller 4 is arbitrary, but in the present embodiment, the controller communication unit 83 communicates with the left controller 3 and the right controller 4 in accordance with the Bluetooth (registered trademark) standard.
[0055] The processor 81 is connected to the above-described left terminal 17, right terminal 21, and 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. Also, 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. Further, when the processor 81 communicates with the cradle, it transmits data to the cradle via the lower terminal 27. Thus, in the present embodiment, the main body device 2 can perform both wired communication and wireless communication with the left controller 3 and the right controller 4, respectively. Also, when the left controller 3 and the right controller 4 are attached to the main body device 2 as an integrated device or when the main body device 2 alone is attached to the cradle, the main body device 2 can output data (e.g., image data and audio data) to a stationary monitor or the like via the cradle.
[0056] Here, the main body device 2 can communicate with a plurality of left controllers 3 simultaneously (in other words, in parallel). Also, the main body device 2 can 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 body device 2 using sets of the left controller 3 and the right controller 4, respectively. As an example, while a first user inputs to the main body device 2 using a first set of the left controller 3 and the right controller 4, it is possible for a second user to input to the main body device 2 using a second set of the left controller 3 and the right controller 4.
[0057] Also, the display 12 is connected to the processor 81. The processor 81 displays an image generated (e.g., by executing the above-described information processing) and / or an image acquired from the outside on the display 12.
[0058] The main unit device 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 speakers 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 / output of audio data to / from the speakers 88 and the audio input / output terminal 25.
[0059] The main unit device 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. Also, although not shown, the power control unit 97 is connected to each part of the main unit device 2 (specifically, each part that receives power supply from the battery 98, the left terminal 17, and the right terminal 21). The power control unit 97 controls the power supply from the battery 98 to each of the above parts based on a command from the processor 81.
[0060] Also, the battery 98 is connected to the lower terminal 27. When an external charging device (for example, a cradle) is connected to the lower terminal 27 and power is supplied to the main unit device 2 via the lower terminal 27, the supplied power is used to charge the battery 98.
[0061] FIG. 7 is a block diagram showing an example of the internal configuration of the main unit device 2, the left controller 3, and the right controller 4. Note that the details of the internal configuration of the main unit device 2 are shown in FIG. 6, and thus are omitted in FIG. 7.
[0062] The left controller 3 includes a communication control unit 101 that communicates with the main body device 2. As shown in FIG. 7, the communication control unit 101 is connected to each component including the terminal 42. In the present embodiment, the communication control unit 101 can communicate with the main body device 2 by both wired communication via the terminal 42 and wireless communication without using the terminal 42. The communication control unit 101 controls the communication method that the left controller 3 performs with respect to the main body device 2. That is, when the left controller 3 is attached to the main body device 2, the communication control unit 101 communicates with the main body device 2 via the terminal 42. Further, when the left controller 3 is detached from the main body device 2, the communication control unit 101 performs wireless communication with the main body device 2 (specifically, the controller communication unit 83). The wireless communication between the controller communication unit 83 and the communication control unit 101 is performed in accordance with, for example, the Bluetooth (registered trademark) standard.
[0063] In addition, the left controller 3 includes a memory 102 such as a flash memory. The communication control unit 101 is configured by, for example, a microcomputer (also referred to as a microprocessor) and executes various processes by executing the firmware stored in the memory 102.
[0064] The left controller 3 includes each button 103 (specifically, buttons 33 to 39, 43, 44, and 47). The left controller 3 also includes an analog stick (described as "stick" in FIG. 7) 32. Each button 103 and the analog stick 32 output information regarding the operation performed on themselves to the communication control unit 101 repeatedly at an appropriate timing.
[0065] The communication control unit 101 acquires information related to input (specifically, information related to operations or detection results by sensors) from each input unit (specifically, each button 103 and the analog stick 32). The communication control unit 101 transmits operation data including the acquired information (or information obtained by performing predetermined processing on the acquired information) to the main body device 2. Note that the operation data is repeatedly transmitted at a rate of once every predetermined time. Note that the intervals at which the information related to the input is transmitted to the main body device 2 may be the same or different for each input unit.
[0066] By transmitting the above operation data to the main body device 2, the main body device 2 can obtain the input performed on the left controller 3. That is, the main body device 2 can determine operations on each button 103 and the analog stick 32 based on the operation data.
[0067] The left controller 3 includes a power supply unit 108. In the present 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 is also connected to each part of the left controller 3 (specifically, each part that receives power supply from the battery).
[0068] As shown in FIG. 7, the right controller 4 includes a communication control unit 111 that communicates with the main body device 2. The right controller 4 also includes a memory 112 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 body device 2 by both wired communication via the terminal 64 and wireless communication without using the terminal 64 (specifically, communication conforming to the Bluetooth (registered trademark) standard), and controls the communication method performed by the right controller 4 with respect to the main body device 2.
[0069] The right controller 4 includes the same input units as those of the left controller 3. Specifically, it includes each button 113 and the analog stick 52. These input units have the same functions as those of the left controller 3 and operate in the same manner.
[0070] The right controller 4 includes a power supply unit 118. The power supply unit 118 has the same function as the power supply unit 108 of the left controller 3 and operates in the same manner.
[0071] Next, with reference to FIGS. 8 to 15, an outline of the processing executed in the game system 1 will be described. In the present embodiment, the game system 1 generates a game image in which terrain objects and characters (for example, player characters operated by the user) are arranged in a game space, which is a three-dimensional virtual space, and displays the game image on a display device. Note that, in the present embodiment, the display device on which the game image is displayed may be the above-described display 12 or a stationary monitor.
[0072] In the present embodiment, the shapes of some objects in the game space are defined by voxel data. Here, a voxel is a rectangular parallelepiped (more specifically, a cubic) region arranged in a grid pattern in the game space, and voxel data is data set for each voxel. Hereinafter, an object whose shape is defined by voxel data will be referred to as a "voxel object". In the present embodiment, the game system 1 stores voxel data as data for generating voxel objects in the game space for each of a plurality of voxels set in the game space.
[0073] FIG. 8 is a diagram showing an example of a terrain object that is a voxel object. As shown in FIG. 8, in the present embodiment, a terrain object representing a terrain such as the ground is defined in shape by voxel data (that is, it is a voxel object). Each cube shown in FIG. 8 represents a terrain object. In FIG. 8, the portions that are the sides of the terrain object are shown in thick lines, but these thick lines are added for the purpose of making the drawing easier to view, and in reality, the sides of the terrain object do not need to be shown thickly.
[0074] Also, the terrain object shown in FIG. 8 is generated, for example, according to the rule that "if the parameter included in the voxel data set for a voxel is greater than a predetermined value, a cube is placed at the position of the voxel, and if it is less than or equal to the predetermined value, nothing is placed at the position of the voxel". The terrain object shown in FIG. 8 is shown for the purpose of easily exemplifying the relationship between voxels and voxel objects. In the present embodiment, in reality, for example, like the terrain object shown in FIG. 15 described later, a voxel object is generated (based on voxel data) according to a rule that results in a more complex shape compared to the length of one side of a voxel. Note that the rule for determining the shape of a voxel object based on voxel data is arbitrary. In other embodiments, the game system 1 may generate a voxel object as shown in FIG. 8 or a voxel object as shown in FIG. 15 based on object data.
[0075] Regarding the voxel object, the shape can be changed by changing the voxel data of each voxel. FIGS. 9 and 10 are diagrams showing an example of the state before and after a part of the terrain object shown in FIG. 8 is deleted. That is, when the hatched portion of the terrain object shown in FIG. 9 is destroyed, the terrain object changes to the shape shown in FIG. 10. At this time, the game system 1 can easily erase the terrain object by rewriting the voxel data described later so as to indicate that there is no terrain object for the voxels in the hatched portion. Note that when the game system 1 adds a terrain object, it can easily change the shape of the terrain object by changing the voxel data of each voxel in the same manner as when erasing the terrain object.
[0076] In this way, the game system 1 can freely change the shape of the voxel object by rewriting the voxel data. For example, when the shape of a terrain object changes as a result of being destroyed for some reason (e.g., a player character strikes the terrain object) in the game, the game system 1 does not directly change the data indicating the outer shape of the terrain object (i.e., the mesh described later), but can freely change the shape of the terrain object by changing the voxel data used for generating the terrain object.
[0077] FIG. 11 is a diagram showing an example of the content of voxel data. Here, in this embodiment, the game space can be divided into a plurality of voxels arranged in a grid pattern. The game system 1 stores by associating voxel data with each voxel in the game space. The voxel data indicates the presence or absence of a voxel object in the voxel corresponding to the voxel data.
[0078] As shown in FIG. 11, the voxel data includes density data. The density data is data of density indicating the degree to which an object is included in the region where each voxel is defined. Although details will be described later, the position and shape of the surface of the voxel object (that is, the mesh described later) are determined based on the above density. That is, in the present embodiment, the above density is also data used to create a mesh that defines the surface of the voxel object.
[0079] In the present embodiment, the density can take an integer value in the range from a lower limit value (for example, 0) to an upper limit value (for example, 255). In the present embodiment, in the game system 1, when the value of the density set for a voxel is high, the ratio of the volume occupied by the voxel object in the voxel tends to be large, and when the value of the density is low, the ratio in the voxel is small. For example, when the density is 0, there is no object in the voxel, when the density is 255, all of the voxel is an object, and when the density is a value in between, the object can occupy the voxel at a ratio corresponding to the value. Then, based on the density, the shape of the voxel mesh, that is, the shape of the voxel object is determined. However, the shape of the voxel object generated based on the above density does not necessarily have a volume that exactly matches the ratio indicated by the density. For example, in the method of generating a voxel object as shown in FIG. 8 and the method of generating a voxel object as shown in FIG. 15, the volumes may be different even based on the same density.
[0080] Note that in other embodiments, the density may indicate either a state in which the entire region in the voxel is occupied by the voxel object or a state in which the voxel object is not included in the region in the voxel. For example, the density data may be data that can only take either 0 or 1.
[0081] As shown in FIG. 11, the voxel data includes material data. The material data indicates the material (in other words, the substance) of the voxel object generated from the voxel data. Here, in the present embodiment, materials such as sand, rock, and soil are set for the voxel object. That is, in the present embodiment, a plurality of types of materials are prepared as materials that can be set for the voxel object, and any one of the plurality of types of materials is set for the voxel object.
[0082] As shown in FIG. 11, in the present embodiment, the material data indicates identification information of the material (referred to as "material ID"). Further, in the present embodiment, the game system 1 stores material information indicating the properties and textures of the materials prepared in the game for each material. In the present embodiment, the material information associates the material ID, the properties of the material, and the appearance of the material (specifically, the texture). Specifically, the material information is information that associates the material ID, the identification information of the properties of the material (referred to as "property ID"), and the identification information of the texture of the material (referred to as "texture ID") (see FIG. 11).
[0083] FIG. 12 is a diagram showing an example of property information indicating the properties of materials. As shown in FIG. 12, the game system 1 stores property information that associates the above property ID with information indicating the content of the property indicated by the property ID. The properties of the material are the properties that the voxel object in which the material is set has in the game, and are, for example, information such as the weight and slipperiness shown in FIG. 12. Note that the specific content of the property is arbitrary, and for example, the following information may be set as the property of the material. · Temperature · Fragility (for example, the number of times the voxel object breaks until it breaks when an impact is applied to the voxel object) · Whether another object adheres to the voxel object · The amount of health restored for the player character when the player character destroys a voxel object · The amount of in-game currency obtained by the player character when the player character destroys a voxel object Note that the specific content of the properties set for the material is arbitrary. In other embodiments, information different from the above may be set as information indicating the properties of the material.
[0084] FIG. 13 is a diagram showing an example of texture information indicating the texture of a material. As shown in FIG. 13, the game system 1 stores texture information associating the above texture ID with the texture indicated by the texture ID.
[0085] Note that, as data defining the appearance of the voxel object, in addition to the texture information, any information regarding color and / or pattern may be set. For example, as information regarding the appearance of the voxel object, a crack pattern may be set. By using such a pattern, the game system 1 can generate an image of a voxel object representing an appearance with cracks.
[0086] As described above, in the present embodiment, the material data defines the properties of the voxel object and the texture to be used for the voxel object by the material ID. For example, when the material ID indicated by the material data included in the voxel data is "002", the property indicated by the property ID "001" associated with the material ID in the material information is set as the property of the voxel object corresponding to the voxel data (see the arrow shown in FIG. 11). Also, in the above case, the texture indicated by the texture ID "002" associated with the material ID in the material information is applied to the voxel object corresponding to the voxel data (see the arrow shown in FIG. 11).
[0087] As described above, in the present embodiment, the game system 1 manages the properties and textures of materials separately. Therefore, in the present embodiment, it is possible to easily set a plurality of types of materials having the same properties but different appearances (i.e., textures), or a plurality of types of materials having different properties but the same appearance.
[0088] Note that the material data may be any data that can identify the properties and / or textures of the material. For example, in other embodiments, the material data may indicate the above property ID and texture ID, or may have a data structure that actually includes data indicating the properties and textures of the material.
[0089] Also, the material data may be information related to the material and may further indicate other information different from the above properties and textures. For example, the material data may include effect data indicating an effect that occurs when an effect generation condition (for example, a part of the voxel object is destroyed, or a character steps on the voxel object) set for the voxel object is satisfied. Note that the effect data may be data indicating an effect image (for example, an effect image representing that the voxel object has been destroyed), or may be data indicating an effect sound (the sound of footsteps when a character walks on the voxel object).
[0090] As shown in FIG. 11, the voxel data includes state data indicating the state of the voxel object. The specific content of the state data is arbitrary. For example, the state data may be data indicating whether the voxel object is in a wet state, or may be data indicating the amount of damage applied to the voxel object. The content of the state data may be updated during the game.
[0091] In this embodiment, the surface of the voxel object is represented by a mesh. A mesh is a collection of a plurality of faces (specifically, polygons) arranged in the game space. In this embodiment, the game system 1 generates a mesh of the voxel object based on the voxel data of each voxel set in the game space. Hereinafter, an example of generating a mesh based on voxel data will be described.
[0092] FIG. 14 is a diagram showing an example of a method for generating a mesh. Note that in FIG. 14, for the purpose of making the drawing easy to view and the explanation easy to understand, the voxels and the mesh are represented two-dimensionally, but actually a three-dimensional mesh is generated based on the voxels in a three-dimensional space.
[0093] As described above, in this embodiment, the density set for the voxels is set in the range of 0 to 255. Also, in this embodiment, it is assumed that voxels with a density equal to or higher than the reference value are inside the object, and voxels with a density lower than the reference value are outside the object. It is not necessary to define only voxels with a density of 0 as outside the object (that is, reference value = 1), and the reference value is, for example, 128. In the example shown in FIG. 14, the density is 0 in voxel 201 and other outer voxels, the density of voxel 202 is 100 which is lower than the reference value, and the densities of voxels 203 and 204 are set to 150 and 200 which are equal to or higher than the reference value. In this embodiment, the game system 1 generates vertices between voxels with a density equal to or higher than the reference value and voxels with a density lower than the reference value. Specifically, for each region spanning eight (four in the drawing) adjacent voxels (the region surrounded by the dotted line in the drawing), it is determined whether to generate a vertex. That is, vertices are generated in the region spanning both voxels with a density equal to or higher than the reference value and voxels with a density lower than the reference value. Further, when the boundary between adjacent vertices (the boundary of the above-described region including each vertex) passes between voxels with a density equal to or higher than the reference value and voxels with a density lower than the reference value, a polygon mesh is generated by connecting those vertices.
[0094] The coordinates of the vertices are determined by comparing the densities of adjacent voxels for each of the XYZ axes and by interpolation based on the density differences. At this time, coordinate calculations can be further performed based on the normal information. The normal information may be pre-retained for at least some of the voxels, or if not retained, the normal information may also be calculated based on the densities of adjacent voxels. In FIG. 14, since the density of voxel 202 is less than the reference value, voxel 202 is treated as outside the object in the determination of the presence or absence of vertices, but the density value itself of voxel 202 is used for the coordinate calculation of the generated vertices. If the reference value is set to a value lower than the density of voxel 202, more vertices will be added to the upper right and upper left sides of voxel 202 in FIG. 14.
[0095] By generating the polygon mesh as described above, a shape with a volume that reflects the density of each voxel to some extent can be generated. However, depending on the relationship with adjacent voxels, it is possible that some voxels with a density of 0 may include regions within the object, or some voxels with a density of 255 may include regions outside the object. Also, in this embodiment, since voxels with a density less than the reference value are treated as outside the object, the volume is smaller by the amount that the number of vertices is reduced compared to the case of treating them as inside the object. That is, it is not necessary to calculate the polygon mesh so as to have a volume that exactly corresponds to the density value.
[0096] FIG. 15 is a diagram showing an example of a game image including a terrain object. In this embodiment, by generating the mesh as described above, the voxel object can be made into a shape with complex irregularities compared to, for example, the length of one side of the voxel.
[0097] Note that the method of generating the mesh based on the voxel data is arbitrary. For example, in other embodiments, when the density of the voxel data is greater than a predetermined value, the mesh may be generated such that a cube is arranged in the voxel (see FIG. 8).
[0098] For each face of the mesh generated as described above, the game system 1 determines the appearance (i.e., color and / or pattern) of each face according to the material specified by the voxel data. Specifically, the game system 1 determines the texture to be used for rendering each face of the mesh based on the voxel data, and generates an image of the voxel object by mapping the determined texture to each face. Note that the texture mapped to each face of the mesh is determined based on the voxel data of the voxels (referred to as target voxels) used to generate the face among the voxels where the voxel object exists. Note that the target voxels depend on the method of generating the mesh, but are, for example, one or more voxels arranged around the face. That is, the texture mapped to the face of the mesh is determined to be a texture corresponding to the material set for one or more voxels arranged around the face.
[0099] In other embodiments, one voxel data may include multiple types (e.g., two types) of material data. At this time, the voxel data includes ratio data regarding the multiple types of material data. The ratio data is data for determining the texture to be used for the voxel object, and indicates the ratio of the influence of each material (specifically, the texture corresponding to the material) indicated by the multiple types of material data on the appearance (specifically, color and / or pattern) of the voxel object. Also, when determining the texture mapped to each face of the mesh, the texture is determined based on various data (specifically, density data, multiple types of material data, and ratio data) included in the voxel data of the target voxels. For example, when multiple types of materials are set for the target voxels corresponding to one face, the texture corresponding to the material with the greatest influence (one type) may be used considering the ratio, or each texture corresponding to the multiple types of materials may be used considering the ratio.
[0100] In another embodiment, there may be both a voxel object that uses voxel data including one type of material data and a voxel object that uses voxel data including two types of material data.
[0101] Next, with reference to FIGS. 16 to 21, an example of game play in which a player character in a game space operates in response to a user operation on the game system 1 will be described. For example, in this embodiment, the operation buttons and sticks of the left controller 3 and / or the right controller 4 in the integrated game system 1, or the touch operation on the touch panel 13 of the main body device 2, the operation of moving the entire game system 1, the operation of changing the posture, etc., cause the player character PC appearing in the game space displayed on the display 12 to operate.
[0102] FIG. 16 is a diagram showing an example of a game image in which a player character PC displayed on the display 12 performs an action of destroying a terrain object TO, and shows the terrain object TO in a cross-sectional view. In FIG. 16, in response to a user operation, the player character PC is performing a destruction action such as hitting a terrain object TO provided on the game field. Here, the terrain object TO is an example of a voxel object generated based on the above-described voxel data, and its surface is represented by a mesh. In the example shown in FIG. 16, one of the voxel spaces defining the voxels is set on the game field in the game space, and a terrain object TO is generated on the game field by defining a plurality of voxels in the voxel space. Here, the voxel space is set to at least one in at least a part of the game space in order to define a plurality of voxels, and the length of one side (resolution) of the voxel, the vector (direction) in the global coordinates of the xyz axes in the vector space, the lengths in the x, y, and z directions of the voxel space, the position of the voxel space in the game space, etc. are defined for each voxel space. In FIGS. 16 to 19, a cross-sectional example of the terrain object TO drawn by mesh generation having an appearance as shown in FIG. 15 by the method described in FIG. 14 is illustrated, but it may be drawn by the block-shaped meshes described in FIGS. 9 and 10.
[0103] In this embodiment, by performing an action in which the player character PC destroys the terrain object TO, it is possible to destroy the terrain object TO and eliminate at least a part thereof. As an example, as shown in FIG. 16, by performing an action in which the player character PC punches a part of the terrain object TO, the terrain object TO can be destroyed and a part of the terrain object TO can be deformed and eliminated. In the example shown in FIG. 16, the terrain object TO has a ground portion formed in a dish shape with a concave center and a wall portion formed to stand upward above the game space on the left side of the ground. The player character PC is disposed substantially at the center on the ground portion and is performing a destruction action to destroy a part of the ground portion.
[0104] FIG. 17 is a diagram showing an example of a game image in which a state where the player character PC has destroyed the terrain object TO is displayed, and shows the terrain object TO in a cross-sectional view. As shown in FIG. 17, a part of the terrain object TO is destroyed and deformed by the destruction action of the player character PC and is erased from the game space. As an example, in the terrain object TO shown in FIG. 17, a semi-elliptical spherical destruction range is formed by the destruction action of the player character PC. Due to this destruction action, a part of the dish-shaped ground portion of the terrain object TO has a shape dug downward in the game space, and a terrain object TO having a ground portion with more severe unevenness compared to before the destruction action is formed. In this embodiment, even if such a ground portion with severe unevenness is formed in the terrain object TO by the destruction action of the player character PC, the ground portion can be deformed flat according to a user operation. The destruction range corresponds to an example of a first range set at a position based on the position of the player character.
[0105] FIG. 18 is a diagram showing an example of a game image in which a player character PC displayed on the display 12 performs an action of flattening a terrain object TO, and shows the terrain object TO in a cross-sectional view. In FIG. 18, in response to a user operation, a flattening action is being performed to flatten the terrain object TO on which the player character PC is placed.
[0106] In this embodiment, by performing an action in which the player character PC flattens the terrain object TO, at least a part of the terrain object TO can be flattened. As an example, by performing an action such as the player character PC punching a part of the terrain object TO or the player character PC jumping and landing on the terrain object TO, a part of the terrain object TO can be deformed and flattened. In an example shown in FIG. 18, the ground portion of the terrain object TO is formed in a dish shape with its center being concave, and a hole is formed in a part thereof. And the player character PC arranged near the central portion of the said ground portion is performing a flattening action to flatten the said ground portion.
[0107] FIG. 19 is a diagram showing an example of a game image in which a player character PC flattens a terrain object TO, and shows the terrain object TO in a cross-sectional view. As shown in FIG. 19, the ground of the terrain object TO on which the player character PC is performing a flattening action is deformed such that at least a part thereof is flattened by the flattening action. As an example, the surface shape within the flattening range set at a position based on the arrangement position of the player character PC that has performed the flattening action on the ground portion of the terrain object TO shown in FIG. 19 is deformed so as to approach the target plane set based on the arrangement position. Specifically, as is clear from a comparison between the cross-sectional view of the terrain object TO in FIG. 18 and the cross-sectional view of the terrain object TO in FIG. 19, the height of the outer edge of the dish-shaped portion, which is a portion higher than the arrangement position of the player character PC in the dish-shaped ground portion, is deformed to be lower. On the other hand, the depth of the hole portion, which is a portion lower than the arrangement position of the player character PC in the ground portion, is deformed to be shallower, that is, the height of the bottom of the hole portion is deformed to be higher. Note that the above-described flattening range corresponds to an example of a second range set at a position based on the position of the player character.
[0108] In this embodiment, the terrain object TO is expressed as being destroyed and deformed / erased or flattened and deformed by changing the voxel data of each voxel constituting the terrain object TO. FIG. 20 is a diagram showing an example of a destruction range of voxels to be destroyed in the terrain object TO in response to a destruction action. Note that the left diagram in FIG. 20 shows the surface of the terrain object TO to be destroyed as viewed from the side of the player character PC that destroys the terrain object TO. The right diagram in FIG. 20 shows a side view of the terrain object TO shown in the left diagram.
[0109] The destruction range of the terrain object TO to be destroyed by the destruction action of the player character PC is set based on the position, strength, ability of the player character PC when destroying the terrain object TO, and the strength (material) of the terrain object TO. For example, the destruction range is set to a range where the distance from a reference position set based on the position where the destruction action by the player character PC occurs in the game space is within a predetermined distance. In the example of FIG. 20, for the terrain object TO, a bell-shaped destruction range with a hemispherical shape at the deepest part missing due to the destruction is formed centered on the position where the player character PC performed the destruction action. Note that the shape of the destruction range may be other shapes, such as spherical, ellipsoidal, cubic, cylindrical, wedge-shaped, shapes generated by 3D software, or shapes with some parts of these shapes missing. Also, the position of the destruction range may be set centered on the position where the destruction action by the player character PC occurs in the game space (for example, the position reached by the fist with which the player character PC punches), or may be set centered on a predetermined distance in front of the position as seen from the player character PC.
[0110] The above-described destruction range is represented as a signed distance field (SDF), and voxels to be erased / deformed are determined using the signed distance. When the destruction range is represented as SDF, the distance from each voxel to the closest destruction range surface is determined by the signed distance. Specifically, with the destruction range surface being 0, the outside of the destruction range is regarded as a positive distance, and the outside of the destruction range is regarded as a negative distance. Then, according to the signed distance in each voxel, the erasure / deformation process of each voxel is set. For example, for voxels to be erased, the voxel data of the voxel is rewritten to indicate that there is no terrain object, so that the part of the voxel is erased from the terrain object TO.
[0111] For example, in this embodiment, by changing the density included in the voxel data, the deletion / deformation of each voxel is controlled. For example, the density is an index indicating the degree of the volume occupied by the voxel object within the region defined by the voxel. The value of the density can take an integer value in the range from a lower limit value (for example, 0) to an upper limit value (for example, 255). And, it is assumed that when the value of the density set for the voxel is high, the above-mentioned degree within the voxel is large, and when the value of the density is low, the above-mentioned degree within the voxel is small. Also, for a voxel whose density is set to the lower limit value (that is, 0), no voxel object is included in the voxel, and for a voxel whose density is set to the upper limit value (that is, 255), it is considered that the voxel object is included throughout the voxel. That is, the density becomes voxel data indicating the presence of the terrain object by being set to a value greater than the lower limit value, and functions as voxel data indicating the absence of the terrain object by being set to the lower limit value. However, the shape of the voxel mesh generated based on the density does not necessarily have a volume that exactly corresponds to the value of the density.
[0112] In this embodiment, the deletion / deformation of each voxel is controlled by rewriting the density of each voxel based on the signed distance of each voxel with respect to the SDF representing the destruction range. Specifically, at least by rewriting the density of the voxel whose signed distance is a negative distance to a low value, at least some of the voxels included in the destruction range are made to be in a state where there is no terrain object. As a first example, by rewriting the density of the voxel whose signed distance is a negative distance to the lower limit value, the voxels included in the destruction range are made to be in a state where there is no terrain object, and by maintaining the density of the voxel whose signed distance is a positive distance at the original value, the voxels outside the destruction range are made to be in a state where there is a terrain object. As a second example, by rewriting the density of the voxel whose signed distance is a negative distance to a lower value as the absolute value of the distance is larger, and by rewriting the density of the voxel whose absolute value is larger than a predetermined value to the lower limit value, at least some of the voxels included in the destruction range are made to be in a state where there is no terrain object, and by maintaining the density of the voxel whose signed distance is a positive distance at the original value, the voxels outside the destruction range are made to be in a state where there is a terrain object. As a third example, by rewriting the density of the voxel whose signed distance is a negative distance to the lower limit value, the voxels included in the destruction range are made to be in a state where there is no terrain object, and by rewriting the density of the voxel whose signed distance is a positive distance to a lower value as the absolute value of the distance is smaller, at least some of the voxels outside the destruction range are made to be in a state where there is no voxel object throughout the voxel.
[0113] Note that the change amount of the density in the voxel data described above may be adjusted according to the type and state of the material indicated by the material data included in the voxel data. For example, according to the properties of the material indicated by the material data (for example, ease of breakage, temperature), the change amount of the density may be adjusted (for example, the change amount of the density rewritten to a lower value is increased for a material that is more easily broken).
[0114] In addition, when rewriting the density in the above-described voxel data, the amount of change in the density may be adjusted according to the state data included in the voxel data. For example, the above state data is data indicating the amount of damage added from the player character PC to the terrain object TO. As an example, whether to decrease the density in the voxel data or increase the amount of damage may be determined by the relationship between the attack power of the player character PC and the defensive power of the terrain object TO. Specifically, in the relationship between the hardness of the attacking side (for example, the hardness of the fist with which the player character PC punches the terrain object TO) and the hardness of the side receiving the attack (the hardness of the material of the terrain object TO), when the hardness of the attacking side is harder, the density in the above destruction range is rewritten, and when the hardness of the side receiving the attack is harder, neither the density nor the amount of damage in the above destruction range is rewritten. And when the hardness of the attacking side is equal to the hardness of the side receiving the attack, the amount of damage to the voxels within the above destruction range is increased, and when the amount of damage exceeds the allowable amount (damage durability value by the material) of the voxels, the density of the voxels is rewritten. Note that when the amount of damage to the voxels exceeds the allowable amount of the voxels, the density of the voxels may be set to 0 to erase the voxels, and the amount of damage to the voxels can also function as voxel data indicating the absence of terrain.
[0115] Then, as described above, on the surface of the terrain object TO after the density is rewritten (specifically, the surface newly exposed to the outside due to destruction), updates for display are performed by newly generating a mesh. For example, based on the occurrence of an event in which the terrain object TO is destroyed, a new mesh is generated by recalculating the vertices of the mesh in the range including at least the voxels whose voxel data has been rewritten by the destruction. As an example, as shown in FIG. 14, each vertex of the mesh is generated. In this way, after voxel deletion, a new mesh is generated by an algorithm in which the vertices of the mesh are recalculated based on the density of each voxel between the voxels where the terrain does not exist and the voxels where the terrain exists. Then, the texture used for rendering each face of the mesh is determined based on the voxel data, and the determined texture is mapped to each face to generate an image of the terrain object TO after destruction. Note that the range for performing the above-described recalculation of the mesh may be a chunk (a group of voxels that is a processing unit composed of a predetermined number of voxels) including the voxels whose voxel data has been rewritten. For example, if one chunk is composed of 16×16×16 voxels and recalculation is performed for the chunk including the voxels whose voxel data has been rewritten, the processing can be reduced compared to recalculating the mesh of the entire game space. The range may be the voxel space in which the voxels whose voxel data has been rewritten are arranged, or the entire terrain object TO including the voxels whose voxel data has been rewritten. Also, if there is no problem with the processing load, the mesh may be recalculated for the entire game space.
[0116] In the above description, as an example of an event in which the terrain object TO is erased, an example is used where a destruction action in which the player character PC hits the terrain object TO causes a part of it to be destroyed, deformed, or erased. However, the terrain object TO may be erased by other events. For example, an event in which the player character PC destroys by hitting the terrain object TO with other parts such as the whole body or legs, or an event in which the player character PC destroys by hitting the terrain object TO with an item such as a weapon may also be possible. Also, an event in which the player character PC throws or kicks another object, and the other object hits the terrain object TO and is destroyed, or an event in which the player character PC shoots or fires a projectile, and the projectile object fired by the shooting or firing hits the terrain object TO and is destroyed, etc., may cause the terrain object TO to be erased (deformed). Further, regardless of the actions of the player character PC, the terrain object TO may be erased (deformed) due to environmental changes within the game space such as vibrations caused by an earthquake, application of crushing force due to the collision of waves or wind and rain, and deterioration or decay due to exposure to the outside air.
[0117] Also, in the above description, as an example of an object whose part is erased from the game space, the terrain object TO is used. Needless to say, the same processing is possible even when other voxel objects are erased from the game space. For example, it is possible to perform the same process of erasing a part from the game space for other voxel objects such as buildings, trees, moving objects such as vehicles moving in the game space, other characters such as enemy characters existing in the game space, items placed in the game space, and objects such as food and tools placed in the game space.
[0118] FIG. 21 is a diagram showing an example of a flattening range of voxels to be flattened and a target plane as a target of the flattening process in the terrain object TO according to the flattening action. In FIG. 21, the solid block group indicates a group of voxels having a density within the terrain object TO, and the broken block group indicates a group of voxels having a density outside the terrain object TO. Also, in FIG. 21, a cross-sectional example of the terrain object TO drawn by a block-shaped mesh is illustrated for explanation, but actually, the terrain object TO drawn by mesh generation having an appearance as shown in FIG. 15 by the method described in FIG. 14 may be used.
[0119] The flattening range of the terrain object TO flattened by the flattening action of the player character PC is set based on the position where the player character PC performs the flattening action on the terrain object TO. For example, the flattening range is within a first distance from a reference position set based on the position where the flattening action by the player character PC occurs in the game space, and within a second distance from the plane including the reference position. In the example of FIG. 21, the terrain object TO has a cylindrical shape (cylinder shape) centered on the reference position where the player character PC performed the flattening action, with the first distance as the radius and twice the second distance as the height, and a flattening range is formed where the cylinder axis is in the vertical direction of the game space. Note that the shape of the flattening range may be other shapes, such as a cube shape, a polygonal prism shape, a spherical shape, an ellipsoidal shape, a conical shape, a pyramidal shape, a wedge shape, a shape generated by 3D software, or a shape with a part of these shapes missing. Also, the position of the flattening range may be set centered on the position where the flattening action by the player character PC occurs in the game space (for example, the position where the player character PC strikes the terrain object TO), or centered on the placement position of the player character PC that performed the flattening action. Further, the size of the flattening range may be set based on the strength of the flattening action by the player character PC, the ability of the player character PC, the strength (material) of the terrain object TO, and the like.
[0120] The target plane to be flattened by the flattening action of the player character PC is set based on the placement position of the player character PC that has performed the flattening action. For example, the target plane is set to the horizontal plane of the game space that includes the placement position of the player character PC that has performed the flattening action within the game space. Note that the position of the target plane may be set to the horizontal plane that includes the position where the flattening action by the player character PC has occurred within the game space (for example, the position where the player character PC has struck the terrain object TO), or may be set to the horizontal plane that includes other positions on the ground within the flattening range.
[0121] In the flattening process of this embodiment, in response to the flattening action of the player character PC, the density of the voxels included in the above flattening range is changed so that the surface shape of the terrain object TO approaches the above target plane, thereby flattening the surface shape. Specifically, for each voxel included in the above flattening range, whether the voxel is above or below the above target plane, whether the density of the voxel is equal to or greater than the reference value, and whether the density of the voxel adjacent to the voxel in the normal direction of the above target plane is equal to or greater than the reference value are used to change the density of each voxel respectively. Note that the flattening range may be represented as an SDF. When the flattening range is represented as an SDF, the determination of whether each voxel is within the flattening range may be made based on the signed distance from each voxel to the nearest surface of the flattening range.
[0122] For voxels below the target plane, an expansion process that raises the ground is performed. For example, among the voxels below the target plane, voxels with a density equal to or higher than a reference value (e.g., reference value = 128) (i.e., voxels with a density within the terrain object TO) increase the density of the voxel by a predetermined value (voxel A in Fig. 21). Also, among the voxels below the target plane, voxels with a density lower than the reference value (i.e., voxels with a density outside the terrain object TO) increase the density of the voxel by a predetermined value if the density of the adjacent voxel adjacent to the voxel in the downward direction of the game space, which is the opposite direction of the normal vector of the target plane, is equal to or higher than the reference value (voxel B in Fig. 21), and do not change the density of the voxel if the density of the adjacent voxel is lower than the reference value (voxel C in Fig. 21). Note that the direction of the normal vector of the target plane is the direction perpendicular to the target plane from the inside to the outside of the terrain object TO, and here it is assumed to be the upward direction of the game space.
[0123] For voxels above the target plane, a contraction process that lowers the ground is performed. For example, among the voxels above the target plane, voxels with a density lower than the reference value decrease the density of the voxel by a predetermined value (voxel D in Fig. 21). Also, among the voxels above the target plane, voxels with a density equal to or higher than the reference value decrease the density of the voxel by a predetermined value if the density of the adjacent voxel adjacent to the voxel in the upward direction of the game space, which is the direction of the normal vector of the target plane, is lower than the reference value (voxel E in Fig. 21), and do not change the density of the voxel if the density of the adjacent voxel is equal to or higher than the reference value (voxel F in Fig. 21).
[0124] Then, as described above, after changing the density by a predetermined amount, an update for display is performed by newly generating a mesh on the surface of the terrain object TO (specifically, the flattened ground). For example, based on the occurrence of an event in which the terrain object TO is flattened, a new mesh is generated by recomputing the vertices of the mesh in the range including at least the voxels whose voxel data has been rewritten by the flattening. As an example, as shown in FIG. 14, each vertex of the mesh is generated. In this way, after the flattening process, a new mesh is generated by an algorithm in which the vertices of the mesh are recomputed based on the density of each voxel between the voxels where there is no terrain and the voxels where there is terrain. Then, the texture used for rendering each face of the mesh is determined based on the voxel data, and the determined texture is mapped onto each face to generate an image of the terrain object TO after flattening. Note that, similar to the destruction process, a range for recomputing the mesh may be set even in the flattening process.
[0125] Note that, triggered by the flattening action being performed, the position of the vertices of the mesh may be changed within the period at the period so that the mesh in the range including the voxels to be flattened sways for a predetermined period. By changing the vertex position of the mesh during the period including at least the point in time when the process of rewriting the voxel data is performed by the above-described flattening process and during the period triggered by the flattening action being performed, the terrain surface of the flattened portion in the terrain object TO is expressed as swaying, so that the visual discomfort with respect to the terrain change due to the flattening can be suppressed.
[0126] In this way, by changing the density of each voxel included within the flattening range, the terrain object TO within the flattening range can be flattened so as to approach the target plane. And the amount by which the terrain object TO is deformed by a single flattening process (flattening intensity) can be adjusted by a predetermined value for changing the density, and even when the flattening intensity is relatively small, by performing the flattening process a plurality of times, a plane close to the target plane is formed centered on the placement position of the player character PC. Also, by using the density change as described above, it is possible to suppress the loss of terrain features such as the walls, voids, cliffs, etc. of the terrain object TO while only flattening the ground portion of the terrain object TO.
[0127] Note that the above-described flattening process may be performed once for a single flattening action, or may be performed a plurality of times for a single flattening action.
[0128] Also, the predetermined amount for changing the density by the flattening process may be changed based on the placement position of the voxels within the flattening range. For example, the predetermined amount for changing the density with reference to the flattening range may be set using the SDF. For example, the encoded distance from the center of the flattening range or the encoded distance to the surface of the range may be set for the voxels within the flattening range, and the predetermined amount for changing the density may be changed according to the encoded distance of each voxel. For example, it is also possible to increase the predetermined amount for changing the density the closer it is to the position where the flattening action was performed or the placement position of the player character PC, and to decrease the predetermined amount for changing the density the closer it is to the vicinity of the edge of the flattening range. In this case, it is also possible to create an effect such that the area closer to the position where the flattening action was performed or the placement position of the player character PC is flattened so as to approach the target plane relatively quickly.
[0129] In addition, the predetermined amount that changes the density by the flattening process may adjust the amount of change in the density according to the type and state of the material indicated by the material data included in the voxel data. For example, the predetermined amount may be adjusted according to the properties of the material indicated by the material data (e.g., fragility, temperature) (e.g., the more fragile the material, the larger the predetermined amount). Also, according to the properties of the material indicated by the material data, the predetermined amount may be set to 0 (e.g., for a material that does not break, the density is not changed by setting the predetermined amount to 0), and voxels that are not flattened may be included within the flattening range. Further, the predetermined amount that changes the density as described above by the flattening process may be set based on the strength of the flattening action by the player character PC, the capabilities of the player character PC, and the like.
[0130] Note that when a plurality of materials are blended in one voxel, the density may be changed only for the content of the material that breaks. As an example, for a voxel in which a non-breaking material with a density of 155 and a breaking material with a density of 100 are blended, when performing a process of reducing the density by 200, only the density of the breaking material may be reduced, and the voxel may be changed to a state where the non-breaking material has a density of 155 and the breaking material has a density of 0 (i.e., the breaking material does not exist).
[0131] Also, the predetermined amount that changes the density by the flattening process may be adjusted according to the state data included in the voxel data. For example, the above state data is data indicating the amount of damage added from the player character PC to the terrain object TO. As an example, regarding whether to change the density in the voxel data by a predetermined amount or increase the amount of damage according to the flattening action, it may be determined by the relationship between the attack power of the player character PC and the defensive power of the terrain object TO. Specifically, in the relationship between the strength of the attacking side (for example, the strength with which the player character PC flattens the terrain object TO) and the strength of the side receiving the attack (the hardness of the material of the terrain object TO), when the strength of the attacking side is stronger, the density in the above flattening range is changed by a predetermined amount, and when the strength of the side receiving the attack is stronger, neither the density nor the amount of damage in the above flattening range is rewritten. And when the strength of the attacking side is equal to the strength of the side receiving the attack, the amount of damage to the voxels within the above flattening range is increased, and when the amount of damage exceeds the allowable amount (damage durability value by the material) of the voxels, the density of the voxels is changed by a predetermined amount.
[0132] Also, in the above description, as an example of an event in which the terrain object TO is flattened, an example is used where a flattening action such as the player character PC punching or jumping and landing on the terrain object TO is performed on the ground part of the terrain object TO, causing a part of it to be flattened and deformed. However, the terrain object TO may be flattened by other events. For example, an event where the player character PC hits the terrain object TO with a part of the whole body or limbs and is flattened, or an event where the player character PC hits the terrain object TO with an item such as a weapon and is flattened. Also, an event where the player character PC throws or kicks another object, causing the other object to hit the terrain object TO and be flattened, or an event where the player character PC shoots or fires a cannon, and the bullet object launched by the shooting or firing hits the terrain object TO and flattens it, etc., may cause the terrain object TO to be flattened. Also, regardless of the actions of the player character PC, due to environmental changes within the game space such as vibrations caused by earthquakes, application of crushing forces due to collisions of wave surfaces or wind and rain, and deterioration or decay due to exposure to the outside air, the terrain object TO may be flattened.
[0133] Also, in the above description, as an example of an object whose part is flattened, the terrain object TO was used. However, it goes without saying that the same processing is possible even when other voxel objects are flattened. For example, it is possible to perform the same processing of flattening a part of other voxel objects such as buildings, trees, moving objects such as vehicles moving in the game space, other characters such as enemy characters existing in the game space, items placed in the game space, objects such as food and tools placed in the game space, etc.
[0134] In the above description, the flattening range is set to a cylindrical shape where the cylindrical axis is in the vertical direction of the game space (i.e., the upper and lower surfaces of the cylindrical shape are horizontal planes), and the target plane is set to the horizontal plane of the game space. However, the flattening range and / or the target plane may be set in other directions.
[0135] As a first example, when the terrain object TO has a wall surface and a flattening action is performed on the wall surface, the flattening process may be performed with the vertical plane in the game space including the position where the player character PC is in contact with the wall surface as the target plane. In this case, regarding the flattening range, it may also be set to a cylindrical shape where the cylindrical axis is in the horizontal direction of the game space (i.e., the upper and lower surfaces of the cylindrical shape are vertical planes) based on the position where the flattening action is performed.
[0136] As a second example, depending on the inclination of the ground where the player character PC is located or the average inclination of the ground within the flattening range, a plane inclined from the horizontal plane of the game space may be used as the target plane. In this case, since the direction of the normal vector of the target plane is also different from the vertical or horizontal direction of the game space, a plurality of voxels to be density-changed and adjacent voxels adjacent to the direction of the normal vector or the opposite direction of the normal vector may be selected. For example, when selecting adjacent voxels in the direction of the normal vector of the voxel to be density-changed, the voxel in the direction of the normal vector of the voxel to be density-changed and closest to the voxel to be density-changed, and at least one voxel selected from the eight voxels adjacent to the voxel excluding the voxel to be density-changed (e.g., the voxel second closest to the voxel in the direction of the normal vector) are selected as adjacent voxels. Then, the density calculated by interpolating the densities of the selected plurality of adjacent vectors is used as the density of the adjacent voxels, and the above-described expansion process and contraction process are performed. As the above interpolation, the average value of the densities, the maximum value of the densities, the minimum value of the densities, etc. may be calculated. Note that in the second example above, the flattening range may be set to be inclined in the game space so that the target plane and the upper and lower surfaces of the cylindrical shape are parallel, or may be set so that the upper and lower surfaces of the cylindrical shape are horizontal in the game space.
[0137] Next, with reference to FIGS. 22 to 25, a specific example of information processing in the game system 1 will be described.
[0138] FIG. 22 is a diagram showing an example of various data used for information processing in the game system 1. As shown in FIG. 22, the game system 1 stores a game program, voxel space data, voxel object data, mesh data, operation data, player character data, destruction range data, flattening range data, target plane data, and a shaking flag data, etc. The game program and the voxel space data are data that are stored in advance in the game system 1 before the execution of the game process. The game program and the voxel space data are stored, for example, in a storage medium mounted on the slot 23 of the main body device 2. Further, the voxel object data, the mesh data, the operation data, the player character data, the destruction range data, the flattening range data, the target plane data, and the shaking flag data are data that are generated during the execution of the game process. The voxel object data, the mesh data, the operation data, the player character data, the destruction range data, the flattening range data, the target plane data, and the shaking flag data are stored, for example, in the DRAM 85 of the main body device 2.
[0139] The game program is a game program for executing the game process (specifically, the game process shown in FIGS. 23 to 25) in the present embodiment.
[0140] The voxel space data is data that defines the voxels set in the game space. Specifically, the voxel space data indicates the length of one side of the voxel and the direction of each side of the voxel in the game space. Further, when voxels are set only in a partial region of the game space, the voxel space data may include data indicating the position and size of the space (i.e., the voxel space) in which the voxels are set (i.e., data indicating the range in the game space where the voxels are set).
[0141] Voxel object data is data indicating voxel objects arranged in the game space. Specifically, the voxel object data includes voxel data for each unit area within a part or all of the game space.
[0142] Mesh data is data indicating a mesh set for a voxel object arranged in the game space. The mesh data includes, for example, data indicating the positions of each vertex in the mesh.
[0143] Operation data is data appropriately acquired from the left controller 3 and / or the right controller 4 and the main body device 2 respectively. As described above, the data acquired from the left controller 3 and / or the right controller 4 and the main body device 2 respectively includes information regarding inputs from each input unit (specifically, each button, analog stick, touch panel) (specifically, information regarding operations). In this embodiment, data is acquired from the left controller 3 and / or the right controller 4 and the main body device 2 respectively, and the acquired data is used to appropriately update the operation data. Note that the update period of the operation data may be updated every frame, which is the period of the process executed in the game system 1 described later, or may be updated every period in which the above data is acquired.
[0144] Player character data is data indicating the arrangement position and arrangement posture of the player character PC arranged in the game space, as well as actions and states in the game space.
[0145] Destruction range data is data indicating the destruction range set when the terrain object TO is destroyed by the player character PC.
[0146] Flattening range data is data indicating the flattening range set when the terrain object TO is flattened by the player character PC.
[0147] The target plane data is data indicating the target plane set when the terrain object TO is destroyed by the player character PC and the normal vector of the target plane.
[0148] The shake flag data is data indicating whether the shake flag is set to on.
[0149] In addition to the data shown in FIG. 22, the game system 1 stores data such as the above-described property information and texture information data in advance in the game system 1 before the execution of the game process.
[0150] FIG. 23 is a flowchart showing an example of the flow of the game process executed by the game system 1. FIG. 24 is a subroutine showing an example of the flattening process in step S9 in the flowchart shown in FIG. 23. FIG. 25 is a subroutine showing an example of the shaking process in step S11 in the flowchart shown in FIG. 23. In the present embodiment, the series of processes shown in FIGS. 23 to 25 are performed by the processor 81 executing the game program. The timing at which the game process shown in FIGS. 23 to 25 is started is arbitrary. As an example, it is started in response to an instruction to start the game being given by the player during the execution of the game program.
[0151] In the present embodiment, the processor 81 of the main body device 2 executes the processes of each step shown in FIGS. 23 to 25 by executing the game program stored in the game system 1. However, in other embodiments, some of the processes of each step may be executed by a processor (for example, a dedicated circuit or the like) different from the processor 81. Further, when the game system 1 is communicable with another information processing device (for example, a server), some of the processes of each step shown in FIGS. 23 to 25 may be executed in the other information processing device. That is, each process shown in FIGS. 23 to 25 may be executed by cooperation of a plurality of information processing devices including the main body device 2. Also, each step of the processes shown in FIGS. 23 to 25 is merely an example, and if the same result can be obtained, the order of the processes of each step may be changed, or another process may be executed in addition to (or instead of) the processes of each step.
[0152] Further, the processor 81 executes the processes of each step shown in FIGS. 23 to 25 using a memory (for example, the DRAM 85). That is, the processor 81 stores information (in other words, data) obtained by each processing step in the memory, and when using the information in subsequent processing steps, reads out and uses the information from the memory.
[0153] In FIG. 23, the processor 81 sets voxel objects in the initial state in the game space (step S1) and proceeds to the next step. Specifically, the processor 81 acquires voxel data indicating the arrangement of the voxel objects in the initial state, and stores (or writes, in other words) part or all of the acquired voxel data in the DRAM 85 as voxel object data. Note that the voxel data indicating the arrangement of the voxel objects in the initial state is stored, for example, in a storage medium mounted in the slot 23 of the main device 2. Note that by holding voxel data including at least the density indicating the degree to which an object occupies the space defined by each voxel included in the voxel space arranged in the virtual space, the computer that stores volume data representing the shape of the terrain in the virtual space in the storage medium corresponds, as an example, to the processor 81 that performs the process of step S1.
[0154] Note that the voxel data written in the DRAM 85 as voxel object data may be voxel data of a partial range used for generating a game image among the voxel data in the entire range of the game space. The processor 81 may generate an image of an object using voxel data only for a partial range (for example, a range within a predetermined distance from the position of the virtual camera) of the game space. At this time, the voxel object data may include the voxel data within the said range. Further, when voxel data for a partial range of the game space is written, the same process as step S1 is executed at an appropriate timing (for example, the timing when the position of the virtual camera has moved more than a predetermined distance) during the execution of a series of processes in steps S3 to S13 described later.
[0155] Next, the processor 81 generates a mesh for the voxel object (step S2), proceeds with the process to the next step to start the game, and repeatedly executes the processes of steps S3 to S13 during the game. The mesh is generated according to the method described above. Here, the processor 81 generates a mesh based on the voxel object data stored in the DRAM 85. By the process of step S2 above, voxel objects such as terrain objects are constructed in the game space.
[0156] Next, the processor 81 acquires data corresponding to a user operation from the left controller 3, the right controller 4, and / or the main body device 2 and updates the operation data (step S3), and proceeds with the process to the next step.
[0157] Next, the processor 81 controls the operations of various objects (e.g., player characters and enemy characters) appearing in the game space (step S4), and proceeds with the process to the next step. For example, the processor 81 controls the operation of the player character based on the operation data acquired in step S3 above and updates the player character data. In addition, the processor 81 controls the operation of the enemy character based on the algorithm defined in the game program. Note that, as an example, the computer that moves the player character on the terrain based on the user's operation input corresponds to the processor 81 that performs the process of step S4.
[0158] Next, the processor 81 determines whether an erasure condition for erasing at least a part of the voxel object is satisfied (step S5). For example, when an impact on the terrain object TO occurs due to a destruction action by the player character PC, the processor 81 sets the position where the impact occurs and the surrounding range as the destruction range, updates the destruction range data, destroys the terrain object TO (voxel object) existing in the destruction range, and erases the destroyed part. As an example, in order to represent that the destruction range has been destroyed, the object within the destruction range is erased by setting the value of the density indicated by the voxel data in at least some of the voxels within the destruction range to 0. Therefore, when the voxels of the voxel object are included within the destruction range due to the impact of the player character, the processor 81 makes an affirmative determination in step S5 above. Then, when the above erasure condition is satisfied, the processor 81 proceeds to step S6 for processing. On the other hand, when the above erasure condition is not satisfied, the processor 81 proceeds to step S8 for processing.
[0159] In step S6, the processor 81 updates the voxel data regarding the voxel object that satisfies the deletion condition, and proceeds with the process to the next step. For example, the processor 81 changes the density of the voxels in the part struck by the player character and the voxels in the surrounding part so that at least a part of the voxel object that satisfies the deletion condition is deleted, and updates the voxel data corresponding to each voxel. Further, the processor 81 reduces the density of the voxels around the destruction range (for example, the range of the strike) to be deleted (however, it shall be 0 or more), thereby deforming the voxel object in the voxels around the destruction range. Specifically, the processor 81 updates the voxel object data stored in the DRAM 85 so as to change the density data regarding the voxel data of the above-described range to be deleted and the voxels around it. Note that the processor 81 may update the density data so that the density indicates a value less than the above-described reference value. For example, the processor 81 may set the density of the voxels in the part (destruction range) struck by the player character to 0, and reduce the density of the voxels in the surrounding part by a predetermined value.
[0160] Next, the processor 81 updates the mesh for the voxel object whose voxel data has been changed in step S6 above (step S7), and proceeds to the next step. That is, the processor 81 generates a mesh for the voxel object that satisfies the deletion condition based on the voxel object data after the update in step S6. As a result, the mesh of the terrain object can be dynamically changed during the game. The processor 81 updates the mesh data stored in the DRAM 85 to the content indicating the newly generated mesh. In addition, in response to a first instruction based on an operation input, a destruction action for destroying the terrain is performed on the player character. When the destruction action hits the terrain, the voxel data is updated so that the density indicating the absence of the terrain is set for the voxels included in a first range set at a position based on the position of the player character. The computer that performs the processing of steps S6 and S7 corresponds to the processor 81 as an example. Also, based on the density, a polygon mesh is generated by an algorithm that determines the vertex positions of the polygon based on the voxel data between the voxels defined inside the terrain and the voxels defined outside the terrain. The computer that recalculates the vertices of the polygon mesh in the range including at least the voxels whose voxel data has been updated based on the occurrence of a destruction action or a flattening action corresponds to the processor 81 that performs the processing of step S7 as an example.
[0161] Next, the processor 81 determines whether a flattening action has been performed by the player character (step S8). Then, when the flattening action has been performed, the processor 81 proceeds to step S9. On the other hand, when the flattening action has not been performed, the processor 81 proceeds to step S10.
[0162] In step S9, the processor 81 performs a flattening process and proceeds to step S10. Hereinafter, with reference to FIG. 24, the flattening process performed in step S9 will be described. Note that, in response to a second instruction based on an operation input, a flattening action is performed to flatten the terrain for the player character, and in response to the flattening action, for the voxels included in a second range set at a position based on the position of the player character, a computer that updates the density of the voxel data so that the surface shape of the terrain approaches a plane set based on the position of the player character corresponds, as an example, to the processor 81 that performs the process of step S9.
[0163] In FIG. 24, the processor 81 sets a flattening range (step S81) and proceeds to the next step. For example, the flattening range is generated based on a reference position based on the position where the flattening action is performed according to the method described above, and the processor 81 updates the flattening range data stored in the DRAM 85 with the content indicating the newly generated flattening range.
[0164] Next, the processor 81 sets a target plane and a normal vector (step S82) and proceeds to the next step. For example, the target plane and the normal vector of the target plane are generated based on the arrangement position of the player character PC according to the method described above, and the processor 81 updates the target plane data stored in the DRAM 85 with the content indicating the newly generated target plane and normal vector.
[0165] Next, the processor 81 performs an inflation process of raising the ground for the voxels below the target plane set in step S82 (step S83), and proceeds to the next step. For example, according to the method described above, for voxels with a density greater than or equal to the reference value, the processor 81 increases the density of the voxel, and for voxels with a density less than the reference value, the processor 81 increases the density of the voxel according to the density of the adjacent voxel in the reverse direction of the normal vector. Then, the processor 81 updates the voxel data stored in the DRAM 85 with the content indicating the changed density. Further, the processor 81 updates the mesh of the voxel object whose voxel data has been updated based on the voxel data, and updates the mesh data stored in the DRAM 85 with the content indicating the newly generated mesh.
[0166] Next, the processor 81 performs a shrinkage process of lowering the ground for the voxels above the target plane set in step S82 (step S84), and proceeds to the next step. For example, according to the method described above, for voxels with a density less than the reference value, the processor 81 decreases the density of the voxel, and for voxels with a density greater than or equal to the reference value, the processor 81 decreases the density of the voxel according to the density of the adjacent voxel in the direction of the normal vector. Then, the processor 81 updates the voxel data stored in the DRAM 85 with the content indicating the changed density. Further, the processor 81 updates the mesh of the voxel object whose voxel data has been updated based on the voxel data, and updates the mesh data stored in the DRAM 85 with the content indicating the newly generated mesh. Note that, based on the density, a polygon mesh is generated by an algorithm that determines the vertex positions of the polygon based on the voxel data between the voxels defined inside the terrain and the voxels defined outside the terrain, and a computer that recalculates the vertices of the polygon mesh in at least the range including the voxels whose voxel data has been updated based on the occurrence of a destruction action or a flattening action corresponds to the processor 81 that performs the processes of steps S83 and S84 as an example.
[0167] Next, the processor 81 sets the shake flag to on (step S85) and ends the processing by this subroutine. For example, the processor 81 sets the shake flag indicated by the shake flag data stored in the DRAM 85 to on and updates the shake flag data.
[0168] Note that the flattening process executed in steps S81 to S85 above may be repeated multiple times for one execution of the flattening action. In this case, a negative determination may be made after a positive determination is repeated multiple times in step S8 above.
[0169] Returning to FIG. 23, in step S10, the processor 81 refers to the shake flag data stored in the DRAM 85 and determines whether the shake flag is set to on. Then, when the shake flag is set to on, the processor 81 proceeds to step S11. On the other hand, when the shake flag is set to off, the processor 81 proceeds to step S12.
[0170] In step S11, the processor 81 performs a shaking process and proceeds to step S12. Hereinafter, with reference to FIG. 25, the shaking process performed in step S11 above will be described. During the game, the process of step S12 is repeatedly executed at a rate of once per predetermined time (for example, one frame time). As an example, a computer that performs a display of shaking the surface of the terrain by changing the positions of the vertices of the polygon mesh for a predetermined period according to the flattening action corresponds to the processor 81 that performs the process of step S11.
[0171] In FIG. 25, the processor 81 extracts vertices of the polygon mesh within the flattening range that have been moved by the flattening process in step S9 (step S91), and proceeds to the next step. For example, the processor 81 extracts, with reference to the mesh data stored in the DRAM 85, the vertices of the polygon mesh arranged within the flattening range indicated by the flattening range data that have been moved by the flattening process in step S9, respectively.
[0172] Next, the processor 81 changes the vertices of the mesh extracted in step S91 based on a predetermined algorithm (step S92), and proceeds to the next step. For example, the processor 81 uses an algorithm that represents the mesh as swaying to change the positions of the vertices of the mesh respectively, and updates the mesh data stored in the DRAM 85 using the changed positions.
[0173] Next, the processor 81 updates the mesh using the positions of the vertices changed in step S92 (step S93), and proceeds to the next step. That is, the processor 81 generates a mesh using the vertex positions after the change in step S92. As a result, the mesh of the terrain object can be dynamically changed to sway. Note that the processor 81 updates the mesh data stored in the DRAM 85 with the content indicating the newly generated mesh.
[0174] Next, the processor 81 determines whether to end the swaying process (step S94). For example, a period for performing the swaying process is predetermined, and the processor 81 makes an affirmative determination in step S94 when the period has ended. Then, when the processor 81 ends the swaying process, it proceeds to step S95. On the other hand, when the processor 81 continues the swaying process, it ends the processing by this subroutine.
[0175] In step S95, the processor 81 returns the positions of the vertices of the mesh changed in step S92 to the positions before the shaking process, and proceeds to the next step. For example, the processor 81 returns the positions of the vertices of the mesh changed in step S92 to their original positions respectively, and updates the mesh data stored in the DRAM 85 using the returned positions.
[0176] Next, the processor 81 sets the shaking flag to off (step S96) and ends the processing by this subroutine. For example, the processor 81 sets the shaking flag indicated by the shaking flag data stored in the DRAM 85 to off and updates the shaking flag data.
[0177] Returning to FIG. 23, in step S12, the processor 81 generates a game image representing the game space and displays it on the display device, and proceeds to the next step. Specifically, the processor 81 generates a game image representing the game space including the voxel object and other objects (for example, the player character and the enemy character). Note that the image of the voxel object is generated according to the method described above using the voxel object data and the mesh data stored in the DRAM 85. Also, the image of the player character is generated using the player character data stored in the DRAM 85. Then, the processor 81 displays the generated game image on the display device. Note that during the game, the processing in step S12 is repeatedly executed at a rate of once per predetermined time (for example, one frame time). Note that a computer that generates an image of a virtual space by at least rendering a polygon mesh representing the surface of the terrain based on volume data corresponds to the processor 81 that performs the processing in step S12 as an example.
[0178] Next, the processor 81 determines whether to end the game (step S13). As conditions for ending the game process in step S13 above, for example, there are cases where the conditions for ending the game process are satisfied, or the user has performed an operation to end the game process. If the processor 81 does not end the game process, it returns to step S3 above and repeats the process. If the game process is ended, the process according to this flowchart is ended. Thereafter, the series of processes from step S3 to step S13 are repeatedly executed until it is determined in step S13 that the process is ended.
[0179] Thus, in this embodiment, while the terrain object generated from the voxels can be freely destroyed according to the user's operation, the terrain around the player character can be flattened and leveled, and the game can be played by deforming the terrain object with a high degree of freedom.
[0180] Also, the game system 1 may be any device, such as a portable game device, any portable electronic device (PDA (Personal Digital Assistant), mobile phone, personal computer, camera, tablet, etc.). In this case, the input device for performing the operation of operating the player object PO does not have to be the left controller 3, the right controller 4, or the touch panel 13, and may be another controller, mouse, touch pad, touch panel, trackball, keyboard, cross key, slide pad, etc.
[0181] Furthermore, although the above description uses an example in which information processing is performed by the game system 1, at least some of the above processing steps may be performed by another device. For example, if the game system 1 is configured to be able to communicate with yet another device (e.g., another server, another image display device, another game device, or another mobile terminal), the above processing steps may be executed by cooperation with the other device. In this way, by performing at least some of the above processing steps in another device, processing similar to the above-described processing becomes possible. Furthermore, the above-described information processing may be executed by one processor or cooperation between multiple processors included in an information processing system composed of at least one information processing device. Furthermore, in the above embodiment, information processing can be performed by the processor 81 of the game system 1 executing a predetermined program, but some or all of the above processing may be performed by a dedicated circuit provided in the game system 1.
[0182] According to the above-described modified example, the present invention can also be realized in a so-called cloud computing system configuration, or in a distributed wide area network or local network system configuration. For example, in a distributed local network system configuration, the above processing can be performed cooperatively between a stationary information processing device (stationary game device) and a portable information processing device (portable game device). Note that in these system configurations, there is no particular limitation on which device performs the above processing, and it goes without saying that the present invention can be realized regardless of the processing division.
[0183] Furthermore, the processing order, setting values, conditions used for judgment, etc. used in the information processing described above are merely examples, and it goes without saying that this embodiment can be realized even with other orders, values, and conditions.
[0184] In addition, the above program may be supplied to the game system 1 not only through an external storage medium such as an external memory, but also through a wired or wireless communication line. Further, the above program may be pre-recorded in a non-volatile storage device inside the device. Note that as the information storage medium for storing the above program, in addition to a non-volatile memory, a CD-ROM, a DVD, or an optical disk-shaped storage medium similar thereto, a flexible disk, a hard disk, a magneto-optical disk, a magnetic tape, etc. may also be used. Also, as the information storage medium for storing the above program, a volatile memory for storing the above program may be used. Such a storage medium can be referred to as a recording medium readable by a computer or the like. For example, by causing a computer or the like to read and execute the programs of these recording media, various functions described above can be provided.
[0185] As described above, the present invention has been described in detail, but the foregoing description is merely an exemplification of the present invention in all respects and is not intended to limit its scope. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. Also, those skilled in the art will understand that an equivalent range can be implemented based on the description of the present invention and common technical knowledge from the description of the specific embodiments of the present invention. Also, it should be understood that the terms used in this specification are used in the meaning commonly used in the art unless otherwise specified. Therefore, unless otherwise defined, all technical terms and specialized terms used in this specification have the same meaning as generally understood by those skilled in the art to which the present invention pertains. In case of contradiction, this specification (including the definitions) shall prevail.
Industrial Applicability
[0186] As described above, the present invention can be used as a game program, a game system, a game device, a game processing method, etc. that can play a game by highly freely deforming an object by enabling destruction, flattening, etc. of the object generated from voxels by a user's operation.
Explanation of Symbols
[0187] 1…Information processing system 2…Main body device 3…Left controller 4…Right controller 11…Housing 12…Display 13…Touch panel 32, 52…Analog stick 42, 64…Terminal 81…Processor 82…Network communication unit 83…Controller communication unit 85…DRAM 101, 111…Communication control unit
Claims
1. A game program executed by a computer of an information processing apparatus, wherein the computer holds voxel data including at least a density indicating the degree to which an object occupies the space defined by each voxel in a voxel space arranged in a virtual space, and stores volume data representing the shape of the terrain in the virtual space in a storage medium, moves a player character on the terrain based on a user's operation input, performs a destruction action to destroy the terrain on the player character in response to a first instruction based on the operation input, and when the destruction action hits the terrain, updates the voxel data so that the density indicating the non-existence of the terrain is set for the voxels included in a first range set at a position based on the position of the player character, performs a flattening action to flatten the terrain on the player character in response to a second instruction based on the operation input, and updates the density of the voxel data so that the surface shape of the terrain approaches a plane set based on the position of the player character for the voxels included in a second range set at a position based on the position of the player character in response to the flattening action, A game program that generates an image of the virtual space by at least rendering a polygon mesh representing the surface of the terrain based on the volume data.
2. In response to the flattening action, for the voxels included on one side with respect to the plane, the density of the voxels with a density equal to or higher than a reference value is increased, and among the voxels with a density lower than the reference value, the density of the voxels whose interpolated density of one adjacent voxel or a plurality of adjacent voxels adjacent to the one direction side is equal to or higher than the reference value is increased, for the voxels included on the other side with respect to the plane, the density of the voxels with a density lower than the reference value is decreased, and among the voxels with a density equal to or higher than the reference value, the density of the voxels whose interpolated density of one adjacent voxel or a plurality of adjacent voxels adjacent to the other direction side is lower than the reference value is decreased. The game program according to claim 1.
3. The game program according to claim 2, wherein the one direction is the reverse direction of the normal vector of the plane, and the other direction is the direction of the normal vector of the plane.
4. The game program according to claim 2 or 3, wherein the one direction is the downward direction of the virtual space, and the other direction is the upward direction of the virtual space.
5. The game program according to any one of claims 1 to 4, wherein the plane is a horizontal plane in the virtual space.
6. The game program according to any one of claims 1 to 5, wherein the plane is a plane passing through a position where the player character contacts the terrain.
7. The game program according to claim 6, wherein the plane has an inclination corresponding to the inclination of the terrain at the position of the player character.
8. Further, the computer The game program according to any one of claims 1 to 7, wherein, in accordance with the flattening action, the positions of the vertices of the polygon mesh are changed for a predetermined period to cause a display that shakes the surface of the terrain.
9. The voxel data includes data indicating the hardness or material of an object within the space defined by the voxel, Further, the computer The game program according to any one of claims 1 to 8, wherein, for voxels within the second range that satisfy a predetermined condition with respect to the hardness or material, the density update based on the flattening action is performed.
10. Further, the computer Based on the density, a polygon mesh is generated by an algorithm that determines the vertex positions of the polygon based on the voxel data between the voxels defined inside the terrain and the voxels defined outside the terrain, The game program according to any one of claims 1 to 9, wherein, based on the occurrence of the destruction action or the flattening action, the vertices of the polygon mesh in at least the range including the voxels whose voxel data has been updated are recalculated.
11. A storage medium that stores volume data representing the shape of a terrain in a virtual space by holding voxel data including at least a density indicating the degree to which an object occupies the space defined by each voxel included in a voxel space arranged in the virtual space. Based on the user's operation input, move the player character on the terrain, In response to a first instruction based on the operation input, cause the player character to perform a destruction action of destroying the terrain. When the destruction action hits the terrain, update the voxel data so that the voxels included in a first range set at a position based on the position of the player character have a density indicating that the terrain does not exist, In response to a second instruction based on the operation input, cause the player character to perform a flattening action of flattening the terrain. In response to the flattening action, update the density of the voxels included in a second range set at a position based on the position of the player character so that the surface shape of the terrain approaches a plane set based on the position of the player character, A game system comprising a processor that generates an image of the virtual space by at least rendering a polygon mesh representing the surface of the terrain based on the volume data.
12. The processor, in response to the flattening action, For the voxels included on one side with respect to the plane, increase the density of the voxels whose density is equal to or higher than the reference value, and among the voxels whose density is less than the reference value, increase the density of the voxels whose density obtained by interpolating the density of one adjacent voxel or a plurality of adjacent voxels adjacent to the one direction side is equal to or higher than the reference value, For the voxels included on the other side with respect to the plane, decrease the density of the voxels whose density is less than the reference value, and among the voxels whose density is equal to or higher than the reference value, decrease the density of the voxels whose density obtained by interpolating the density of one adjacent voxel or a plurality of adjacent voxels adjacent to the other direction side is less than the reference value. The game system according to claim 11.
13. The one direction is the reverse direction of the normal vector of the plane, and the other direction is the direction of the normal vector of the plane. The game system according to claim 12.
14. The one direction is the downward direction of the virtual space, and the other direction is the upward direction of the virtual space. The game system according to claim 12 or 13.
15. The game system according to any one of claims 11 to 14, wherein the plane is a horizontal plane in the virtual space.
16. The game system according to any one of claims 11 to 15, wherein the plane is a plane passing through a position where the player character touches the terrain.
17. The game system according to claim 16, wherein the plane has an inclination corresponding to the inclination of the terrain at the position of the player character.
18. The processor further The game system according to any one of claims 11 to 17, wherein, in response to the flattening action, a display that shakes the surface of the terrain is performed by changing the positions of the vertices of the polygon mesh for a predetermined period.
19. The voxel data includes data indicating the hardness or material of an object within the space defined by the voxel, The processor further The game system according to any one of claims 11 to 18, wherein, among the voxels within the second range, the update of the density based on the flattening action is performed on the voxels whose hardness or material satisfies a predetermined condition.
20. The processor further Based on the density, a polygon mesh is generated by an algorithm that determines the vertex positions of the polygons based on the voxel data between the voxels defined inside the terrain and the voxels defined outside the terrain, The game system according to any one of claims 11 to 19, wherein, based on the occurrence of the destruction action or the flattening action, the vertices of the polygon mesh in a range including at least the voxels whose voxel data has been updated are recalculated.
21. A storage medium that stores volume data representing the shape of a terrain in a virtual space by holding voxel data including at least a density indicating the degree to which an object occupies the space defined by each voxel included in a voxel space arranged in the virtual space; Moving a player character on the terrain based on a user's operation input, In response to a first instruction based on the operation input, cause the player character to perform a destruction action to destroy the terrain. When the destruction action hits the terrain, update the voxel data so that voxels included in a first range set at a position based on the position of the player character have a density indicating that the terrain does not exist. In response to a second instruction based on the operation input, cause the player character to perform a flattening action to flatten the terrain. In response to the flattening action, update the density of voxels included in a second range set at a position based on the position of the player character so that the surface shape of the terrain approaches a plane set based on the position of the player character. A game device comprising a processor that generates an image of the virtual space by at least rendering a polygon mesh representing the surface of the terrain based on the volume data.
22. The processor, in response to the flattening action, For voxels included on one side with respect to the plane, increase the density of voxels having a density equal to or greater than a reference value, and among voxels having a density less than the reference value, increase the density of voxels for which the density obtained by interpolating the density of one adjacent voxel or a plurality of adjacent voxels adjacent to the one direction side is equal to or greater than the reference value. For voxels included on the other side with respect to the plane, decrease the density of voxels having a density less than the reference value, and among voxels having a density equal to or greater than the reference value, decrease the density of voxels for which the density obtained by interpolating the density of one adjacent voxel or a plurality of adjacent voxels adjacent to the other direction side is less than the reference value. The game device according to claim 21.
23. The processor further Performs a display that shakes the surface of the terrain by changing the positions of the vertices of the polygon mesh for a predetermined period in response to the flattening action. The game device according to claim 21 or 22.
24. In the processor of the information processing device By holding voxel data that includes at least the density indicating the degree to which an object occupies the space defined by each voxel in the voxel space arranged in the virtual space, volumetric data representing the shape of the terrain in the virtual space is stored in a storage medium. Based on a user's operation input, move a player character on the terrain. In response to a first instruction based on the operation input, cause the player character to perform a destruction action to destroy the terrain. When the destruction action hits the terrain, update the voxel data so that the voxels included in a first range set at a position based on the position of the player character have a density indicating that the terrain does not exist. In response to a second instruction based on the operation input, cause the player character to perform a flattening action to flatten the terrain. In response to the flattening action, update the density of the voxels included in a second range set at a position based on the position of the player character so that the surface shape of the terrain approaches a plane set based on the position of the player character. A game processing method for generating an image of the virtual space by at least rendering a polygon mesh representing the surface of the terrain based on the volumetric data.
25. To the processor, in response to the flattening action, For the voxels included on one side with respect to the plane, increase the density of the voxels whose density is equal to or greater than a reference value, and among the voxels whose density is less than the reference value, increase the density of the voxels whose interpolated density of one adjacent voxel or a plurality of adjacent voxels adjacent to the one direction side is equal to or greater than the reference value. For the voxels included on the other side with respect to the plane, decrease the density of the voxels whose density is less than the reference value, and among the voxels whose density is equal to or greater than the reference value, decrease the density of the voxels whose interpolated density of one adjacent voxel or a plurality of adjacent voxels adjacent to the other direction side is less than the reference value. The game processing method according to claim 24.
26. To the processor, further, The game processing method according to claim 24 or 25, wherein, in accordance with the flattening action, the position of the vertices of the polygon mesh is changed for a predetermined period to cause a display that shakes the surface of the terrain.
Citation Information
Patent Citations
Program, recording medium, game character drawing method and game machine
JP2004062666A
Server system, game system, and program
JP2021122302A
Data processing apparatus, data processing method, and program
JP2022171068A
Method and system for generating polygon meshes approximating surfaces using root-finding and iteration for mesh vertex positions
JP2023178274A
Program, information storage medium and image generation system
JP2008033521A