Game effect control method, system, computer device and readable storage medium
By centrally controlling the loading and running of game effect files, the conflict between game effect systems is solved, safe storage and precise control of game effects are achieved, and development efficiency is improved.
Patent Information
- Application Number
- CN202111647673.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the prior art, conflicts are prone to occur between game effect systems, resulting in confusion in game effects and errors in running logic modules, affecting development efficiency.
By obtaining the initial game effect file, determining the basic information and storing it to the physical disk, loading it into memory according to the loading instructions and running the game effect data according to the preset operation strategy, centralized control is achieved.
It avoids effect system conflicts, improves the security and accuracy of game effects, reduces logic module operation errors, and improves development efficiency.
Smart Images

Figure CN114404955B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular, to a game effect control method, system, computer device, and readable storage medium. Background Art
[0002] In game development, multiple effect systems such as a sound effect system, a particle system, a camera system, and a physics system are used to improve the performance of the game. When designing a game, game developers need to control the opening and closing of game effects corresponding to each independent system one by one, as well as the parameter input of each independent system. When making a game logic module, multiple effect systems are involved, and multiple game logic modules may also use the same effect system at the same time.
[0003] Existing solutions often do not have a centralized control solution for game effects, resulting in conflicts easily occurring between multiple effect systems, causing game effect chaos, game logic module operation errors, and indirectly affecting the game development efficiency. Summary of the Invention
[0004] In view of this, one of the purposes of this application is to provide a game effect control method, system, computer device, and readable storage medium, which can at least solve some of the above technical problems.
[0005] In a first aspect, an embodiment of this application provides a game effect control method, and the method includes:
[0006] Obtain at least two initial game effect files, and each initial game effect file includes game effect data and a game effect name;
[0007] Determine basic information corresponding to each game effect name according to each game effect name and a preset configuration table, where the preset configuration table includes a mapping relationship between different game effect names and different basic information, and each basic information includes an effect type, an effect priority, an effect quantity threshold, a unique identifier, and a group type;
[0008] Store each game effect data and the basic information corresponding to each game effect name into the initial game effect file corresponding to each game effect data to obtain all target game effect files, and store all target game effect files on the physical disk of the game running device;
[0009] If a loading instruction is detected, load the target game effect file on the physical disk into the memory of the game running device according to the loading instruction, and run each game effect data according to a preset operation strategy.
[0010] In a possible implementation manner, the step of loading a target game effect file in the physical disk into the memory of the game running device according to the loading instruction includes:
[0011] If the loading instruction is a first instruction, load the target game effect file corresponding to the game effect name in the first preset table in the physical disk into the memory of the game running device;
[0012] If the loading instruction is a second instruction, load the target game effect file corresponding to the game effect name in the second preset table in the physical disk into the memory of the game running device, where the first preset table and the second preset table each include at least one game effect name, and the game effect names in the first preset table are different from the game effect names in the second preset table.
[0013] In a possible implementation manner, the step of loading a target game effect file in the physical disk into the memory of the game running device according to the loading instruction further includes:
[0014] Obtain a first storage structure of the target game effect file, and convert the first storage structure into a second storage structure, where the first storage structure is a storage-type file structure and the second storage structure is a running file structure.
[0015] In a possible implementation manner, the first data structure is JSON and the second data structure is a sequence structure.
[0016] In a possible implementation manner, the step of generating the preset operation strategy includes:
[0017] Obtain the device information of the game running device, and generate the preset operation strategy according to the basic information in each target game effect file and the device information, where the device information includes device hardware information and device working temperature, and the preset operation strategies corresponding to different target game effect files are different.
[0018] In a possible implementation manner, before the step of running each game effect according to the preset operation strategy, the method further includes:
[0019] If a target game effect file containing a running identifier is detected, load the target game effect file corresponding to the running identifier into the memory of the game running device and directly run it.
[0020] In a second aspect, an embodiment of the present application provides a game effect control system, and the system includes:
[0021] An acquisition module, configured to acquire at least two initial game effect files, each initial game effect file including game effect data and a game effect name;
[0022] A query module, configured to determine basic information corresponding to each game effect name according to each game effect name and a preset configuration table, where the preset configuration table includes a mapping relationship between different game effect names and different basic information, and each basic information includes an effect type, an effect priority, an effect quantity threshold, a unique identifier, and a group type;
[0023] A storage module, configured to store each game effect data and the basic information corresponding to each game effect name into the initial game effect file corresponding to each game effect data to obtain all target game effect files, and store all target game effect files into a physical disk of the game running device;
[0024] A loading module, configured to, if a loading instruction is detected, load the target game effect file in the physical disk into the memory of the game running device according to the loading instruction, and run each game effect data according to a preset running strategy.
[0025] In a possible implementation manner, the loading module is further configured to, if the loading instruction is a first instruction, load the target game effect file corresponding to the game effect name in a first preset table in the physical disk into the memory of the game running device; if the loading instruction is a second instruction, load the target game effect file corresponding to the game effect name in a second preset table in the physical disk into the memory of the game running device, where the first preset table and the second preset table respectively include at least one game effect name, and the game effect names in the first preset table are different from the game effect names in the second preset table.
[0026] In a third aspect, an embodiment of the present application provides a computer device, where the computer device includes a computer-readable storage medium and a processor, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the game effect control method provided in the first aspect is implemented.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by one or more processors, the game effect control method provided in the first aspect is implemented.
[0028] The game effect control method, system and computer-readable storage medium provided by the embodiments of the present application obtain at least two initial game effect files including game effect data and game effect names, determine the basic information of each game effect according to a preset configuration table, store the obtained target game effect files, and after detecting a loading instruction, load the target game effect files in the physical disk into the memory of the game running device according to the loading instruction, and implement centralized control over the target game effect files according to a preset operation strategy, avoiding the risk that the use of multiple effect systems causes conflicts in the effect systems, resulting in chaotic game effects and an increase in the occurrence of errors in the game logic module operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0030] Figure 1 FIG. shows a schematic structural diagram of a computer device provided by an embodiment of the present application;
[0031] Figure 2 FIG. shows a flowchart of a game effect control method provided by an embodiment of the present application;
[0032] Figure 3 FIG. shows a flowchart of a loading method involved in a game control method provided by an embodiment of the present application;
[0033] Figure 4 FIG. shows a schematic storage structure diagram of a target game effect file involved in a game control method provided by an embodiment of the present application;
[0034] Figure 5 FIG. shows a schematic diagram of functional modules of a game effect control system provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Generally, the components of the embodiments of the present invention described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.
[0036] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0038] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0039] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0040] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0041] Please refer to Figure 1 , Figure 1 A schematic diagram of the structure of a computer device provided in an embodiment of the present application, the computer device 100 provided in an embodiment of the present application can be a computer device with data processing capabilities, such as a personal computer, a server, etc., and mainly includes a game effect control system 110, a memory 120 and a processor 130. Among them, the memory 120 and the processor 130 are electrically connected to each other directly or indirectly to realize the transmission or interaction of data. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The computer device 100 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or solidified in the operating system (OS) of the computer device 100. The processor 130 is used to execute the executable modules stored in the memory 120, such as the software function modules and computer programs included in the game effect control system 110.
[0042] Among them, the memory 120 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electric Erasable Programmable Read-Only Memory (EEPROM), etc. Among them, the memory 120 is used to store a program, and after receiving an execution instruction, the processor 130 executes the program.
[0043] The processor 130 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0044] Please refer to Figure 2 , Figure 2 , which is a flowchart of a game effect control method provided by an embodiment of the present application. The following will elaborate on each step of the game effect control method in detail.
[0045] S210, obtain at least two initial game effect files, and each initial game effect file includes game effect data and a game effect name.
[0046] Specifically, the initial effect file in this embodiment may be generated according to a game effect editor, and the game effect editor involved in this embodiment may be further developed based on the Unity3D engine, and different game effect editors can be developed according to different types of games using the Unity3D engine.
[0047] In addition, the initial game effect file, game effect data, and game effect name in this embodiment can be generated by editing through a game effect editor. Exemplarily, different game effect data such as lightning, thunder, and rain can be generated through the game effect editor. After completing the editing of these game effects, the corresponding game effect names such as lightning001, thunder001, and rain001 can be edited, and then the corresponding storage files are generated to store lightning1, thunder1, and rain1. The generated storage file is the initial game effect file in this embodiment.
[0048] Optionally, the game effect names in this embodiment are all unique and non-repeating. The game effect name can be used as the file name of the initial game effect file for storing the game effect data, which can achieve quick query of the initial game effect file. Exemplarily, if the game effect name of the game effect data "thunder" is "thunder001", then the file name of the corresponding initial game effect file is also "thunder001". By querying the game effect name "thunder001", not only can the corresponding game effect file be queried, but also the corresponding thunder game effect can be directly located, improving the accuracy and reliability of game effect query.
[0049] Optionally, each initial game effect file stores only one game effect, and in the case of multiple game effects, accurate control of multiple game effects can be achieved.
[0050] S220. Determine the basic information corresponding to each game effect name according to each game effect name and a preset configuration table, where the preset configuration table includes the mapping relationship between different game effect names and different basic information, and each basic information includes an effect type, an effect priority, an effect quantity threshold, a unique identifier, and a group type.
[0051] The preset configuration table in this embodiment can be the game effect name and the basic information corresponding to the game effect name, which can not only be used to quickly determine the basic information corresponding to the game effect name, but also be used to accurately calculate the preset operation strategy in subsequent operations according to the basic information. Among them, the effect type can represent the type to which the game effect data belongs. For example, the effect type of the game effect data lightning001 in the above embodiment belongs to vision, and the effect type of thunder001 belongs to audition.
[0052] The effect priority can represent the level of game effect data. For example, a game effect "Ice Mist" has two types, and the corresponding game effect names are "Big Frost" and "Small Frost" respectively. The spatial range of the ice mist corresponding to "Big Frost" is larger than that of the ice mist corresponding to "Small Frost". Then, the effect level of "Big Frost" is level 1, and the game effect of "Small Frost" is level 2. In the case where "Big Frost" and "Small Frost" in the game hit a virtual object at the same time, the ice mist of "Big Frost" is preferentially displayed. When the ice mist of "Big Frost" is about to disappear or has disappeared, the ice mist of "Small Frost" is displayed, enhancing the display effect.
[0053] The effect quantity threshold can represent the lower limit and upper limit of the quantity of game effect data. For example, the lower limit of the quantity of "Big Frost" is 2, and the upper limit is 4. The lower limit of the quantity of "Small Frost" is 1, and the upper limit is 3. The unique identifier can represent whether the game effect data or the game effect name is unique. The group type represents the group to which the game effect data belongs. For example, the effect with the game effect name "Thunder 001" belongs to the "Sound Group". Through the group type, the game effect data can also be quickly queried and accurately located.
[0054] S230, store each game effect data and the basic information corresponding to each game effect name into the initial game effect file corresponding to each game effect data to obtain all target game effect files, and store all target game effect files into the physical disk of the game running device.
[0055] The initial game effect file in the above embodiment does not contain the basic information corresponding to the game effect data. However, in this embodiment, after obtaining the basic information of the game effect and storing the basic information into the original initial game effect file, the target game effect file is obtained. That is, the target game effect file contains the basic information corresponding to the game effect data.
[0056] After obtaining the target game effect file, it is stored in the physical disk of the game running device for storage to avoid the loss of the target game effect file. After storing the target game effect file in the physical disk, during the subsequent game loading and running, the game effect file in the physical disk can be loaded to implement the operation of the game effect data.
[0057] S240, if a loading instruction is detected, load the target game effect file in the physical disk into the memory of the game running device according to the loading instruction, and run each game effect data according to a preset operation strategy.
[0058] In this embodiment, if it is detected that the game is started, a loading instruction will be triggered to load the target game effect file into the memory of the game running device, and the game effect data in the target game effect file will be prepared for running. Exemplarily, if the game running device is a computer host, the circuit detection unit in the computer host can detect in real time or at preset time intervals whether a game is in the startup state or the running state. If it is detected that the game is in the startup loading or running state, the game effect data will be run according to the preset running strategy. Optionally, the preset running strategy further includes the running duration of each game effect data.
[0059] Among them, the generation steps of the preset running strategy include:
[0060] Obtain the device information of the game running device, and generate the preset running strategy according to the basic information in each target game effect file and the device information, where the device information includes device hardware information and device working temperature, and the preset running strategies corresponding to different target game effect files are different.
[0061] In the above embodiment, the basic information of each game effect data has been obtained. In this embodiment, the preset running strategy can be generated according to the basic information of each game effect and the device information of the game running device.
[0062] Example 1, if the current game running device has a Core i3 processor, the working temperature of the processor is 40 °C, the game effect names include "Big Frost 001", "Big Frost 002", "Small Frost 001", and "Small Frost 002", the lower limit of the number of particles of "Big Frost 001" is 2000, the lower limit of the number of particles of "Big Frost 002" is 1000, the lower limit of the number of particles of "Small Frost 001" is 500, and the lower limit of the number of particles of "Small Frost 002" is 50.
[0063] All examples in this embodiment default that Core i3 belongs to a low-performance processor, Core i5 belongs to a medium-performance processor, and Core i7 and Core i9 belong to high-performance processors. Considering that a low-performance processor cannot load "Big Frost 001" and "Big Frost 002", otherwise it will cause the game running device to freeze, the preset running strategy generated by Example 1 is: only run "Small Frost 001" and "Small Frost 002".
[0064] Example 2, if only the working temperature in Example 1 is changed to 70 °C and other conditions remain unchanged, considering that the performance of the processor is affected by the increase in working temperature, the generated preset running strategy is: only run "Small Frost 002".
[0065] Example 3: If only the processor in Example 1 is changed to Core i9 and other conditions remain unchanged, considering the improvement in processor performance, the generated preset operation strategy is: run "Large Frost 001", "Large Frost 002", "Small Frost 001", and "Small Frost 002".
[0066] Example 4: If only the processor in Example 1 is changed to Core i9 and the working temperature is changed to 70°C, also considering the performance degradation of the processor caused by the temperature rise, the generated preset operation strategy is: run "Large Frost 002", "Small Frost 001", and "Small Frost 002".
[0067] The above four examples have introduced in detail the generation of the preset operation strategy. Specifically, the preset operation strategy can also be further generated according to the effect priority and effect quantity threshold of the game effect data. This embodiment will not elaborate on them one by one here.
[0068] As can be seen from the above analysis, the embodiments of the present application obtain at least two initial game effect files including game effect data and game effect names, determine the basic information of each game effect through the preset configuration table, store the obtained target game effect files, and centrally control the target game effect files according to the preset operation strategy, avoiding the risk of conflicts in the effect system caused by using multiple effect systems, resulting in chaotic game effects and an increase in the number of errors in the operation of the game logic module. Moreover, one game effect file only saves one copy of game effect data and stores it in the physical disk of the game running device, ensuring the storage security of the game effect data, as well as the precise control and query of the game effect data.
[0069] In the above embodiments, the target game effect file in the physical disk of the game running device can be loaded into the memory of the game running device according to the loading instruction for preparation for operation. However, it does not consider differentiating the target game effect file, and it is impossible to load the target game effect file corresponding to the startup moment and the target game effect file corresponding to after running for a period of time when the game is just started or has been running for a period of time, and it is impossible to ensure the hit rate and execution response speed of the game effect data.
[0070] Optionally, please refer to Figure 3 , the method flowchart of the loading method involved in the game control method provided by the embodiments of the present application. The following will elaborate on each step of the loading method in detail.
[0071] S310, if the loading instruction is the first instruction, then load the target game effect file corresponding to the game effect name in the first preset table in the physical disk into the memory of the game running device.
[0072] In this embodiment, if the game on the game running device is in the just-started state, it can be determined that the loading instruction is the first instruction, and then it is identified whether there is a target game effect file corresponding to the game effect name in the first preset table among all the target game files in the physical disk. If so, the target game effect file corresponding to the game effect name in the first preset table is loaded from the physical disk into the memory.
[0073] Exemplarily, the game effect names in the first preset table include "Startup Sound 001", "Startup Sound 002", and "Startup Sound 003". If the game effect name "Startup Sound 002" only exists in the target game effect file A and the game effect name "Startup Sound 003" only exists in the target game effect file B in the physical disk, then the target game effect file A and the target game effect file B in the physical disk are loaded into the memory of the game running device. It can immediately run "Startup Sound 002" and "Startup Sound 003" when the game is just started, ensuring the hit rate of the game effect data and the execution response speed.
[0074] S320, if the loading instruction is the second instruction, then load the target game effect file corresponding to the game effect name in the second preset table in the physical disk into the memory of the game running device, where the first preset table and the second preset table each include at least one game effect name, and the game effect names in the first preset table are different from the game effect names in the second preset table.
[0075] In this embodiment, if the game on the game running device is in the running state after a preset time interval from the startup state, it can be determined that the loading instruction is the second instruction, and then it is identified whether there is a target game effect file corresponding to the game effect name in the second preset table among all the target game files in the physical disk. If so, the target game effect file corresponding to the game effect name in the second preset table is loaded from the physical disk into the memory.
[0076] For the specific implementation process of this embodiment, reference can be made to the implementation process exemplified in step S310. Specifically, only the game effect names in the second preset table are different from those in the first preset table. Correspondingly, the target game effect files loaded in this embodiment are also different from the target game effect files loaded in the above embodiment, and this is not elaborated one by one here.
[0077] Considering the correct running of the game effect data in the target game effect file, before the target game effect file is loaded into the memory of the game running device, it is necessary to convert the data format of the game effect data in the target game effect file.
[0078] In a possible implementation manner, the step of loading the target game effect file in the physical disk into the memory of the game running device according to the loading instruction further includes:
[0079] Obtain the first storage structure of the target game effect file, and convert the first storage structure into a second storage structure, where the first storage structure is a storage-type file structure, and the second storage structure is a running file structure. Optionally, the first storage structure is JSON, and the second storage structure is a sequence structure.
[0080] Exemplarily, the first storage structure JSON of the target game effect file can save game effect data as follows:
[0082] {"type": "sound effect", "file name": "sound001.mp3", "start time": 0},
[0083] {"type": "particle", "file name": "particle001.fx", "start time": 0, "duration": 2.0}
[0084] 。
[0085] Please refer to Figure 4 , the converted second storage structure is a sequence structure and can be directly loaded and run through the memory. Specifically, if SoundEffectData represents game sound effect data, ParticleEffectData represents game particle effect data, and EffectData represents game effect data, and both game sound effect data and game particle effect data belong to game effect data. If game sound effect data and game particle effect data are used as sub-models, then game effect data is the parent model. The sub-models can inherit the parent model, and SoundEffectData and ParticleEffectData obtained by inheriting a parent model can be saved into a sequence structure.
[0086] Convert the first storage structure into the second storage structure. Exemplarily, convert the structure {"type": "sound effect", "file name": "sound001.mp3", "start time": 0} in the above embodiment into a SoundEffectData structure, and convert {"type": "particle", "file name": "particle001.fx", "start time": 0, "duration": 2.0} into a ParticleEffectData structure. And store these two structures in a variable of the sequence structure for storage.
[0087] Considering that some game effect data must be run, and not running this part of the game effect data will cause abnormal game display. In a possible implementation manner, before the step of running each game effect according to a preset running strategy, the method further includes:
[0088] If a target game effect file containing a running identifier is detected, load the target game effect file corresponding to the running identifier into the memory of the game running device and directly run it.
[0089] In this embodiment, the running identifier and the game effect data are stored together in the target game effect file. The running identifier is used to indicate that the game effect data associated with the running identifier must be executed.
[0090] Exemplarily, if the processor of the current game running device is Core i3, the working temperature of the processor is 40 °C, the game effect name includes "Rain 001", the lower limit of the number of particles of "Rain 001" is 2,000, and if the running environment in the game is rainy, then the target game effect file storing the game effect name "Rain 001" stores the running identifier correspondingly. Although the performance of the processor is not sufficient to support running the game effect data corresponding to "Rain 001", considering that the running environment in the game is rainy, if the game effect corresponding to "Rain 001" is not run, the game will face the situation of abnormal display. In this case, the target game effect file storing "Rain 001" can be directly loaded from the physical disk of the game running device into the memory of the game running device according to the running identifier and prepared to run.
[0091] In summary, in the embodiment of the present application, by obtaining at least two initial game effect files including game effect data and game effect names, and determining the basic information of each game effect through a preset configuration table, and storing the obtained target game effect files, and centrally controlling the target game effect files according to a preset running strategy, the risk of conflicts occurring in the effect system caused by using multiple effect systems, resulting in chaotic game effects and an increase in the number of errors in the game logic module running is avoided. Moreover, only one copy of the game effect data is saved in one game effect file and stored in the physical disk of the game running device, ensuring the storage security of the game effect data, as well as the precise control and query of the game effect data. Also, by differentiating the loading instructions, the hit rate and execution response speed of the game effect data are ensured.
[0092] Corresponding to the above method embodiment, the present application also provides a game effect control system.
[0093] Please refer to Figure 5 , the game effect control system 500 includes:
[0094] An acquisition module 510, configured to acquire at least two initial game effect files, each initial game effect file including game effect data and a game effect name;
[0095] A query module 520, configured to determine, according to each game effect name and a preset configuration table, basic information corresponding to each game effect name, where the preset configuration table includes a mapping relationship between different game effect names and different basic information, and each basic information includes an effect type, an effect priority, an effect quantity threshold, a unique identifier, and a group type;
[0096] A storage module 530, configured to store each game effect data and the basic information corresponding to each game effect name into the initial game effect file corresponding to each game effect data, to obtain all target game effect files, and store all the target game effect files into a physical disk of a game running device;
[0097] A loading module 540, configured to, if a loading instruction is detected, load the target game effect file in the physical disk into the memory of the game running device according to the loading instruction, and run each game effect according to a preset running strategy.
[0098] In an embodiment of the present application, by acquiring at least two initial game effect files including game effect data and game effect names, and determining the basic information of each game effect according to a preset configuration table, storing the obtained target game effect files, and centrally controlling the target game effect files according to a preset running strategy, the risk that the use of multiple effect systems causes conflicts in the effect systems, resulting in chaotic game effects and an increase in the phenomenon of errors in the operation of the game logic module is avoided. Moreover, only one copy of the game effect data is saved in one game effect file and stored in the physical disk of the game running device, ensuring the storage security of the game effect data, as well as the accurate control and query of the game effect data.
[0099] In a possible implementation manner, the loading module 440 is further configured to, if the loading instruction is a first instruction, load the target game effect file corresponding to the game effect name in a first preset table in the physical disk into the memory of the game running device; if the loading instruction is a second instruction, load the target game effect file corresponding to the game effect name in a second preset table in the physical disk into the memory of the game running device, where the first preset table and the second preset table each include at least one game effect name, and the game effect names in the first preset table are different from the game effect names in the second preset table.
[0100] In summary, in the embodiment of the present application, by obtaining at least two initial game effect files including game effect data and game effect names, and determining the basic information of each game effect according to a preset configuration table, storing the obtained target game effect files, and implementing centralized control over the target game effect files according to a preset operation strategy, the risk of conflicts occurring in the effect systems caused by using multiple effect systems, resulting in chaotic game effects and an increase in the number of errors in the operation of the game logic module is avoided. Also, by differentiating loading instructions, the hit rate of game effect data and the execution response speed are ensured.
[0101] The embodiment of the present application also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the game effect control method described in the method embodiment is implemented.
[0102] For the specific implementation processes of the game effect control system, computer device, and computer-readable storage medium provided in this embodiment, reference may be made to the specific implementation processes of the above game effect control method, which will not be elaborated here one by one.
[0103] In summary, in the embodiment of the present application, by obtaining at least two initial game effect files including game effect data and game effect names, and determining the basic information of each game effect according to a preset configuration table, storing the obtained target game effect files, and implementing centralized control over the target game effect files according to a preset operation strategy, the risk of conflicts occurring in the effect systems caused by using multiple effect systems, resulting in chaotic game effects and an increase in the number of errors in the operation of the game logic module is avoided. Moreover, only one copy of the game effect data is saved in a game effect file and stored in the physical disk of the game running device, ensuring the storage security of the game effect data, as well as the precise control and query of the game effect data. Also, by differentiating loading instructions, the hit rate of game effect data and the execution response speed are ensured.
[0104] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A game effect control method, characterized in that, The method includes: Obtaining at least two initial game effect files, where each initial game effect file includes game effect data and a game effect name; Determining, according to each game effect name and a preset configuration table, basic information corresponding to each game effect name, where the preset configuration table includes a mapping relationship between different game effect names and different basic information, and each basic information includes an effect type, an effect priority, an effect quantity threshold, a unique identifier, and a group type; Storing each game effect data and the basic information corresponding to each game effect name into the initial game effect file corresponding to each game effect data to obtain all target game effect files, and storing all the target game effect files into the physical disk of the game running device; If a loading instruction is detected, loading the target game effect files in the physical disk into the memory of the game running device according to the loading instruction, and running each game effect data according to a preset running strategy; The step of loading the target game effect files in the physical disk into the memory of the game running device according to the loading instruction includes: If the loading instruction is a first instruction, loading the target game effect files corresponding to the game effect names in a first preset table in the physical disk into the memory of the game running device; If the loading instruction is a second instruction, loading the target game effect files corresponding to the game effect names in a second preset table in the physical disk into the memory of the game running device, where the first preset table and the second preset table respectively include at least one game effect name, and the game effect names in the first preset table are different from the game effect names in the second preset table.
2. The game effect control method according to claim 1, wherein The step of loading the target game effect files in the physical disk into the memory of the game running device according to the loading instruction further includes: Obtaining a first storage structure of the target game effect file, and converting the first storage structure into a second storage structure, where the first storage structure is a storage-type file structure, and the second storage structure is a running file structure.
3. The game effect control method according to claim 2, wherein The first storage structure is JSON, and the second storage structure is a sequence structure.
4. The game effect control method according to claim 1, wherein The generating step of the preset running strategy includes: Obtaining device information of the game running device, and generating the preset running strategy according to the basic information in each target game effect file and the device information, where the device information includes device hardware information and device working temperature, and the preset running strategies corresponding to different target game effect files are different.
5. The game effect control method according to claim 1, characterized in that Before the step of running each game effect according to the preset running strategy, the method further includes: If a target game effect file containing a running identifier is detected, loading the target game effect file corresponding to the running identifier into the memory of the game running device and directly running it.
6. A game effect control system, characterized in that, The system includes: An obtaining module, configured to obtain at least two initial game effect files, where each initial game effect file includes game effect data and a game effect name; A query module, configured to determine basic information corresponding to each game effect name according to each game effect name and a preset configuration table, where the preset configuration table includes a mapping relationship between different game effect names and different basic information, and each basic information includes an effect type, an effect priority, an effect quantity threshold, a unique identifier, and a group type; A storage module, configured to store each game effect data and the basic information corresponding to each game effect name into an initial game effect file corresponding to each game effect data to obtain all target game effect files, and store all the target game effect files into a physical disk of a game running device; A loading module, configured to, if a loading instruction is detected, load the target game effect file in the physical disk into the memory of the game running device according to the loading instruction, and run each game effect data according to a preset operation strategy; The loading module is further configured to, if the loading instruction is a first instruction, load the target game effect file corresponding to the game effect name in a first preset table in the physical disk into the memory of the game running device; if the loading instruction is a second instruction, load the target game effect file corresponding to the game effect name in a second preset table in the physical disk into the memory of the game running device, where the first preset table and the second preset table respectively include at least one game effect name, and the game effect names in the first preset table are different from the game effect names in the second preset table.
7. A computer device, characterized in that, The computer device includes a device body, a computer-readable storage medium, and a processor. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the game effect control method according to any one of claims 1-5 is implemented.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by one or more processors, the game effect control method according to any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Game resource processing method and device, processor and storage medium
CN112799737A