Game interface generation method, device, equipment and storage medium
Through automatic graph cutting robot and automatic splicing technology, the problem of low game interface generation efficiency is solved, and efficient graphical user interface generation and resource management are achieved.
Patent Information
- Application Number
- CN202210378727.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-04-12
AI Technical Summary
In the prior art, the game interface generation efficiency is low, and the graph cutting and splicing process is cumbersome, resulting in resource redundancy and slow progress.
The automatic picture cutting robot is used to cut the graphical user interface, generate the result image with identification information, and automatically splice it based on the interface display method of the target game application to reduce manual operations.
It improves the efficiency of game interface generation, reduces manual operation steps, reduces resource redundancy, and improves resource reuse rate and overall production efficiency.
Smart Images

Figure CN114699769B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, apparatus, device and storage medium for generating a game interface. Background Art
[0002] During the process of creating a graphical user interface for a game, the initial interface image is usually created by image creation software (such as Photoshop), and the game creation interface is usually created by game interface creation software (such as Unity). Among them, the output image of the Photoshop software needs to be cut before being processed by the Unity software.
[0003] In the existing technology, image cutting is usually achieved by manual cutting. In addition, since the number of cut images obtained is usually large, manual interface splicing using Unity software requires relatively cumbersome steps. Moreover, manual actions such as cutting and splicing in the existing technology require a lot of work.
[0004] This results in low efficiency in cutting images using the existing method, and also low efficiency in splicing, which in turn leads to low overall efficiency in generating a game graphical user interface. Summary of the Invention
[0005] The purpose of this application is to provide a game interface generation method, device, equipment and storage medium, which can improve the efficiency of generating a graphical user interface in a game.
[0006] The embodiment of the present application is implemented as follows:
[0007] In one aspect of an embodiment of the present application, a method for generating a game interface is provided, comprising:
[0008] Acquire a first graphical user interface, where the first graphical user interface is an interface having multiple layers;
[0009] Performing image slicing processing on the first graphical user interface to obtain at least one result image, where the result image includes identification information, and the identification information is used to represent content information and splicing attribute information of the result image;
[0010] Based on the interface display mode pre-configured in the target game application and the identification information of each result image, at least one result image is spliced to generate a target game interface.
[0011] Optionally, the first graphical user interface includes: interface parameter information and layer parameter information of each layer;
[0012] Before performing image slicing on the first graphical user interface to obtain at least one result image, the method further includes:
[0013] The first graphical user interface, the interface parameter information, and the layer parameter information of each layer are stored in a target queue.
[0014] Optionally, performing image slicing processing on the first graphical user interface to obtain at least one result image, the method further includes:
[0015] Get the update status of the target queue;
[0016] If there is an update in the target queue, image cutting processing is performed according to the first graphical user interface, the interface parameter information, and the layer parameter information of each layer to obtain at least one result image.
[0017] Optionally, performing image slicing processing according to the first graphical user interface, the interface parameter information, and the layer parameter information of each layer to obtain at least one result image includes:
[0018] Based on the interface parameter information, the first graphical user interface is segmented to obtain at least one segmented image;
[0019] Performing format conversion on at least one cut image to obtain at least one result image and content information of the result image, wherein the result image is in an image format that supports image splicing;
[0020] Based on the layer parameter information of each layer, the stitching attribute information of the result image is determined.
[0021] Optionally, based on a preconfigured interface display mode in the target game application and identification information of each result image, stitching the at least one result image to generate a target game interface includes:
[0022] Determining the position and style to be allocated for each result image based on the pre-configured interface display mode in the target game application and the identification information of the result image;
[0023] The result images are spliced according to the positions and styles to be assigned to generate the target game interface.
[0024] Optionally, each result image is spliced according to the position to be assigned and the style to be assigned to generate a target game interface, including:
[0025] Splicing the result images according to the positions to be assigned and the styles to be assigned to obtain a spliced intermediate image;
[0026] In response to the adjustment operation on the spliced intermediate image, the spliced intermediate image is adjusted to generate a target game interface, and the adjustment process includes at least one of the following: position adjustment, level adjustment, mask adjustment, naming adjustment and list adjustment.
[0027] Optionally, the method further includes:
[0028] Configure target links for configurable elements in the target game interface.
[0029] Optionally, before configuring the target link for the configurable element in the target game interface, the method further includes:
[0030] Determine the configurable elements in the target game interface, including interactive controls.
[0031] Optionally, configuring a target link for a configurable element in a target game interface includes associating the interactive control with the target link in response to a configuration operation on the interactive control.
[0032] Optionally, configuring a target link for a configurable element in a target game interface includes associating the interactive control with the target link based on a mapping relationship table between the interactive control and the target link.
[0033] Another aspect of the embodiment of the present application provides a game interface generation device, including: an acquisition module, a cutting module, and a splicing module;
[0034] An acquisition module is used to acquire a first graphical user interface, where the first graphical user interface is an interface having multiple layers;
[0035] a cutting module, configured to perform cutting processing on the first graphical user interface to obtain at least one result image, wherein the result image includes identification information, and the identification information is used to represent content information and splicing attribute information of the result image;
[0036] The splicing module is used to splice at least one result image based on the interface display mode pre-configured in the target game application and the identification information of each result image to generate a target game interface.
[0037] Optionally, the first graphical user interface includes: interface parameter information and layer parameter information of each layer; and an acquisition module is specifically configured to store the first graphical user interface, the interface parameter information and the layer parameter information of each layer into a target queue.
[0038] Optionally, the image cutting module is specifically used to obtain the update status of the target queue; if there is an update in the target queue, the image cutting process is performed according to the first graphical user interface, the interface parameter information and the layer parameter information of each layer to obtain at least one result image.
[0039] Optionally, the cutting module is specifically used to cut the first graphical user interface based on interface parameter information to obtain at least one cut image; perform format conversion on at least one cut image to obtain at least one result image and content information of the result image, and the result image is an image format that supports image splicing; based on the layer parameter information of each layer, determine the splicing attribute information of the result image.
[0040] Optionally, the splicing module is specifically used to determine the position to be assigned and the style to be assigned of each result image based on the interface display mode pre-configured in the target game application and the identification information of the result image; and splice each result image according to the position to be assigned and the style to be assigned to generate the target game interface.
[0041] Optionally, the stitching module is specifically used to stitch each result image according to the position to be assigned and the style to be assigned to obtain a stitched intermediate image; in response to an adjustment operation on the stitched intermediate image, the stitched intermediate image is adjusted to generate a target game interface, and the adjustment processing includes at least one of the following: position adjustment, level adjustment, mask adjustment, naming adjustment and list adjustment.
[0042] Optionally, the device further includes: a configuration module, configured to configure a target link for a configurable element in the target game interface.
[0043] Optionally, the configuration module is further used to determine configurable elements in the target game interface, and the configurable elements include: interactive controls.
[0044] Optionally, the configuration module is specifically configured to associate the interactive control with the target link in response to a configuration operation on the interactive control.
[0045] Optionally, the configuration module is specifically configured to associate the interactive control with the target link based on a mapping relationship table between the interactive control and the target link.
[0046] In another aspect of an embodiment of the present application, a computer device is provided, including: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the above-mentioned game interface generation method are implemented.
[0047] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned game interface generation method are implemented.
[0048] The beneficial effects of the embodiments of the present application include:
[0049] In a game interface generation method, apparatus, device and storage medium provided by an embodiment of the present application, a first graphical user interface can be obtained, and the first graphical user interface is an interface with multiple layers; the first graphical user interface is cut to obtain at least one result image, and the result image includes identification information, and the identification information is used to characterize the content information and splicing attribute information of the result image; based on the pre-configured interface display mode in the target game application and the identification information of each result image, at least one result image is spliced to generate a target game interface. In particular, when cutting, a pre-configured cutting robot can be used to achieve automatic cutting without manual cutting, and in the process of splicing, a target game interface can be determined for a large number of result images based on the identification information of the image, so that the target game interface can be generated more quickly, thereby improving the efficiency of generating the graphical user interface in the game. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 A flowchart of a method for generating a game interface according to an embodiment of the present application;
[0052] Figure 2 Another flowchart of the method for generating a game interface provided in an embodiment of the present application;
[0053] Figure 3 Another flowchart of the method for generating a game interface provided in an embodiment of the present application;
[0054] Figure 4 Another flowchart of the method for generating a game interface provided in an embodiment of the present application;
[0055] Figure 5 A schematic diagram of a pre-configured interface display method in a game provided in an embodiment of the present application;
[0056] Figure 6 Another flowchart of the method for generating a game interface provided in an embodiment of the present application;
[0057] Figure 7 Another flowchart of the method for generating a game interface provided in an embodiment of the present application;
[0058] Figure 8A schematic diagram of the structure of a game interface generation device provided in an embodiment of the present application;
[0059] Figure 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0061] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0062] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0063] In the description of this application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0064] It should be noted that the current common interface production method in Unity engine game development projects is that the interface production staff first create renderings in Photoshop. After the renderings meet the requirements, they cut out each layer and then hand it over to other relevant staff to manually piece together the layers in the form of prefabricated parts in the Unity engine, and finally piece together an interface that can be used by the program.
[0065] In the prior art, image cutting is a tedious task for interface designers. It often results in missing, incorrect, or over-cut images, requiring re-cutting, resulting in a significant amount of rework. Furthermore, interface assembly is time-consuming and laborious. Building an interface from scratch in Unity based solely on provided renderings and resources is extremely cumbersome. Manually modifying image position, width, and text alignment, font size, and color can easily lead to missing details in complex interfaces, necessitating subsequent rework. Furthermore, resource reuse is low. For games comprised of numerous interactive interfaces, manually controlling resource reuse is cumbersome. When importing resources and assembling interfaces, it's difficult to determine whether a resource already exists in the game and whether to use a new one, leading to resource redundancy. This production method is inefficient when the number of interfaces becomes large, resulting in a lengthy production process and a poor resource reuse strategy. Over time, this leads to slow progress, redundant resources, and reduced performance.
[0066] It should be noted that the execution subject of the game interface generation method provided in the embodiment of the present application can be any computer device, and when executing different steps of the method, they can be completed in sequence by different computers respectively. Among them, the computer device can be specifically an electronic device such as a computer, a mobile phone, a tablet computer, a special development device, etc., and no specific limitation is made here.
[0067] The following is a detailed explanation of the specific implementation process of the game interface generation method provided in the embodiment of the present application.
[0068] Figure 1 For a flow chart of the method for generating a game interface provided in this embodiment of the application, please refer to Figure 1 , a game interface generation method, comprising:
[0069] S110: Acquire a first graphical user interface.
[0070] The first graphical user interface is an interface with multiple layers.
[0071] Optionally, the first graphical user interface may be an image exported from other application software, for example, it may be exported from Photoshop software, for example, it may be an image in psd format, or it may be software in other required formats, which is not specifically limited here.
[0072] S120: Perform image slicing processing on the first graphical user interface to obtain at least one result image.
[0073] The result image includes identification information, and the identification information is used to represent content information and splicing attribute information of the result image.
[0074] Optionally, a pre-configured automatic image cutting robot may be used to perform image cutting on the first graphical user interface, wherein the automatic image cutting robot may be a program software pre-set in a computer device, and image cutting refers to performing layer cutting on the first graphical user interface comprising multiple layers to obtain an image under each layer.
[0075] Optionally, each result image may carry corresponding identification information when generated. The representation information may be recorded in the form of the result image name or a name suffix, etc. The identification information may include content information and splicing attribute information of the result image.
[0076] Among them, the content information can specifically include attributes such as the size, pixels, color, transparency and specific content of the result image. The specific content of the content information can be set according to actual needs. This is only an example and is not specifically limited. The stitching attribute information can be the relevant attributes of the result image when the stitching step is subsequently performed, such as type attributes, style attributes, etc., which are not specifically limited here.
[0077] S130: Based on the interface display mode pre-configured in the target game application and the identification information of each result image, splicing the at least one result image to generate a target game interface.
[0078] Optionally, the interface display mode pre-configured in the target game application can be a display mode pre-configured based on actual needs, such as: three-grid display, nine-grid display or regular display, etc., which can be specifically selected according to the actual needs of the target game application and is not limited here.
[0079] Optionally, after obtaining multiple result images, each result image can be spliced in sequence. During the splicing process, how to splice each result image can be determined based on the pre-configured interface display method in the target game application and the identification information of each result image. After determining the corresponding splicing method, each result image is spliced according to the splicing method. After each result image is spliced, the target game interface can be generated, which can be the graphical user interface displayed in the game.
[0080] In a method for generating a game interface provided by an embodiment of the present application, a first graphical user interface can be obtained, wherein the first graphical user interface is an interface having multiple layers; the first graphical user interface is subjected to a cutting process to obtain at least one result image, wherein the result image includes identification information, and the identification information is used to characterize the content information and splicing attribute information of the result image; based on the pre-configured interface display mode in the target game application and the identification information of each result image, the at least one result image is spliced to generate a target game interface. In particular, when performing the cutting process, a pre-configured cutting robot can be used to realize automatic cutting without manual cutting, and in the process of splicing, a target game interface can be determined for a large number of result images based on the identification information of the image, so that the target game interface can be generated more quickly, thereby improving the efficiency of generating the graphical user interface in the game.
[0081] Moreover, when there are multiple images with the same representation information in the result image, only the first image obtained can be stored and used for stitching during the stitching process, and the other images do not need to be stored or processed, thereby reducing the redundancy of storage resources and computing resources.
[0082] Optionally, the first graphical user interface includes: interface parameter information and layer parameter information of each layer; before performing image slicing on the first graphical user interface to obtain at least one result image, the method also includes: storing the first graphical user interface, interface parameter information and layer parameter information of each layer in a target queue.
[0083] The interface parameter information may be overall parameter information of the first graphical user interface, such as the number of layers included in the image, the size of the image, etc., and may be set accordingly based on actual needs, without limitation thereto. The layer parameter information of each layer may specifically be related properties of the layer, such as the size, transparency, and position of the layer within the entire image, and may also be set accordingly based on actual needs, without limitation thereto.
[0084] Optionally, when producing the first graphical user interface, corresponding settings may be made according to actual application requirements. For example, if Photoshop is used to produce the first graphical user interface and Unity is used to produce the subsequent splicing process, the following settings may be made based on actual requirements when producing the first graphical user interface:
[0085] First, you can determine the relationship between PSD files (an engineering image format editable by Photoshop) and images displayable in Unity. For example, a pixel unit in PSD corresponds to a unit of width and height of a UI (User Interface) element in the UGUI (a type of graphical user interface that can be edited and displayed in Unity). If you draw a 100×100 pixel image in Photoshop, it will be converted to a 100×100 width and height image in the UGUI. For example, in PSD, you can set the width and height of an interface to 2340×1080, and the canvas setting is also 2340×1080 pixels, and use this as the basis for designing the UI interface.
[0086] In addition, the layer arrangement in PSD is similar to the view hierarchy in Unity. The difference is that in UGUI, the lower elements are displayed at the top, while in PSD, the upper elements are displayed at the top. When setting, you can make corresponding conversion annotations.
[0087] Optionally, in order to more quickly implement subsequent image cutting and splicing work, the first graphical user interface can be specially named, for example: words and numbers are separated by "_", and should not be written consecutively. Letters and numbers representing different contents can also be separated by this symbol, for example: names and colors can also be separated by "_"; uniformly use the same language for naming; corresponding identifiers can be added for image types that require special processing later.
[0088] An optional naming method is as follows:
[0089] Image function_layer properties_image name_layer color_layer color+transparency=function suffix.
[0090] Among them, the image function can specifically be a functional resource, that is, a picture resource containing a certain module. Since the picture resources need to be packaged into atlases in Unity development, in order to avoid excessive references to the atlas and reduce memory pressure, the pictures of each function can be separated as much as possible.
[0091] The layer attributes may be of a specific type, such as an image type or a text type, etc., and may be recorded using different identifiers. For example, if it is an image type, it is identified as "img"; if it is a text type, it is identified as "txt".
[0092] The layer color + transparency can specifically record the specific color and transparency of the image in the form of letters or numbers. Since there may be related software that does not support color modification during subsequent processing, the color can be fixed by naming to prevent color loss during the processing.
[0093] =The function suffix can be used to distinguish which resources are needed and which are not. For example, the function suffix can be as follows:
[0094] (1) = png
[0095] When a layer ends with =png, the current layer can be processed as an image resource, cut and converted into a UGUI view.
[0096] (2) = text
[0097] When a layer ends with =png, the current layer can be processed as text and converted into UGUI text.
[0098] (3)=show
[0099] Since there may be some special effects and model-related content in the design of the first graphical user interface, which does not need to be converted or cut, you can add this suffix to let the program skip these layers when processing.
[0100] (4)_group
[0101] When splicing certain interfaces, there will be a large number of identical elements, but in fact only one is needed to complete operations such as cutting pictures. Therefore, in order to improve efficiency, the same layers can be merged and only one is retained.
[0102] (5)_old
[0103] If the interface previously reused images that were stitched together in other processes, add the _old identifier after the layer, and the annotation image should be marked with the identifier of the specific interface that was previously reused for subsequent processing.
[0104] Optionally, in addition to the above-mentioned naming types, other types of naming methods may be used. For example, for common images (common images refer to image resources that may be used in various interfaces), the naming format may also be: common image (common)_layer attribute_image name.
[0105] For example, if you want to use a general triangle image, you can name it:
[0106] common_img_common_hud_sanjiao.
[0107] Optionally, in actual needs, the naming format can also be abbreviated for easy recording.
[0108] Optionally, in the process of performing the above naming, a pre-configured naming tool may be used to quickly name the layers, and a corresponding naming result may be obtained after inputting the corresponding layer information.
[0109] For example, suppose there is a newly added image file named xinzeng2 on the layer. The naming tool will name it as:
[0110] Connection_img_xincheng2_12FFCF98.
[0111] Among them, 12FFCF represents the hexadecimal of RGB (that is, the image color), and 98 represents 98% transparency.
[0112] In addition, for text, since text does not require operations such as cutting pictures, the name of the text is automatically named by the naming tool starting from 1 and increasing.
[0113] For example: Connection_txt_2_12FFCF98.
[0114] When using the naming tool for automatic naming, you can choose not to perform automatic naming for layers in the above special formats. The specific reasons are as follows:
[0115] (1) Ending with =png or =text: Since these layers have already been named, they will be skipped.
[0116] (2) = show: Because it is a special effect, no image cutting is required, so it is skipped.
[0117] (3)_old: The image is considered old and will not be processed.
[0118] (4)_group: Because _group is added manually, it does not need to be processed.
[0119] (5) The layer name contains common and some abbreviations representing common images.
[0120] (6) represents some public library components.
[0121] Optionally, when adding the naming suffix as described above, a pre-set tool may be used for processing. The specific processing method may be set according to actual needs and is not limited here.
[0122] It should be noted that before providing the first graphical user interface to Unity for cutting processing, it is necessary to use a pre-set inspection tool to detect it, for example: the file name cannot contain spaces or symbols such as &; the file name that does not end with =png or =text or =show is recorded; the file size cannot be 0; the layer with a fill rate of 0 and a transparency of 0 is recorded; only English, numbers and underscores are allowed in the layer; the name cannot start with an underscore; the text content cannot be empty.
[0123] It should be noted that the above-mentioned automatic naming tool, naming suffix tool, and inspection tool can all be related script programs pre-set in Photoshop according to actual needs. They can be set specifically according to actual layer requirements and are not limited here.
[0124] Optionally, after the above naming is performed, the first graphical user interface can be determined. The above related naming content is the interface parameter information of the first graphical user interface and the layer parameter information of each layer.
[0125] Optionally, after determining the first graphical user interface, the first graphical user interface, the interface parameter information, and the layer parameter information of each layer can be stored in a target queue. The target queue can be a pre-set queue specifically used to store graphical user interface information. Whenever a new first graphical user interface is generated, the interface can be stored in the target queue.
[0126] The following is a detailed explanation of the specific implementation process of cutting pictures based on the target queue in the game interface generation method provided in the embodiment of the present application.
[0127] Figure 2 For another flowchart of the method for generating a game interface provided in this embodiment of the present application, please refer to Figure 2 , performing image slicing processing on the first graphical user interface to obtain at least one result image, the method further comprising:
[0128] S210: Obtain the update status of the target queue.
[0129] Optionally, the method can be implemented by the game interface production software of the computer device (such as Unity), which can monitor the target queue in real time and obtain the update status of the target queue. When a new first graphical user interface is added to the target queue, it can be determined that there is an update to the target queue.
[0130] S220: If there is an update in the target queue, perform image cutting processing according to the first graphical user interface, the interface parameter information, and the layer parameter information of each layer to obtain at least one result image.
[0131] Optionally, after determining that there is an update in the target queue, image cutting processing may be performed to obtain a corresponding result image.
[0132] In the process of cutting the image, the first graphical user interface can be cut according to the corresponding layers to obtain the result image corresponding to each layer.
[0133] In the game interface generation method provided in the embodiment of the present application, the update status of the target queue can be obtained; if the target queue has been updated, image slicing processing is performed based on the first graphical user interface, interface parameter information, and layer parameter information of each layer to obtain at least one result image. By obtaining the update status of the target queue, it is possible to more accurately and quickly determine whether a new first graphical user interface has been generated, thereby enabling rapid acquisition of the first graphical user interface and improving processing efficiency.
[0134] The following is a detailed explanation of another specific implementation process of the game interface generation method provided in the embodiment of the present application.
[0135] Figure 3 For another flowchart of the method for generating a game interface provided in this embodiment of the present application, please refer to Figure 3 , performing image cutting processing according to the first graphical user interface, the interface parameter information, and the layer parameter information of each layer to obtain at least one result image, including:
[0136] S310: Slice the first graphical user interface based on the interface parameter information to obtain at least one sliced image.
[0137] Optionally, the first graphical user interface can be segmented based on the interface parameter information. For example, the number of layers in the interface and the corresponding position of each layer can be determined based on the interface parameter information, and a pre-configured automatic image segmentation robot can be used to segment the interface image, dividing the first graphical user interface into at least one segmented image. Each segmented image can be the entirety of a layer in the graphical user interface or a portion of a layer, without specific limitation, and can be segmented according to specific needs.
[0138] S320: Perform format conversion on at least one cut image to obtain at least one result image and content information of the result image.
[0139] The result image is in an image format that supports image stitching.
[0140] Optionally, the cut image obtained after cutting is still an image in a format suitable for image production software (such as Photoshop). Therefore, after obtaining the cut image, the image format can be converted to obtain the angle information of the game interface production software (such as Unity), etc., so as to determine the result image corresponding to each cut image. After determining the result image, the content information of the result image can be determined.
[0141] S330: Determine stitching attribute information of the result image based on the layer parameter information of each layer.
[0142] Optionally, the stitching attribute information of the result image can be determined based on the layer parameter information of each layer. The stitching attribute information can be specifically determined based on the naming of each layer. Based on different naming methods, the setting method will be different in subsequent stitching work. Therefore, when determining the stitching attributes of the result image, each result image can also be stored according to the corresponding naming method as the stitching attribute information of the result image.
[0143] Optionally, when using an automatic image cutting robot for cutting, the target queue can be a folder. The automatic image cutting robot can set a timer, for example, to update the SVN (subversion, an open source version control system) of the folder every 5 seconds. According to the relevant information provided by SVN, all new / modified files in this update can be obtained. If the file ends with .psd, it will be added to the subsequent PSD list that needs to be cut as the first graphical user interface to be cut.
[0144] Optionally, during the process of cutting image detection, all cutting results of the first graphical user interface can be detected at regular preset time intervals, such as 10 seconds. If it is determined that a certain cutting result does not exist in the target queue for cutting, the cutting image corresponding to the cutting result can be added to the target queue for cutting.
[0145] In the process of cutting pictures, you can process the PSD files in the PSD list that need to be cut one by one. You can use the Python scripting language to execute a one-click renaming script with code. This script can be similar to the aforementioned naming tool and can perform bottom-line processing to prevent errors. You can also use the Python scripting language to execute the Psd2UnityPro-Digest.jsxbin script (for cutting pictures) with code; use the Python scripting language to execute the PSD to Unity angle and other information.jsx script (for format conversion) with code; since common types of pictures already exist in the project, the names of the output pictures are directly compared. For example, if the picture contains a common related string, the picture can be deleted to prevent picture redundancy. When generating the result image, you can generate an HTML file, which will mark each picture information (content information) and style (splicing attribute information), and then obtain the corresponding result image to complete the cutting.
[0146] The game interface generation method provided in the embodiment of the present application can specifically segment the first graphical user interface based on interface parameter information to obtain at least one segmented image; perform format conversion on the at least one segmented image to obtain at least one result image and content information of the result image; and determine the splicing attribute information of the result image based on the layer parameter information of each layer. The segmentation of the first graphical user interface, the format conversion of the at least one segmented image, and the determination of the splicing attribute information of the result image can all be implemented using a pre-set automatic segmentation robot, thereby improving the efficiency of segmentation, avoiding the tedious steps of manual operation, and improving the accuracy of segmentation.
[0147] The following is another specific implementation process of the game interface generation method provided in the embodiment of the present application.
[0148] Figure 4 For another flowchart of the method for generating a game interface provided in this embodiment of the present application, please refer to Figure 4 , based on the interface display mode pre-configured in the target game application and the identification information of each result image, stitching at least one result image to generate a target game interface, including:
[0149] S410: Determine the position and style to be allocated of each result image based on the interface display mode pre-configured in the target game application and the identification information of the result image.
[0150] Optionally, the specific type of the target game interface can be determined based on the interface display method pre-configured in the target game application, for example: a three-grid interface, a nine-grid interface or a regular interface, etc.; wherein, the three-grid interface and the nine-grid interface can be images in which some positions are usually fixed in the game interface, then the images in these positions and the images that often need to change positions can be set separately, and can usually be divided into three areas or nine areas, corresponding to the three-grid and nine-grid, accordingly, the regular interface can be a normally set interface without pre-set area division.
[0151] Optionally, splicing attribute information of each result image may be determined based on identification information of the result image, and the splicing attribute information may be used to indicate the area in the interface to which the result image is specifically used for splicing.
[0152] After determining the specific type of the target game interface, the position to be allocated and the style to be allocated of the result image can be determined based on the splicing attribute information, wherein the position to be allocated can be the position where the result image is required to be set in the target game interface, and the style to be allocated can be the style of the result image in the target game interface, such as: the specific angle direction, whether size stretching is required, etc., which are not specifically restricted here.
[0153] S420: performing splicing processing on the result images according to the positions to be allocated and the styles to be allocated to generate a target game interface.
[0154] Optionally, after determining the above-mentioned positions to be allocated and styles to be allocated, each result image can be spliced according to the positions to be allocated and styles to be allocated to generate a target game interface, which can be a graphical user interface displayed in the game.
[0155] In the game interface generation method provided in the embodiment of the present application, based on the interface display mode pre-configured in the target game application and the identification information of the result images, the position and style to be assigned to each result image can be determined, and each result image can be spliced according to the position and style to be assigned to generate the target game interface. The splicing method described above can improve the splicing processing efficiency, thereby improving the efficiency of generating the graphical user interface in the game.
[0156] The following specifically explains the display methods of the three-grid and nine-grid format interfaces provided in the embodiments of the present application.
[0157] Figure 5 For a schematic diagram of the interface display mode pre-configured in the game provided in the embodiment of the present application, please refer to Figure 5 , Figure 5The a on the left side is a three-grid interface; the b on the right side is a nine-grid interface. The specific division ratio can be set according to actual needs and is not specifically limited here.
[0158] It's important to note that during game development, images often share many identical pixels, such as basemaps and progress bars. The typical solution is to create a smaller image, then set the viewport to partial mode in Unity and copy the pixels in the middle using a three-panel or nine-panel layout. This replaces the original large image, reducing project resource pressure.
[0159] The following is a detailed explanation of another specific implementation process of the game interface generation method provided in the embodiment of the present application.
[0160] Figure 6 For another flowchart of the method for generating a game interface provided in this embodiment of the present application, please refer to Figure 6 , stitching the result images according to the positions and styles to be assigned to generate the target game interface, including:
[0161] S610: performing stitching processing on the result images according to the positions to be assigned and the styles to be assigned to obtain a stitched intermediate image.
[0162] Optionally, after the result images are stitched together in the above-mentioned stitching manner, the obtained result may be used as a stitched intermediate image.
[0163] S620: In response to the adjustment operation on the spliced intermediate image, perform adjustment processing on the spliced intermediate image to generate a target game interface.
[0164] The adjustment process includes at least one of the following: position adjustment, level adjustment, mask adjustment, naming adjustment, and list adjustment.
[0165] Optionally, after determining the stitched intermediate image, adjustment processing can be performed based on an adjustment operation, wherein the adjustment operation can specifically be an operation input by the user. In the adjustment processing, position adjustment can be adjusting the position of one of the images, layer adjustment can be adjusting the upper and lower layers of multiple images, mask adjustment can be adjusting other factors in the image that have a mask relationship, such as transparency, etc., naming adjustment can be adjusting the name of the corresponding image, and list adjustment can be adjusting based on the location where the image is stored. The above are only some optional examples. In actual practice, settings can be selected according to actual needs, and are not limited to this.
[0166] It should be noted that during the stitching process, the result images required under different interface types can be stored in different folders. For example, three-grid cut images and nine-grid cut images can be stored in special cut image folders and distinguished by underscores 3 and 9.
[0167] In the process of generating stitching results, you can operate based on some pre-existing functions in the Unity software. For example, you can use the "one-click psd to Ugui interface" function to generate a basic UI interface, and then further process it to summarize and organize each result image. After the organization is completed, you can delete and organize some redundant layers that have been converted, such as old and group ending layers; then you can rename and adjust them, such as layer masking, list organization, position sliding area, etc.
[0168] Optionally, after the target game interface is generated, all used result images may be stored according to certain preset rules. For example, images of the same type may be stored in a unified folder for preservation.
[0169] The following is a detailed explanation of another specific implementation process of the game interface generation method provided in the embodiment of the present application.
[0170] Figure 7 For another flowchart of the method for generating a game interface provided in this embodiment of the present application, please refer to Figure 7 , the method further comprises:
[0171] S720: Configure a target link for a configurable element in the target game interface.
[0172] Optionally, after determining the target game interface, the game interface is a simple display interface and cannot realize the human-computer interaction function. Therefore, it is necessary to configure a target link for the configurable elements in the target game interface. The target link can be a link to open other related interfaces or a link to perform a certain operation. There is no specific restriction here, and any link that can realize the human-computer interaction function will be sufficient.
[0173] Optionally, after the corresponding target link is determined, the configurable element may be stored in an interactive control library.
[0174] For example, if the configurable element is an interactive control, the stored interactive control can be called from the interactive control library after splicing, thereby saving configuration time.
[0175] Based on the above approach, the workload of subsequent manual processing can be reduced, and the processability of configurable elements and the reusability of underlying codes can also be enhanced.
[0176] Optionally, before configuring the target link for the configurable element in the target game interface, the method further includes:
[0177] S710: Determine configurable elements in the target game interface.
[0178] Among them, configurable elements include: interactive controls.
[0179] Alternatively, the interactive control may be specifically one of the icons. The interactive control may be determined based on the classification of the images. During the folder classification process, the icons that may serve as interactive controls may be stored in the same folder, and the configurable elements in the target game interface may be determined during further processing.
[0180] Optionally, configuring a target link for a configurable element in a target game interface includes: associating the interactive control with the target link in response to a configuration operation on the interactive control; or associating the interactive control with the target link based on a mapping relationship table between the interactive control and the target link.
[0181] The process of configuring the target link may be in response to the user's configuration of the interactive control or based on a mapping relationship table between the interactive control and the target link, wherein the mapping relationship table between the interactive control and the target link may be a pre-set mapping table.
[0182] Optionally, during the configuration process, the relevant content in the file (the file in which the aforementioned pictures are saved) can be parsed, and relevant records of the processing can also be stored in these files. For example, when certain fonts or images are bolded or otherwise processed during the processing, corresponding settings can be made based on the parsed results.
[0183] The following describes the devices, equipment, storage media, etc. corresponding to the game interface generation method provided by this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0184] Figure 8 For a structural diagram of the game interface generation device provided in the embodiment of the present application, please refer to Figure 8 , the game interface generating device includes: an acquisition module 810, a cutting module 820, and a splicing module 830;
[0185] An acquisition module 810 is configured to acquire a first graphical user interface, where the first graphical user interface is an interface having multiple layers;
[0186] The image cutting module 820 is configured to perform image cutting processing on the first graphical user interface to obtain at least one result image, where the result image includes identification information, and the identification information is used to represent content information and splicing attribute information of the result image;
[0187] The splicing module 830 is configured to splice at least one result image based on the interface display mode pre-configured in the target game application and identification information of each result image to generate a target game interface.
[0188] Optionally, the first graphical user interface includes: interface parameter information and layer parameter information of each layer; the acquisition module 810 is specifically used to store the first graphical user interface, the interface parameter information and the layer parameter information of each layer into the target queue.
[0189] Optionally, the image cutting module 820 is specifically used to obtain the update status of the target queue; if the target queue is updated, the image cutting process is performed according to the first graphical user interface, interface parameter information and layer parameter information of each layer to obtain at least one result image.
[0190] Optionally, the cutting module 820 is specifically used to cut the first graphical user interface based on the interface parameter information to obtain at least one cut image; perform format conversion on at least one cut image to obtain at least one result image and content information of the result image, where the result image is in an image format that supports image splicing; and determine the splicing attribute information of the result image based on the layer parameter information of each layer.
[0191] Optionally, the splicing module 830 is specifically used to determine the position to be assigned and the style to be assigned of each result image based on the interface display mode pre-configured in the target game application and the identification information of the result image; and splice each result image according to the position to be assigned and the style to be assigned to generate the target game interface.
[0192] Optionally, the stitching module 830 is specifically used to stitch each result image according to the position to be assigned and the style to be assigned to obtain a stitched intermediate image; in response to an adjustment operation on the stitched intermediate image, the stitched intermediate image is adjusted to generate a target game interface, and the adjustment processing includes at least one of the following: position adjustment, level adjustment, mask adjustment, naming adjustment and list adjustment.
[0193] Optionally, the device further includes: a configuration module 840, configured to configure a target link for a configurable element in the target game interface.
[0194] Optionally, the configuration module 840 is further configured to determine configurable elements in the target game interface, where the configurable elements include interactive controls.
[0195] Optionally, the configuration module 840 is specifically configured to associate the interactive control with a target link in response to a configuration operation on the interactive control.
[0196] Optionally, the configuration module 840 is specifically configured to associate the interactive control with the target link based on a mapping relationship table between the interactive control and the target link.
[0197] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0198] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0199] Figure 9 For a schematic diagram of the computer device provided in this application embodiment, please refer to Figure 9 The computer device includes: a memory 910 and a processor 920. The memory 910 stores a computer program that can be run on the processor 920. When the processor 920 executes the computer program, the steps of the above-mentioned game interface generation method are implemented.
[0200] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned game interface generation method are implemented.
[0201] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0202] Units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0203] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional units.
[0204] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0205] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited to them. Any changes or substitutions that can be easily conceived by any person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0206] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for generating a game interface, characterized in that: include: Acquire a first graphical user interface, where the first graphical user interface is an interface having multiple layers; Performing image slicing processing on the first graphical user interface to obtain at least one result image, wherein the result image includes identification information, and the identification information is used to represent content information and splicing attribute information of the result image; Based on the interface display mode preconfigured in the target game application and the identification information of each result image, the at least one result image is spliced to generate a target game interface, where the interface display mode is a three-grid display, a nine-grid display, or a regular display; The performing image slicing processing on the first graphical user interface to obtain at least one result image includes: Slicing the first graphical user interface based on the interface parameter information to obtain at least one sliced image, wherein the interface parameter information is overall parameter information of the first graphical user interface, including the number of layers and the size of the image; Performing format conversion on at least one of the cut images to obtain at least one result image and content information of the result image, wherein the result image is in an image format that supports image splicing; Based on the layer parameter information of each layer, the stitching attribute information of the result image is determined. The layer parameter information is the relevant attributes of the layer, including the size, transparency and position of the layer in the entire image.
2. The game interface generation method according to claim 1, wherein: The first graphical user interface includes: interface parameter information and layer parameter information of each layer; Before performing image slicing processing on the first graphical user interface to obtain at least one result image, the method further includes: The first graphical user interface, the interface parameter information, and the layer parameter information of each layer are stored in a target queue.
3. The game interface generation method according to claim 2, wherein: The method further comprises: performing image slicing processing on the first graphical user interface to obtain at least one result image; Obtaining the update status of the target queue; If there is an update in the target queue, image cutting processing is performed according to the first graphical user interface, the interface parameter information, and the layer parameter information of each layer to obtain at least one result image.
4. The method for generating a game interface according to claim 1, wherein: The step of splicing the at least one result image based on the interface display mode pre-configured in the target game application and the identification information of each result image to generate a target game interface includes: Determining a position and a style to be allocated to each result image based on a preconfigured interface display mode in the target game application and identification information of the result image; The result images are spliced according to the positions to be assigned and the styles to be assigned to generate the target game interface.
5. The game interface generation method according to claim 4, wherein: The step of splicing the result images according to the positions to be allocated and the styles to be allocated to generate the target game interface includes: performing a stitching process on the result images according to the positions to be assigned and the styles to be assigned to obtain a stitched intermediate image; In response to the adjustment operation on the spliced intermediate image, the spliced intermediate image is adjusted to generate the target game interface, and the adjustment processing includes at least one of the following: position adjustment, level adjustment, mask adjustment, naming adjustment and list adjustment.
6. The method for generating a game interface according to claim 1, wherein: The method further comprises: Configure a target link for a configurable element in the target game interface.
7. The method for generating a game interface according to claim 6, wherein: Before configuring a target link for a configurable element in the target game interface, the method further includes: Determine configurable elements in the target game interface, where the configurable elements include interactive controls.
8. The game interface generation method according to claim 7, wherein: Configuring a target link for a configurable element in the target game interface includes: In response to a configuration operation on the interactive control, the interactive control is associated with a target link.
9. The method for generating a game interface according to claim 7, wherein: Configuring a target link for a configurable element in the target game interface includes: Based on the mapping relationship table between interactive controls and target links, the interactive controls are associated with the target links.
10. A game interface generating device, characterized in that: include: Acquisition module, image cutting module, and splicing module; The acquisition module is configured to acquire a first graphical user interface, where the first graphical user interface is an interface having multiple layers; The image cutting module is configured to perform image cutting processing on the first graphical user interface to obtain at least one result image, wherein the result image includes identification information, and the identification information is used to represent content information and splicing attribute information of the result image; The splicing module is configured to splice the at least one result image based on a preconfigured interface display mode in the target game application and identification information of each result image to generate a target game interface, wherein the interface display mode is a three-grid display, a nine-grid display, or a conventional display; The image slicing module is specifically configured to slice the first graphical user interface based on interface parameter information to obtain at least one sliced image, wherein the interface parameter information is overall parameter information of the first graphical user interface, including the number of layers and the size of the image; Performing format conversion on at least one of the cut images to obtain at least one result image and content information of the result image, wherein the result image is in an image format that supports image splicing; determining splicing attribute information of the result image based on layer parameter information of each layer, wherein the layer parameter information is related attributes of the layer, including the size, transparency, and position of the layer in the entire image.
11. A computer device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the game interface generation method described in any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the steps of the game interface generation method according to any one of claims 1 to 9.