Script generation method and apparatus
By determining the editing mode in the game, collecting and generating a set of tags carrying position, time and attribute information, the problem of difficult maintenance of novice guidance code is solved, and the generation of novice guidance scripts that are easy to read and maintain is achieved.
Patent Information
- Application Number
- CN202210111110.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-01-26
AI Technical Summary
In the prior art, the novice guide code is difficult to maintain and update in the game, resulting in poor code readability.
The editing mode is determined through the preset framework, the operation information of the marker control is collected, a marker set carrying position, time and attribute information is generated, and finally the target script is generated.
The independent management of novice guidance code is realized, which improves the readability and maintainability of the code.
Smart Images

Figure CN114461192B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of data processing technology, and in particular to a script generation method. Background Art
[0002] Almost every game on the market has a beginner's guide. The purpose of the beginner's guide in the game is to guide and instruct players on how to play a certain level or system in the game from scratch, while combining the game's plot, camera, sound effects, etc. to achieve a more immersive beginner experience.
[0003] Since the novice guide involves all aspects of the game, if the novice guide code is written in each system, it will reduce the readability of the code and it will also be inconvenient to maintain and update. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a script generation method. One or more embodiments of this specification also relate to a script generation apparatus, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a script generation method is provided, comprising:
[0006] Determine the editing mode according to the preset framework;
[0007] Collecting operation information for the marker control in the editing mode;
[0008] Acquire a mark set according to operation information on the mark control, wherein the mark set carries position information, time information, and attribute information;
[0009] A target script is generated according to the tag set.
[0010] According to a second aspect of the embodiments of this specification, a script generation device is provided, including:
[0011] A mode determination module is configured to determine an editing mode according to a preset framework;
[0012] An information collection module is configured to collect operation information for the mark control in the editing mode;
[0013] a tag acquisition module, configured to acquire a tag set according to operation information on the tag control, wherein the tag set carries position information, time information, and attribute information;
[0014] The script generation module is configured to generate a target script according to the tag set.
[0015] According to a third aspect of an embodiment of this specification, a computing device is provided, including:
[0016] memory and processor;
[0017] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned script generation method are implemented.
[0018] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned script generation method are implemented.
[0019] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned script generation method.
[0020] Embodiments of this specification provide a script generation method, comprising: determining an edit mode based on a preset framework; collecting operation information for a marker control in the edit mode; obtaining a marker set based on the operation information for the marker control, wherein the marker set carries position information, time information, and attribute information; and generating a target script based on the marker set. By performing a novice onboarding task in the game and recording the operation information, a separate script file is automatically generated based on the operation information, making the novice onboarding code procedural, easy to read, and easy to maintain. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flowchart of a script generation method provided by one embodiment of this specification;
[0022] Figure 2 This is a framework diagram of a script generation method provided in one embodiment of this specification;
[0023] Figure 3 This is a flowchart of a script generation method according to an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of the structure of a script generation device provided by an embodiment of this specification;
[0025] Figure 5 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION
[0026] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0027] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0028] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0029] First, the terms involved in one or more embodiments of this specification are explained.
[0030] Lua: A small scripting language.
[0031] Coroutine: A Lua collaborative program that has an independent stack, independent local variables, and an independent instruction pointer, while sharing global variables and most other things with other collaborative programs.
[0032] In this specification, a script generation method is provided. This specification also relates to a script generation device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0033] See also Figure 1 , Figure 1 A flowchart of a script generation method provided according to an embodiment of this specification is shown, which specifically includes the following steps.
[0034] Step 102: Determine the editing mode according to the preset framework.
[0035] Among them, the preset framework can be an underlying framework written based on a computer language, such as a framework written by a Lua coroutine; the editing mode can be a mode for editing the game screen, for example, adding graphics, text, etc. to the game screen.
[0036] In actual applications, in the game, novice players will be guided to familiarize themselves with the game's operations and interface. However, currently the novice guide is directly written into the game file instead of existing separately, which makes the novice guide code difficult to maintain. Therefore, the novice guide code can be managed independently, which requires generating a separate game guide script file.
[0037] For example, using Lua coroutines to write a preset framework, see Figure 2 , Figure 2 This is a framework diagram of a script generation method provided in one embodiment of this specification. The preset framework includes a guide management class layer, a guide script base class layer, and a guide script layer. The guide management class layer provides data and tools, the guide script base class layer provides interfaces for game guidance, starting, and ending, and the guide script layer provides script storage and management functions. Based on this preset framework, the game is enabled in edit mode. In edit mode, a staff member uses a novice account to play the game, and multiple controls are set on the game screen. Each control has a different function, and can include guidance controls, plot controls, and dialogue controls.
[0038] It should be noted that different games have different requirements for novice guides, so the functions required in the development of the game's novice guides are also different. Therefore, the controls set in different preset frameworks are different, that is, the editing modes are different, to adapt to different novice guide development needs. For example, in a two-dimensional game without route guidance, players only need to familiarize themselves with the interface operations or watch the game plot according to the text dialogues in the novice guide in the interface. Accordingly, in the development of the novice guide for this game, the editing mode determined according to the preset framework includes dialogue controls and plot controls, but no guidance controls for adding road guidance.
[0039] In the embodiments of this specification, the editing mode is determined by a preset framework, which reduces the difficulty of script development. Directly applying the preset framework can improve development efficiency.
[0040] Step 104: Collecting operation information for the mark control in the editing mode.
[0041] Among them, the mark control can be a control on the game graphical interface, such as a button or a slider; the operation information can be information obtained when operating the mark control, for example, time information, coordinate information, etc. obtained when clicking the mark control.
[0042] In actual applications, staff will operate the mark control or input information related to the novice guidance in the editing mode according to the needs of the novice guidance of the game.
[0043] For example, in editing mode, there are multiple controls on the game screen, including guidance controls, plot controls, and dialogue controls. When the staff operates the characters in the game to reach a certain intersection, road guidance needs to be added to make novice players clear about which road to go. At this time, the staff clicks on the guidance control and adds road guidance in the game according to the guidance control to obtain the operation information.
[0044] In the embodiments of this specification, only simple operations are required from the staff, and operation information is automatically obtained through the staff's operations, which saves manpower input and reduces development costs.
[0045] Specifically, collecting operation information for the mark control in the editing mode includes:
[0046] In response to a click operation, recording the position coordinates of the simulation object and determining the type of the marking control in the editing mode;
[0047] Displaying an attribute information input control according to the type of the mark control;
[0048] Collect the attribute information in the attribute information input control.
[0049] Among them, the simulation object can be a character object, object object, etc. in the game, for example, a character in the novice guide; the position coordinates refer to the coordinates of the simulation object in the game, for example (20000, 50000); the attribute information can be text, picture, sound and other information, such as a dialogue text.
[0050] In actual applications, after the staff clicks the control, they need to record the position of the simulated object in the game so that the simulated object can display guidance information when it is at the current position. They also need to determine the type of mark control so that the staff can input text, pictures, sounds and other information when needed.
[0051] For example, the staff clicks on the dialogue control, and in response to the click operation on the dialogue control, determines the position of the simulated object in the game, that is, records the position coordinates (20000, 50000), and at the same time determines that the dialogue control is clicked, and a dialogue information editing window pops up in the game screen. The staff enters the dialogue in the dialogue information editing window and obtains the text entered in the dialogue information editing window.
[0052] Furthermore, when the staff adds road guidance and enters dialogue in the dialogue information editing window, different levels of dialogue, road guidance and other information can be added for novice players of different levels. For example, the level of novice guidance is divided into five levels: "Newbie", "Rookie", "Normal Person", "Journeyman" and "Master". Among them, "Newbie" corresponds to players who have never played the game or the game of this type; "Newbie" corresponds to players who are familiar with the game or the game of this type; "Normal Person" corresponds to players who have played the game or the game of this type; "Journeyman" corresponds to players who are already proficient in the gameplay of the game or the game of this type; and "Master" corresponds to players who are already familiar with the game or the game of this type. Accordingly, when the staff adds guidance information in text form, they need to add text corresponding to the five levels of proficiency. For "newbies", the text message can be: "You need to click the A button in the upper right corner to open the T1 menu. In the T1 menu, you can see the B button, C button, and D button. Select one of the buttons to change your image!"; for "novices", the text message can be: "You need to click the A button to open the T1 menu. In the T1 menu, you can see multiple selection buttons. Select one of the buttons to change your image!"; for "normal people", the text message can be: "Click the A button to open the T1 menu. Select one of the buttons in the T1 menu to change your image!"; for "experienced workers", the text message can be: "Click the A button to change your image!"; for "masters", the text message can be: "Welcome to your world!".
[0053] Accordingly, when a new user enters the game and the game guide is displayed, a pop-up window asking for proficiency can appear: "Please select the proficiency that matches your level from the following five levels." The proficiency levels are: "Newbie," "Rookie," "Normal," "Journeyman," and "Master." After the user selects the corresponding proficiency level, the corresponding newbie guide is displayed.
[0054] It should be noted that the proficiency of new users can be determined not only through the user's own choice, but also based on the user's data. For example, the user's identity code can be used to find out that the user has registered a game account in other regions of the game, and the user's proficiency can be determined based on the level of the game account in other regions, or the user can be asked to take a question-answering test and the user's proficiency can be determined based on the result of the question-answering test.
[0055] Furthermore, the user's proficiency in a particular part of the game can be used to determine the proficiency of the newbie guide for that part. For example, when a new user enters the game and the game guide is displayed, a pop-up window can be displayed asking "Have you played this type of game or this game before?" If the user confirms that they have played this type of game before, it can be determined that the user is unfamiliar with the game interface but familiar with the gameplay. In this case, the newbie guide will not include any gameplay guidance. Alternatively, the user can be asked to play a trial game and then rated based on that game to determine their proficiency in the gameplay.
[0056] In the embodiment of this specification, the marker control is monitored and corresponding information is obtained when the marker control is clicked, which makes the operation simple, simplifies the development process, and thus improves the development efficiency.
[0057] Step 106: Acquire a mark set according to the operation information for the mark control, wherein the mark set carries position information, time information, and attribute information.
[0058] The tag set can be understood as a set of tags obtained each time the control is operated.
[0059] In actual situations, after the staff operates the control in the edit mode, a single point mark will be generated. After the staff completes the entire novice guidance, multiple single point marks will be obtained, and the multiple single point marks will be merged into a mark set.
[0060] For example, a staff member clicks a dialogue control. In response to the click, a single point marker is generated. The staff member continues to control the game character and, when reaching a fork in the road, needs to guide the character, so the staff member clicks the guidance control. Another single point marker is generated, and the marker set is obtained based on these two single point markers.
[0061] In the embodiment of this specification, multiple operation information are combined into a tag set so that a script file can be generated with one click in subsequent steps, which simplifies the development steps and improves development efficiency.
[0062] Specifically, the acquiring of the tag set according to the operation information on the tag control includes:
[0063] Obtaining a single point marker according to the position coordinates of the simulation object and the attribute information;
[0064] A marker set is obtained according to the plurality of single-point markers.
[0065] Here, a single point mark refers to a mark, for example, a mark of a coordinate point in a game.
[0066] In actual application, after the staff operates the control in the edit mode, a single point mark will be generated. After the staff completes the entire novice guidance, multiple single point marks will be obtained. Multiple single point marks will be merged into a mark set.
[0067] For example, a staff member clicks on a dialogue control. In response to the click on the dialogue control, the position of the simulated object in the game is determined, that is, the position coordinates (20000, 50000) are recorded. At the same time, it is determined that the dialogue control is clicked, and a dialogue information editing window pops up on the game screen. The staff member enters the dialogue in the dialogue information editing window and obtains the text entered in the dialogue information editing window. At this time, a single point mark is obtained. The staff member continues to control the game character to move forward. When the character reaches a fork in the road, it needs to be guided along the road. The staff member clicks on the guidance control. In response to the click on the guidance control, the position of the simulated object in the game is determined, that is, the position coordinates (20350, 52000) are recorded. A road guidance image is added to the game screen. At this time, another single point mark is obtained. The mark set is obtained based on these two single point marks.
[0068] The embodiment of this specification generates a tag set according to the operation information of the staff, which simplifies the script generation process and improves the development efficiency.
[0069] Specifically, obtaining a single point marker according to the position coordinates of the simulated object and the attribute information includes:
[0070] generating display data according to the attribute information in the attribute information input control, wherein the display data includes text, pictures and sounds;
[0071] A single point mark is obtained according to the position coordinates of the simulation object, the current time and the display data.
[0072] Among them, display data refers to the data displayed in the game, such as dialogues, pictures, etc.; current time refers to the time when the staff operates the mark control.
[0073] In actual application, the staff entered text A in the dialogue information editing window, but text A is not suitable for direct display in the game screen. The text A needs to be processed to obtain text that can be displayed, and then the processed text A is added to the single-point mark.
[0074] For example, the staff clicks on the dialogue control, and in response to the click operation on the dialogue control, determines the position of the simulated object in the game, that is, records the position coordinates (20000, 50000), and at the same time determines that the dialogue control is clicked, and a dialogue information editing window pops up in the game screen. The staff enters the dialogue in the dialogue information editing window: "Hello, I am your route assistant", obtains the text "Hello, I am your route assistant" entered in the dialogue information editing window, adds color to the text to obtain display data: red "Hello, I am your route assistant", and then obtains a single point mark based on the display data and the current time 7:35:03 and (20000, 50000).
[0075] In the embodiment of this specification, the staff only needs to input the initial attribute information, and the attribute information is automatically processed to obtain text, pictures, and voice that are adapted to the game, thereby improving development efficiency.
[0076] Furthermore, the specific implementation method of obtaining single point marking is described as follows.
[0077] The obtaining of a single point mark according to the position coordinates, current time and display data of the simulated object comprises:
[0078] Determining a current area within a preset radius according to the position coordinates of the simulated object;
[0079] The current area, current time and display data are associated with each other to obtain a single mark.
[0080] The preset radius may be a radius of a measurement unit in a game map, such as 500 coordinate values or 20 grids; the current area refers to a set area where a virtual object in the game is located.
[0081] In actual applications, when the player controls the game character to reach an area in the game, guidance, dialogue and other information will be displayed. Therefore, after obtaining the position coordinates, it is necessary to calculate the area around the position coordinates so that the game guidance can be triggered when the player controls the game character to reach an area.
[0082] For example, the staff clicks on the dialogue control, and in response to the click operation on the dialogue control, determines the position of the simulated object in the game, that is, records the position coordinates (20000, 50000), and then calculates the current area around the position coordinates (20000, 50000) with the 200 coordinate value to obtain the current area D. At the same time, it is determined that the dialogue control is clicked, and a dialogue information editing window pops up on the game screen. The staff enters the dialogue in the dialogue information editing window: "Hello, I am your route assistant", obtains the text "Hello, I am your route assistant" entered in the dialogue information editing window, adds color to the text to obtain display data: red "Hello, I am your route assistant", and then generates a single point mark based on the display data and the current time 7:35:3 and the current area D.
[0083] The embodiment of this specification determines the current area within a preset radius based on the position coordinates of the simulated object, and displays a novice guide when the player controls the simulated object to enter the current area, thereby improving the universality of the game guide.
[0084] Step 108: Generate a target script according to the tag set.
[0085] The target script may be a final script, such as a game boot script.
[0086] In actual applications, after obtaining the tag set, the target script can be generated according to the single-point tag in the tag set. In the game, the game guide displays different data in sequence, that is, when the player is performing the novice guide tasks, they complete them one by one.
[0087] Specifically, generating a target script according to the tag set includes:
[0088] Sequentially sorting the plurality of time attributes in the tag set to obtain a sorted list;
[0089] determining a display order of the attribute information and the location attribute according to the sorted list;
[0090] A target script is generated according to the display order.
[0091] The sorted list may be a list obtained in chronological order or a list obtained in a set order.
[0092] In practical applications, the order can be determined based on the time when the staff clicks the mark control, and then the target script can be generated based on the attribute information and position attributes corresponding to the time point in the mark set.
[0093] For example, the mark set includes single-point mark S1, single-point mark S2 and single-point mark S3, among which the time attribute of single-point mark S1 is 7 hours 35 minutes and 3 seconds, the time attribute of single-point mark S2 is 7 hours 38 minutes and 30 seconds, and the time attribute of single-point mark S3 is 7 hours 24 minutes and 45 seconds. Then the sorted list is 7 hours 24 minutes and 45 seconds, 7 hours 35 minutes and 3 seconds, and 7 hours 38 minutes and 30 seconds. Then, the display order of the attribute information and position attributes corresponding to the time attributes is determined, that is, when the player operates the virtual object to reach the area of single-point mark S3, the text, sound or picture of single-point mark S3 is displayed, and then when it reaches the area of single-point mark S1, the text, sound or picture of single-point mark S1 is displayed, and finally when it reaches the area of single-point mark S2, the text, sound or picture of single-point mark S2 is displayed.
[0094] The embodiment of this specification determines the order of tasks in the novice guide according to the time of editing by the staff, eliminating the step of setting the order and improving development efficiency.
[0095] Furthermore, generating a target script according to the display order includes:
[0096] Generate script statements according to the display order;
[0097] Generate a script file according to the script statement.
[0098] The script statements may be program execution statements, such as Java language execution statements and Lua language execution statements.
[0099] Continuing with the above example, when the player operates the virtual object to reach the area of single-point marker S3, the text, sound or picture of single-point marker S3 is displayed. Then, when the player reaches the area of single-point marker S1, the text, sound or picture of single-point marker S1 is displayed. Finally, when the player reaches the area of single-point marker S2, the text, sound or picture of single-point marker S2 is displayed. Statements M1, M2 and M3 are generated, and statements M1, M2 and M3 are recorded in the script file.
[0100] The embodiments of this specification generate corresponding script statements according to the required computer language, which can adapt to games in various development environments and improve universality.
[0101] See also Figure 3 , Figure 3 A flowchart of a script generation method according to an embodiment of the present disclosure is shown, which specifically includes the following steps.
[0102] Step 302: Determine the editing mode according to the preset framework.
[0103] Among them, the preset framework can be an underlying framework written based on a computer language, such as a framework written by a Lua coroutine; the editing mode can be a mode for editing the game screen, for example, adding graphics, text, etc. to the game screen.
[0104] In actual applications, in the game, novice players will be guided to familiarize themselves with the game's operations and interface. However, currently the novice guides are directly written into the game files instead of existing separately, which makes the novice guide code difficult to maintain. Therefore, the novice guide code can be managed independently, which requires generating a separate game guide script file.
[0105] For example, a preset framework is written using Lua collaborative programs. The preset framework includes a boot management class layer, a boot script base class layer, and a boot script layer. The boot management class layer provides data and tools, the boot script base class layer provides interfaces such as game boot, start, and end, and the boot script layer provides script storage and management functions. Based on this preset framework, the editing mode in the game is enabled by a staff member using a novice account to play in the game, and multiple controls are set on the game screen. Each control has different functions, and can include guidance controls, plot controls, and dialogue controls.
[0106] Step 304: In response to the click operation, record the position coordinates of the simulation object and determine the type of the marker control in the editing mode.
[0107] The simulation object may be a character object, an object object, etc. in the game, for example, a character in a novice guide; the position coordinates refer to the coordinates of the simulation object in the game, for example (20000, 50000).
[0108] In actual applications, after the staff clicks the control, they need to record the position of the simulated object in the game so that the guidance information can be displayed when the simulated object is at the current position.
[0109] For example, the staff clicks on the dialogue control, and in response to the click operation on the dialogue control, determines the position of the simulated object in the game, that is, records the position coordinates (20000, 50000), and determines the type of the marking control at the same time.
[0110] Step 306: Displaying the attribute information input control according to the type of the mark control.
[0111] In actual applications, it is also necessary to determine the type of markup control so that staff can input text, pictures, sounds and other information when they need to.
[0112] For example, it is determined that the dialog control is clicked, and a dialog information editing window pops up in the game screen. The staff enters the dialog in the dialog information editing window and obtains the text entered in the dialog information editing window.
[0113] Step 308: Collect the attribute information in the attribute information input control.
[0114] The attribute information may be text, images, sounds, and other information, such as a conversation text.
[0115] For example, after a staff member enters a conversation in a conversation information editing window, the staff member obtains the text entered in the conversation information editing window.
[0116] Step 310: Generate display data according to the attribute information in the attribute information input control, wherein the display data includes text, pictures and sounds.
[0117] Display data refers to data displayed in the game, such as dialogues, pictures, etc.
[0118] In actual application, the staff entered text A in the dialogue information editing window, but text A is not suitable for direct display in the game screen. The text A needs to be processed to obtain text that can be displayed, and then the processed text A is added to the single-point mark.
[0119] For example, the staff clicks on the dialogue control, and in response to the click operation on the dialogue control, determines the position of the simulated object in the game, that is, records the position coordinates (20000, 50000), and at the same time determines that the dialogue control is clicked, and a dialogue information editing window pops up in the game screen. The staff enters the dialogue in the dialogue information editing window: "Hello, I am your route assistant", obtains the text "Hello, I am your route assistant" entered in the dialogue information editing window, adds color to the text to obtain the display data: red "Hello, I am your route assistant".
[0120] Step 312: Obtain a single point marker according to the position coordinates, current time and display data of the simulation object, and obtain a marker set according to multiple single point markers.
[0121] The current time refers to the time when the staff operates the mark control.
[0122] For example, after obtaining the display data: "Hello, I am your route assistant" in red, a single point mark is generated by associating the display data with the current time 7:35:3 seconds and the location coordinates (20000, 50000).
[0123] Step 314: sequentially sorting a plurality of the time attributes in the mark set to obtain a sorting list.
[0124] The sorting list can be a list obtained according to time sequence or a list obtained according to a set sequence.
[0125] In actual application, the sequence can be determined according to the time when the staff clicks the mark control, and then the target script is generated according to the attribute information and the position attribute corresponding to the time point in the mark set.
[0126] For example, the mark set includes a single-point mark S1, a single-point mark S2 and a single-point mark S3, the time attribute of the single-point mark S1 is 7:35:3, the time attribute of the single-point mark S2 is 7:38:30, and the time attribute of the single-point mark S3 is 7:24:45, and the sorting list is 7:24:45, 7:35:3 and 7:38:30.
[0127] Step 316: determining the display sequence of the attribute information and the position attribute according to the sorting list.
[0128] For example, the display sequence of the attribute information and the position attribute corresponding to the time attribute is then determined, that is, when the player operates the virtual object to reach the area of the single-point mark S3, the text, sound or picture of the single-point mark S3 is displayed, then when the player operates the virtual object to reach the area of the single-point mark S1, the text, sound or picture of the single-point mark S1 is displayed, and finally when the player operates the virtual object to reach the area of the single-point mark S2, the text, sound or picture of the single-point mark S2 is displayed.
[0129] Step 318: generating a target script according to the display sequence.
[0130] The target script can be a final script, for example, a game guide script.
[0131] In the above example, when the player operates the virtual object to reach the area of the single-point mark S3, the text, sound or picture of the single-point mark S3 is displayed, then when the player operates the virtual object to reach the area of the single-point mark S1, the text, sound or picture of the single-point mark S1 is displayed, and finally when the player operates the virtual object to reach the area of the single-point mark S2, the text, sound or picture of the single-point mark S2 is displayed, a sentence M1, a sentence M2 and a sentence M3 are generated, and the sentence M1, the sentence M2 and the sentence M3 are recorded in a script file.
[0132] Corresponding to the method embodiments, the present specification also provides script generation device embodiments, Figure 4 A structural schematic diagram of a script generation device provided by an embodiment of the present specification is shown. As shown in the figure, Figure 4 The device includes:
[0133] A mode determination module 402 is configured to determine an editing mode according to a preset framework;
[0134] The information collection module 404 is configured to collect operation information for the mark control in the editing mode;
[0135] The tag acquisition module 406 is configured to acquire a tag set according to the operation information on the tag control, wherein the tag set carries position information, time information and attribute information;
[0136] The script generation module 408 is configured to generate a target script according to the tag set.
[0137] Optionally, the information collection module 404 is further configured to:
[0138] In response to a click operation, recording the position coordinates of the simulation object and determining the type of the marking control in the editing mode;
[0139] Displaying an attribute information input control according to the type of the mark control;
[0140] Collect the attribute information in the attribute information input control.
[0141] Optionally, the tag acquisition module 406 is further configured to:
[0142] Obtaining a single point marker according to the position coordinates of the simulation object and the attribute information;
[0143] A marker set is obtained according to the plurality of single-point markers.
[0144] Optionally, the tag acquisition module 406 is further configured to:
[0145] generating display data according to the attribute information in the attribute information input control, wherein the display data includes text, pictures and sounds;
[0146] A single point mark is obtained according to the position coordinates of the simulation object, the current time and the display data.
[0147] Optionally, the tag acquisition module 406 is further configured to:
[0148] Determining a current area within a preset radius according to the position coordinates of the simulated object;
[0149] The current area, current time and display data are associated with each other to obtain a single mark.
[0150] Optionally, the script generation module 408 is further configured to:
[0151] Sequentially sorting the plurality of time attributes in the tag set to obtain a sorted list;
[0152] determining a display order of the attribute information and the location attribute according to the sorted list;
[0153] A target script is generated according to the display order.
[0154] Optionally, the script generation module 408 is further configured to:
[0155] Generate script statements according to the display order;
[0156] Generate a script file according to the script statement.
[0157] Optionally, the information collection module 404 is further configured to:
[0158] The collecting of operation information for the mark control in the editing mode includes:
[0159] In response to a click operation, determining a guide level in the editing mode, recording the position coordinates of the simulation object corresponding to the guide level, and determining the type of the mark control;
[0160] Displaying an attribute information input control according to the type of the mark control;
[0161] Collect the attribute information in the attribute information input control.
[0162] The script generation device determines the editing mode based on a preset framework. In this editing mode, it collects operation information for the marker controls and, based on this information, obtains a marker set containing location, time, and attribute information. The target script is then generated based on the marker set. By performing novice onboarding tasks in the game and recording the operation information, a separate script file is automatically generated based on this information, making the onboarding code procedural, easy to read, and maintain.
[0163] The above is a schematic diagram of a script generation device according to this embodiment. It should be noted that the technical solution of the script generation device and the technical solution of the script generation method described above are based on the same concept. For details not described in detail in the technical solution of the script generation device, please refer to the description of the technical solution of the script generation method described above.
[0164] Figure 5 The block diagram of a computing device 500 according to one embodiment of the present disclosure is shown. Components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
[0165] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 540 can include one or more of any type of network interface (for example, a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a global microwave interconnection access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like, wired or wireless.
[0166] In one embodiment of the present specification, the above-mentioned components of the computing device 500 and other components not shown in the Figure 5 may be connected to each other, for example, through a bus. It should be understood that Figure 5 The computing device structure diagram shown is only for the purpose of example, and is not a limitation on the scope of the present specification. Other components can be added or replaced by those skilled in the art as needed.
[0167] The computing device 500 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, and the like), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, and the like), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 500 can also be a mobile or stationary server.
[0168] The processor 520 is configured to execute computer-executable instructions, which, when executed by the processor, implement the steps of the script generation method described above.
[0169] The above is a schematic scheme of a computing device according to the present embodiment. It should be noted that the technical scheme of the computing device belongs to the same concept as the technical scheme of the script generation method described above, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the script generation method.
[0170] The present embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the script generation method described above.
[0171] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of this storage medium and the technical scheme of the script generation method described above are based on the same concept. For details not described in detail in the technical scheme of the storage medium, please refer to the description of the technical scheme of the script generation method described above.
[0172] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned script generation method.
[0173] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the script generation method described above are based on the same concept. For details not described in detail in the technical scheme of the computer program, please refer to the description of the technical scheme of the script generation method described above.
[0174] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0175] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0176] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0177] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0178] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A script generation method, characterized in that: include: Determine the editing mode based on the preset frame, wherein different preset frames have different controls; Collecting operation information for a mark control in the editing mode, wherein the mark control is used by a staff member to operate according to the needs of a novice guide of the game in the editing mode to display guidance information; Acquire a mark set based on the operation information on the mark control, wherein the mark set carries position information, time information, and attribute information, and the mark set is obtained by combining multiple single-point marks generated by the staff member after completing the entire novice guidance by operating the control in the editing mode; A target script is generated according to the tag set, wherein the target script is a game boot script.
2. The method according to claim 1, characterized in that The collecting of operation information for the mark control in the editing mode includes: In response to a click operation, recording the position coordinates of the simulation object and determining the type of the marking control in the editing mode; Displaying an attribute information input control according to the type of the mark control; Collect the attribute information in the attribute information input control.
3. The method according to claim 2, characterized in that The acquiring of the mark set according to the operation information on the mark control includes: Obtaining a single point marker according to the position coordinates of the simulation object and the attribute information; A marker set is obtained according to the plurality of single-point markers.
4. The method according to claim 3, characterized in that The obtaining of a single point mark according to the position coordinates of the simulated object and the attribute information includes: generating display data according to the attribute information in the attribute information input control, wherein the display data includes text, pictures and sounds; A single point mark is obtained according to the position coordinates of the simulation object, the current time and the display data.
5. The method according to claim 3, characterized in that The obtaining of a single point mark according to the position coordinates, current time and display data of the simulated object comprises: Determining a current area within a preset radius according to the position coordinates of the simulated object; The current area, current time and display data are associated with each other to obtain a single mark.
6. The method according to claim 1, characterized in that Generating a target script according to the tag set includes: Sequentially sorting the plurality of time attributes in the tag set to obtain a sorted list; determining a display order of the attribute information and the location attribute according to the sorted list; A target script is generated according to the display order.
7. The method according to claim 6, characterized in that Generating a target script according to the display order includes: Generate script statements according to the display order; Generate a script file according to the script statement.
8. The method according to claim 1, characterized in that The collecting of operation information for the mark control in the editing mode includes: In response to a click operation, determining a guide level in the editing mode, recording the position coordinates of the simulation object corresponding to the guide level, and determining the type of the mark control; Displaying an attribute information input control according to the type of the mark control; Collect the attribute information in the attribute information input control.
9. A script generation device, comprising: A mode determination module is configured to determine an editing mode according to a preset framework, wherein different controls are provided in different preset frameworks; an information collection module configured to collect operation information for a mark control in the editing mode, wherein the mark control is used by a staff member to operate according to the needs of a novice guide of the game in the editing mode and display guidance information; a mark acquisition module configured to acquire a mark set based on operation information on the mark control, wherein the mark set carries location information, time information, and attribute information, and is obtained by combining multiple single-point marks generated by the staff member after completing the entire novice guidance by operating the control in the editing mode; The script generation module is configured to generate a target script according to the tag set, wherein the target script is a game boot script.
10. A computing device comprising: memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the script generation method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the script generation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multimedia editing method and device in game, terminal equipment and storage medium
CN111124403A