Game prop editing method and device, storage medium and computer equipment
By pre-setting a texture interface in the game client to generate and configure custom textures, the problem of monotonous game item textures is solved, personalized game item display is achieved, player experience is improved and development burden is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
- Filing Date
- 2021-12-30
- Publication Date
- 2026-07-31
AI Technical Summary
The texture effects of game props in the current technology are relatively simple and cannot meet the personalized game needs of players.
By pre-setting a texture interface in the game client, custom textures are generated in response to player editing commands and configured into the material parameters of game items, enabling game items to display player-defined information.
It enriches gameplay, enhances the player's gaming experience, reduces the workload for game developers, and avoids the storage space and network transmission pressure caused by large amounts of data.
Smart Images

Figure CN116407844B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for editing game props, a storage medium, and computer equipment. Background Technology
[0002] When players celebrate, make wishes, or take photos in the game, they sometimes use props such as Kongming lanterns to enhance the atmosphere. Usually, the textures for these props are pre-made by the game developers, and the animations are triggered by player actions. The texture effects are relatively simple and fail to meet the personalized gaming needs of players. Summary of the Invention
[0003] In view of this, this application provides a method and apparatus for editing game props, a storage medium, and a computer device, which helps to enrich gameplay, improve the player's gaming experience, and reduce the workload of game developers.
[0004] According to one aspect of this application, a method for editing game items is provided, applied to a game client, comprising:
[0005] In response to an editing command for a target game item, obtain the information to be displayed as indicated by the editing command;
[0006] Call the preset texture interface to generate a first texture that matches the information to be displayed, wherein the preset texture interface is preset in the game client;
[0007] The first texture is configured to the material parameters of the target game item to display the information to be displayed on the target game item.
[0008] Optionally, the information to be displayed includes text to be displayed; the step of calling the preset texture interface to generate a first texture matching the information to be displayed specifically includes:
[0009] Call the preset texture interface to create the base plate and texture to be drawn corresponding to the target game item, and draw the text to be displayed onto the texture to be drawn to obtain the text texture;
[0010] The text texture is drawn onto the base plate to obtain the first texture.
[0011] Optionally, drawing the text to be displayed onto the texture to obtain a text texture specifically includes:
[0012] Obtain the target text offset parameter and the target drawing start position, draw the first character in the text to be displayed at the target drawing start position, and draw the remaining characters in the text to be displayed in sequence according to the target text offset parameter to obtain the text texture.
[0013] Optionally, after configuring the first texture to the material parameters of the target game item, the method further includes:
[0014] In response to a trigger command for the target game item, a first usage animation of the target game item is played, and a synchronous usage notification for the item is sent to the game server. The game server then sends the information to be displayed to the associated client corresponding to the game client. The associated client edits the target game item based on the information to be displayed and plays the edited second usage animation of the target game item containing the information to be displayed.
[0015] Optionally, forwarding the information to be displayed to the associated client corresponding to the game client through the game server specifically includes:
[0016] The game server determines the associated player character within the synchronization range of the target player character location based on the location of the target player character corresponding to the game client, and sends the information to be displayed to the associated client of the associated player character;
[0017] Accordingly, the associated client generates a second usage animation for the target game item based on the information to be displayed, specifically including:
[0018] When the associated client determines that the current player character corresponding to the associated client is within the visible area of the target game item, the second usage animation is played.
[0019] Optionally, before obtaining the information to be displayed indicated by the editing instruction in response to the editing instruction for the target game item, the method further includes:
[0020] In response to the selection operation of the target game item, an information input interface is displayed, wherein the information input interface includes a text information input area and / or an information identifier selection area;
[0021] Receive the first text information entered by the player in the text information input area and / or the information identifier selected in the information identifier selection area;
[0022] The editing instruction is generated based on the player's confirmation operation of the first text information and / or the information identifier, wherein the information to be displayed includes the first text information and / or the second text information obtained based on the information identifier.
[0023] Optionally, before obtaining the text offset parameters and the drawing start position, the method further includes:
[0024] The text sorting rules set by the player are obtained as the preview text sorting rules. If the player has not set any, the preset text sorting rules are obtained as the preview text sorting rules. The preview text sorting rules include text sorting direction, font size, character spacing and line spacing.
[0025] Displays a preset first preview effect corresponding to the preview text sorting rule;
[0026] If a confirmation instruction for the preset first preview effect is received, the target text offset parameter is determined according to the preview text sorting rule;
[0027] If a modification instruction for the preview text sorting rule is received, the preview text sorting rule is modified based on the modification instruction, and a preset second preview effect matching the modified preview text sorting rule is displayed. Upon receiving a confirmation instruction for the preset second preview effect, the target text offset parameter is determined based on the modified preview text sorting rule.
[0028] According to another aspect of this application, a device for editing game items is provided, applied to a game client, comprising:
[0029] The information acquisition module is used to acquire the information to be displayed indicated by the editing instruction in response to the editing instruction for the target game item;
[0030] The texture generation module is used to call a preset texture interface to generate a first texture that matches the information to be displayed, wherein the preset texture interface is pre-set in the game client;
[0031] A configuration module is used to configure the first texture to the material parameters of the target game item, so as to display the information to be displayed on the target game item.
[0032] Optionally, the information to be displayed includes text to be displayed; the texture generation module is specifically used for:
[0033] Call the preset texture interface to create the base plate and texture to be drawn corresponding to the target game item, and draw the text to be displayed onto the texture to be drawn to obtain the text texture;
[0034] The text texture is drawn onto the base plate to obtain the first texture.
[0035] Optionally, the texture generation module is further configured to: obtain target text offset parameters and target drawing start position, draw the first character in the text to be displayed at the target drawing start position, and draw the remaining characters in the text to be displayed in sequence according to the target text offset parameters to obtain the text texture.
[0036] Optionally, the device further includes:
[0037] The display module is used to, after configuring the first texture to the material parameters of the target game item, respond to a trigger command on the target game item, play the first usage animation of the target game item, and send a synchronous usage notification of the item to the game server, so that the game server can send the information to be displayed to the associated client corresponding to the game client, and the associated client can edit the target game item based on the information to be displayed and play the edited second usage animation of the target game item with the information to be displayed.
[0038] Optionally, the game server determines the associated player character within the synchronization range of the target player character location based on the location of the target player character corresponding to the game client, and sends the information to be displayed to the associated client of the associated player character;
[0039] Accordingly, when the associated client determines that the current player character corresponding to the associated client is within the visible area of the target game item, it plays the second usage animation.
[0040] Optionally, the apparatus further includes: an instruction generation module, configured to:
[0041] Before obtaining the information to be displayed indicated by the editing instruction in response to the editing instruction for the target game item, the information input interface is displayed in response to the selection operation of the target game item, wherein the information input interface includes a text information input area and / or an information identifier selection area;
[0042] Receive the first text information entered by the player in the text information input area and / or the information identifier selected in the information identifier selection area;
[0043] The editing instruction is generated based on the player's confirmation operation of the first text information and / or the information identifier, wherein the information to be displayed includes the first text information and / or the second text information obtained based on the information identifier.
[0044] Optionally, the device further includes: a parameter acquisition module, used for:
[0045] Before obtaining the text offset parameters and the drawing start position, the text sorting rule set by the player is obtained as the preview text sorting rule. If the player has not set one, the preset text sorting rule is obtained as the preview text sorting rule. The preview text sorting rule includes text sorting direction, font size, character spacing and line spacing.
[0046] Displays a preset first preview effect corresponding to the preview text sorting rule;
[0047] If a confirmation instruction for the preset first preview effect is received, the target text offset parameter is determined according to the preview text sorting rule;
[0048] If a modification instruction for the preview text sorting rule is received, the preview text sorting rule is modified based on the modification instruction, and a preset second preview effect matching the modified preview text sorting rule is displayed. Upon receiving a confirmation instruction for the preset second preview effect, the target text offset parameter is determined based on the modified preview text sorting rule.
[0049] According to another aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method for editing game props.
[0050] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described method for editing game props.
[0051] By employing the above technical solutions, this application provides a method, apparatus, storage medium, and computer device for editing game props. Responding to an in-game editing command for a target game prop, it obtains the information to be displayed as indicated by the command, and calls a pre-set texture interface within the game client to generate a corresponding first texture. This first texture is then configured to the material parameters of the target game prop, so that after rendering the target game prop using the material parameters, the prop includes the information to be displayed, thus achieving customized configuration of the target game prop. Compared to the prior art where game developers edit props, this application's embodiment hands over control of in-game props to the player. Players can customize the display content of game props and generate textures matching their customized content using a locally pre-set texture interface. This not only enriches gameplay and improves the player's gaming experience but also reduces the workload for game developers. Furthermore, it avoids the large amount of game prop data in the game data package occupying storage space and avoids network pressure caused by large data transmission volumes.
[0052] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0053] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0054] Figure 1 A flowchart illustrating a method for editing game props according to an embodiment of this application is shown;
[0055] Figure 2 A flowchart illustrating another method for editing game props provided in an embodiment of this application is shown;
[0056] Figure 3 This illustration shows a schematic diagram of an information input interface provided in an embodiment of this application;
[0057] Figure 4 The illustration shows a rendering of a custom Kongming lantern provided in an embodiment of this application;
[0058] Figure 5 This illustration shows a flowchart of a process for creating a Kongming lantern prop texture according to an embodiment of this application;
[0059] Figure 6 This illustration shows a schematic diagram of the usage process of a Kongming lantern prop provided in an embodiment of this application;
[0060] Figure 7 A schematic diagram of the structure of a game prop editing device provided in an embodiment of this application is shown. Detailed Implementation
[0061] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0062] This embodiment provides a method for editing game items, such as... Figure 1 As shown, the method includes:
[0063] Step 101: In response to the editing instruction for the target game item, obtain the information to be displayed indicated by the editing instruction;
[0064] Step 102: Call the preset texture interface to generate a first texture that matches the information to be displayed, wherein the preset texture interface is preset in the game client;
[0065] Step 103: Configure the first texture to the material parameters of the target game item so as to display the information to be displayed on the target game item.
[0066] This application embodiment is applied to a game client. It generates textures through a pre-defined texture interface within the game client, and then assigns these textures to the material parameters of specific game items, enabling players to customize item materials. Specifically, the game can provide gameplay with custom items, such as releasing sky lanterns or hot air balloons. Textures are created based on player-defined text, and these textures are then assigned to the material parameters of the sky lanterns and hot air balloons. These material parameters are applied to the target game item, and the sky lanterns and hot air balloons are rendered according to these parameters, thus displaying the player-customized sky lanterns and hot air balloons. The sky lanterns and hot air balloons can display custom text, and players can also release them, resulting in an animation of releasing the sky lanterns playing in the game client.
[0067] After the game client runs the game, it generates an editing command based on the player's selection of custom item gameplay. The game client responds to the command and obtains the information to be displayed. The information to be displayed can be the custom display content entered by the player after selecting the custom item gameplay, or the display content confirmed by the player in advance. For example, the wish entered by the player after selecting to release a wishing sky lantern, or the confession sky lantern after the player has pre-configured a confession object and selects to release a confession sky lantern, the confession object is filled into the confession template and the information to be displayed is obtained. Next, a preset texture interface is called to generate a first texture containing the information to be displayed. Specifically, the preset texture interface can determine the texture configuration data corresponding to the information to be displayed. The texture configuration data can include the character arrangement rules to indicate how each character in the information to be displayed should be arranged, thereby drawing all the characters in the information to be displayed to obtain the first texture. The first texture is then configured in the configuration area of the target game item. In specific application scenarios, the target game item is preferably an item containing at least one surface area. The first texture is assigned to the material parameters of the target game item, and the target game item is rendered according to these material parameters to achieve dynamic generation of game items with the information to be displayed in the game. This application embodiment provides the function of player-customized items, giving players control over the item material. This not only helps enrich gameplay and improve the player's gaming experience, but also helps reduce the workload of game developers. Simultaneously, it avoids the large amount of game item data in the game data package occupying storage space and avoids network pressure caused by large data transmission.
[0068] Optionally, the information to be displayed includes text to be displayed; the process of creating the first texture, i.e., step 102, specifically includes: calling the preset texture interface to create a base plate and a texture to be drawn corresponding to the target game prop, and drawing the text to be displayed onto the texture to be drawn to obtain a text texture; drawing the text texture onto the base plate to obtain the first texture.
[0069] In this embodiment, firstly, a base plate (i.e., base plate texture) and a texture to be drawn are created for the target game prop. Specifically, the size of the base plate can be set according to the size of the configuration area of the target game prop, and the number of base plates can be set according to the number of configuration areas. For example, if the Kongming Lantern prop includes 4 configuration areas and it is stipulated that each configuration area should be configured with the same texture, then 4 blank base plates and 1 texture to be drawn can be created. Alternatively, a blank base plate can be obtained by clearing the preset base plate. Secondly, each character in the text to be displayed is drawn on the texture to be drawn in a certain order to obtain a text texture. The information to be displayed can be in the form of text, or it can include custom emoticons, custom images, etc. This embodiment only uses text as an example. Finally, the text texture containing the text to be displayed is drawn on the base plate, and the base plate is assigned to the material ball of the target game prop, such as the Kongming Lantern model, thereby realizing the configuration of the surface material of the Kongming Lantern. For example, text textures can be drawn on four blank base plates to obtain four base plates that match the configuration areas of the Kongming Lantern. This allows the base plates that match the configuration areas of the Kongming Lantern to be configured onto the Kongming Lantern model, resulting in a Kongming Lantern prop with custom text.
[0070] By applying the technical solution of this embodiment, in response to the editing command for the target game item within the game, the information to be displayed as indicated by the command is obtained, and a corresponding first texture is generated by calling the preset texture interface in the game client. The first texture is then configured to the material parameters of the target game item, so that after rendering the target game item through the material parameters, the item includes the information to be displayed, thus achieving customized configuration of the target game item. Compared to the prior art where game developers edit items, this embodiment of the application gives control of game items to the player. Players can customize the display content of game items and generate textures matching the player's customized content using a locally preset texture interface. This not only enriches the gameplay and improves the player's gaming experience but also reduces the workload of game developers. Furthermore, it avoids the large amount of game item data in the game data package occupying storage space and avoids network pressure caused by large data transmission.
[0071] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another method for editing game props is provided, such as... Figure 2As shown, the method includes:
[0072] Step 201: In response to the selection operation of the target game item, an information input interface is displayed, wherein the information input interface includes a text information input area and / or an information identifier selection area.
[0073] In this embodiment, the target game props include, but are not limited to, the Kongming lantern prop in the game, and can also be other types of props configured using custom textures, such as hot air balloons. Taking the selection of the Kongming lantern prop as an example, after selecting the Kongming lantern prop, an information input interface pops up in the game display interface. The information input interface can include a text information input area and an information identifier selection area. The text information input area provides an information input window where players can enter custom information. The information identifier selection area provides several text information templates pre-configured by the game developers, such as "Good health" and "Good luck on your exams," etc. Players can select the desired text by clicking, dragging, etc. Furthermore, the text information templates are editable. After selecting a text information template, the player can write the selected text information template into the text information input area, where the player can modify the text. Figure 3 As shown, after using the Kongming Lantern item, players can enter custom text in the pop-up information input interface.
[0074] Step 202: Receive the first text information entered by the player in the text information input area and / or the information identifier selected in the information identifier selection area; generate the editing instruction based on the player's confirmation operation of the first text information and / or the information identifier, wherein the information to be displayed includes the first text information and / or the second text information obtained based on the information identifier.
[0075] Step 203: In response to the editing instruction for the target game item, obtain the information to be displayed indicated by the editing instruction.
[0076] In this embodiment, players can input first text information in the text information input area and select the desired information identifier in the information identifier selection area. After inputting the first text information and / or selecting the information identifier, players confirm the input and selection. After confirmation, an editing command for the target game item is generated. The game client obtains the first text information carried by the editing command and / or obtains the second text information corresponding to the information identifier based on the information identifier carried by the editing command. The information to be displayed is determined based on the first and second text information. If the information to be displayed includes only one of the two, then either the first or second text information is directly used as the information to be displayed. If both the first and second text information are included, then they are merged to generate the information to be displayed. For example, if a player selects a pre-configured fillable template "Happy Birthday XX!" (i.e., the second text information) and inputs a name in the information input area (i.e., the first text information), then in response to the editing command, the name entered by the player can be filled into the template selected by the player.
[0077] Step 204: Obtain the text sorting rule set by the player as the preview text sorting rule. If the player has not set one, obtain the preset text sorting rule as the preview text sorting rule. The preview text sorting rule includes text sorting direction, font size, character spacing, and line spacing. Display the preset first preview effect corresponding to the preview text sorting rule.
[0078] In this embodiment, an effect preview function can be provided so that players can have a certain understanding of the effect of the item before generating the custom target game item, and can make corrections if they are not satisfied, thereby obtaining a satisfactory effect. Before previewing, players can also configure the text sorting rules. For example, a specification configuration area can be provided in the information input interface, where players can configure parameters such as font, font size, color, character spacing, line spacing, and text sorting direction (horizontal or vertical). If the player has configured it, the text sorting rules set by the player will be used as the preview text sorting rules. If the player has not configured it, the preset text sorting rules set by the game developers can be used as the preview text sorting rules, or the text sorting rules set by the player when they last used the Kongming Lantern item can be used as the preview text sorting rules. Furthermore, after determining the preview text sorting rules, a preset first preview effect that matches the preview text sorting rules is obtained and displayed. Game developers can pre-create various versions of prop previews with fixed text information. For example, they can pre-create a preview of a Kongming lantern with "Good Health" in various fonts, sizes, and spacings. The preview can be in the form of an animation or an image. The developer can then select the preview effect that matches the text sorting rules mentioned above from the various pre-created preview effects for display.
[0079] Step 205: If a confirmation instruction for the preset first preview effect is received, the target text offset parameter is determined according to the preview text sorting rules.
[0080] Step 206: If a modification instruction for the preview text sorting rule is received, the preview text sorting rule is modified based on the modification instruction, and a preset second preview effect matching the modified preview text sorting rule is displayed. When a confirmation instruction for the preset second preview effect is received, the modified preview text sorting rule is used to determine the target text offset parameter.
[0081] In the above embodiments, if the player confirms the preset first preview effect, then according to the preview text sorting rules, the corresponding target text offset parameters are determined. These target text offset parameters include the inter-character offset distance and direction of the next character relative to the previous character in the same line, and the inter-line offset distance and direction of the next line relative to the previous line in two adjacent lines. They may also include the font and color of the text to be displayed, so that a texture matching the preview text sorting rules and the information to be displayed can be generated subsequently. If the player feels the preset first preview effect is not good enough, they can modify the preview text sorting rules. After modifying the preview text sorting rules, a preset second preview effect matching the modified preview text sorting rules is obtained and displayed. The player can continuously modify the preview text sorting rules to obtain a satisfactory effect. Finally, after the player confirms the preview effect corresponding to the modified preview text sorting rules, the target text offset parameters are determined according to the final preview text sorting rules confirmed by the player.
[0082] Additionally, it should be noted that in this embodiment, the preview step may be omitted. That is, after step 203, the system continues to receive the text sorting direction, font size, and font color set by the player, skipping steps 204 to 206 and directly proceeding to step 207. The target offset parameter can be directly determined based on the text sorting direction, font size, and font color set by the player. Optionally, the target offset parameter includes the text sorting direction, font size, font color, and the inter-character offset distance, inter-character offset direction, and line spacing determined based on the text sorting direction and font size. Alternatively, the target text offset parameter can be determined based on some of the above parameters pre-set by the planner and another part of the parameters set by the player. For example, the text sorting direction can be set by the player, while the remaining parameters are set to fixed values by the planner. Another example is that the text sorting direction and font size can be set by the player, while the remaining parameters are automatically matched based on the matching rules pre-configured by the planner, using the number of characters input by the player and the font size set by the player. Thus, the target offset parameter is determined based on the text sorting direction and font size set by the player, and the automatically matched inter-character and line spacing. Alternatively, the target text offset parameters can be determined based on all the parameters preset by the planner.
[0083] Step 207: Call the preset texture interface to create the base plate and texture to be drawn corresponding to the target game prop; obtain the target text offset parameter and the target drawing start position, draw the first character in the text to be displayed at the target drawing start position, and draw the remaining characters in the text to be displayed in sequence according to the target text offset parameter to obtain the text texture; draw the text texture on the base plate to obtain the first texture.
[0084] Step 208: Configure the first texture to the material parameters of the target game item so as to display the information to be displayed on the target game item.
[0085] In the above-described texture creation process of this application embodiment, after creating the base and the texture to be drawn, the text to be displayed (which may also include an image, or text and an image) is loaded. The text to be displayed is provided to the project view object ZCCanvasItem. ZCCanvasItem first draws the first character of the text to be displayed at the target drawing start position of the texture to be drawn, and then draws the remaining characters in sequence according to the target text offset parameter. During the drawing of characters, for example, two consecutive characters A and B, after A is drawn, when B is to be drawn, it is calculated whether the target drawing position 1 of character B obtained by offsetting from character A according to the inter-character offset distance exceeds the drawing area of the texture to be drawn. If it does not exceed the target drawing position, character B is drawn at the target drawing position 1. If it exceeds the target drawing position, the target drawing position 2 of the next character obtained by wrapping according to the inter-line offset distance is calculated, and it is determined whether the target drawing position 2 exceeds the drawing area of the texture to be drawn. If it does not exceed the target drawing position, character B is drawn at the target drawing position 2. Otherwise, it is determined whether a page break should be made (when there are multiple textures to be drawn). Finally, each character in the text to be displayed is drawn on the texture, resulting in a text texture. The text texture is then drawn onto the substrate, and the substrate is assigned to the material of the target game item, such as a Kongming lantern model, to obtain the target game item with custom text. For example... Figure 4 The image shown is a rendering of a custom Kongming lantern.
[0086] Optionally, the target text offset parameters include the inter-character offset distance and direction of the subsequent character relative to the preceding character in the same line, and the inter-line offset distance and direction of the subsequent line relative to the preceding line in two adjacent lines. "Drawing the first character of the text to be displayed at the target drawing start position, and then drawing the remaining characters of the text to be displayed sequentially according to the target text offset parameters to obtain the text texture," specifically includes:
[0087] S1, draw the first character in the text to be displayed at the target drawing start position corresponding to the first texture to be drawn;
[0088] S2, read the remaining first character, and determine whether the remaining first character will exceed the drawing area of the texture to be drawn if the remaining first character is drawn according to the inter-character offset distance and the inter-character offset direction;
[0089] S3, if the judgment result of S2 is negative, then draw the remaining first character according to the inter-character offset distance and the inter-character offset direction, and return to S2 to continue reading the remaining first character until all the text to be displayed is drawn;
[0090] S4, if the judgment result of S2 is yes, then determine whether the remaining first character will exceed the drawing area of the texture to be drawn if the remaining first character is drawn according to the interline offset distance and the interline offset direction;
[0091] S5, if the judgment result of S4 is negative, then draw the remaining first character according to the interline offset distance and the interline offset direction, and return to S2 to continue reading the remaining first character until all the text to be displayed is drawn;
[0092] S6. If the judgment result of S4 is yes, then determine whether there is a next texture to be drawn; if yes, then draw the remaining first character at the target drawing start position corresponding to the next texture to be drawn; if no, end the drawing.
[0093] Step 209: In response to the trigger command for the target game item, play the first usage animation of the target game item and send a synchronous usage notification for the item to the game server, so as to send the information to be displayed to the associated client corresponding to the game client through the game server. The associated client edits the target game item based on the information to be displayed and plays the edited second usage animation of the target game item with the information to be displayed.
[0094] In the above embodiments, for the Kongming lantern prop, players can choose when to release the lantern. The trigger command can be the player's command to release the lantern. After the player selects to release the lantern, the current game client can display the first usage animation of the target game prop. Players can see the effect of the lantern with custom text displayed in the game being released. In online games, when a player uses an prop, it can not only be displayed in that player's game client, but also synchronized with other clients. At the same time, in response to the trigger command for the target game prop, the game client can also send a prop synchronization usage notification to the game server (this notification may include the information to be displayed, the target text offset parameters, and the target drawing start position; however, if it is specified that only the text in the prop can be customized, and other parameters are fixed, then the notification only needs to carry the information to be displayed) to notify the game server that the current game client has released the lantern. After receiving this signal, the game server forwards it to the associated client corresponding to that game client. The game server can determine the corresponding region based on the current player character's location in the game and forward information to the associated clients of other players within that region. For example, if the current player character is in village A, the game server can forward messages to the associated clients of other players also in village A. The game server can also determine the associated client based on the attributes of the target game item. For example, if a player chooses to release a sky lantern towards a specific player, the game server can forward messages to that specific player's client. Upon receiving the notification, the associated client can use a local preset texture interface to generate a second texture and configure it on the target game item, thereby changing the item's material and playing a second usage animation. This achieves synchronized playback of custom game item usage animations in the online game. Furthermore, the item synchronization notification can also include the sky lantern release location corresponding to the current game client, so that different players can see the same sky lantern release effect on different clients. For example, if player character 1 releases a sky lantern at location A in the current game client, then all the related clients will see the effect of player character 1 releasing a sky lantern at location A.
[0095] Optionally, in this embodiment of the application, the associated client includes: the associated client editing the target game item based on the information to be displayed, and playing the second usage animation when it is determined that the current player character corresponding to the associated client is within the visible area of the target game item.
[0096] In the above embodiments, after receiving the item synchronization notification, the associated client can generate a second texture in the same way as generating the first texture, and assign the second texture to the material parameters of the target game item. The target game item is then rendered according to the material parameters to dynamically generate game items with information to be displayed in the game. In addition, since the position of the current player character corresponding to the associated client can change in real time, the associated client can calculate whether the current player character is within the visible area of the target game item. If the character is within the visible area, the second usage animation is displayed; if the character is outside the visible area, the associated client does not need to display the item.
[0097] Optionally, in this embodiment of the application, it further includes: if the target game item belongs to the type of item that affects the attributes of the player character, then send a notification of successful use of the target game item to the game server.
[0098] In the above embodiments, if the target game item selected by the player only has a display effect, then the first usage animation is displayed, that is, the use of the target game item is completed. However, if the target game item affects the attributes of any player in the game, then a successful use notification should also be sent to the game server to notify the game server to calculate the impact of the item on the player's attributes. For example, if the wishing lantern has a boost to the player's luck attribute, then the game server can update the target player's luck attribute when it receives the successful use notification. As another example, if the confession lantern has a boost to the intimacy attribute between the target player's character and the character to whom the confession is made, then the game server can update the intimacy attribute between the target player's character and the character to whom the confession is made when it receives the successful use notification.
[0099] like Figure 5 The diagram shown illustrates a process for creating a texture for a Kongming lantern prop, as provided in an embodiment of this application. First, a dynamic texture to be drawn is created. The Kongming lantern material is called, and player-defined parameters such as text, font size, font type, character spacing, and line spacing are written into the ItemViewObject. The drawing position of each text character is determined sequentially using the canvas item ZCCanvasItem. Then, the UE interface is called to draw each character onto a separate texture. The texture is then used to fill the material of the target game prop, dynamically generating the corresponding material to display the custom text on the mesh of the target game prop, thus completing the text rendering.
[0100] like Figure 6The diagram illustrates the usage process of a Kongming lantern prop provided in this embodiment of the application. When a player uses a Kongming lantern prop from their inventory in the game, the local client responds to the player's action, displaying a custom content UI interface. The player inputs and confirms the custom content, and the server synchronizes the player's customized Kongming lantern content with other nearby clients. Both the local client and other clients can read the Kongming lantern data configuration and create dynamic textures based on the data configuration and custom text. When the scene interaction module is invoked (i.e., when the player releases the Kongming lantern), the local client generates a Kongming lantern model based on the dynamic texture and synchronizes the lantern's position and speed information with other nearby clients via the server. The local client and other clients can simultaneously see the Kongming lantern's launching effect.
[0101] Furthermore, as Figure 1 In terms of specific implementation, this application provides a device for editing game items, applied to a game client, such as... Figure 7 As shown, the device includes:
[0102] The information acquisition module is used to acquire the information to be displayed indicated by the editing instruction in response to the editing instruction for the target game item;
[0103] The texture generation module is used to call a preset texture interface to generate a first texture that matches the information to be displayed, wherein the preset texture interface is pre-set in the game client;
[0104] A configuration module is used to configure the first texture to the material parameters of the target game item, so as to display the information to be displayed on the target game item.
[0105] Optionally, the information to be displayed includes text to be displayed; the texture generation module is specifically used for:
[0106] Call the preset texture interface to create the base plate and texture to be drawn corresponding to the target game item, and draw the text to be displayed onto the texture to be drawn to obtain the text texture;
[0107] The text texture is drawn onto the base plate to obtain the first texture.
[0108] Optionally, the texture generation module is further configured to: obtain target text offset parameters and target drawing start position, draw the first character in the text to be displayed at the target drawing start position, and draw the remaining characters in the text to be displayed in sequence according to the target text offset parameters to obtain the text texture.
[0109] Optionally, the device further includes:
[0110] The display module is used to, after configuring the first texture to the material parameters of the target game item, respond to a trigger command on the target game item, play the first usage animation of the target game item, and send a synchronous usage notification of the item to the game server, so that the game server can send the information to be displayed to the associated client corresponding to the game client, and the associated client can edit the target game item based on the information to be displayed and play the edited second usage animation of the target game item with the information to be displayed.
[0111] Optionally, the game server determines the associated player character within the synchronization range of the target player character location based on the location of the target player character corresponding to the game client, and sends the information to be displayed to the associated client of the associated player character;
[0112] Accordingly, when the associated client determines that the current player character corresponding to the associated client is within the visible area of the target game item, it plays the second usage animation.
[0113] Optionally, the apparatus further includes: an instruction generation module, configured to:
[0114] Before obtaining the information to be displayed indicated by the editing instruction in response to the editing instruction for the target game item, the information input interface is displayed in response to the selection operation of the target game item, wherein the information input interface includes a text information input area and / or an information identifier selection area;
[0115] Receive the first text information entered by the player in the text information input area and / or the information identifier selected in the information identifier selection area;
[0116] The editing instruction is generated based on the player's confirmation operation of the first text information and / or the information identifier, wherein the information to be displayed includes the first text information and / or the second text information obtained based on the information identifier.
[0117] Optionally, the device further includes: a parameter acquisition module, used for:
[0118] Before obtaining the text offset parameters and the drawing start position, the text sorting rule set by the player is obtained as the preview text sorting rule. If the player has not set one, the preset text sorting rule is obtained as the preview text sorting rule. The preview text sorting rule includes text sorting direction, font size, character spacing and line spacing.
[0119] Displays a preset first preview effect corresponding to the preview text sorting rule;
[0120] If a confirmation instruction for the preset first preview effect is received, the target text offset parameter is determined according to the preview text sorting rule;
[0121] If a modification instruction for the preview text sorting rule is received, the preview text sorting rule is modified based on the modification instruction, and a preset second preview effect matching the modified preview text sorting rule is displayed. Upon receiving a confirmation instruction for the preset second preview effect, the target text offset parameter is determined based on the modified preview text sorting rule.
[0122] It should be noted that other corresponding descriptions of the functional units involved in the game prop editing device provided in this application embodiment can be found in the following references. Figures 1 to 2 The corresponding descriptions in the method will not be repeated here.
[0123] Based on the above, Figures 1 to 2 Accordingly, this application also provides a storage medium storing a computer program, which, when executed by a processor, implements the above-described method. Figures 1 to 2 The method for editing game items is shown.
[0124] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0125] Based on the above, Figures 1 to 2 The method shown, and Figure 7 To achieve the above objectives, the present application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the virtual device embodiment. This computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figures 1 to 2 The method for editing game items is shown.
[0126] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.
[0127] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0128] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the physical device.
[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or it can be implemented by hardware to respond to the editing instructions for the target game item in the game, obtain the information to be displayed indicated by the instructions, and call the preset texture interface in the game client to generate the corresponding first texture. Then, the first texture is configured to the material parameters of the target game item, so that after the target game item is rendered through the material parameters, the item is accompanied by the information to be displayed, realizing the custom configuration of the target game item. Compared with the prior art of game developers editing items, the embodiments of this application give the control of the game item to the player. Players can customize the display content of the game item and use the local preset texture interface to generate textures that match the player's customized content. This not only enriches the gameplay and improves the player's game experience, but also reduces the production workload of game developers. At the same time, it can avoid the large amount of game item data in the game data package occupying storage space and avoid the network pressure caused by large data transmission.
[0130] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0131] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A game prop editing method characterized by comprising: Applied to game clients, including: In response to an editing command for a target game item, the system acquires the information to be displayed indicated by the editing command, the information to be displayed including text to be displayed; Calling a preset texture interface to generate a first texture that matches the information to be displayed, wherein the preset texture interface is pre-installed in the game client; including: obtaining target text offset parameters and target drawing start position, drawing the first character in the text to be displayed at the target drawing start position, and drawing the remaining characters in the text to be displayed sequentially according to the target text offset parameters to obtain a text texture; drawing the text texture onto the substrate to obtain the first texture; The first texture is configured to the material parameters of the target game item so as to display the information to be displayed on the target game item; In response to the trigger command for the target game item, the first usage animation of the target game item is played, and a synchronous usage notification for the item is sent to the game server, so that the game server sends the information to be displayed to the associated client corresponding to the game client; The game server determines the associated player characters within the synchronization range of the target player character location based on the location of the target player character corresponding to the game client, and sends the information to be displayed to the associated client of the associated player character. The associated client generates a second texture by calling the local preset texture interface based on the information to be displayed, and configures the second texture to the material parameters of the target game item in order to edit the target game item; When the associated client determines that the current player character corresponding to the associated client is within the visible area of the target game item, it plays an edited second usage animation of the target game item containing the information to be displayed.
2. The method of claim 1, wherein, Before obtaining the information to be displayed indicated by the editing instruction in response to the editing instruction for the target game item, the method further includes: In response to the selection operation of the target game item, an information input interface is displayed, wherein the information input interface includes a text information input area and / or an information identifier selection area; Receive the first text information entered by the player in the text information input area and / or the information identifier selected in the information identifier selection area; The editing instruction is generated based on the player's confirmation operation of the first text information and / or the information identifier, wherein the information to be displayed includes the first text information and / or the second text information obtained based on the information identifier.
3. The method of claim 1, wherein, Before obtaining the target text offset parameters and the target drawing start position, the method further includes: The text sorting rules set by the player are obtained as the preview text sorting rules. If the player has not set any, the preset text sorting rules are obtained as the preview text sorting rules. The preview text sorting rules include text sorting direction, font size, character spacing and line spacing. Displays a preset first preview effect corresponding to the preview text sorting rule; If a confirmation instruction for the preset first preview effect is received, the target text offset parameter is determined according to the preview text sorting rule; If a modification instruction for the preview text sorting rule is received, the preview text sorting rule is modified based on the modification instruction, and a preset second preview effect matching the modified preview text sorting rule is displayed. Upon receiving a confirmation instruction for the preset second preview effect, the target text offset parameter is determined based on the modified preview text sorting rule.
4. An editing device of a game prop, characterized by, Applied to game clients, including: The information acquisition module is used to acquire, in response to an editing instruction for a target game item, information to be displayed indicated by the editing instruction, the information to be displayed including text to be displayed; The texture generation module is used to call a preset texture interface to generate a first texture that matches the information to be displayed, wherein the preset texture interface is pre-set in the game client; A configuration module is used to configure the first texture to the material parameters of the target game item, so as to display the information to be displayed on the target game item; The texture generation module is specifically used to obtain the target text offset parameters and the target drawing start position, draw the first character in the text to be displayed at the target drawing start position, and draw the remaining characters in the text to be displayed in sequence according to the target text offset parameters to obtain a text texture; draw the text texture on the substrate to obtain the first texture; The display module is used to respond to the trigger command of the target game item, play the first usage animation of the target game item, and send a synchronous usage notification of the item to the game server, so that the game server sends the information to be displayed to the associated client corresponding to the game client; The game server determines the associated player characters within the synchronization range of the target player character location based on the location of the target player character corresponding to the game client, and sends the information to be displayed to the associated client of the associated player character. The associated client generates a second texture by calling the local preset texture interface based on the information to be displayed, and configures the second texture to the material parameters of the target game item in order to edit the target game item; When the associated client determines that the current player character corresponding to the associated client is within the visible area of the target game item, it plays an edited second usage animation of the target game item containing the information to be displayed.
5. A storage medium having stored thereon a computer program, characterized in that When the computer program is executed by a processor, it implements the method of any one of claims 1 to 3.
6. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 3.