Game resource loading method and device, storage medium and electronic device

CN116407849BActive Publication Date: 2026-09-29BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111640548.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2026-09-29
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

[0003]相关技术需要在地图中先购买空地皮,购买后地皮上会自动生成一个“房屋”,房屋生成后不可移动,也不可以回收或替换,实现方式更类似于显隐,不能预装修布设,导致装修素材的利用率低,同时由于用户需要购买地皮或房屋置换才能生成装修后的房屋,游戏前期地图区域中全是未装修的毛坯房或者空地,在前期地图中地图区域显得过于荒凉,影响了游戏画面的显示效果

Benefits of technology

[0010]通过本发明,在虚拟游戏的地图区域中定位资源加载区域,其中,资源加载区域为待分配给游戏账号的地图区域,查找资源加载区域对应的虚拟装修素材,其中,资源加载区域预先配置有虚拟装修素材;读取虚拟装修素材的素材资源,采用素材资源在资源加载区域内加载虚拟装修素材,通过定位资源加载区域,并获取待分配给游戏账号的地图区域内的虚拟装修素材和素材资源,并采用素材资源在资源加载区域内加载虚拟装修素材,实现了一种在虚拟游戏地图中预装修的方案,解决了相关技术虚拟装修素材利用率低的技术问题,在虚拟游戏前期提高了虚拟装修素材在地图区域中的利用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116407849B_ABST
    Figure CN116407849B_ABST
Patent Text Reader

Abstract

The application provides a game resource loading method and device, a storage medium and an electronic device, and the method comprises the steps of: locating a resource loading area in a map area of a virtual game, wherein the resource loading area is a map area to be allocated to a game account; searching for a virtual decoration material corresponding to the resource loading area, wherein the resource loading area is pre-configured with the virtual decoration material; reading material resources of the virtual decoration material; and loading the virtual decoration material in the resource loading area by using the material resources. Through the application, the technical problem of low utilization rate of virtual decoration materials in related technologies is solved, and the utilization rate of virtual decoration materials in the map area is improved in the early stage of the virtual game.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a method and apparatus for loading game resources, a storage medium, and an electronic device. Background Technology

[0002] In related technologies, when displaying virtual houses in the map area of ​​a virtual game, only a three-dimensional exterior of the house is usually drawn, without any interior decoration materials. In order to display different decoration styles in the game map, decoration materials are needed for decoration.

[0003] The relevant technology requires purchasing empty land on the map first. After purchase, a "house" will automatically be generated on the land. Once generated, the house cannot be moved, recycled, or replaced. The implementation is more like a hidden / revealed feature. Pre-decoration and layout are not possible, resulting in low utilization of decoration materials. At the same time, since users need to purchase land or replace houses to generate decorated houses, the map area in the early stages of the game is full of undecorated bare houses or empty land. In the early stages of the game, the map area appears too desolate, affecting the display effect of the game screen.

[0004] There are currently no effective solutions to the aforementioned problems in the relevant technologies. Summary of the Invention

[0005] This invention provides a method and apparatus for loading game resources, a storage medium, and an electronic device.

[0006] According to an embodiment of the present invention, a method for loading game resources is provided, comprising: locating a resource loading area in a map area of ​​a virtual game, wherein the resource loading area is a map area to be allocated to a game account; searching for virtual decoration materials corresponding to the resource loading area, wherein the resource loading area is pre-configured with the virtual decoration materials; reading the material resources of the virtual decoration materials; and loading the virtual decoration materials in the resource loading area using the material resources.

[0007] According to another embodiment of the present invention, a game resource loading device is provided, comprising: a first positioning module, configured to locate a resource loading area in a map area of ​​a virtual game, wherein the resource loading area is a map area to be allocated to a game account; a search module, configured to search for virtual decoration materials corresponding to the resource loading area, wherein the resource loading area is pre-configured with the virtual decoration materials; a reading module, configured to read the material resources of the virtual decoration materials; and a rendering module, configured to load the virtual decoration materials in the resource loading area using the material resources.

[0008] According to yet another embodiment of the present invention, a storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0009] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0010] This invention locates resource loading areas within a virtual game's map region. These resource loading areas are map regions to be allocated to game accounts. Virtual decoration materials corresponding to these resource loading areas are located, and these areas are pre-configured with virtual decoration materials. The invention reads the material resources of these virtual decoration materials and uses them to load the virtual decoration materials within the resource loading area. By locating the resource loading area and obtaining the virtual decoration materials and material resources within the map region to be allocated to the game account, and using these material resources to load the virtual decoration materials within the resource loading area, this invention provides a pre-decoration solution for virtual game maps. This solves the technical problem of low utilization of virtual decoration materials in related technologies and improves the utilization rate of virtual decoration materials in the map region during the early stages of a virtual game. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0012] Figure 1 This is a hardware structure block diagram of a computer for loading game resources according to an embodiment of the present invention;

[0013] Figure 2 This is a flowchart illustrating a method for loading game resources according to an embodiment of the present invention;

[0014] Figure 3 This is a schematic diagram of the three-dimensional frame in an embodiment of the present invention;

[0015] Figure 4 This is a flowchart illustrating the display of virtual furniture according to an embodiment of the present invention;

[0016] Figure 5 This is a flowchart of loading a virtual camera in an embodiment of the present invention;

[0017] Figure 6 This is a structural block diagram of a game resource loading device according to an embodiment of the present invention;

[0018] Figure 7This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] Example 1

[0022] The method embodiment provided in Embodiment 1 of this application can be executed in a mobile phone, tablet, server, computer, or similar electronic terminal. Taking running on a computer as an example, Figure 1 This is a hardware structure block diagram of a computer for loading game resources according to an embodiment of the present invention. Figure 1 As shown, a computer may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the computer may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer described above. For example, the computer may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0023] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to a game resource loading method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. In this embodiment, the processor 104 is used to respond to human-computer interaction instructions and game strategies, controlling the target virtual character to perform specified operations to complete game tasks. The memory 104 is used to store the program scripts, configuration information, and attribute information of the game scene, etc., of the electronic game.

[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a computer's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0025] Optionally, the input / output device 108 also includes a human-computer interaction screen for obtaining human-computer interaction commands through a human-computer interaction interface, and for presenting game screens in a virtual scene;

[0026] This embodiment provides a method for loading game resources. Figure 2 This is a flowchart illustrating a method for loading game resources according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process includes the following steps:

[0027] Step S202: Locate the resource loading area in the map area of ​​the virtual game, wherein the resource loading area is the map area to be allocated to the game account;

[0028] Optionally, the virtual scene in this embodiment can be a virtual game scene, a virtual teaching scene, a virtual demonstration scene, etc. The virtual scene includes multiple types of virtual characters, which can be controlled by user operation or system AI. When a virtual character is controlled by a user, it can be a PCC (Player-Controlled Character) in a virtual game controlled by a main player. In this embodiment, a game scene is used as an example for explanation.

[0029] The virtual scene in this embodiment is a virtual scene displayed (or provided) by the application when it runs on the terminal. This virtual scene can be a simulation of real-world buildings, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. Optionally, the resource loading area is the area where a specific type of virtual space (e.g., a virtual home) is located in the game. After purchasing a resource loading area, the game account can allocate the resource loading area to itself, allowing the game account to place, adjust, and recycle virtual resources within the resource loading area (including the aforementioned virtual decoration materials and other virtual resources selected by the game account after gaining editing permissions for the resource loading area).

[0030] Step S204: Locate the virtual decoration materials corresponding to the resource loading area, wherein the resource loading area is pre-configured with virtual decoration materials;

[0031] Optionally, the virtual decoration material can be a virtual decoration material pre-configured for the resource loading area. Different resource loading areas can correspond to the same or different virtual decoration materials. When different virtual decoration materials are used, it can make the various resource loading areas more diverse after loading different virtual decoration materials.

[0032] Step S206: Read the material resources of the virtual decoration materials;

[0033] Optional resources include furniture models, blueprints, and other information, which can be used to configure the shape, size, textures, structure, etc. of virtual decoration materials.

[0034] Step S208: Load virtual decoration materials into the resource loading area using material resources.

[0035] After reading the virtual decoration material resources, the virtual decoration material is loaded into the resource loading area displayed on the game client, so that the virtual decoration material can be displayed in the resource loading area displayed on the game client.

[0036] Through the above steps, a resource loading area is located in the map area of ​​the virtual game. This resource loading area is the map area to be allocated to the game account. Virtual decoration materials corresponding to the resource loading area are located, and these materials are pre-configured. The material resources of the virtual decoration materials are read, and these materials are used to load the virtual decoration materials within the resource loading area. By locating the resource loading area and obtaining the virtual decoration materials and material resources within the map area to be allocated to the game account, and using these material resources to load the virtual decoration materials within the resource loading area, a pre-decoration scheme in the virtual game map is implemented. This solves the technical problem of low utilization rate of virtual decoration materials in related technologies and improves the utilization rate of virtual decoration materials in the map area in the early stages of the virtual game.

[0037] In one embodiment of this example, locating the resource loading area in the map region of the virtual game includes:

[0038] S11, Locate the land plot identifier of virtual land assets in virtual game assets;

[0039] S12, Obtain a three-dimensional frame associated with the land marker, wherein the three-dimensional frame is used to mark the display location range of the virtual decoration material;

[0040] Since the 3D frame is within the resource loading area, it is used to determine the placement of virtual decoration materials within that area.

[0041] S13, the area where the three-dimensional frame is located is positioned as the resource loading area in the map area of ​​the virtual game.

[0042] In some examples, locating the area where the 3D frame is located as a resource loading area in the map region of the virtual game includes: determining a first center point of the ground surface of the 3D frame, determining a second center point of a specified edge of the ground surface, and determining the coordinates of a teleportation point in the 3D frame; locating the first center point as the ground center point of the resource loading area in the map region of the virtual game, locating the second center point as the entrance location of the resource loading area, and locating the teleportation point as the initial generation location of a specified item in the virtual game, wherein the specified item is used to teleport a virtual character from the open world map area of ​​the resource loading area to the copy map area of ​​the resource loading area corresponding to the specified item when the item is active.

[0043] Optionally, the entrance location can be a main entrance, a back entrance, a garage entrance, etc.

[0044] Each plot of land in the map area corresponds to a homestead ID for a resource loading area. When a player purchases a plot of land, they will obtain the homestead decoration rights for the corresponding ID. By associating these IDs with various frames, the decoration area can be matched one-to-one with the land asset.

[0045] Optionally, determining the coordinate position of the transmission point in the three-dimensional frame includes: calculating the center coordinate positions of the first center point and the second center point, and determining the center coordinate positions as the coordinate positions of the transmission point.

[0046] Optionally, the designated item can be a functional furniture such as a virtual crystal ball, which has a teleportation function. When the player's virtual character approaches the crystal ball and triggers the first interaction command, they can see the door number. In the open world map, triggering the second interaction command can teleport them from the open world to the dungeon map.

[0047] Figure 3 This is a schematic diagram of a three-dimensional frame in an embodiment of the present invention. The pre-decoration area is a cuboid frame. This frame defines the range of locations where virtual decoration materials can be placed within the resource loading area where the virtual land is located. Point A is the center point of the ground and is used to locate the overall position of the frame. Point B is the center point of one of the edges of the ground and is used to locate the position of the home gate. Point C is the midpoint of AB and is used to locate the coordinate position of the teleportation point.

[0048] In this embodiment, after obtaining the resource loading area through a game account transaction, the game account is granted editing permissions for the resource loading area. This allows the game account to further edit the resource loading area, such as controlling and processing already loaded virtual decoration materials, recycling existing virtual decoration materials, adding (placing) new virtual decoration materials, adjusting the size and position of added virtual decoration materials, etc. Different implementation methods are described below:

[0049] In one embodiment of this example, after loading the virtual decoration material using the material resources in the resource loading area, the method further includes: detecting a transaction instruction for the resource loading area; allocating material editing permissions for the resource loading area and the virtual decoration material to the target game account that triggered the transaction instruction; detecting a material editing instruction triggered by the target game account based on the material editing permissions, and performing at least one of the following operations on the virtual decoration material in the resource loading area: zooming in, zooming out, changing the placement position, or recycling.

[0050] After purchasing a resource loading area through their game account, players can manipulate the pre-decorated materials (virtual decoration materials) already in the resource loading area, such as enlarging, shrinking, and changing their placement, thus realizing the privatization and free control of virtual assets.

[0051] In some scenarios, access permissions for virtual characters to resource loading areas can also be controlled. Taking the resource loading area as an abstraction of a virtual home in a game scene as an example, it is possible to control whether visitors (i.e., virtual characters) are allowed to enter the virtual home, or whether visitors are allowed to enter specific areas of the virtual home. The solution in this implementation scenario also includes: assigning global access permissions for the resource loading area to the first virtual character corresponding to the target game account that triggered the transaction instruction, wherein the global access permissions are used to indicate that access to all areas of the resource loading area is allowed (i.e., the world map area and the instance map area in the resource loading area); detecting a visit request from a second virtual character to the resource loading area, wherein the visit request is used to indicate that the second virtual character requests access to a target area of ​​the resource loading area (such as the instance map area in the resource loading area); determining whether the second virtual character has the global access permissions; if the second virtual character has the global access permissions, sending the virtual resources corresponding to the target area to the game client controlling the second virtual character, so as to load the virtual resources corresponding to the target area in the target area displayed in the game client of the second virtual character; if the second virtual character does not have the global access permissions, prohibiting the sending of the virtual resources corresponding to the target area to the game client controlling the second virtual character.

[0052] Optionally, the resource loading area includes at least two areas: the open world map area (e.g., the front yard in a virtual home) and the instance map area (e.g., the backyard in a virtual home). The front yard is located in the open world map, and the backyard is located in the instance map. Player 1 obtains this resource loading area through trading. Players 2 and 3 can visit the open world area (front yard) of Player 1's resource loading area. Without Player 1's authorization, Players 2 and 3 cannot enter the instance area (backyard) of the resource loading area. Only after Player 1 authorizes Players 2 and 3 to obtain full access to the resource loading area can Players 2 and 3 visit the backyard.

[0053] In one embodiment of this example, after detecting a transaction instruction for the resource loading area and loading the virtual decoration material in the resource loading area using the material resource, the method further includes: responding to an addition operation by the first virtual character corresponding to the target game account to add the target virtual resource to the resource loading area, determining the addition position of the target virtual resource in the resource loading area; if the addition position is a specified position, synchronizing the target virtual resource with the game client connected to the game server, so that the game client loads the target virtual resource at the addition position in the resource loading area.

[0054] The specified location in the above implementation can be the location of the resource loading area in the world map area. If a user adds a target virtual resource in the world map area, it can be synchronized to all connected game clients through the game server, and other online users can also see it.

[0055] In some examples, after detecting transaction instructions targeting the resource loading area, material decoration permissions are assigned to the target game account. Material decoration instructions triggered by the target game account based on the material decoration permissions are detected. These material decoration instructions carry the material identifier of the first virtual decoration material and the placement orientation parameters of the first virtual decoration material. The first virtual decoration material is added to the resource loading area. Based on the placement orientation parameters, the placement position of the first virtual decoration material in the resource loading area is adjusted. The placement position of the first virtual decoration material is synchronized to the game client connected to the game server, so that the game client can adjust the placement position of the first virtual decoration material in the resource loading area.

[0056] After purchasing a resource loading area, players can continue to decorate their home, such as placing other items in the resource loading area of ​​the open world. The items placed by the player in this area will be synchronized to other clients via the server.

[0057] In one embodiment of this example, after assigning material decoration permissions to the target game account, the solution further includes: detecting a material recycling instruction triggered by the target game account based on the material decoration permissions, unloading the second virtual decoration material in the resource loading area, storing the second virtual decoration material in the virtual asset account of the target game account, and detecting a material decoration instruction triggered by the target game account based on the material decoration permissions by selecting the target virtual decoration material in the virtual asset account, loading the target virtual decoration material in the resource loading area.

[0058] After gaining access to the material decoration system, players can freely recycle these virtual decoration materials and use them for other decorations. That is, after purchasing a homestead, players can recycle pre-decorated items, which then become optional decoration materials. Players can then rearrange these items within their resource loading area, changing their position, size, orientation, and combination (e.g., stacking).

[0059] In one embodiment of this example, after detecting a transaction instruction for the resource loading area, the solution further includes: obtaining account attribute information of the target game account, and / or obtaining character attribute information of the target game character (such as a player character controlled by the target game account), and using the account attribute information and / or character attribute information to adjust the area range of the resource loading area.

[0060] For the copy map area in the resource loading area (such as the backyard of a virtual house), the area can be expanded according to the player's game behavior and data (such as level). Players can combine some virtual decoration materials (such as furniture and objects) in the area, and after combining, they can perform operations such as moving and scaling the whole.

[0061] Optionally, finding virtual decoration materials within the resource loading area includes: using a first mapping table to find a three-dimensional frame associated with the resource loading area, wherein the three-dimensional frame is configured with virtual decoration components; determining at least one virtual decoration component identifier corresponding to the virtual decoration component; and determining the virtual decoration material represented by the at least one virtual decoration component identifier as the virtual decoration material within the resource loading area.

[0062] Optionally, in this embodiment, the virtual decoration component can be a furniture Actor, and the virtual decoration component identifier can be a furniture ID. A furniture Actor is an object in the rendering engine that allows developers to place in game levels and other scenes. Since elements in the game generally do not allow players to adjust them (such as trees, buildings, NPCs (Non-Player Characters), etc. in the scene, they can all be regarded as Actors placed by the developer, but cannot be adjusted by the player), this embodiment develops a special Actor for pre-decorated furniture, which allows both developers to place it and players who purchase the resource loading area to adjust it. When the resource loading area is reclaimed, the pre-decorated furniture will also revert to the original appearance placed by the developer.

[0063] The Furniture Actor contains several objects that developers and players can place. The display and identification of these objects are read by their IDs, which are linked to the furniture configuration table.

[0064] Figure 4 This is a flowchart of displaying virtual furniture according to an embodiment of the present invention. Taking each resource loading area as a home in a virtual game as an example, the process includes: the virtual character controlled by the player enters the loading range of the home area map, finds the three-dimensional frame associated with the home plot ID, finds the furniture Actor associated with the three-dimensional frame, finds the furniture ID corresponding to the furniture Actor, and finally displays the blueprint / model corresponding to the furniture ID.

[0065] In this embodiment, the pre-decorated virtual decoration material is a special Actor. By associating it with the furniture ID, the model, blueprint and other information of the corresponding furniture can be read and displayed in real time.

[0066] Each pre-decorated furniture Actor corresponds to a unique level element ID. All associated level element IDs can be configured in the frame. When reading the corresponding frame in the resource loading area, the corresponding furniture information can be automatically read. In this embodiment, the level element refers to the furniture mesh or furniture group blueprint. The level element ID is matched in the furniture configuration table of the virtual decoration material.

[0067] In one embodiment of this example, loading the virtual decoration material within the resource loading area using the material resources includes:

[0068] S21, initialize the camera parameters of the virtual camera in the resource loading area, wherein the camera parameters include camera position and camera focal length;

[0069] S22, Obtain target control instructions for the virtual camera;

[0070] In one example, obtaining the target control command for the virtual camera includes: detecting the virtual camera's retrieval command and generating a surface air wall in the 3D space where the resource loading area is located; detecting the initial control command for the virtual camera, wherein the initial control command is used to indicate the virtual camera's movement direction; determining whether the movement direction exceeds the wall range of the surface air wall; if the movement direction does not exceed the wall range of the surface air wall, outputting the initial control command as the target control command; if the movement direction exceeds the wall range of the surface air wall, generating the target control command based on the farthest wall boundary of the surface air wall.

[0071] S23, Generate a rendering screen of the virtual decoration material in the resource loading area according to the target control command and the material resources.

[0072] Optionally, the virtual camera during the decoration process is one of the parameters of the 3D frame corresponding to the resource loading area. The position, focal length, etc. of the virtual camera can be adjusted in advance to adapt it to decoration areas of various sizes.

[0073] Figure 5 This is a flowchart of loading a virtual camera in an embodiment of the present invention, including: the player enters the decoration mode, reads the player's land ID, reads the camera parameters of the frame corresponding to the land ID, enters camera initialization, and generates an air wall according to the frame.

[0074] In one example, generating a target control command based on the farthest wall boundary of the surface air wall includes: calculating the shortest distance between the center point of the virtual camera and each wall surface of the air wall, selecting the target wall surface with the smallest shortest distance, determining the target wall surface as the wall surface that collides with the virtual camera, and generating a target control command, wherein the target control command is used to move the center point of the virtual camera to a position coinciding with the target wall surface and restrict the orientation range of the virtual camera within the air wall.

[0075] In the decoration mode, players can control the virtual camera to move and rotate. When the virtual camera is invoked, an air wall will be generated on the surface of the three-dimensional frame to limit the movement range of the decoration camera.

[0076] The solution in this embodiment ensures that the location of the resource loading area is consistent across all house plots on the map, avoiding the uneven placement issues that can occur with manual placement. This can satisfy several scenarios in virtual games: By pre-decorating houses, players can preview the expected decoration effects within the resource loading area. In the early stages of the game, most players do not meet the requirements to purchase virtual land assets and houses; pre-decoration prevents corresponding areas on the map from appearing too desolate, improving the player's gaming experience and immersion.

[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0078] Example 2

[0079] This embodiment also provides a game resource loading device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0080] Figure 6 This is a structural block diagram of a game resource loading device according to an embodiment of the present invention, such as... Figure 6As shown, the device includes: a first positioning module 60, a searching module 62, a reading module 64, and a rendering module 66, wherein...

[0081] The first positioning module 60 is used to locate a resource loading area in the map area of ​​the virtual game, wherein the resource loading area is a map area to be allocated to the game account;

[0082] The search module 62 is used to search for virtual decoration materials corresponding to the resource loading area, wherein the resource loading area is pre-configured with the virtual decoration materials;

[0083] The reading module 64 is used to read the material resources of the virtual decoration material;

[0084] Rendering module 66 is used to load the virtual decoration material in the resource loading area using the material resource.

[0085] Optionally, the first positioning module includes: a search unit for searching for land identifiers of virtual land assets in virtual game assets; an acquisition unit for acquiring a three-dimensional frame associated with the land identifier, wherein the three-dimensional frame is used to identify the placement range of the virtual decoration material; and a positioning unit for positioning the area where the three-dimensional frame is located as a resource loading area in the map area of ​​the virtual game.

[0086] Optionally, the positioning unit includes: a determining subunit, used to determine a first center point of the ground surface of the three-dimensional frame, a second center point of a specified edge of the ground surface, and the coordinate position of a teleportation point in the three-dimensional frame; and a positioning subunit, used to position the first center point as the ground center point of the resource loading area in the map area of ​​the virtual game, position the second center point as the entrance position of the resource loading area, and position the teleportation point as the initial generation position of a specified item in the virtual game, wherein the specified item is used to teleport the virtual character from the large world map area of ​​the resource loading area to the copy map area of ​​the resource loading area corresponding to the specified item when the item is active.

[0087] Optionally, the device further includes: a first detection module, configured to detect a transaction instruction for the resource loading area after the rendering module loads the virtual decoration material using the material resources in the resource loading area; a first allocation module, configured to allocate the resource loading area and material editing permissions for the virtual decoration material to the target game account that triggers the transaction instruction; and an editing module, configured to detect a material editing instruction triggered by the target game account based on the material editing permissions, and perform at least one of the following operations on the virtual decoration material in the resource loading area: zoom in, zoom out, change the placement position, or recycle.

[0088] Optionally, the search module includes: a search unit, configured to use a first mapping table to search for a three-dimensional frame associated with the resource loading area, wherein the three-dimensional frame is configured with virtual decoration components; a first determination unit, configured to determine at least one virtual decoration component identifier corresponding to the virtual decoration component; and a second determination unit, configured to determine the virtual decoration material represented by the at least one virtual decoration component identifier as the virtual decoration material in the resource loading area.

[0089] Optionally, the device further includes: a second allocation module, configured to allocate global access permissions for the resource loading area to a first virtual character corresponding to the target game account that triggered the transaction instruction after the detection module detects a transaction instruction for the resource loading area, wherein the global access permissions are used to indicate that access to all areas of the resource loading area is permitted; a second detection module, configured to detect a visit request from a second virtual character for the resource loading area, wherein the visit request is used to indicate that the second virtual character requests access to a target area of ​​the resource loading area; a judgment module, configured to determine whether the second virtual character has the global access permissions if the target area is not a specified location; and a processing module, configured to send virtual resources corresponding to the target area to the game client controlling the second virtual character if the second virtual character has the global access permissions, so as to load the virtual resources corresponding to the target area in the target area displayed in the game client of the second virtual character; and to prohibit sending virtual resources corresponding to the target area to the game client controlling the second virtual character if the second virtual character does not have the global access permissions.

[0090] Optionally, the rendering module includes: an initialization module for initializing camera parameters of the virtual camera in the resource loading area, wherein the camera parameters include camera position and camera focal length; an acquisition module for acquiring target control commands for the virtual camera; and a generation module for generating a rendered image of the virtual decoration material in the resource loading area based on the target control commands and the material resources.

[0091] Optionally, the acquisition module includes: a generation unit, configured to generate a surface air wall in the three-dimensional space where the resource loading area is located; a detection unit, configured to detect an initial control command for the virtual camera, wherein the initial control command is used to indicate the movement direction of the virtual camera; a judgment unit, configured to determine whether the movement direction exceeds the wall range of the surface air wall; and a processing unit, configured to output the initial control command as a target control command if the movement direction does not exceed the wall range of the surface air wall; and to generate a target control command based on the farthest wall boundary of the surface air wall if the movement direction exceeds the wall range of the surface air wall.

[0092] Optionally, the processing unit includes: a calculation subunit for calculating the shortest distance between the center point of the virtual camera and each wall of the air wall; and a control subunit for selecting the target wall with the smallest shortest distance, determining the target wall as the wall that collides with the virtual camera, and generating a target control command, wherein the target control command is used to move the center point of the virtual camera to a position coinciding with the target wall, and restrict the orientation range of the virtual camera within the air wall.

[0093] Optionally, the device further includes: a second positioning module, configured to, after the rendering module loads the virtual decoration material in the resource loading area using the material resources, determine the addition position of the target virtual resource in the resource loading area in response to the addition operation of the first virtual character corresponding to the target game account adding the target virtual resource to the resource loading area; and an update module, configured to, if the addition position is a specified position, synchronize the target virtual resource with the game client connected to the game server, so that the game client loads the target virtual resource at the addition position in the resource loading area.

[0094] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0095] Example 3

[0096] This application also provides an electronic device. Figure 7 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 7 As shown, it includes a processor 71, a communication interface 72, a memory 73, and a communication bus 74. The processor 71, the communication interface 72, and the memory 73 communicate with each other through the communication bus 74. The memory 73 is used to store computer programs.

[0097] When the processor 71 executes the program stored in the memory 73, it performs the following steps: locating a resource loading area in the map area of ​​the virtual game, wherein the resource loading area is a map area to be allocated to a game account; searching for virtual decoration materials corresponding to the resource loading area, wherein the resource loading area is pre-configured with the virtual decoration materials; reading the material resources of the virtual decoration materials; and loading the virtual decoration materials in the resource loading area using the material resources.

[0098] Optionally, locating the resource loading area in the map area of ​​the virtual game includes: finding the land identifier of virtual land assets in the virtual game assets; obtaining a three-dimensional frame associated with the land identifier, wherein the three-dimensional frame is used to identify the placement range of the virtual decoration materials; and locating the area where the three-dimensional frame is located in the map area of ​​the virtual game as the resource loading area.

[0099] Optionally, positioning the area where the 3D frame is located as a resource loading area in the map area of ​​the virtual game includes: determining a first center point of the ground surface of the 3D frame, determining a second center point of a specified edge of the ground surface, and determining the coordinate position of a teleportation point in the 3D frame; positioning the first center point as the ground center point of the resource loading area in the map area of ​​the virtual game, positioning the second center point as the entrance position of the resource loading area, and positioning the teleportation point as the initial generation position of a specified item in the virtual game, wherein the specified item is used to teleport the virtual character from the large world map area of ​​the resource loading area to the copy map area of ​​the resource loading area corresponding to the specified item when the item is active.

[0100] Optionally, after loading the virtual decoration material using the material resources in the resource loading area, the method further includes: detecting a transaction instruction for the resource loading area; assigning material editing permissions for the resource loading area and the virtual decoration material to the target game account that triggered the transaction instruction; detecting a material editing instruction triggered by the target game account based on the material editing permissions, and performing at least one of the following operations on the virtual decoration material in the resource loading area: zooming in, zooming out, changing the placement position, or recycling.

[0101] Optionally, finding virtual decoration materials within the resource loading area includes: using a first mapping table to find a three-dimensional frame associated with the resource loading area, wherein the three-dimensional frame is configured with virtual decoration components; determining at least one virtual decoration component identifier corresponding to the virtual decoration component; and determining the virtual decoration material represented by the at least one virtual decoration component identifier as the virtual decoration material within the resource loading area.

[0102] Optionally, after detecting a transaction instruction targeting the resource loading area, the method further includes: assigning global access permission to the resource loading area to a first virtual character corresponding to the target game account that triggered the transaction instruction, wherein the global access permission is used to indicate that access to all areas of the resource loading area is permitted; detecting a visit request from a second virtual character targeting the resource loading area, wherein the visit request is used to indicate that the second virtual character requests access to a target area of ​​the resource loading area; determining whether the second virtual character has the global access permission; if the second virtual character has the global access permission, sending virtual resources corresponding to the target area to the game client controlling the second virtual character, so as to load the virtual resources corresponding to the target area in the target area displayed in the game client of the second virtual character; if the second virtual character does not have the global access permission, prohibiting the sending of virtual resources corresponding to the target area to the game client controlling the second virtual character.

[0103] Optionally, loading the virtual decoration material using the material resources within the resource loading area includes: initializing the camera parameters of the virtual camera in the resource loading area, wherein the camera parameters include camera position and camera focal length; obtaining target control instructions for the virtual camera; and generating a rendered image of the virtual decoration material within the resource loading area based on the target control instructions and the material resources.

[0104] Optionally, obtaining the target control command for the virtual camera includes: generating a surface air wall in the three-dimensional space where the resource loading area is located; detecting an initial control command for the virtual camera, wherein the initial control command is used to indicate the movement direction of the virtual camera; determining whether the movement direction exceeds the wall range of the surface air wall; if the movement direction does not exceed the wall range of the surface air wall, outputting the initial control command as a target control command; if the movement direction exceeds the wall range of the surface air wall, generating a target control command based on the farthest wall boundary of the surface air wall.

[0105] Optionally, generating target control instructions based on the farthest wall boundary of the surface air wall includes: calculating the shortest distance between the center point of the virtual camera and each wall surface of the air wall; selecting the target wall surface with the smallest shortest distance, determining the target wall surface as the wall surface that collides with the virtual camera, and generating target control instructions, wherein the target control instructions are used to move the center point of the virtual camera to a position coinciding with the target wall surface, and restrict the orientation range of the virtual camera within the air wall.

[0106] Optionally, after loading the virtual decoration material in the resource loading area using the material resources, the method further includes: in response to the addition operation of the first virtual character corresponding to the target game account adding the target virtual resource to the resource loading area, determining the addition position of the target virtual resource in the resource loading area; if the addition position is a specified position, synchronizing the target virtual resource with the game client connected to the game server, so that the game client loads the target virtual resource at the addition position in the resource loading area.

[0107] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0108] The communication interface is used for communication between the aforementioned terminal and other devices.

[0109] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0110] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0111] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the game resource loading method described in any of the above embodiments.

[0112] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the game resource loading methods described in the above embodiments.

[0113] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0114] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0115] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0116] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0120] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for loading game resources, characterized in that, include: Locate the resource loading area in the map area of ​​the virtual game, wherein the resource loading area is the map area to be allocated to the game account; Locate the virtual decoration materials corresponding to the resource loading area, wherein the resource loading area is pre-configured with the virtual decoration materials; Read the material resources of the virtual decoration materials; The virtual decoration material is loaded into the resource loading area using the aforementioned material resources; The method further includes, after loading the virtual decoration material into the resource loading area using the material resources, the method further includes: detecting a transaction instruction for the resource loading area; assigning the resource loading area and the virtual decoration material editing permissions to the target game account that triggered the transaction instruction; detecting a material editing instruction triggered by the target game account based on the material editing permissions, and performing at least one of the following operations on the virtual decoration material in the resource loading area: zooming in, zooming out, changing the placement position, or recycling.

2. The method according to claim 1, characterized in that, Locating resource loading areas within the map region of a virtual game includes: Locate the land plot identifier for virtual land assets within the virtual game assets; Obtain a three-dimensional frame associated with the land identifier, wherein the three-dimensional frame is used to identify the display location range of the virtual decoration material; In the map area of ​​the virtual game, the area where the three-dimensional frame is located is positioned as the resource loading area.

3. The method according to claim 2, characterized in that, In the virtual game's map area, defining the area containing the 3D frame as the resource loading area includes: Determine the first center point of the ground surface of the three-dimensional frame, determine the second center point of a specified edge of the ground surface, and determine the coordinate position of the transmission point in the three-dimensional frame; In the virtual game's map area, the first center point is positioned as the ground center point of the resource loading area, the second center point is positioned as the entrance location of the resource loading area, and the teleportation point is positioned as the initial generation location of a designated item in the virtual game. The designated item is used to teleport the virtual character from the large world map area of ​​the resource loading area to the copy map area of ​​the resource loading area corresponding to the designated item when it is active.

4. The method according to claim 1, characterized in that, Locating virtual decoration materials within the resource loading area includes: The first mapping table is used to find the three-dimensional frame associated with the resource loading area, wherein the three-dimensional frame is configured with virtual decoration components; Determine at least one virtual decoration component identifier corresponding to the virtual decoration component; The virtual decoration material represented by the at least one virtual decoration component identifier is determined as the virtual decoration material in the resource loading area.

5. The method according to claim 1, characterized in that, After detecting a transaction instruction targeting the resource loading region, the method further includes: Assign global access permissions to the resource loading area to the first virtual character corresponding to the target game account that triggered the transaction instruction, wherein the global access permissions are used to indicate that all areas of the resource loading area are allowed to be accessed; Detect a visit request from a second virtual character to the resource loading area, wherein the visit request is used to instruct the second virtual character to request access to a target area of ​​the resource loading area; Determine whether the second virtual character has the aforementioned global access permission; If the second virtual character has the global access permission, the virtual resources corresponding to the target area are sent to the game client controlling the second virtual character, so that the virtual resources corresponding to the target area are loaded in the target area displayed in the game client of the second virtual character; if the second virtual character does not have the global access permission, the sending of the virtual resources corresponding to the target area to the game client controlling the second virtual character is prohibited.

6. The method according to claim 1, characterized in that, Loading the virtual decoration material within the resource loading area using the aforementioned material resources includes: Initialize the camera parameters of the virtual camera in the resource loading area, wherein the camera parameters include camera position and camera focal length; Obtain target control commands for the virtual camera; The virtual decoration material is rendered within the resource loading area according to the target control command and the material resources.

7. The method according to claim 6, characterized in that, Obtaining target control commands for the virtual camera includes: A surface air wall is generated in the three-dimensional space where the resource loading area is located. Detect initial control commands for the virtual camera, wherein the initial control commands are used to indicate the movement direction of the virtual camera; Determine whether the moving direction exceeds the wall range of the surface air wall; If the movement direction does not exceed the wall range of the surface air wall, the initial control command is output as a target control command; if the movement direction exceeds the wall range of the surface air wall, a target control command is generated based on the farthest wall boundary of the surface air wall.

8. The method according to claim 7, characterized in that, Generating target control commands based on the farthest wall boundary of the surface air wall includes: Calculate the shortest distance between the center point of the virtual camera and each surface of the air wall; Select the target wall with the shortest distance and determine it as the wall that will collide with the virtual camera. Generate a target control command, wherein the target control command is used to move the center point of the virtual camera to a position that coincides with the target wall and restrict the orientation range of the virtual camera within the virtual wall.

9. The method according to claim 1, characterized in that, After loading the virtual decoration material into the resource loading area using the material resources, the method further includes: In response to the first virtual character corresponding to the target game account adding a target virtual resource to the resource loading area, the addition position of the target virtual resource in the resource loading area is determined; If the added location is a specified location, the target virtual resource is synchronized with the game client connected to the game server, so that the game client loads the target virtual resource at the added location in the resource loading area.

10. A device for loading game resources, characterized in that, include: The first positioning module is used to locate the resource loading area in the map area of ​​the virtual game, wherein the resource loading area is the map area to be allocated to the game account; The search module is used to search for virtual decoration materials corresponding to the resource loading area, wherein the resource loading area is pre-configured with the virtual decoration materials; The reading module is used to read the material resources of the virtual decoration materials; The rendering module is used to load the virtual decoration material into the resource loading area using the material resources; The device further includes: a first detection module, used to detect a transaction instruction for the resource loading area after the rendering module loads the virtual decoration material using the material resources in the resource loading area; a first allocation module, used to allocate the resource loading area and material editing permissions for the virtual decoration material to the target game account that triggers the transaction instruction; and an editing module, used to detect a material editing instruction triggered by the target game account based on the material editing permissions, and perform at least one of the following operations on the virtual decoration material in the resource loading area: zoom in, zoom out, change the placement position, or recycle.

11. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 9 when it is run.

12. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Building processing method and device in virtual scene, electronic equipment and storage medium

    CN113209612A