CN113908554B - Implementation method and system for automatically generating game scenario - Google Patents

Implementation method and system for automatically generating game scenario Download PDF

Info

Publication number
CN113908554B
CN113908554B CN202111225554.8A CN202111225554A CN113908554B CN 113908554 B CN113908554 B CN 113908554B CN 202111225554 A CN202111225554 A CN 202111225554A CN 113908554 B CN113908554 B CN 113908554B
Authority
CN
China
Prior art keywords
scenario
data
blocking
time axis
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111225554.8A
Other languages
Chinese (zh)
Other versions
CN113908554A (en
Inventor
刘德建
温荣泉
陈宏展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN202111225554.8A priority Critical patent/CN113908554B/en
Publication of CN113908554A publication Critical patent/CN113908554A/en
Application granted granted Critical
Publication of CN113908554B publication Critical patent/CN113908554B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides an implementation method for automatically generating a game scenario, which comprises the steps of 1, inputting scenario data for creating the game scenario, judging whether the type of the inputted scenario data is Json data, and if not, carrying out data conversion on the inputted scenario data; step 2 is entered; if yes, directly entering the step 2; 2. analyzing the converted data to generate a blocking time axis; 3. distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, carrying out the step 4; 4. and executing scenario instructions in the scenario data, and continuously distributing scenario data corresponding to the blocking time axis according to the blocking time axis. The game provided by the invention provides an interaction method for blocking the time axis, supports playing the scenario according to the time line, and sets the scenario to play at any moment, thereby realizing complete playing and interaction control of the game scenario.

Description

Implementation method and system for automatically generating game scenario
Technical Field
The invention relates to the technical field of game making, in particular to a realization method and a system for automatically generating game scenario.
Background
The scenario is considered by numerous trusted players and developers to be the souls of the game. For one player, this is not any inadequacy; as a developer, there is a problem that scenario interactivity is low when scenario design is performed. The game scenario can be expressed perfectly by words, pictures and animations, but is difficult to express accurately in an interactive mode. Existing technologies for generating game scenarios include generating game scenarios based on configuration dynamics, generating game scenarios based on Json, and the like; the prior art has high limitation on generation, is usually only used for generating specific game scenarios, does not support interactive control in a mode of blocking a time axis, is difficult to expand and cannot be widely used.
Disclosure of Invention
In order to overcome the problems, the invention aims to provide an implementation method for automatically generating the game scenario, which solves the problems that the game scenario is executed in a single direction, is not supported to be controlled in a time axis manner, is complex to use, is not easy to maintain, cannot be dynamically constructed and the like.
The invention is realized by adopting the following scheme: an implementation method for automatically generating a game scenario, the method comprising the following steps:
S1, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, and if not, performing data conversion on the input scenario data; step S2 is entered; if yes, directly enter step S2;
S2, analyzing the converted data to generate a blocking time axis; the blocking time axis is a time axis supporting blocking conditions, wherein when blocking condition nodes are not set in blocking time axis scenario node data, the time axis normally operates according to a time sequence; when the blocking condition is set, the playing time is updated to the blocking condition node, the updating of the playing time is stopped, and the playing time is moved to the starting position of the next node to continue playing after the blocking condition is met;
s3, distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, carrying out step S4;
and S4, executing scenario instructions in the scenario data, and continuously distributing scenario data corresponding to the blocking time axis according to the blocking time axis.
Further, the step S1 further specifically includes:
Step S11, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, if yes, entering step S12, if not, judging whether the input scenario data is a Json file path, if yes, reading the Json data in the file, entering step S12, otherwise, stopping the flow;
Step S12, identifying the Json data as a Json instance type;
step S13, creating a scenario data structure;
Step S14, filling basic data in the Json data into corresponding field values of the scenario data structure;
s15, filling data without matching fields into an expansion field queue of the scenario data structure;
Step S16, judging whether the scenario data in the scenario data structure is root node data or not, and if not, adding the scenario data into child data of the scenario data of the father node; if yes, recording as root node scenario data;
Step S17, judging whether the Json data contains sub data, if yes, entering step S13; and if not, returning the created root node scenario data, and ending the flow.
Further, the analysis of the converted data to generate the blocking time axis is further specifically:
s21, inputting converted scenario data for creating a game scenario; the scenario data comprises a plurality of sub scenario data, and the data recorded in the scenario data comprises scenario instructions and execution modes thereof, scenario node time length, whether nodes are blocked, blocking conditions and whether skipping is supported;
step S22, creating a blocking time axis;
Step S23, reading all scenario node data in scenario data for creating a game scenario; adding all scenario node data into a scenario node data queue;
step S24, judging whether a scenario node data queue is empty, if so, returning to a blocking time axis, and ending the flow; if not, the process proceeds to step S25;
s25, reading scenario node data from a scenario node data queue, and adding the scenario node data into the current node position of the blocking time axis; the current time value of the blocking time axis moves backwards to the time value accessed in the scenario node data;
S26, judging whether a blocking value is recorded in scenario node data, wherein the blocking value is a data value corresponding to a blocking condition; if not, the process proceeds to step S27; adding a blocking condition node in a blocking time axis, and setting a blocking value to adjust to a blocking condition recorded in scenario node data; the current time axis of the blocking time axis moves backward by one blocking node unit time value, and the step S27 is entered;
Step S27, judging whether other scenario data nodes exist in the scenario data node queue, if yes, executing step S25; and if not, returning to the blocking time axis, and ending the flow.
Further, the blockage timeline includes: the time node set comprises a plurality of time nodes, and each time node comprises a time length, a progress value and a blocking condition.
Further, the step S3 further specifically includes:
s31, inputting scenario data corresponding to a blocking time axis;
Step S32, reading a progress value of a blocking time axis;
step S33, judging whether the execution of the blocking time axis is finished, if yes, ending the distribution of scenario data corresponding to the blocking time axis and ending the flow, otherwise, reading the scenario data of the current progress value;
Step S34, a scenario instruction data set in scenario data is read, and data in the scenario instruction data set is added into a scenario instruction data queue;
step S35, judging whether a scenario instruction data queue is empty, if yes, updating a blocking time axis progress value to the next node, executing step S33, and if not, executing step S36;
step S36, reading one scenario instruction data from the scenario instruction data queue, and executing the scenario instruction data;
Step S37, judging whether other scenario instruction data exist in the scenario instruction data queue, if yes, executing step S36; if not, the congestion timeline progress value is updated to the next node, and step S33 is performed.
Further, step S4 further specifically includes: s41, inputting scenario instruction data and reading scenario instructions in the scenario instruction data;
Step S42, judging whether the scenario instruction registers the corresponding execution mode, if not, completing the scenario instruction execution and ending the flow, if yes, proceeding to step S43,
Step S43, executing the corresponding execution mode to transmit scenario instruction data;
step S44, judging whether the execution mode is synchronously executed; if not, waiting for the execution completion of the asynchronous execution mode, and returning to the execution success event; the execution of the scenario instruction is completed; and if yes, returning an execution success event, and completing the execution of the scenario instruction.
The invention also provides an implementation system for automatically generating the game scenario, which comprises a data conversion module, a data analysis module, a data distribution module and a data execution module;
the data conversion module is used for inputting scenario data for creating a game scenario, judging whether the type of the inputted scenario data is Json data, and if not, carrying out data conversion on the inputted scenario data; executing a data analysis module; if yes, directly executing a data analysis module;
the data analysis module is used for analyzing the converted data to generate a blocking time axis; the blocking time axis is a time axis supporting blocking conditions, wherein when blocking condition nodes are not set in blocking time axis scenario node data, the time axis normally operates according to a time sequence; when the blocking condition is set, the playing time is updated to the blocking condition node, the updating of the playing time is stopped, and the playing time is moved to the starting position of the next node to continue playing after the blocking condition is met;
the data distribution module is used for distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, executing a data execution module;
And the data execution module is used for executing the scenario instructions in the scenario data and continuously distributing the scenario data corresponding to the blocking time axis according to the blocking time axis.
Further, the implementation manner of the data conversion module further specifically includes:
Step S51, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, if yes, entering step S52, if not, judging whether the input scenario data is a Json file path, if yes, reading the Json data in the file, entering step S52, otherwise, stopping the flow;
Step S52, identifying the Json data as a Json instance type;
step S53, creating a scenario data structure;
step S54, filling basic data in the Json data into corresponding field values of the scenario data structure;
step S55, filling data without matching fields into an expansion field queue of the scenario data structure;
step S56, judging whether the scenario data in the scenario data structure is root node data or not, and if not, adding the scenario data into child data of the scenario data of the father node; if yes, recording as root node scenario data;
step S57, judging whether the Json data contains sub data, if yes, entering step S53; and if not, returning the created root node scenario data, and ending the flow.
Further, the analysis of the converted data to generate the blocking time axis is further specifically:
step S61, inputting the converted scenario data for creating the game scenario; the scenario data comprises a plurality of sub scenario data, and the data recorded in the scenario data comprises scenario instructions and execution modes thereof, scenario node time length, whether nodes are blocked, blocking conditions and whether skipping is supported;
Step S62, creating a blocking time axis;
step S63, reading all scenario node data in scenario data for creating a game scenario; adding all scenario node data into a scenario node data queue;
Step S64, judging whether a scenario node data queue is empty, if so, returning to a blocking time axis, and ending the flow; if not, the process proceeds to step S65;
Step S65, reading scenario node data from the scenario node data queue, and adding the scenario node data into the current node position of the blocking time axis; the current time value of the blocking time axis moves backwards to the time value accessed in the scenario node data;
Step S66, judging whether a blocking value is recorded in scenario node data, wherein the blocking value is a data value corresponding to a blocking condition; if not, the process proceeds to step S67; adding a blocking condition node in a blocking time axis, and setting a blocking value to adjust to a blocking condition recorded in scenario node data; the current time axis of the blocking time axis moves backward by one blocking node unit time value, and the step S67 is entered;
Step S67, judging whether other scenario data nodes exist in the scenario data node queue, if yes, executing step S65; and if not, returning to the blocking time axis, and ending the flow.
Further, the blockage timeline includes: the time node set comprises a plurality of time nodes, and each time node comprises a time length, a progress value and a blocking condition.
Further, the implementation manner of the data distribution module further specifically includes:
Step S71, inputting scenario data corresponding to a blocking time axis;
step S72, reading a progress value of the blocking time axis;
step S73, judging whether execution of the blocking time axis is completed, if yes, ending the distribution of scenario data corresponding to the blocking time axis and ending the flow, otherwise, reading scenario data of the current progress value;
step S74, a scenario instruction data set in scenario data is read, and data in the scenario instruction data set is added into a scenario instruction data queue;
step S75, judging whether a scenario instruction data queue is empty, if yes, updating a blocking time axis progress value to the next node, executing step S73, and if not, executing step S76;
Step S76, reading one scenario instruction data from the scenario instruction data queue, and executing the scenario instruction data;
Step S77, judging whether other scenario instruction data exist in the scenario instruction data queue, if yes, executing step S76; if not, the congestion timeline progress value is updated to the next node, and step S73 is performed.
Further, the implementation manner of the data execution module further specifically includes: step S81, inputting scenario instruction data and reading scenario instructions in the scenario instruction data;
Step S82, judging whether the scenario instruction registers the corresponding execution mode, if not, completing the scenario instruction execution and ending the flow, if yes, proceeding to step S83,
Step S83, executing the corresponding execution mode to transmit scenario instruction data;
Step S84, judging whether the execution mode is synchronously executed; if not, waiting for the execution completion of the asynchronous execution mode, and returning to the execution success event; the execution of the scenario instruction is completed; and if yes, returning an execution success event, and completing the execution of the scenario instruction.
The invention has the beneficial effects that: according to the invention, the unified general scenario data structure is generated by the game scenario Json data, the data analysis module generates the blocking time axis, and after receiving the user starting scenario, the data distribution module distributes scenario data according to the blocking time axis, and the data execution module executes scenario instructions in the scenario data, so that a complete game scenario playing and interaction control system is realized.
The invention generates the game scenario data of the blocked time axis type through the game scenario Json data or the dynamically constructed general scenario data, reduces the development consumption of the game scenario and the interactive logic, shortens the development period of the game scenario and accelerates the development progress. The game scenario in the invention has unified calling style, fewer relevant files and codes of the game scenario, easier maintenance and lower later maintenance cost.
The game of the invention provides an interaction method for blocking the time axis, which supports playing the scenario according to the time line and setting the scenario to play at any moment; any type of game items can be quickly accessed and used by the invention, the development and maintenance are simple and efficient, custom expanding scenario instructions are supported, and the invention is suitable for various use requirements of the game scenario.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
FIG. 2 is a flow chart of the data conversion operation in the method of the present invention.
Fig. 3 is a schematic diagram of scenario data flow corresponding to a congestion time axis generated by data analysis in the method of the present invention.
Fig. 4 is a schematic diagram of the data structure of the jam time axis of the present invention.
Fig. 5 is a schematic diagram of a scenario data flow for distribution on a blocked time axis in the method of the present invention.
Fig. 6 is a flow chart of executing scenario instructions in scenario data in the method of the present invention.
Fig. 7 is a system schematic block diagram of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
The invention can be applied to the generation and interaction processes of all types of game scenarios, and is different from the conventional development of the game scenarios.
Referring to fig. 1, the implementation method for automatically generating a game scenario of the present invention includes the following steps:
S1, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, and if not, performing data conversion on the input scenario data; step S2 is entered; if yes, directly enter step S2;
S2, analyzing the converted data to generate a blocking time axis; the blocking time axis is a time axis supporting blocking conditions, wherein when blocking condition nodes are not set in blocking time axis scenario node data, the time axis normally operates according to a time sequence; when the blocking condition is set, the playing time is updated to the blocking condition node, the updating of the playing time is stopped, and the playing time is moved to the starting position of the next node to continue playing after the blocking condition is met;
s3, distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, carrying out step S4;
and S4, executing scenario instructions in the scenario data, and continuously distributing scenario data corresponding to the blocking time axis according to the blocking time axis.
The invention is further described with reference to the following specific examples:
s1, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, and if not, performing data conversion on the input scenario data; step S2 is entered; if yes, directly enter step S2; the scenario data comprises scenario data for creating a game scenario, scenario data corresponding to a blocking time axis, scenario instruction data and the like;
referring to fig. 2, the step S1 further specifically includes:
Step S11, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, if yes, entering step S12, if not, judging whether the input scenario data is a Json file path, if yes, reading the Json data in the file, entering step S12, otherwise, stopping the flow;
Step S12, identifying the Json data as a Json instance type;
step S13, creating a scenario data structure;
Step S14, filling basic data in the Json data into corresponding field values of the scenario data structure;
s15, filling data without matching fields into an expansion field queue of the scenario data structure;
Step S16, judging whether the scenario data in the scenario data structure is root node data or not, and if not, adding the scenario data into child data of the scenario data of the father node; if yes, recording as root node scenario data;
Step S17, judging whether the Json data contains sub data, if yes, entering step S13; and if not, returning the created root node scenario data, and ending the flow.
S2, analyzing the converted data to generate a blocking time axis; the jam time axis is a time axis supporting jam conditions,
Referring to fig. 3, the analysis and conversion of the data to generate the blocking time axis is further specifically:
s21, inputting converted scenario data for creating a game scenario; the scenario data comprises a plurality of sub scenario data, and the data recorded in the scenario data comprises scenario instructions and execution modes thereof, scenario node time length, whether nodes are blocked, blocking conditions and whether skipping is supported;
Step S22, creating a blocking time axis; the blocking time axis is a time axis, a plurality of time nodes exist, the blocking condition node is a time node containing blocking conditions, time pauses before the blocking conditions are not achieved, and the next node is entered after the blocking conditions are achieved;
Step S23, reading all scenario node data in scenario data for creating a game scenario; adding all scenario node data into a scenario node data queue;
step S24, judging whether a scenario node data queue is empty, if so, returning to a blocking time axis, and ending the flow; if not, the process proceeds to step S25;
s25, reading scenario node data from a scenario node data queue, and adding the scenario node data into the current node position of the blocking time axis; the current time value of the blocking time axis moves backwards to the time value accessed in the scenario node data;
S26, judging whether a blocking value is recorded in scenario node data, wherein the blocking value is a data value corresponding to a blocking condition; if not, the process proceeds to step S27; adding a blocking condition node in a blocking time axis, and setting a blocking value to adjust to a blocking condition recorded in scenario node data; the current time axis of the blocking time axis moves backward by one blocking node unit time value, and the step S27 is entered; the definition of the blocking value is a data value corresponding to a blocking condition parameter in scenario data, wherein the scenario data can be set or not set, blocking is generated during setting, and the setting is executed according to time sequence;
Step S27, judging whether other scenario data nodes exist in the scenario data node queue, if yes, executing step S25; and if not, returning to the blocking time axis, and ending the flow. Referring to fig. 4, wherein the occlusion time axis includes: the time node set comprises a plurality of time nodes, and each time node comprises a time length, a progress value and a blocking condition. The definition of blocking conditions in the present invention includes, but is not limited to, a character reaching a specified location, a user clicking on an interface, a user interacting with a character, etc.
S3, distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, carrying out step S4;
an example of resolving the converted data to generate a blockage timeline is as follows:
On the blocking time axis, adding blocking condition nodes in the blocking time axis, and setting blocking values to adjust to blocking conditions recorded in scenario node data:
the time 0 node plays the approach animation, and the time length is 5;
Adding a blocking condition for waiting for clicking by a user by the time 5 node, wherein the time length is 1;
The time 6 node is added with a main angle playing action A animation, and the time length is 2;
the NPC1 playing action B animation is added to the time 6 node, and the time length is 2;
the NPC2 playing action C animation is added to the time 7 node, and the time length is 2;
The effect when the blocked timeline is played:
Starting to play the approach animation at the moment 0, and playing for 5 units of time;
Waiting for clicking by a user, and jumping the playing time value to 6 time;
the main angle playing action A is animated, and the NPC1 is used for playing action B;
And when the time is played to 7 times, playing the action C animation by the NPC 2.
Referring to fig. 5, the step S3 of the present invention further specifically includes:
s31, inputting scenario data corresponding to a blocking time axis;
Step S32, reading a progress value of a blocking time axis;
step S33, judging whether the execution of the blocking time axis is finished, if yes, ending the distribution of scenario data corresponding to the blocking time axis and ending the flow, otherwise, reading the scenario data of the current progress value;
Step S34, a scenario instruction data set in scenario data is read, and data in the scenario instruction data set is added into a scenario instruction data queue; definition of scenario instructions in the present invention includes, but is not limited to, displaying a character, setting position rotation or size of a character, action playing of a character, character routing, character reloading, character special effect playing, mobile zooming or dithering of a camera lens, scenario UI display, etc.
Step S35, judging whether a scenario instruction data queue is empty, if yes, updating a blocking time axis progress value to the next node, executing step S33, and if not, executing step S36;
step S36, reading one scenario instruction data from the scenario instruction data queue, and executing the scenario instruction data;
Step S37, judging whether other scenario instruction data exist in the scenario instruction data queue, if yes, executing step S36; if not, the congestion timeline progress value is updated to the next node, and step S33 is performed.
Step S4, executing scenario instructions in the scenario data, and continuously distributing scenario data corresponding to the blocking time axis according to the blocking time axis:
referring to fig. 6, step S4 of the present invention further specifically includes: s41, inputting scenario instruction data and reading scenario instructions in the scenario instruction data;
Step S42, judging whether the scenario instruction registers the corresponding execution mode, if not, completing the scenario instruction execution and ending the flow, if yes, proceeding to step S43,
Step S43, executing the corresponding execution mode to transmit scenario instruction data;
step S44, judging whether the execution mode is synchronously executed; if not, waiting for the execution completion of the asynchronous execution mode, and returning to the execution success event; the execution of the scenario instruction is completed; and if yes, returning an execution success event, and completing the execution of the scenario instruction.
The invention generates a unified general scenario data structure based on the game scenario Json data, and then generates blocking time axis scenario data through a data analysis module. And after receiving the scenario opened by the user, the data distribution module distributes scenario data according to the blocking time axis, and the data execution module executes scenario instructions in the scenario data to realize a complete game scenario playing and interaction control system.
Referring to fig. 7, the invention also provides an implementation system for automatically generating the game scenario, which comprises a data conversion module, a data analysis module, a data distribution module and a data execution module;
the data conversion module is used for inputting scenario data for creating a game scenario, judging whether the type of the inputted scenario data is Json data, and if not, carrying out data conversion on the inputted scenario data; executing a data analysis module; if yes, directly executing a data analysis module;
the data analysis module is used for analyzing the converted data to generate a blocking time axis; the blocking time axis is a time axis supporting blocking conditions, wherein when blocking condition nodes are not set in blocking time axis scenario node data, the time axis normally operates according to a time sequence; when the blocking condition is set, the playing time is updated to the blocking condition node, the updating of the playing time is stopped, and the playing time is moved to the starting position of the next node to continue playing after the blocking condition is met;
the data distribution module is used for distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, executing a data execution module;
And the data execution module is used for executing the scenario instructions in the scenario data and continuously distributing the scenario data corresponding to the blocking time axis according to the blocking time axis.
And a data conversion module: the module provides data conversion capability for the data analysis module, and can convert Json data or Json file paths into unified scenario data.
And a data analysis module: the module provides the capability of analyzing the data to generate the scenario data of the blocking time axis, so that the unified scenario data is analyzed into the scenario data of the blocking time axis, and a data source is provided for the data distribution module.
And a data distribution module: the module provides the capability of distributing the scenario data according to the blocking time axis, realizes that the scenario instruction data set is lifted from the scenario data and distributed, and promotes the execution of the scenario instruction.
And the data execution module is used for: the module provides the capability of executing the scenario instructions, and realizes the process of executing the scenario instructions and applying the data described in the scenario instructions to the scene.
The implementation manner of the data conversion module further specifically comprises:
Step S51, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, if yes, entering step S52, if not, judging whether the input scenario data is a Json file path, if yes, reading the Json data in the file, entering step S52, otherwise, stopping the flow;
Step S52, identifying the Json data as a Json instance type;
step S53, creating a scenario data structure;
step S54, filling basic data in the Json data into corresponding field values of the scenario data structure;
step S55, filling data without matching fields into an expansion field queue of the scenario data structure;
step S56, judging whether the scenario data in the scenario data structure is root node data or not, and if not, adding the scenario data into child data of the scenario data of the father node; if yes, recording as root node scenario data;
step S57, judging whether the Json data contains sub data, if yes, entering step S53; and if not, returning the created root node scenario data, and ending the flow.
The analysis and conversion data generation blocking time axis is further specifically as follows:
step S61, inputting the converted scenario data for creating the game scenario; the scenario data comprises a plurality of sub scenario data, and the data recorded in the scenario data comprises scenario instructions and execution modes thereof, scenario node time length, whether nodes are blocked, blocking conditions and whether skipping is supported;
Step S62, creating a blocking time axis;
step S63, reading all scenario node data in scenario data for creating a game scenario; adding all scenario node data into a scenario node data queue;
Step S64, judging whether a scenario node data queue is empty, if so, returning to a blocking time axis, and ending the flow; if not, the process proceeds to step S65;
Step S65, reading scenario node data from the scenario node data queue, and adding the scenario node data into the current node position of the blocking time axis; the current time value of the blocking time axis moves backwards to the time value accessed in the scenario node data;
Step S66, judging whether a blocking value is recorded in scenario node data, wherein the blocking value is a data value corresponding to a blocking condition; if not, the process proceeds to step S67; adding a blocking condition node in a blocking time axis, and setting a blocking value to adjust to a blocking condition recorded in scenario node data; the current time axis of the blocking time axis moves backward by one blocking node unit time value, and the step S67 is entered;
step S67, judging whether other scenario data nodes exist in the scenario data node queue, if yes, executing step S65; and if not, returning to the blocking time axis, and ending the flow. The occlusion time axis includes: the time node set comprises a plurality of time nodes, and each time node comprises a time length, a progress value and a blocking condition.
The implementation manner of the data distribution module further specifically comprises:
Step S71, inputting scenario data corresponding to a blocking time axis;
step S72, reading a progress value of the blocking time axis;
step S73, judging whether execution of the blocking time axis is completed, if yes, ending the distribution of scenario data corresponding to the blocking time axis and ending the flow, otherwise, reading scenario data of the current progress value;
step S74, a scenario instruction data set in scenario data is read, and data in the scenario instruction data set is added into a scenario instruction data queue;
Step S75, judging whether a scenario instruction data queue is empty, if yes, updating a blocking time axis progress value to the next node, executing step S73, and if not, executing step S76; definition of scenario instructions in the present invention includes, but is not limited to, displaying a character, setting position rotation or size of a character, action playing of a character, character routing, character reloading, character special effect playing, mobile zooming or dithering of a camera lens, scenario UI display, etc.
Step S76, reading one scenario instruction data from the scenario instruction data queue, and executing the scenario instruction data;
Step S77, judging whether other scenario instruction data exist in the scenario instruction data queue, if yes, executing step S76; if not, the congestion timeline progress value is updated to the next node, and step S73 is performed.
The implementation manner of the data execution module further specifically includes: step S81, inputting scenario instruction data and reading scenario instructions in the scenario instruction data;
Step S82, judging whether the scenario instruction registers the corresponding execution mode, if not, completing the scenario instruction execution and ending the flow, if yes, proceeding to step S83,
Step S83, executing the corresponding execution mode to transmit scenario instruction data;
Step S84, judging whether the execution mode is synchronously executed; if not, waiting for the execution completion of the asynchronous execution mode, and returning to the execution success event; the execution of the scenario instruction is completed; and if yes, returning an execution success event, and completing the execution of the scenario instruction.
The invention is applicable to all types of game scenario generation and interaction processes, including but not limited to generation and interaction processes of game scenario in 2D games, generation and interaction processes of game scenario in 3D games, generation and interaction processes of game scenario in AR, VR games or applications, and generation and interaction processes of game scenario in other types of games.
The foregoing description is only of the preferred embodiments of the invention, and all changes and modifications that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (10)

1. An implementation method for automatically generating game scenario is characterized in that: the method comprises the following steps:
S1, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, and if not, performing data conversion on the input scenario data; step S2 is entered; if yes, directly enter step S2;
S2, analyzing the converted data to generate a blocking time axis; the blocking time axis is a time axis supporting blocking conditions, wherein when blocking condition nodes are not set in blocking time axis scenario node data, the time axis normally operates according to a time sequence; when the blocking condition is set, the playing time is updated to the blocking condition node, the updating of the playing time is stopped, and the playing time is moved to the starting position of the next node to continue playing after the blocking condition is met;
s3, distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, carrying out step S4;
s4, executing scenario instructions in the scenario data, and continuously distributing scenario data corresponding to the blocking time axis according to the blocking time axis;
the analysis and conversion data generation blocking time axis is further specifically as follows:
s21, inputting converted scenario data for creating a game scenario; the scenario data comprises a plurality of sub scenario data, and the data recorded in the scenario data comprises scenario instructions and execution modes thereof, scenario node time length, whether nodes are blocked, blocking conditions and whether skipping is supported;
step S22, creating a blocking time axis;
Step S23, reading all scenario node data in scenario data for creating a game scenario; adding all scenario node data into a scenario node data queue;
step S24, judging whether a scenario node data queue is empty, if so, returning to a blocking time axis, and ending the flow; if not, the process proceeds to step S25;
s25, reading scenario node data from a scenario node data queue, and adding the scenario node data into the current node position of the blocking time axis; the current time value of the blocking time axis moves backwards to the time value accessed in the scenario node data;
S26, judging whether a blocking value is recorded in scenario node data, wherein the blocking value is a data value corresponding to a blocking condition; if not, the process proceeds to step S27; adding a blocking condition node in a blocking time axis, and setting a blocking value to adjust to a blocking condition recorded in scenario node data; the current time axis of the blocking time axis moves backward by one blocking node unit time value, and the step S27 is entered;
Step S27, judging whether other scenario data nodes exist in the scenario data node queue, if yes, executing step S25; and if not, returning to the blocking time axis, and ending the flow.
2. The method for automatically generating a game scenario according to claim 1, wherein: the step S1 further specifically includes:
Step S11, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, if yes, entering step S12, if not, judging whether the input scenario data is a Json file path, if yes, reading the Json data in the file, entering step S12, otherwise, stopping the flow;
Step S12, identifying the Json data as a Json instance type;
step S13, creating a scenario data structure;
Step S14, filling basic data in the Json data into corresponding field values of the scenario data structure;
s15, filling data without matching fields into an expansion field queue of the scenario data structure;
Step S16, judging whether the scenario data in the scenario data structure is root node data or not, and if not, adding the scenario data into child data of the scenario data of the father node; if yes, recording as root node scenario data;
Step S17, judging whether the Json data contains sub data, if yes, entering step S13; and if not, returning the created root node scenario data, and ending the flow.
3. The method for automatically generating a game scenario according to claim 1, wherein: the occlusion time axis includes: the time node set comprises a plurality of time nodes, and each time node comprises a time length, a progress value and a blocking condition.
4. A method for automatically generating a game scenario according to claim 3, wherein: the step S3 further specifically includes:
s31, inputting scenario data corresponding to a blocking time axis;
Step S32, reading a progress value of a blocking time axis;
step S33, judging whether the execution of the blocking time axis is finished, if yes, ending the distribution of scenario data corresponding to the blocking time axis and ending the flow, otherwise, reading the scenario data of the current progress value;
Step S34, a scenario instruction data set in scenario data is read, and data in the scenario instruction data set is added into a scenario instruction data queue;
step S35, judging whether a scenario instruction data queue is empty, if yes, updating a blocking time axis progress value to the next node, executing step S33, and if not, executing step S36;
step S36, reading one scenario instruction data from the scenario instruction data queue, and executing the scenario instruction data;
Step S37, judging whether other scenario instruction data exist in the scenario instruction data queue, if yes, executing step S36; if not, the congestion timeline progress value is updated to the next node, and step S33 is performed.
5. A method for automatically generating a game scenario according to claim 3, wherein: the step S4 further specifically includes: s41, inputting scenario instruction data and reading scenario instructions in the scenario instruction data;
Step S42, judging whether the scenario instruction registers the corresponding execution mode, if not, completing the scenario instruction execution and ending the flow, if yes, proceeding to step S43,
Step S43, executing the corresponding execution mode to transmit scenario instruction data;
Step S44, judging whether the corresponding execution mode is synchronously executed or not; if not, waiting for the execution completion of the asynchronous execution mode, and returning to the execution success event; the execution of the scenario instruction is completed; and if yes, returning an execution success event, and completing the execution of the scenario instruction.
6. An implementation system for automatically generating a game scenario is characterized in that: the implementation system comprises a data conversion module, a data analysis module, a data distribution module and a data execution module;
the data conversion module is used for inputting scenario data for creating a game scenario, judging whether the type of the inputted scenario data is Json data, and if not, carrying out data conversion on the inputted scenario data; executing a data analysis module; if yes, directly executing a data analysis module;
the data analysis module is used for analyzing the converted data to generate a blocking time axis; the blocking time axis is a time axis supporting blocking conditions, wherein when blocking condition nodes are not set in blocking time axis scenario node data, the time axis normally operates according to a time sequence; when the blocking condition is set, the playing time is updated to the blocking condition node, the updating of the playing time is stopped, and the playing time is moved to the starting position of the next node to continue playing after the blocking condition is met;
the data distribution module is used for distributing scenario data corresponding to the blocking time axis according to the blocking time axis; judging whether the scenario data corresponding to the blocking time axis is distributed; if yes, stopping ending the flow; if not, executing a data execution module;
the data execution module is used for executing scenario instructions in scenario data and continuously distributing scenario data corresponding to the blocking time axis according to the blocking time axis;
the analysis and conversion data generation blocking time axis is further specifically as follows:
step S61, inputting the converted scenario data for creating the game scenario; the scenario data comprises a plurality of sub scenario data, and the data recorded in the scenario data comprises scenario instructions and execution modes thereof, scenario node time length, whether nodes are blocked, blocking conditions and whether skipping is supported;
Step S62, creating a blocking time axis;
step S63, reading all scenario node data in scenario data for creating a game scenario; adding all scenario node data into a scenario node data queue;
Step S64, judging whether a scenario node data queue is empty, if so, returning to a blocking time axis, and ending the flow; if not, the process proceeds to step S65;
Step S65, reading scenario node data from the scenario node data queue, and adding the scenario node data into the current node position of the blocking time axis; the current time value of the blocking time axis moves backwards to the time value accessed in the scenario node data;
Step S66, judging whether a blocking value is recorded in scenario node data, wherein the blocking value is a data value corresponding to a blocking condition; if not, the process proceeds to step S67; adding a blocking condition node in a blocking time axis, and setting a blocking value to adjust to a blocking condition recorded in scenario node data; the current time axis of the blocking time axis moves backward by one blocking node unit time value, and the step S67 is entered;
Step S67, judging whether other scenario data nodes exist in the scenario data node queue, if yes, executing step S65; and if not, returning to the blocking time axis, and ending the flow.
7. The system for automatically generating a game scenario of claim 6, wherein: the implementation manner of the data conversion module further specifically comprises:
Step S51, inputting scenario data for creating a game scenario, judging whether the type of the input scenario data is Json data, if yes, entering step S52, if not, judging whether the input scenario data is a Json file path, if yes, reading the Json data in the file, entering step S52, otherwise, stopping the flow;
Step S52, identifying the Json data as a Json instance type;
step S53, creating a scenario data structure;
step S54, filling basic data in the Json data into corresponding field values of the scenario data structure;
step S55, filling data without matching fields into an expansion field queue of the scenario data structure;
step S56, judging whether the scenario data in the scenario data structure is root node data or not, and if not, adding the scenario data into child data of the scenario data of the father node; if yes, recording as root node scenario data;
step S57, judging whether the Json data contains sub data, if yes, entering step S53; and if not, returning the created root node scenario data, and ending the flow.
8. The system for automatically generating a game scenario of claim 6, wherein: the occlusion time axis includes: the time node set comprises a plurality of time nodes, and each time node comprises a time length, a progress value and a blocking condition.
9. The system for automatically generating a game scenario of claim 8, wherein: the implementation manner of the data distribution module further specifically comprises:
Step S71, inputting scenario data corresponding to a blocking time axis;
step S72, reading a progress value of the blocking time axis;
step S73, judging whether execution of the blocking time axis is completed, if yes, ending the distribution of scenario data corresponding to the blocking time axis and ending the flow, otherwise, reading scenario data of the current progress value;
step S74, a scenario instruction data set in scenario data is read, and data in the scenario instruction data set is added into a scenario instruction data queue;
step S75, judging whether a scenario instruction data queue is empty, if yes, updating a blocking time axis progress value to the next node, executing step S73, and if not, executing step S76;
Step S76, reading one scenario instruction data from the scenario instruction data queue, and executing the scenario instruction data;
Step S77, judging whether other scenario instruction data exist in the scenario instruction data queue, if yes, executing step S76; if not, the congestion timeline progress value is updated to the next node, and step S73 is performed.
10. The system for automatically generating a game scenario of claim 8, wherein: the implementation manner of the data execution module further specifically includes: step S81, inputting scenario instruction data and reading scenario instructions in the scenario instruction data;
Step S82, judging whether the scenario instruction registers the corresponding execution mode, if not, completing the scenario instruction execution and ending the flow, if yes, proceeding to step S83,
Step S83, executing the corresponding execution mode to transmit scenario instruction data;
Step S84, judging whether the corresponding execution mode is synchronously executed; if not, waiting for the execution completion of the asynchronous execution mode, and returning to the execution success event; the execution of the scenario instruction is completed; and if yes, returning an execution success event, and completing the execution of the scenario instruction.
CN202111225554.8A 2021-10-21 2021-10-21 Implementation method and system for automatically generating game scenario Active CN113908554B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111225554.8A CN113908554B (en) 2021-10-21 2021-10-21 Implementation method and system for automatically generating game scenario

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111225554.8A CN113908554B (en) 2021-10-21 2021-10-21 Implementation method and system for automatically generating game scenario

Publications (2)

Publication Number Publication Date
CN113908554A CN113908554A (en) 2022-01-11
CN113908554B true CN113908554B (en) 2024-09-20

Family

ID=79242126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111225554.8A Active CN113908554B (en) 2021-10-21 2021-10-21 Implementation method and system for automatically generating game scenario

Country Status (1)

Country Link
CN (1) CN113908554B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108093315A (en) * 2017-12-28 2018-05-29 优酷网络技术(北京)有限公司 Video generation method and device
CN110858408A (en) * 2018-08-07 2020-03-03 奥多比公司 Animation production system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000508195A (en) * 1996-04-10 2000-07-04 ジャン ステロブスキイ Time-sharing multimedia game player and authoring system
WO2012051585A1 (en) * 2010-10-14 2012-04-19 Fixmaster, Inc. System and method for creating and analyzing interactive experiences
CN103530087B (en) * 2012-07-04 2015-02-18 腾讯科技(深圳)有限公司 Plot command executing method and device
CN108810639A (en) * 2018-07-06 2018-11-13 深圳点猫科技有限公司 A kind of video interactive date storage method and electronic equipment based on intelligent algorithm

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108093315A (en) * 2017-12-28 2018-05-29 优酷网络技术(北京)有限公司 Video generation method and device
CN110858408A (en) * 2018-08-07 2020-03-03 奥多比公司 Animation production system

Also Published As

Publication number Publication date
CN113908554A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
US11127311B2 (en) Systems and methods for programming instruction
US20190108448A1 (en) Artificial intelligence framework
CN100361162C (en) System supporting animation of graphical display elements through animation object instances
US9595202B2 (en) Programming learning center
US9361869B2 (en) Generative scheduling method
CN111803951A (en) Game editing method and device, electronic equipment and computer readable medium
CN111880877B (en) Animation switching method, device, equipment and storage medium
CN113710336B (en) Server load prediction and advanced performance metrics
JP7273901B2 (en) Video sequencing method, apparatus, electronic equipment, storage medium, and program
CN112631691A (en) Game interface dynamic effect editing method, device, processing equipment and medium
CN114661284A (en) Game editing method, game running method, game editing device and computer equipment
US20070240131A1 (en) Application prototyping
CN113908554B (en) Implementation method and system for automatically generating game scenario
WO2020190736A1 (en) Methods, systems, and apparatuses for production of an interactive movie
EP2590074A1 (en) System for inserting services in a software application
CN113893529A (en) Method and system for realizing game scenario state management
CN113918462B (en) Method and system for realizing automatic test of game scenario
Jourdan et al. An integrated authoring and presentation environment for interactive multimedia documents
Hamido Adventures in Quantumland
CN112052002A (en) User interface generation method, device and medium based on declarative programming framework
Ogborn et al. Estuary 0.3: Collaborative audio-visual live coding with a multilingual browser-based platform
Zang et al. Euterpe: A Web Framework for Interactive Music Systems
KR102158676B1 (en) Scenario Player System For Scenario With Divergence
US11711573B1 (en) 1-click reversible story
Janousek et al. AdvancED Flash on Devices: Mobile Development with Flash Lite and Flash 10

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant