Method, apparatus, electronic device, and computer storage medium for generating a map
By obtaining the target object attribute information, selecting a matching road model to generate a map, the problem of unchanging maps in the virtual racing environment is solved, the flexibility and diversity of maps are achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202010367925.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-30
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2040-04-30
AI Technical Summary
The map of the existing virtual racing environment remains unchanged and lacks fun and challenging.
By obtaining the attribute information of the target object, selecting a matching road model from the predetermined road model set, generating a map associated with the location of the target object, realizing the flexibility and diversity of the map.
It realizes the flexibility and diversity of map generation, adjusts the difficulty and complexity of maps according to the attributes of the target object, and improves the fun and challenging of the user experience.
Smart Images

Figure CN111617467B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the field of information processing, and more particularly to methods, devices, electronic devices, and computer storage media for generating maps. Background Art
[0002] In applications such as virtual racing environments, the map often remains unchanged every time the application is entered. For users, after getting familiar with a certain map in the virtual racing environment, the unchanging map lacks interest and challenge. Summary of the Invention
[0003] Embodiments of the present disclosure provide methods, devices, electronic devices, and computer storage media for generating maps, which can achieve the matching of road models in the map with the attribute information of the target object, thereby realizing the flexibility and diversification of map generation.
[0004] In a first aspect of the present disclosure, a method for generating a map is provided. The method includes: at a terminal device, obtaining attribute information of a target object, selecting one or more road models from a predetermined set of road models that match the attribute information of the target object, and generating a map associated with the location of the target object based on the selected one or more road models.
[0005] In a second aspect of the present disclosure, a device for generating a map is provided. The device includes: an attribute obtaining module configured to obtain attribute information of a target object, a road model selection module configured to select one or more road models from a predetermined set of road models that match the attribute information of the target object, and a map generation module configured to generate a map associated with the location of the target object based on the selected one or more road models.
[0006] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit and at least one memory. At least one memory is coupled to at least one processing unit and stores instructions for execution by at least one processing unit. The instructions, when executed by at least one processing unit, cause the electronic device to perform any of the steps of the method described in the first aspect of the present disclosure.
[0007] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a machine, the machine is caused to implement any of the steps of the method described in the first aspect of the present disclosure.
[0008] The Summary of the Invention section is provided to introduce, in a simplified form, a selection of concepts that will be further described in the detailed implementation below. The Summary of the Invention section is not intended to identify the key features or essential features of the present disclosure, nor is it intended to limit the scope of the present disclosure. Brief Description of the Drawings
[0009] The above and other objects, features, and advantages of the present disclosure will become more apparent by describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, in which, in the exemplary embodiments of the present disclosure, the same reference numerals generally represent the same components.
[0010] Figure 1 A schematic diagram showing an example of an information processing environment 100 according to an embodiment of the present disclosure;
[0011] Figure 2 A schematic flowchart showing a method 200 for generating a map according to an embodiment of the present disclosure;
[0012] Figure 3 A schematic flowchart showing a method 300 for generating a map according to an embodiment of the present disclosure;
[0013] Figure 4 A schematic flowchart showing a method 400 for updating a map according to an embodiment of the present disclosure;
[0014] Figure 5 A schematic diagram showing an updated map 500 according to an embodiment of the present disclosure;
[0015] Figure 6 A schematic block diagram showing a device 600 for generating a map according to an embodiment of the present disclosure; and
[0016] Figure 7 A schematic block diagram showing an example device 700 that can be used to implement the embodiments of the present disclosure.
[0017] In each of the drawings, the same or corresponding reference numerals represent the same or corresponding parts. Detailed Implementation
[0018] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0019] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise specified, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. There may also be other explicit and implicit definitions hereinafter.
[0020] As described above, for the current virtual racing environment application, each time the application is entered, the scene in the map tends to be unchanged. For users, after getting familiar with a certain map, the unchanging map lacks interest and challenge.
[0021] To at least partially solve one or more of the above problems and other potential problems, example embodiments of the present disclosure propose a solution for generating a map. In this solution, at the terminal device, attribute information of a target object is obtained, one or more road models matching the attribute information of the target object are selected from a predetermined set of road models, and a map associated with the location of the target object is generated based on the selected one or more road models.
[0022] In the above solution, a matching road model is selected based on the attribute information of the target object for generating a map associated with the location of the target object, which can enable the road model in the map to match the attribute of the target object, and the generated map is no longer unchanging, thus achieving flexibility and diversification in map generation.
[0023] Hereinafter, specific examples of this solution will be described in more detail with reference to the drawings.
[0024] Figure 1 A schematic diagram showing an example of an information processing environment 100 according to an embodiment of the present disclosure is shown. The information processing environment 100 includes a terminal device 110, road models 120-1 to 120-3 (collectively referred to as road models 120), a target object 130, and a map 140.
[0025] The terminal device 110 can generate a map associated with the location of the target object based on the road model. In some embodiments, the terminal device 110 can be an electronic device. The terminal device 110 is, for example but not limited to, a mobile phone, a smart phone, a tablet computer, a personal computer, etc.
[0026] The road model 120 may include, but is not limited to, a bend model, a straight road model, a jump platform model, etc. The bend model may include, for example, a U-shaped bend, a right-angle bend, an obtuse-angle bend, an acute-angle bend, an S-shaped bend, an irregular bend, etc. In some embodiments, the road model 120 may be locally stored in the terminal device 110. In other embodiments, the road model 120 may be received by the terminal device 120 from the server.
[0027] The target object 130 may include, but is not limited to, a virtual account, a virtual character, a virtual animal, a virtual vehicle, and so on. The target object 130 may have attribute information. The attribute information includes, but is not limited to, level, type, historical data, and so on. For example, in an embodiment of a virtual racing environment, the target object may include a virtual account or a virtual vehicle, and the attribute information of the target object may include the level, type, etc. of the virtual account or the virtual vehicle. For example, the virtual account may be divided into levels 1-10, or divided into paid or non-paid types. For example, the virtual vehicle may be divided into levels 1-10, or divided into types such as sports cars and family cars. In some embodiments, the attribute information of the target object may be locally stored in the terminal device 110. In other embodiments, the attribute information of the target object may be received by the terminal device 110 from the server.
[0028] The terminal device 110 is configured to obtain the attribute information of the target object, select one or more road models from a predetermined set of road models that match the attribute information of the target object, and generate a map associated with the location of the target object based on the selected one or more road models.
[0029] In the following, it will be combined with Figure 2 to describe in detail the actions performed by the terminal device 110.
[0030] Figure 2 FIG. shows a flowchart of a method 200 for generating a map according to an embodiment of the present disclosure. For example, the method 200 may be executed by a terminal device 110 as shown in Figure 1 It should be understood that the method 200 may also include additional blocks not shown and / or may omit the shown blocks, and the scope of the present disclosure is not limited in this regard.
[0031] At block 202, the terminal device 110 obtains the attribute information of the target object. The target object may include a virtual account or a game object controlled by a game player through the terminal device, such as a virtual vehicle, a virtual character, a virtual animal, etc. The attribute information of the target object may include information such as the level, type, historical data, etc. of the target object. The target object may be divided into, for example, multiple levels. For example, a virtual account or a virtual vehicle may be divided into levels 1 to 10, or levels such as novice, ordinary, expert, etc. The target object may also be divided into multiple types. For example, a virtual account may be divided into a paid account and a free account, and a virtual vehicle may be divided into a sports car, a family car, etc. The historical data may include, for example, but is not limited to, the number of game times of the virtual account, the number of clearance times of the virtual vehicle, etc. Obtaining the attribute information of the target object may include the terminal device 110 obtaining the attribute information of the target object stored locally, or may also include the terminal device 110 requesting from and receiving the attribute information of the target object from the server 120.
[0032] In some embodiments, obtaining the attribute information of the target object may include the terminal device 110 determining whether the game is started, and if it is determined that the game is started, obtaining the attribute information of the target object. For example, if it is determined that a pressing instruction of the game start button is received from the user, it is determined that the game is started. Also for example, if it is determined that the game application is started, it is determined that the game is started.
[0033] At block 204, the terminal device 110 selects one or more road models from the set of predetermined road models that match the attribute information of the target object. The road models may include, but are not limited to, a bend model, a straight road model, a jump platform model, etc. The bend model may include, for example, a U-shaped bend, a right-angle bend, an obtuse-angle bend, an acute-angle bend, an S-shaped bend, an irregular bend, etc. For example, one or more bend models that match the attribute information of the target object may be obtained from the set of predetermined bend models.
[0034] Different attribute information of the target object can match the same or different road models. The attribute information of the target object can match one or more road models. Taking the bend model and three levels of novice, ordinary, and expert as examples, it is illustrated below. For the novice level, it can match, for example, right-angle bends, U-shaped bends, acute-angle bends, and obtuse-angle bends. For the ordinary level, it can match, for example, right-angle bends, U-shaped bends, acute-angle bends, obtuse-angle bends, and irregular bends. For the expert level, it can match, for example, right-angle bends, U-shaped bends, acute-angle bends, obtuse-angle bends, and combined bends. If the level of the target object is the novice level, at least one of the right-angle bends, U-shaped bends, acute-angle bends, and obtuse-angle bends is obtained from a predetermined set of bend models. If the level of the target object is the ordinary level, at least one of the right-angle bends, U-shaped bends, acute-angle bends, obtuse-angle bends, and irregular bends is obtained from a predetermined set of bend models, and so on. It should be understood that the level is only an example of the attribute information, and other attribute information can also be matched with road models, such as type, historical data, etc. For example, the types of virtual accounts can be divided into paid accounts and free accounts. For free accounts, it can match, for example, right-angle bends, U-shaped bends, and obtuse-angle bends. For paid accounts, it can match, for example, right-angle bends, U-shaped bends, acute-angle bends, obtuse-angle bends, S-shaped bends, and irregular bends.
[0035] In some embodiments, selecting one or more road models that match the attribute information of the target object from a predetermined set of road models may include the terminal device 110 selecting one or more road models that match the attribute information from the predetermined set of road models based on the predetermined matching information between the attribute information of the target object and the road models. Taking the bend model and the level of the target object as an example, the predetermined matching information between the level and the bend model may include, but is not limited to, a matching table, as shown in Table 1 below:
[0036] Table 1
[0037] Level Curve Model Novice Right Angle Bend, U - shaped Bend, Acute Angle Bend, Obtuse Angle Bend Ordinary Right Angle Bend, U - shaped Bend, Acute Angle Bend, Obtuse Angle Bend, Irregular Bend Expert Right Angle Bend, U - shaped Bend, Acute Angle Bend, Obtuse Angle Bend, Composite Bend
[0038] At block 206, the terminal device 110 generates a map associated with the location of the target object based on the selected one or more road models. For example, the selected one or more road models are spliced to generate a map associated with the location of the target object. The map may include a game map, a simulation map, etc. Taking the novice level and the bend model as an example, one or more bend models that match the novice level are selected from a predetermined set of bend models, such as right-angle bends, U-shaped bends, and acute-angle bends. Subsequently, the right-angle bends, U-shaped bends, and acute-angle bends can be spliced by straight roads to generate a track map associated with the location of the target object.
[0039] Accordingly, a matching road model is selected based on the attribute information of the target object for generating a map associated with the position of the target object, enabling the road model in the map to match the attribute information of the target object, and making the generated map no longer fixed. For example, the stronger the attribute of the target object (such as the higher the level), the more complex the matching road model and the higher the racing difficulty, thus achieving the flexibility and diversification of map generation.
[0040] In some embodiments, generating a map associated with the position of the target object includes: the terminal device 110 determines the number of road instances based on the attribute information of the target object, and the road instances will be generated based on one or more selected road models, and generates a map associated with the position of the target object based on one or more selected road models and the determined number of road instances. In some embodiments, determining the number of road instances may include the terminal device 110 determining the number of road instances based on the predetermined matching information between the attribute information of the target object and the number of road instances. The predetermined matching information includes, for example, but is not limited to, a matching table.
[0041] In some embodiments, the number of road instances may include the total number of road instances. Taking the bend model and three levels of novice, ordinary, and expert as examples. For example, the total number of bend instances matching the novice level is, for example, 7, the total number of bend instances matching the ordinary level is, for example, 10, and the total number of bend instances matching the expert level is, for example, 14. Taking bends as an example, the matching information between the level of the target object and the total number of bend instances is shown in Table 2 below:
[0042] Table 2
[0043]
[0044] If the level of the target object is novice, then based on one or more selected bend models, 7 bend instances are generated. The 7 bend instances may include, for example, 1 right-angle bend instance, 2 U-shaped bend instances, 3 acute-angle bend instances, and 1 obtuse-angle bend instance. These 7 bend instances are spliced with or without straight road instances to generate a map associated with the position of the target object, such as a race track map. It should be understood that this is only an example, and it may also be other situations, such as 3 right-angle bend instances, 2 U-shaped bend instances, 1 acute-angle bend instance, and 1 obtuse-angle bend instance, etc. For the ordinary and expert levels, the situation is similar and will not be elaborated. Accordingly, it is possible to achieve that the number of road instances in the map matches the attribute information of the target object, for example, the stronger the attribute of the target object (such as the higher the level), the more road instances and the higher the racing difficulty, thus achieving the flexibility and diversification of map generation.
[0045] In some other embodiments, the number of road instances includes the number of road instances that may be associated with a road model. Taking a curve model and three levels of novice, ordinary, and expert as examples for illustration. For example, the number of right-angle bend instances matching the novice level is, for example, 1, the number of U-shaped bend instances is, for example, 1, the number of right-angle bend instances matching the ordinary level is, for example, 2, the number of U-shaped bend instances is, for example, 3, the number of right-angle bend instances matching the expert level is, for example, 3, and the number of U-shaped bend instances is, for example, 6. Taking curves as an example, the matching information between the level of the target object and the number of each curve instance can be as shown in Table 3 below:
[0046] Table 3
[0047] Level Number of Right Angle Bend Instances Number of U - shaped Bend Instances Novice 1 1 Ordinary 2 3 Expert 3 6
[0048] If the level of the target object is novice, for example, if the matching right-angle bend model and U-shaped bend model are selected, then based on the selected right-angle bend model and U-shaped bend model, 1 right-angle bend instance and 1 U-shaped bend instance are generated, and these two instances are spliced to generate a map. For the ordinary and expert levels, the situation is similar and will not be elaborated here. Thus, it is possible to achieve that the number of road instances in the map matches the attribute information of the target object, for example, the stronger the attribute of the target object (such as the higher the level), the more road instances, and the higher the racing difficulty, thereby realizing the flexibility and diversification of map generation.
[0049] Alternatively or additionally, in some embodiments, generating a map associated with the position of the target object includes: The terminal device 110 determines the amount of road guidance information based on the attribute information of the target object, and generates a map associated with the position of the target object based on the selected one or more road models and the determined amount of road guidance information. In some embodiments, determining the amount of road guidance information may include determining the amount of road guidance information based on the predetermined matching information between the attribute information of the target object and the amount of road guidance information.
[0050] Taking the three levels of novice, ordinary, and expert as examples for illustration. For example, the amount of road guidance information matching the novice level is the complete amount of road guidance information, the amount of road guidance information matching the ordinary level is the partial amount of road guidance information, and the amount of road guidance information matching the expert level is the no road guidance information. The matching information between the level and the amount of road guidance information can be as shown in Table 4 below:
[0051] Table 4
[0052] Level Road Guidance Information Volume Novice Complete Ordinary Partial Expert None
[0053] The complete road guidance information amount includes, for example, guiding information prompts at all bend entrances. The partial road guidance information amount includes, for example, guiding information prompts at some bend entrances. The zero road guidance information amount includes, for example, no guiding information prompts at all bend entrances. Thus, it is possible to match the road guidance information amount in the map with the attribute information of the target object. For example, the stronger the attribute of the target object (e.g., the higher the level), the less the road guidance information amount, and the higher the racing difficulty, thereby achieving the flexibility and diversification of map generation.
[0054] Alternatively or additionally, in some embodiments, generating a map associated with the position of a target object includes: the terminal device 110 determines road instance parameters based on the attribute information of the target object, and generates a map associated with the position of the target object based on the selected one or more road models and the determined road instance parameters. The road instance parameters include but are not limited to the width, length, inclination, curvature, etc. of the road instance. For example, the width of the road instance matching the novice level is 17 - 20 meters, the width of the road instance matching the ordinary level is 14 - 16 meters, and the width of the road instance matching the expert level is 12 - 10 meters. Thus, it is possible to match the road instance parameters in the map with the attribute information of the target object. For example, the stronger the attribute of the target object (e.g., the higher the level), the more stringent the road instance parameters, and the higher the racing difficulty, thereby achieving the flexibility and diversification of map generation.
[0055] Alternatively or additionally, in some embodiments, generating a map associated with the position of a target object includes: the terminal device 110 obtains a terrain model selected by the user or set by the system from a predetermined set of terrain models, and generates a map associated with the position of the target object based on the obtained terrain model and the selected one or more road models. The predetermined set of terrain models includes, for example, but is not limited to terrains such as highways, grasslands, mudlands, hillsides, sandy lands, water surfaces, bridges, woods, buildings, and ice and snow. Thus, the terrain selected by the user or set by the system can be combined with the road model matching the attribute information of the target object to generate a map associated with the position of the target object, thereby achieving the flexibility and diversification of map generation.
[0056] Figure 3 FIG. 300 shows a flowchart of a method 300 for generating a map associated with the position of a target object according to an embodiment of the present disclosure. For example, the method 300 may be executed by a terminal device 110 as shown in Figure 1 FIG. It should be understood that the method 300 may further include additional blocks not shown and / or may omit the blocks shown, and the scope of the present disclosure is not limited in this regard.
[0057] At block 302, the terminal device 110 obtains the device attributes of the terminal device 110. The device attributes include, for example, but are not limited to, computing attributes, display attributes, etc. The computing attributes include, for example, but are not limited to, processor performance, memory size, etc. The display attributes include, for example, but are not limited to, display size, display resolution, etc.
[0058] At block 304, the terminal device 110 determines a drawing radius based on the device attributes of the terminal device 110. For example, a reference drawing radius can be set based on reference device attributes. If it is determined that the device attributes of the terminal device 110 are stronger than the reference device attributes, the reference drawing radius is increased as the drawing radius, and if it is determined that the device attributes of the terminal device are weaker than the reference device attributes, the reference drawing radius is decreased as the drawing radius. The amount of the increased or decreased radius can be, for example, based on the difference between the device attributes of the terminal device and the reference device attributes, or can be, for example, a fixed value.
[0059] At block 306, the terminal device 110 generates a map within a first circle centered at the initial position of the target object and having a radius equal to the drawing radius, based on the one or more selected road models.
[0060] Thus, the drawing radius of the map can be determined based on the device attributes of the terminal device, such that the map drawing size is adapted to the terminal device, thereby improving the map drawing efficiency.
[0061] In some embodiments, method 300 may further include: the terminal device 110 determines whether the distance between the current position and the initial position of the target object is greater than or equal to a predetermined distance. If it is determined that the distance between the current position and the initial position of the target object is greater than or equal to the predetermined distance, the map is updated. The predetermined distance includes, for example, but is not limited to, half of the drawing radius. Thus, the map update can be triggered after the position of the target object moves to the trigger point, thereby realizing the expansion of the map.
[0062] Figure 4 A flowchart of a method 400 for updating a map according to an embodiment of the present disclosure is shown. For example, method 400 can be executed by the terminal device 110 as Figure 1 shown. It should be understood that method 400 may further include additional blocks not shown and / or may omit the shown blocks, and the scope of the present disclosure is not limited in this regard.
[0063] At block 402, the terminal device 110 determines an area within a second circle centered at the current position of the target object and having a radius equal to the drawing radius, and that does not overlap with the first circle. As Figure 5 shown, the first circle A is centered at the initial position a and has a radius equal to the drawing radius, and the second circle B is centered at the current position and has a radius equal to the drawing radius. The area within the second circle B that does not overlap with the first circle A is C.
[0064] At block 404, the terminal device 110 randomly extends the current road instance in the map within the determined area, and the current road instance is generated based on one or more selected road models.
[0065] Thereby, it is possible to randomly extend the current road instance only in the newly added map part without updating the entire map, thus achieving map update and expansion with higher efficiency.
[0066] In some embodiments, updating the map further includes: the terminal device 110 smoothly extends the current terrain in the map within the determined area. Thereby, the existing terrain in the map can be utilized for extension, improving the efficiency of map update and expansion.
[0067] Alternatively or additionally, in some embodiments, updating the map further includes: deleting the map part whose distance from the current position in the map is greater than the drawing radius. The map part whose distance from the current position in the map is greater than the drawing radius is, for example Figure 5 the area D in. Since the map part corresponding to the area D is no longer required by the target object, deleting this map part does not affect, for example, the racing or simulation process, but saves memory space. Thereby, it is possible to delete the map part exceeding the drawing radius when triggering an update, saving memory space, thus supporting continuous expansion and update of the map.
[0068] Figure 6 FIG. shows a schematic block diagram of a device 600 for generating a map according to an embodiment of the present disclosure. As Figure 6 shown, the device 600 includes an attribute acquisition module 601 configured to acquire attribute information of a target object; a road model selection module 602 configured to select one or more road models matching the attribute information of the target object from a predetermined set of road models; and a map generation module 603 configured to generate a map associated with the position of the target object based on the selected one or more road models.
[0069] In some embodiments, the map generation module 603 includes: a road instance number determination sub-module (not shown) configured to determine the number of road instances based on the attribute information of the target object, and the road instances will be generated based on the selected one or more road models; and a map generation sub-module (not shown) configured to generate a map associated with the position of the target object based on the selected one or more road models and the determined number of road instances.
[0070] In some embodiments, the map generation module 603 includes: a road guidance information amount determination sub-module (not shown), configured to determine the road guidance information amount based on the attribute information of the target object; and a map generation sub-module (not shown), configured to generate a map associated with the position of the target object based on the selected one or more road models and the determined road guidance information amount.
[0071] In some embodiments, the map generation module 603 includes: a road instance parameter determination sub-module (not shown), configured to determine road instance parameters based on the attribute information of the target object; and a map generation sub-module (not shown), configured to generate a map associated with the position of the target object based on the selected one or more road models and the determined road instance parameters.
[0072] In some embodiments, the map generation module 603 includes: a device attribute acquisition sub-module (not shown), configured to acquire the device attributes of the terminal device; a drawing radius determination sub-module (not shown), configured to determine the drawing radius based on the device attributes of the terminal device; and a map generation sub-module (not shown), configured to generate a map within a first circle centered at the initial position of the target object and having the drawing radius as the radius, based on the selected one or more road models.
[0073] In some embodiments, the apparatus 600 further includes: a map update module 604, configured to determine whether the distance between the current position and the initial position of the target object is greater than or equal to a predetermined distance, and if it is determined that the distance between the current position and the initial position of the target object is greater than or equal to the predetermined distance, update the map.
[0074] In some embodiments, the map update module 604 includes: a region determination sub-module (not shown), configured to determine a region within a second circle centered at the current position and having the drawing radius as the radius and not overlapping with the first circle; and a road instance extension module (not shown), configured to randomly extend the current road instance in the map within the determined region, where the current road instance is generated based on the selected one or more road models.
[0075] In some embodiments, the map update module 604 further includes: a terrain extension sub-module (not shown), configured to smoothly extend the current terrain in the map within the determined region.
[0076] In some embodiments, the map update module 604 includes: a deletion sub-module (not shown), configured to delete the map portion whose distance from the current position in the map is greater than the drawing radius.
[0077] In some embodiments, the predetermined distance includes half of the drawing radius.
[0078] In some embodiments, the road model includes at least one of a straight road model, a curved road model, and a jump platform model.
[0079] Figure 7 FIG. shows a schematic block diagram of an example device 700 that can be used to implement embodiments of the present disclosure. For example, the terminal device 110 shown as Figure 1 shown can be implemented by the device 700. As shown in the figure, the device 700 includes a central processing unit (CPU) 701, which can execute various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0080] Multiple components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, a microphone, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disc, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0081] Each of the processes and processes described above, such as methods 200-400, can be executed by the processing unit 701. For example, in some embodiments, methods 200-400 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the CPU 701, one or more actions of the methods 200-400 described above can be executed.
[0082] The present disclosure can be a method, an apparatus, a system, and / or a computer program product. The computer program product can include a computer-readable storage medium having thereon computer-readable program instructions for performing various aspects of the present disclosure.
[0083] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example—but not limited to—an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device, such as a punch card or raised structures in grooves storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as being a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0084] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0085] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or, alternatively, may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.
[0086] Aspects of the present disclosure are described herein with reference to the flowchart and / or block diagram of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowchart and / or block diagram, and the combinations of blocks in the flowchart and / or block diagram, can be implemented by computer - readable program instructions.
[0087] These computer - readable program instructions can be provided to a processing unit of a general - purpose computer, a special - purpose computer, or other programmable data - processing apparatus to produce a machine such that, when the instructions are executed by the processing unit of the computer or other programmable data - processing apparatus, a device is produced that implements the functions / acts specified in one or more blocks of the flowchart and / or block diagram. These computer - readable program instructions can also be stored in a computer - readable storage medium, which causes a computer, a programmable data - processing apparatus, and / or other devices to operate in a particular manner, so that the computer - readable medium storing the instructions includes a manufacture, which includes instructions for implementing various aspects of the functions / acts specified in one or more blocks of the flowchart and / or block diagram.
[0088] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.
[0089] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of code, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
[0090] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the technical improvement of technologies in the market, or to enable other ordinary skilled artisans in the art to understand the embodiments disclosed herein.
Claims
1. A method for generating a map, comprising: At a terminal device, obtaining attribute information of a target object; Selecting one or more road models from a set of predetermined road models that match the attribute information of the target object; Generating a map associated with the location of the target object based on the selected one or more road models; Wherein generating a map associated with the location of the target object includes: Obtaining device attributes of the terminal device; Determining a drawing radius based on the device attributes of the terminal device, including: In response to the device attributes being stronger than the reference device attributes, increasing the reference drawing radius as the drawing radius; In response to the device attributes being weaker than the reference device attributes, decreasing the reference drawing radius as the drawing radius; and Generating the map within a first circle centered at the initial position of the target object and having a radius equal to the drawing radius based on the selected one or more road models.
2. The method according to claim 1, wherein generating a map associated with the location of the target object includes: Determining the number of road instances to be generated based on the one or more road models selected based on the attribute information of the target object; And Generating a map associated with the location of the target object based on the selected one or more road models and the determined number of road instances.
3. The method according to claim 1 or 2, wherein generating a map associated with the location of the target object includes: Determining the amount of road guidance information based on the attribute information of the target object; And Generating a map associated with the location of the target object based on the selected one or more road models and the determined amount of road guidance information.
4. The method according to claim 1 or 2, wherein generating a map associated with the location of the target object includes: Determining road instance parameters based on the attribute information of the target object; And Generating a map associated with the location of the target object based on the selected one or more road models and the determined road instance parameters.
5. The method according to claim 1, further comprising: Updating the map in response to determining that the distance between the current position and the initial position of the target object is greater than or equal to a predetermined distance.
6. The method according to claim 5, wherein updating the map includes: Determining an area within a second circle centered at the current position and having a radius equal to the drawing radius that does not overlap with the first circle; and Randomly extending current road instances in the map within the determined area, the current road instances being generated based on the selected one or more road models.
7. The method according to claim 6, wherein updating the map further includes: Smoothing the current terrain in the map within the determined area.
8. The method according to claim 5, wherein updating the map includes: Deleting map portions in the map that are at a distance greater than the drawing radius from the current position.
9. The method according to claim 5, wherein the predetermined distance includes half of the drawing radius.
10. The method according to claim 1, wherein the road model includes at least one of a straight road model, a curved road model, and a jump platform model.
11. A device for generating a map, comprising: An attribute acquisition module configured to acquire attribute information of a target object; A road model selection module configured to select one or more road models that match the attribute information of the target object from a predetermined set of road models; A map generation module configured to generate a map associated with the position of the target object based on the selected one or more road models; Wherein the map generation module includes: A device attribute acquisition sub-module configured to acquire device attributes of a terminal device; A drawing radius determination sub-module configured to determine a drawing radius based on the device attributes of the terminal device, including: In response to the device attributes being stronger than the reference device attributes, increasing the reference drawing radius as the drawing radius; In response to the device attributes being weaker than the reference device attributes, decreasing the reference drawing radius as the drawing radius; and A map generation sub-module configured to generate the map within a first circle centered at the initial position of the target object and having a radius equal to the drawing radius based on the selected one or more road models.
12. The device according to claim 11, wherein the map generation module includes: A road instance quantity determination sub-module configured to determine the quantity of road instances based on the attribute information of the target object, and the road instances will be generated based on the selected one or more road models; And A map generation sub-module configured to generate a map associated with the position of the target object based on the selected one or more road models and the determined quantity of the road instances.
13. The device according to claim 11 or 12, wherein the map generation module includes: A road guidance information quantity determination sub-module configured to determine the quantity of road guidance information based on the attribute information of the target object; And A map generation sub-module configured to generate a map associated with the position of the target object based on the selected one or more road models and the determined quantity of the road guidance information.
14. The device according to claim 11 or 12, wherein the map generation module includes: A road instance parameter determination sub-module configured to determine road instance parameters based on the attribute information of the target object; And A map generation sub-module configured to generate a map associated with the position of the target object based on the selected one or more road models and the determined road instance parameters.
15. The device according to claim 11, further comprising: A map update module configured to update the map in response to determining that the distance between the current position and the initial position of the target object is greater than or equal to a predetermined distance.
16. The device according to claim 15, wherein the map update module includes: An area determination sub-module, configured to determine an area within a second circle centered at the current position and with the drawing radius as the radius, and not overlapping with the first circle; and A road instance extension module, configured to randomly extend the current road instance in the map within the determined area, where the current road instance is generated based on the selected one or more road models.
17. The apparatus according to claim 16, wherein the map update module further includes: A terrain extension sub-module, configured to smoothly extend the current terrain in the map within the determined area.
18. The apparatus according to claim 15, wherein the map update module includes: A deletion sub-module, configured to delete a part of the map whose distance from the current position is greater than the drawing radius.
19. In the apparatus according to claim 15, the predetermined distance includes half of the drawing radius.
20. The apparatus according to claim 12, wherein the road model includes at least one of a straight road model, a curved road model, and a jump platform model.
21. An electronic device, comprising: At least one processing unit; And At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions when executed by the at least one processing unit causing the device to perform the steps of the method according to any one of claims 1 to 10.
22. A computer-readable storage medium, having stored thereon a computer program, which when executed by a machine, implements the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Game scene generation method and device, electronic equipment and storage medium
CN109806584A
Game application map switching method and device, storage medium, and electronic device
CN110013670A