Text-based game development method, device and equipment and storage medium

CN116841507BActive Publication Date: 2026-09-25SANDBOX NETWORK TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310648178.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2026-09-25
Estimated Expiration
2043-06-01

AI Technical Summary

Technical Problem

[0003]本发明的主要目的在于提供一种基于文字的游戏开发方法、装置、设备及存储介质,旨在解决或至少部分的解决如何提高游戏开发效率的技术问题

Benefits of technology

[0037]本申请提供的基于文字的游戏开发方法通过对用户输入的文字信息进行解析后得到对应的游戏资源信息以及玩法信息,进而根据所述游戏资源信息匹配对应的资源对象,再根据匹配到的资源对象来生成游戏场景,根据玩法信息匹配对应的游戏玩法,进而根据游戏场景和游戏玩法构建目标游戏;用户只需输入部分文字信息,即可自动生成与文字信息相对应的目标游戏,降低了游戏开发难度,节省了游戏开发的时间成本和人力成本,实现了游戏的快速生成,提高了游戏开发效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116841507B_ABST
    Figure CN116841507B_ABST
Patent Text Reader

Abstract

The application discloses a text-based game development method and device, equipment and storage medium, and relates to the technical field of game development. The text-based game development method comprises the following steps: obtaining text information, and analyzing the text information to obtain game resource information and play information; matching a resource object corresponding to the game resource information in a preset database, wherein the resource object comprises a scene object and a character object; generating a game scene according to the scene object; and if a game play corresponding to the play information is matched in the preset database, constructing a target game according to the game scene, the character object and the game play. The application improves the game development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game development technology, and in particular to a text-based game development method, apparatus, device, and storage medium. Background Technology

[0002] Currently, game development generally requires developers to possess relevant language development skills. However, the target user group is relatively narrow, making game development a high-barrier and inefficient process for non-professionals. For example, sandbox games typically use the Roblox editor, but Roblox only allows editing of the map and scene, relying on built-in game logic. This results in relatively limited game functionality that fails to meet user needs. Therefore, if developing games that align with user intent is required, conventional text-based game development methods remain inefficient. Summary of the Invention

[0003] The main objective of this invention is to provide a text-based game development method, apparatus, device, and storage medium, aiming to solve, or at least partially solve, the technical problem of how to improve game development efficiency.

[0004] To achieve the above objectives, this application provides a text-based game development method, which includes:

[0005] Obtain text information and parse the text information to obtain game resource information and gameplay information;

[0006] Match resource objects corresponding to the game resource information in a preset database, wherein the resource objects include scene objects and character objects;

[0007] Generate a game scene based on the scene object;

[0008] If a game mode corresponding to the gameplay information is matched in the preset database, a target game is constructed based on the game scene, the character object, and the gameplay mode.

[0009] Optionally, the scene object includes a scene template object and a scene model object, and the step of generating a game scene based on the scene object includes:

[0010] If a scene template object corresponding to the game resource information is matched, the game scene is generated based on the matched scene template object;

[0011] If no scene template object is matched, then each entity word in the game resource information is extracted, and the corresponding scene model object is matched in the preset database according to each entity word;

[0012] The game scene is generated based on the matched scene model objects.

[0013] Optionally, the step of generating the game scene based on each matched scene model object includes:

[0014] The scene model objects are loaded sequentially according to the built-in sorting algorithm to obtain the initial game scene;

[0015] The game scene is obtained by laying out the scene model objects in the initial game scene.

[0016] Optionally, before the step of constructing the target game based on the game scene, the character object, and the gameplay, the method includes:

[0017] Extract modifiers for the scene object from the game resource information, and update the attribute values ​​of the model object in the game scene based on the modifiers.

[0018] Optionally, the step of updating the attribute values ​​of the model objects in the game scene according to the modifier includes:

[0019] Adjust the mesh data of the model objects in the game scene according to the modifier;

[0020] If the modifier includes texture information, then generate corresponding texture data based on the texture information;

[0021] The model objects in the game scene are updated based on the texture data and the mesh data.

[0022] Optionally, before the step of constructing the target game based on the game scene, the character object, and the gameplay, the method includes:

[0023] Extract the modifiers for the character object from the game resource information, and update the attribute values ​​of the character object according to the modifiers.

[0024] Optionally, after the step of generating a game scene based on the scene object, the method further includes:

[0025] If the gameplay is not matched in the preset database, then load the game scene;

[0026] In response to user actions on scene objects in the game scene, tag information is added to the game scene, wherein the tag information includes the logical relationship between each scene object and the character object;

[0027] Obtain tag information and generate target game logic based on the logical relationships in the tag information;

[0028] The target game is constructed based on the game scene, the character objects, and the target game logic.

[0029] Furthermore, to achieve the above objectives, this application also provides a text-based game development apparatus, the text-based game development apparatus comprising:

[0030] The text parsing module is used to acquire text information and parse the text information to obtain game resource information and gameplay information;

[0031] The resource matching module is used to match resource objects corresponding to the game resource information in a preset database, wherein the resource objects include scene objects and character objects;

[0032] The scene generation module is used to generate game scenes based on the scene object;

[0033] The game construction module is used to construct a target game based on the game scene, the character object, and the game gameplay if a game gameplay corresponding to the gameplay information is matched in the preset database.

[0034] In addition, to achieve the above objectives, this application also provides an electronic device, which includes: a memory, a processor, and a game development program stored on the memory and executable on the processor. When the game development program is executed by the processor, it implements the steps of the text-based game development method described above.

[0035] In addition, to achieve the above objectives, this application also provides a storage medium storing a game development program, which, when executed by a processor, implements the steps of the text-based game development method described above.

[0036] In addition, to achieve the above objectives, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the text-based game development method described above.

[0037] The text-based game development method provided in this application parses the text information input by the user to obtain corresponding game resource information and gameplay information. Then, it matches the corresponding resource objects based on the game resource information, generates a game scene based on the matched resource objects, matches the corresponding gameplay based on the gameplay information, and constructs the target game based on the game scene and gameplay. The user only needs to input part of the text information to automatically generate the target game corresponding to the text information, which reduces the difficulty of game development, saves the time and manpower costs of game development, realizes rapid game generation, and improves game development efficiency. Attached Figure Description

[0038] Figure 1 This is a flowchart illustrating the first embodiment of the text-based game development method in this application.

[0039] Figure 2 This is a schematic diagram of the composition structure of the text-based game development device in the embodiments of this application;

[0040] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the text-based game development method in this application embodiment.

[0041] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0042] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0043] Currently, game development requires developers to possess high levels of programming, modeling, and artistic skills. However, the resulting games often have limited functionalities, leading to high development costs and low efficiency due to their limited functionality and inability to meet user needs. Therefore, this embodiment addresses this deficiency by allowing users to input game creation information (such as text). This information is then parsed to obtain game resource and gameplay information, which is then matched using templates. Once the corresponding resource objects and gameplay are matched, the game scene is loaded, and the desired game is generated. This allows users to automatically generate a game simply by inputting text-based game creation information, and gameplay can be generated based on this information. This avoids the problems of limited gameplay and high development costs, thus improving game development efficiency.

[0044] Reference Figure 1 This application provides a text-based game development method. In the first embodiment of the text-based game development method, the method includes:

[0045] Step S10: Obtain text information and parse the text information to obtain game resource information and gameplay information.

[0046] For example, the game development method in this application embodiment can be applied to a game editor. The game editor can be a program stored on a local device, such as a mobile phone, laptop, desktop computer, or smart bracelet. The game editor can parse the text information input by the user to determine the user's game development intent, thereby generating a game that meets the user's intent. The game editor includes at least a parser, which may include a game resource parser and a gameplay parser. The game resource parser may include a scene resource parser and a character resource parser.

[0047] The text information refers to user-inputted text related to game development, including game resource information and gameplay information. The game resource information includes text describing game scenes and game characters. The gameplay information describes the game's mechanics.

[0048] In one feasible embodiment, the game editor first obtains the text information input by the user, and then parses and classifies the text information through a parser to obtain game resource information and gameplay information.

[0049] The game resource information may include game scene information and character information. The game scene information describes the objects that constitute the game scene, which refers to the collection of all spaces, environments, and objects in the game except for the characters, including buildings, machinery, props, and other objects. The character information describes the objects that constitute the game character, which is a virtual object controlled by the player to experience the game within the game scene; it can be a person, an animal, etc.

[0050] As an example, after obtaining game resource information and gameplay information, a multi-threaded collaborative approach can be adopted, simultaneously parsing character resource information through a character resource parser, scene resource information through a scene resource parser, and gameplay information through a gameplay parser. Alternatively, at least one of the scene resource parser, character resource parser, and gameplay parser can be used to parse the text information first, and then the remaining parser can perform subsequent text information parsing operations.

[0051] As an example, the parser can be a data model. Before using the parser to parse text information, it is trained using a pre-prepared training set to improve its parsing and classification accuracy. For example, multiple sets of text information are labeled, and the labeled text information and the unlabeled text information are used as a training set. The parser is then trained using this training set to extract game resource information and gameplay information. For instance, the unlabeled text information is: "The knight and the dragon are fighting in the castle." The "fight" in the unlabeled text information is then labeled as gameplay information, and "knight," "dragon," and "castle" are labeled as game resource information. Further, "knight" and "dragon" can be labeled as character information within the game resource information, and "castle" can be labeled as game scene information within the game resource information, generating labeled text information. The labeled text information and the unlabeled text information are used as training data in the training set, and the parser is trained using this training data. After the parser is trained, if the parser recognizes the presence of "knight," "dragon," and / or "castle" in the text information, then the parsed text information is considered to belong to game resource information.

[0052] Step S20: Match resource objects corresponding to the game resource information in a preset database, wherein the resource objects include scene objects and character objects.

[0053] For example, the preset database is a local or online database used to store various resource objects; the resource objects include scene objects and character objects. The scene object can be a single environment, building, prop, or other object, or it can be a collection of multiple single environment, building, prop, or other objects; the character object is a virtual object controlled by the player to experience the fun of the game scene.

[0054] In one feasible embodiment, the game editor queries a preset database for scene objects and character objects that match the game resource information to obtain the resource objects corresponding to the game resource information.

[0055] As an example, the game editor queries a preset database for scene objects and character objects that match the names and / or identifiers contained in the game resource information to obtain the resource objects corresponding to the game resource information.

[0056] Step S30: Generate a game scene based on the scene object.

[0057] In one feasible embodiment, a game scene is generated by building the game scene based on the matched scene objects using a game editor.

[0058] As an example, the construction of the game scene can be achieved through modeling, terrain editing, etc.

[0059] Step S40: If a game mode corresponding to the gameplay information is matched in the preset database, then a target game is constructed based on the game scene, the character object, and the gameplay mode.

[0060] In one feasible embodiment, a preset database stores multiple preset gameplay options. A game editor matches gameplay options corresponding to the specified gameplay information within the preset database. If a matching gameplay option is found, indicating that the input gameplay information is valid, the game scene, character objects, and the matched gameplay option are combined to generate the target game. It should be understood that the generated target game can be at least a partial target game project, meaning it doesn't have to be a complete game. This allows users to further refine the game based on this partial project, creating a complete game and thus improving game development efficiency.

[0061] As an example, when building the target game, the attributes and functions of each scene object can be set based on the description of each scene object in the gameplay information. 。

[0062] As an example, the attributes of the scene object mainly include the attack power, health points, and defense power of other non-player characters in the scene object, while the functions of the scene object include the attack functions of monsters in the game scene, the speed-up functions of game props, the health recovery functions, or the increase of experience points.

[0063] As an example, in the process of matching gameplay information with gameplay, a text matching method can be used. For instance, the text in the gameplay information can be divided into multiple sentences according to punctuation marks, and semantic matching can be performed with multiple sentences describing the text in the pre-set gameplay model in a preset database. When the number of successfully matched sentences exceeds a preset proportion of the total number of sentences, the match can be considered successful. It should be noted that the above example is only to illustrate one possible implementation method in gameplay matching and is not intended to limit step S40.

[0064] As an example, the gameplay information includes the logical interaction rules between character objects (such as game characters controlled by the player) and various scene objects; for example, the trigger condition is that when a game character encounters an NPC (non-player character) object, a dialog box will pop up; or the trigger condition is that when a game character encounters a monster and begins to attack, the monster's health value will decrease, and the monster's counterattack will also be triggered, etc. The various events triggered above and their corresponding trigger conditions together constitute the logical interaction rules of the target game.

[0065] In this embodiment, text information is acquired and parsed to obtain game resource information and gameplay information. Then, resource objects corresponding to the game resource information are matched in a preset database. These resource objects include scene objects and character objects. Finally, a game scene is generated based on the scene objects. , If a game mode corresponding to the gameplay information is matched in the preset database, a target game is constructed based on the game scene, the character object, and the gameplay. Users only need to input some text information to automatically generate a target game corresponding to the text information, which reduces the difficulty of game development, realizes rapid game generation, and improves game development efficiency.

[0066] Furthermore, based on the first embodiment of the text-based game development method of this application, a second embodiment of the text-based game development method is proposed. In the second embodiment, the scene object includes a scene template object and a scene model object, and the step of generating a game scene based on the scene object may include the following sub-steps:

[0067] Sub-step S31: If a scene template object corresponding to the game resource information is matched, the game scene is generated based on the matched scene template object.

[0068] For example, a scene template object is a pre-built, pre-assembled game scene template that can be directly retrieved and used from a preset database, and can be reused.

[0069] In one feasible embodiment, if a scene template object is found in a preset database that matches the information describing the objects constituting the game scene in the game resource information (i.e., game scene information), the game editor directly uses the scene template object as the matched resource object to generate the corresponding game scene.

[0070] Sub-step S32: If no scene template object is matched, extract each entity word from the game resource information and match the corresponding scene model object in the preset database according to each entity word.

[0071] For example, the entity words refer to words used to describe scene model objects in game resource information, such as entities like mountains, houses, swords, and trees; entity words can describe the basic attributes of scene model objects in game resources. Scene model objects refer to pre-defined scene models with basic attributes, such as bungalows, roses, and pine trees in a game scene; during game development, scene model objects can be used directly, or, according to game development needs, the attributes of scene model objects can be adjusted based on their corresponding basic attributes, and the adjusted scene model objects can be used; the attribute adjustment can be the adjustment of the attribute values ​​of scene model objects; and the attribute values ​​refer to specific characteristics or parameters of attributes, such as the height value and area value of a house.

[0072] In one feasible embodiment, when the game resource information cannot be matched with a corresponding scene template object, indicating that the preset database does not store a game scene template that matches the game resource information, the game editor identifies and extracts each entity word from the game resource information, and then matches them in the preset database to determine the scene model object that matches each entity word. For example, the game editor identifies and extracts entity words from the game resource information including: whale, dolphin, and shark, and then filters out scene model objects that match whale, dolphin, and shark from the preset database.

[0073] Sub-step S33: Generate the game scene based on the matched scene model objects.

[0074] In one feasible embodiment, the game editor sequentially loads the matched scene model objects and places each scene model object in a suitable position to build the game scene and generate the game scene.

[0075] This application proposes a method for generating game scenes based on scene objects. Specifically, it includes a method for handling successful matching of scene template objects within the scene object, and a method for handling unsuccessful matching of scene template objects within the scene object. If a scene model object is successfully matched, it indicates that a full game scene template matching the game resource information exists in the preset database. The game scene is then built directly based on the matched scene template. Compared to conventional game development processes, which require modeling and editing each object in the game scene individually, this application reduces game development time and improves efficiency. If a scene model object fails to match, entity words are extracted from the game resource information, and scene model objects are matched in the preset database to meet the needs of different game developments. Then, based on the matched scene models, objects in the game scene are quickly generated, and the game scene is built, thereby improving game development efficiency.

[0076] Furthermore, based on the second embodiment of the text-based game development method of this application, a third embodiment of the text-based game development method is proposed. In the third embodiment, the sub-step of generating a game scene based on the scene object may further include the following sub-steps:

[0077] Sub-step S331: Load each scene model object sequentially according to the built-in sorting algorithm to obtain the initial game scene.

[0078] In one feasible embodiment, the game editor loads each of the scene model objects sequentially based on the loading order in the built-in sorting algorithm to generate the initial game scene.

[0079] The built-in sorting algorithm is an algorithm that sorts the loading order of scene model objects. This algorithm is trained based on the frequency with which users use the loading order of various scene model objects during game development. For example, when users load and place scene model objects to construct a game scene, the most frequently used loading order is: house, desk, book. Therefore, the game editor, based on the loading order in the built-in sorting algorithm, first loads the house, then loads the desk within the house, and then loads the book on the desk to construct the game scene. This ensures that the loading order of objects in the generated game scene is reasonable, avoiding common-sense and logical errors.

[0080] The initial game scene can be a game scene that has been fully loaded and consists of all the objects in the game scene; however, the layout of each object in the initial game scene may have some errors, and further layout adjustments are needed.

[0081] As an example, the game editor's backend can maintain an entity word database. When a user loads and places scene model objects, the database determines the frequency of occurrence of entity words corresponding to each scene model object, and then sorts the entity words in ascending or descending order to determine the frequency of use of the loading order of each scene model object. The built-in sorting algorithm is trained based on this entity word database. This ensures that the loading order of objects in the game scene during game development more closely resembles the actual manual loading order, guaranteeing the rationality of the loading order of objects in the game scene. Furthermore, the order of occurrence of entity words in the entity word database can also be determined according to a user-defined method, which is not limited here.

[0082] Sub-step S332: Lay out the scene model objects in the initial game scene to obtain the game scene.

[0083] In one feasible embodiment, the game editor lays out each scene model object in the initial game scene according to the preset layout big data, and the game scene is obtained after the layout of each scene model object is completed.

[0084] While the initial game scene contains all the objects that constitute the game scene, the placement of each scene model object may contain errors or be incorrect. Therefore, real-world scene layout big data can be introduced as a reference for the layout of scene model objects to determine their correct placement. For example, real-world house interior layout big data can be introduced, including the placement of windows on the four walls of the house. When building the house game scene, window scene model objects can be placed on the four walls of the house scene model object, avoiding the situation where window scene model objects are placed on the floor. Because real-world scene layout data is used as a reference when laying out scene model objects, the rationality of the game scene construction is improved, thereby enhancing the quality of game development.

[0085] Furthermore, based on the first, second, or third embodiment of the text-based game development method of this application, a fourth embodiment of the text-based game development method is proposed. In the fourth embodiment, before the step of constructing the target game according to the game scene, the character object, and the gameplay, the following sub-step may be included:

[0086] Sub-step S34: Extract modifiers for the scene object from the game resource information, and update the attribute values ​​of the model object in the game scene according to the modifiers.

[0087] In one feasible embodiment, modifiers for scene objects are extracted from the game resource information using a game editor. The scene object can be a scene template object or a scene model object. Based on the modifiers, the default attribute values ​​of the model objects in the generated game scene are adjusted and updated to obtain an updated game scene. The target game can then be constructed based on the updated game scene.

[0088] In this context, the model objects in the game scene before attribute value updates can be model objects pre-set in a database or model objects in scene templates, with default attribute values. Modifiers are words that describe or modify the properties, states, characteristics, and other attributes of the scene objects in detail. For example, the game resource information includes: "steep mountain peak," where "mountain peak" is an entity word and "steep" is a modifier. The default attribute values ​​of the mountain peak model objects are then adjusted and updated based on "steep," for example, adjusting the height attribute value of the mountain peak model objects, i.e., increasing the height value of the mountain peak model objects. The specific range of change in attribute values ​​can be set according to more detailed modifiers. For example, if the modifier is "5 kilometers," then the height value in the attribute value is set to 5 kilometers. Alternatively, it can be customized according to game development needs, and this application embodiment does not limit this.

[0089] As an example, if the scene object is a scene template object, the generated game scene is constructed based on the scene template object. Then, based on the modifiers for the target model objects in the scene template object in the game resource information, the attribute values ​​of the target model objects in the game scene can be adjusted and updated. Here, the scene template object is a pre-built, pre-assembled full game scene template; therefore, the scene template object contains multiple model objects. For example, if the scene template object is "city," then the city scene template object contains multiple house model objects. Then, based on the modifiers for the house target model objects in the city scene template object in the game resource information, the attribute values ​​of the house target model objects in the generated city game scene are adjusted and updated.

[0090] In this application embodiment, a method is proposed to update the attribute values ​​of model objects in the game scene based on modifiers in the game resource information. By extracting modifiers for scene objects from the game resource information, the attribute values ​​of model objects in the generated game scene are adjusted in a personalized way, thereby obtaining an updated game scene, so as to realize personalized customization of the game scene and further improve the game quality.

[0091] Furthermore, based on the fourth embodiment of the text-based game development method of this application, a fifth embodiment of the text-based game development method is proposed. In the fifth embodiment, the sub-step of updating the attribute values ​​of the model objects in the game scene according to the modifier may further include the following sub-step:

[0092] Sub-step S341: Adjust the mesh data of the model objects in the game scene according to the modifier.

[0093] In one feasible embodiment, the game editor adjusts the mesh data of the model objects in the game scene according to the modifier.

[0094] Optionally, grid data refers to data that describes the outline of a model object, including attributes such as length, width, and height.

[0095] For example, the game resource information includes: a 5-kilometer steep mountain peak; where "5 kilometers" is a modifier, and the height data in the grid data of the mountain peak model object is set to 5 kilometers based on "5 kilometers".

[0096] Sub-step S342: If the modifier includes texture information, then generate corresponding texture data based on the texture information.

[0097] In one feasible embodiment, the game editor determines whether the modifier contains texture information; if so, the corresponding texture data is generated based on the texture information.

[0098] Among them, texture data is used to characterize the detailed features of the model object, such as surface patterns and textures.

[0099] For example, the game resource information includes: a leopard-print sofa; wherein, "leopard-print" is a modifier, and the modifier contains texture information, and leopard-print texture data is generated based on "leopard-print".

[0100] In another feasible embodiment, if the game editor determines that the modifier does not contain texture information, then a texture data is randomly generated as the texture data of the model object.

[0101] Sub-step S343: Update the model objects in the game scene based on the texture data and the mesh data.

[0102] In one feasible embodiment, the texture data is pasted onto the mesh data using a game editor to update the model objects in the game scene, thereby enabling personalized customization of the game scene and further improving the game quality.

[0103] Furthermore, based on any one of the first to fifth embodiments of the text-based game development method of this application, a sixth embodiment of the text-based game development method is proposed. In the sixth embodiment, before the step of constructing the target game according to the game scene, the character object, and the gameplay, a sub-step may be included:

[0104] Sub-step S41: Extract modifiers for the character object from the game resource information, and update the attribute values ​​of the character object according to the modifiers.

[0105] In one feasible embodiment, a game editor is used to extract modifiers for character objects from game resource information. Then, based on the extracted modifiers, the attribute values ​​of the character objects are adjusted and updated, and the target game can be constructed based on the updated character objects.

[0106] The character object before the update can be a pre-set character object in a preset database, and its attribute values ​​are all default values; the default values ​​can include one or more sets for random selection, and there is no restriction here.

[0107] Modifiers are words that describe or modify the properties, states, characteristics, and other attributes of a character object in a use case. For example, the game resource information includes: a tall, thin man, where "man" is an entity word and "tall, thin" is a modifier. Then, the default attribute values ​​of the man character object are adjusted according to "tall, thin". For example, the height and width attribute values ​​of the man character object are adjusted, that is, the height value of the man character object is increased and the width value of the man character object is decreased. The specific range of change of the attribute values ​​can be set according to more detailed modifiers. For example, if the modifier is "1.8 meters", then the height value in the attribute value is set to 1.8 meters. Alternatively, it can be customized according to the game development requirements, and this application embodiment does not limit this.

[0108] As an example, the preset database stores various character objects, which can be real people, animals, etc., or fictional people, animals, etc.; for example, the preset database stores character objects corresponding to dragons and the Nian beast.

[0109] In another feasible implementation, entity words are extracted from the character resource information in the game resource information, and the corresponding character objects are matched in the preset database according to the entity words; modifiers are extracted from the character resource information, and the attribute values ​​of the character objects are adjusted according to the modifiers to obtain updated character objects; and the target game can be constructed according to the game scene, the updated character objects, and the gameplay.

[0110] In another feasible implementation, modifiers for the character object are extracted from the game resource information, and the mesh data of the character object is adjusted according to the modifiers; if the modifiers include texture information, corresponding texture data is generated according to the texture information; and the character object is updated according to the texture data and the mesh data.

[0111] In this application embodiment, a method is proposed to adjust the attribute values ​​of a character object based on modifiers in game resource information. By extracting modifiers for the character object from the game resource information, the attribute values ​​of the character object are adjusted in a personalized way, making the game characters in the target game richer and more complete. Then, the target game is constructed based on the updated character objects, thereby further improving the game quality.

[0112] Furthermore, based on any one of the first to sixth embodiments of the text-based game development method of this application, a seventh embodiment of the text-based game development method is proposed. In the seventh embodiment, after the step of generating a game scene based on the scene object, the method further includes:

[0113] Step S50: If the game mode is not matched in the preset database, then load the game scene.

[0114] In one feasible embodiment, the game editor determines whether a game that matches the gameplay information is found. If no game that matches the gameplay information is found in the preset database, the generated game scene is loaded directly.

[0115] Step S60: In response to user operations on scene objects in the game scene, add tag information to the game scene, wherein the tag information includes the logical relationship between each scene object and the character object.

[0116] In one feasible embodiment, the text information entered by the user in the game scene is obtained through the game editor, and then the label information corresponding to the text information is added above each scene object in the loaded game scene.

[0117] The tag information includes the logical relationships between scene objects and character objects; corresponding tag information can be generated based on the text information input by the user, and the text information input by the user can include content describing the logical interaction relationships between scene objects and character objects; for example, the text information input by the user includes: "When any game character approaches a flower, the flower blooms"; where the flower is a scene object, and based on the text information input by the user, the tag information "Game character approaches and blooms" is added above the flower (scene object).

[0118] The user's operation can be that the user controls the game character to move within the loaded game scene, thereby inputting text information on scene objects at various locations within the game scene.

[0119] Step S70: Obtain tag information and generate target game logic based on the logical relationships in the tag information.

[0120] In one feasible embodiment, tag information is obtained through a game editor. There can be multiple tags, and the corresponding logical relationships among the multiple tags are integrated to obtain the target game logic.

[0121] The logical relationship refers to the interaction logic between scene objects and role objects represented in the text information input by the user.

[0122] Step S80: Construct the target game based on the game scene, the character object, and the target game logic.

[0123] In one feasible embodiment, the obtained target game logic is applied to the game scene and character objects through a game editor to construct the target game.

[0124] As an example, a user controls a game character to move within a pre-loaded game scene. As the game character's perspective moves to different locations, the user can input corresponding tag information on various scene objects and the character's corresponding object. This tag information specifically describes the interaction relationships between the game character and other scene model objects. For example, when the game character touches and uses a game item in the scene, it can trigger an effect that increases health; or when the game character encounters a river or railing in the scene, it can trigger an effect that prevents passage. In this embodiment, by collecting all the tag information, the target game logic for the entire game is constructed and applied to all scene model objects and character objects in the game scene, finally generating the target game.

[0125] As an example, the target game logic is a complete set of game rules. For instance, the tag information includes: 4 factions, 4 players in each faction, and each faction has a bed. The winner is to destroy the opponent's bed and kill 3 players from the other faction. Furthermore, the tag information can contain more detailed descriptions, such as the specific items used and their functions. All of the above fall under the category of game resource information.

[0126] As an example, the game rules include triggering conditions and triggering results. Multiple triggering conditions can correspond to the same triggering result, or each triggering condition can correspond to a single triggering result. The triggering conditions and results can be determined based on logical words in the user-inputted text, thereby determining the user's actual intent implied in the text. Furthermore, the triggering conditions and results are sorted according to the training priority set in the backend. For example, the text is: "If a player destroys the opponent's bed and kills the opponent, then they win." Based on the above text, the logical word "if...then" is determined, thus determining the triggering conditions "destroy the opponent's bed" and "kill the opponent's person," with the triggering result "win." Furthermore, according to the preset training priority, the priority of "destroy the opponent's bed" in the triggering results is determined to be higher than "kill the opponent's person," and the result "win" is triggered only when all the above triggering conditions are met.

[0127] In this embodiment, a game development method is proposed when a pre-set database does not store any gameplay information that matches the gameplay information. By directly loading a game scene, responding to user operations on scene objects in the game scene, and adding tag information to the game scene, the tag information generates target game logic, which is then used as the game rules of the target game. This ensures the smooth development of the target game, meets the development needs of various games, and enriches the game development experience.

[0128] In addition, refer to Figure 2 This application also provides a text-based game development apparatus, the text-based game development apparatus comprising:

[0129] The text parsing module 101 is used to acquire text information and parse the text information to obtain game resource information and gameplay information;

[0130] The resource matching module 102 is used to match resource objects corresponding to the game resource information in a preset database, wherein the resource objects include scene objects and character objects;

[0131] Scene generation module 103 is used to generate a game scene based on the scene object;

[0132] The game construction module 104 is used to construct a target game based on the game scene, the character object, and the game gameplay if a game gameplay corresponding to the gameplay information is matched in the preset database.

[0133] Optionally, the scene object includes a scene template object and a scene model object, and the scene generation module 103 is further used for:

[0134] If a scene template object corresponding to the game resource information is matched, the game scene is generated based on the matched scene template object;

[0135] If no scene template object is matched, then each entity word in the game resource information is extracted, and the corresponding scene model object is matched in the preset database according to each entity word;

[0136] The game scene is generated based on the matched scene model objects.

[0137] Optionally, the scene generation module 103 is further configured to:

[0138] The scene model objects are loaded sequentially according to the built-in sorting algorithm to obtain the initial game scene;

[0139] The game scene is obtained by laying out the scene model objects in the initial game scene.

[0140] Optionally, the game building module 104 is further configured to:

[0141] Extract modifiers for the scene object from the game resource information, and update the attribute values ​​of the model object in the game scene based on the modifiers.

[0142] Optionally, the game building module 104 is further configured to:

[0143] Adjust the mesh data of the model objects in the game scene according to the modifier;

[0144] If the modifier includes texture information, then generate corresponding texture data based on the texture information;

[0145] The model objects in the game scene are updated based on the texture data and the mesh data.

[0146] Optionally, the game building module 104 is further configured to:

[0147] Extract the modifiers for the character object from the game resource information, and update the attribute values ​​of the character object according to the modifiers.

[0148] Optionally, the game building module 104 is further configured to:

[0149] If the gameplay is not matched in the preset database, then load the game scene;

[0150] In response to user actions on scene objects in the game scene, tag information is added to the game scene, wherein the tag information includes the logical relationship between each scene object and the character object;

[0151] Obtain tag information and generate target game logic based on the logical relationships in the tag information;

[0152] The target game is constructed based on the game scene, the character objects, and the target game logic.

[0153] In addition, this application also provides an electronic device, which includes a memory, a processor, and a game development program stored in the memory and executable on the processor. When the game development program is executed by the processor, it implements the steps of the text-based game development method described above.

[0154] Furthermore, in one embodiment, Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, as shown below. Figure 3 As shown, at the hardware level, this electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk storage device. Of course, this electronic device may also include other hardware required for its functions. The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 3 The term "bus" is represented by a single double-headed arrow, but this does not imply a single bus or a single type of bus. Memory is used to store programs. Specifically, the program may include program code, which includes computer operation instructions. The processor reads the corresponding computer program from non-volatile memory into memory and then executes it, forming a shared resource access control device at the logical level. The processor executes the program stored in memory and specifically performs the steps of the aforementioned text-based game development method.

[0155] The specific implementation of the electronic device in this application is basically the same as the embodiments of the above-described text-based game development method, and will not be repeated here.

[0156] In addition, to achieve the above objectives, this application also provides a storage medium storing a game development program, which, when executed by a processor, implements the steps of the game development method described above.

[0157] The specific implementation of the storage medium in this application is basically the same as the embodiments of the above-described text-based game development method, and will not be repeated here.

[0158] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0159] In addition, to achieve the above objectives, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the text-based game development method described above.

[0160] Compared with the prior art, the beneficial effects of the computer program product provided in this application embodiment are the same as the beneficial effects of the text-based game development method provided in the above embodiments, and will not be repeated here.

[0161] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A text-based game development method, characterized in that, The text-based game development method includes the following steps: Obtain text information and parse the text information to obtain game resource information and gameplay information; Match resource objects corresponding to the game resource information in a preset database, wherein the resource objects include scene objects and character objects; Generate a game scene based on the scene object; If a game mode corresponding to the gameplay information is matched in the preset database, a target game is constructed based on the game scene, the character object, and the gameplay. After the step of generating a game scene based on the scene object, the method further includes: If the gameplay is not matched in the preset database, then load the game scene; In response to user actions on scene objects in the game scene, tag information is added to the game scene, wherein the tag information includes the logical relationship between each scene object and the character object; Obtain tag information and generate target game logic based on the logical relationships in the tag information; The target game is constructed based on the game scene, the character objects, and the target game logic.

2. The text-based game development method as described in claim 1, characterized in that, The scene object includes a scene template object and a scene model object. The step of generating a game scene based on the scene object includes: If a scene template object corresponding to the game resource information is matched, the game scene is generated based on the matched scene template object; If no scene template object is matched, then each entity word in the game resource information is extracted, and the corresponding scene model object is matched in the preset database according to each entity word; The game scene is generated based on the matched scene model objects.

3. The text-based game development method as described in claim 2, characterized in that, The step of generating the game scene based on the matched scene model objects includes: The scene model objects are loaded sequentially according to the built-in sorting algorithm to obtain the initial game scene; The game scene is obtained by laying out the scene model objects in the initial game scene.

4. The text-based game development method as described in any one of claims 1-3, characterized in that, Before the step of constructing the target game based on the game scene, the character object, and the gameplay, the method includes: Extract modifiers for the scene object from the game resource information, and update the attribute values ​​of the model object in the game scene based on the modifiers.

5. The text-based game development method as described in claim 4, characterized in that, The step of updating the attribute values ​​of the model objects in the game scene according to the modifier includes: Adjust the mesh data of the model objects in the game scene according to the modifier; If the modifier includes texture information, then generate corresponding texture data based on the texture information; The model objects in the game scene are updated based on the texture data and the mesh data.

6. The text-based game development method as described in claim 1, prior to the step of constructing the target game based on the game scene, the character object, and the gameplay, the method includes: Extract the modifiers for the character object from the game resource information, and update the attribute values ​​of the character object according to the modifiers.

7. A text-based game development device, characterized in that, The text-based game development device includes: The text parsing module is used to acquire text information and parse the text information to obtain game resource information and gameplay information; The resource matching module is used to match resource objects corresponding to the game resource information in a preset database, wherein the resource objects include scene objects and character objects; The scene generation module is used to generate game scenes based on the scene object; The game construction module is used to construct a target game based on the game scene, the character object, and the game gameplay if a game gameplay corresponding to the gameplay information is matched in the preset database. The game construction module is further configured to: load a game scene if no game mode is matched in the preset database; add tag information to the game scene in response to user operations on scene objects in the game scene, wherein the tag information includes the logical relationship between each scene object and the character object; obtain the tag information and generate target game logic based on the logical relationship in the tag information; and construct a target game based on the game scene, the character object, and the target game logic.

8. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a game development program stored in the memory and executable on the processor, wherein the game development program, when executed by the processor, implements the steps of the text-based game development method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores a game development program, which, when executed by a processor, implements the steps of the text-based game development method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and device in word games

    CN111729292A

  • Game formula compiling method and system for game playing method

    CN111966359A