Game resource allocation method and device, storage medium, and electronic device
By updating the virtual resource accumulation of both camps in real-time in the multiplayer online role-playing game, the problem of the camps being unable to understand the progress of task completion in real time is solved, improving the game experience and immersion.
Patent Information
- Application Number
- CN202011232312.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-06
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-11-06
AI Technical Summary
In multiplayer online role-playing games, the two camps cannot understand each other's task completion progress in real time, resulting in a limited game experience.
By matching the first character set and the second character set in the game scene, the accumulation of virtual resources for both parties to perform game tasks is obtained and updated in real time, and game resources are allocated according to the accumulation, ensuring that players can understand the task completion progress of their respective camps in real time.
It solves the problem of the two camps being unable to update the task completion progress in real time, and improves the user's game experience and game immersion.
Smart Images

Figure CN112337089B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for allocating game resources, a storage medium, and an electronic device. Background Art
[0002] In the related art, with the development of computer technology and the diversification of terminal functions, more and more types of games can be realized on terminals and other devices, such as racing, sandbox, role-playing games (RPG) and shooting games, etc. Among them, in all role-playing games of MMORPG (Massive Multiplayer Online Role-Playing Game), players have to play a fictional character and control the character to complete various tasks in the game, and interact with non-player characters (NPC is the abbreviation of Non-Player Character, which is a type of character in the game, meaning non-player character, which refers to the game character in the game that is not controlled by the player) in the game.
[0003] In the related art, in a battle game involving multiple camps, after the game is over, rewards will be settled for the members participating in the game based on the outcome of the game. However, during the game, both camps do not know the specific completion status of the game tasks, and cannot understand the progress of task completion of each camp.
[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for allocating game resources, a storage medium, and an electronic device.
[0006] According to one embodiment of the present invention, a method for allocating game resources is provided, comprising: matching a first character set and a second character set in a game scene, wherein the first character set and the second character set include an equal number of multiple player characters; starting from a start time, acquiring in real time a first cumulative amount of virtual resources generated by the first character set performing a game task, and acquiring in real time a second cumulative amount of virtual resources generated by the second character set performing the game task, wherein the first character set includes multiple first player characters and the second character set includes multiple second player characters; after an end time is reached, allocating game resources to the player characters of the first character set and the second character set according to the first cumulative amount of virtual resources and the second cumulative amount of virtual resources.
[0007] Optionally, real-time acquisition of the accumulated amount of first virtual resources generated by the first character set performing the game task, and real-time acquisition of the accumulated amount of second virtual resources generated by the second character set performing the game task include: acquiring in real time according to the settlement period the first residence time of the first player character within a specified range of the game map, and the number of the first player characters, and acquiring in real time the second residence time of the second player character within the specified range, and the number of the second player characters, wherein the number of player characters that can be accommodated in the specified range is less than the total number of player characters of the first character set and the second character set; calculating a first gain based on the first residence time and the number of the first player characters, and calculating a second gain based on the second residence time and the number of the second player characters, wherein the gain is positively correlated with the residence time and positively correlated with the number of player characters; using the first gain to update the accumulated amount of first virtual resources at the current time, and using the second gain to update the accumulated amount of second virtual resources at the current time.
[0008] Optionally, calculating the first gain based on the first stay duration and the number of the first player characters includes: using the following formula to calculate the first gain H1=a*t1+b*m1, wherein the first stay duration is t1, the number of first player characters is m1, a is negatively correlated with t1, and b is negatively correlated with m1.
[0009] Optionally, before obtaining the first residence time of the first player character within the specified range of the game map and the number of the first player characters in real time according to the settlement period, and obtaining the second residence time of the second player character within the specified range and the number of the second player characters in real time according to the settlement period, the method further includes: monitoring the running status of each player character in the first character set and the second character set at the initial time of the settlement period, wherein the running status includes one of the following: activation status, cooling down status; and deleting the designated first player character and the designated second player character whose running status is cooling down status in the first character set and the second character set, respectively.
[0010] Optionally, real-time acquisition of the accumulated amount of first virtual resources generated by the first set of characters performing the game task, and real-time acquisition of the accumulated amount of second virtual resources generated by the second set of characters performing the game task include: starting from the start time, real-time acquisition of the number of the first player characters within a specified range of the game map according to the settlement period, and real-time acquisition of the number of the second player characters within the specified range; comparing the number of the first player characters with the number of the second player characters, and calculating the difference between the number of the first player characters and the number of the second player characters; calculating the first accumulated amount of virtual resources or the second accumulated amount of virtual resources based on the difference in number.
[0011] Optionally, allocating game resources to player characters of the first character set and the second character set based on the first amount of virtual currency and the second amount of virtual currency includes: calculating a first gain amount based on the first amount of virtual currency, and calculating a second gain amount based on the second amount of virtual currency, wherein the gain amount is positively correlated with the amount of virtual currency; using the first gain amount to update the third cumulative amount of virtual resources at the current time, and using the second gain amount to update the fourth cumulative amount of virtual resources at the current time; allocating game resources to player characters of the first character set and the second character set based on the third cumulative amount of virtual resources and the fourth cumulative amount of virtual resources.
[0012] Optionally, before obtaining in real time the first amount of virtual currency transferred by the first player character to the designated non-player character in the game scene, the method further includes: detecting an attack instruction output by the first player character to the second player character, wherein the designated position of the second player character displays the amount of available virtual currency to be transferred by the second player character to the designated non-player character; updating the current life value of the second player character based on the attack instruction, and when the current life value of the second player character reaches a preset threshold, transferring the available amount of virtual currency from the second player character to the first player character, and / or transferring the attack and defense attribute values of the second player character to the second player character, and / or allocating an attack gain value in the next life cycle to the second player character, and / or allocating a defense loss value in the current life cycle to the first player character.
[0013] Optionally, updating the current health value of the second player character based on the attack instruction includes: determining the current power status of the camps where the first player character and the second player character are located, wherein the power status includes an advantageous camp and a disadvantageous camp; if the first player character is in a disadvantageous camp, allocating a camp gain value to the first player character; calculating the basic attribute value of the attack instruction and the life decay value caused by the camp gain value, and updating the current health value of the second player character according to the life decay value.
[0014] Optionally, before updating the current health value of the second player character based on the attack instruction, the method also includes: calculating a speed debuff value of the second player character based on the available virtual currency amount, wherein the speed debuff value is positively correlated with the available virtual currency amount; and reducing the movement speed of the second player character in the game scene based on the speed debuff value.
[0015] Optionally, before updating the current health value of the second player character based on the attack instruction, the method further includes: responding to a resource transfer instruction of the second player character, transferring the available virtual currency amount to a third player character, wherein the second player character and the third player character belong to the same character set.
[0016] Optionally, allocating game resources to player characters of the first character set and the second character set according to the first accumulated amount of virtual resources and the second accumulated amount of virtual resources includes at least one of the following: if the first accumulated amount of virtual resources is greater than the second accumulated amount of virtual resources, allocating a first amount of game resources to the first character set and a second amount of game resources to the second character set, wherein the first amount is greater than the second amount; if the first accumulated amount of virtual resources is less than the second accumulated amount of virtual resources, allocating a third amount of game resources to the first character set and a fourth amount of game resources to the second character set, wherein the third amount is less than the fourth amount; for each player character in the first character set and the second character set, calculating the contribution of the player character to the first accumulated amount of virtual resources or the second accumulated amount of virtual resources, and allocating a fifth amount of game resources to the corresponding player character based on the contribution, wherein the amount of game resources is positively correlated with the contribution of the corresponding player character.
[0017] Optionally, after obtaining in real time the accumulated amount of first virtual resources generated by the first set of characters performing a game task, and obtaining in real time the accumulated amount of second virtual resources generated by the second set of characters performing the game task, the method further includes: displaying in real time in the game scene the accumulated amount of the first virtual resources and the accumulated amount of the second virtual resources at the current time.
[0018] Optionally, after matching the first character set and the second character set in the game scene, the method further includes: assigning the same attack and defense attribute value to each player character in the first character set and the second character set.
[0019] According to another embodiment of the present invention, a device for allocating game resources is provided, comprising: a matching module for matching a first character set and a second character set in a game scene, wherein the first character set and the second character set include an equal number of multiple player characters; an acquisition module for acquiring, starting from a start time, in real time a first cumulative amount of virtual resources generated by the first character set performing a game task, and acquiring in real time a second cumulative amount of virtual resources generated by the second character set performing the game task, wherein the first character set includes multiple first player characters, and the second character set includes multiple second player characters; a first allocation module for allocating game resources to the player characters of the first character set and the second character set according to the first cumulative amount of virtual resources and the second cumulative amount of virtual resources after an end time is reached.
[0020] Optionally, the acquisition module includes: a first acquisition unit, which is used to obtain in real time according to the settlement period the first stay time of the first player character in a specified range of the game map and the number of the first player characters after the matching module matches the first character set and the second character set in the game scene, and to obtain in real time the second stay time of the second player character in the specified range and the number of the second player characters, wherein the number of player characters that can be accommodated in the specified range is less than the total number of player characters in the first character set and the second character set; a first calculation unit, which is used to calculate a first gain based on the first stay time and the number of the first player characters, and to calculate a second gain based on the second stay time and the number of the second player characters, wherein the gain is positively correlated with the stay time and the number of player characters; a first update unit, which is used to use the first gain to update the first virtual resource accumulation at the current time, and to use the second gain to update the second virtual resource accumulation at the current time.
[0021] Optionally, the calculation unit also includes: a calculation subunit, used to calculate the first gain amount H1=a*t1+b*m1 using the following formula, wherein the first stay time is t1, the number of first player characters is m1, a is negatively correlated with t1, and b is negatively correlated with m1.
[0022] Optionally, the acquisition module also includes: a monitoring unit, used to monitor the running status of each player character in the first character set and the second character set at the initial time of the settlement cycle before the acquisition unit acquires the first stay duration of the first player character in the specified range of the game map and the number of the first player characters in real time according to the settlement cycle, and acquires the second stay duration of the second player character in the specified range and the number of the second player characters in real time, wherein the running status includes one of the following: an activation status and a cooling-down status; and a deleting unit, used to delete the specified first player character and the specified second player character whose running status is the cooling-down status in the first character set and the second character set, respectively.
[0023] Optionally, the acquisition module includes: a second acquisition unit, used to acquire the number of the first player characters within a specified range of the game map in real time according to the settlement period starting from the start time, and to acquire the number of the second player characters within the specified range in real time; a comparison unit, used to compare the number of the first player characters with the number of the second player characters, and calculate the difference between the number of the first player characters and the number of the second player characters; a second calculation unit, used to calculate the first virtual resource cumulative amount or the second virtual resource cumulative amount based on the difference in quantity.
[0024] Optionally, the acquisition module includes: a third acquisition unit, used to acquire in real time the amount of first virtual currency transferred by the first player character to a designated non-player character in the game scene, and to acquire in real time the amount of second virtual currency transferred by the second player character to the designated non-player character; a second updating unit, used to use the first virtual currency amount to update the accumulated amount of first virtual resources at the current time, and to use the second virtual currency amount to update the accumulated amount of second virtual resources at the current time.
[0025] Optionally, the acquisition module also includes: a detection unit, used to detect an attack instruction output by the first player character to the second player character before the third acquisition unit acquires in real time the first virtual currency amount transferred by the first player character to the designated non-player character in the game scene, wherein the designated position of the second player character displays the available virtual currency amount to be transferred by the second player character to the designated non-player character; a control unit, used to update the current life value of the second player character based on the attack instruction, and when the current life value of the second player character reaches a preset threshold, transfer the available virtual currency amount from the second player character to the first player character, and / or transfer the attack and defense attribute values of the second player character to the second player character, and / or assign an attack gain value in the next life cycle to the second player character, and / or assign a defense loss value in the current life cycle to the first player character.
[0026] Optionally, the control unit includes: a determination subunit, used to determine the current power status of the camps where the first player character and the second player character are located, wherein the power status includes an advantageous camp and a disadvantageous camp; an allocation subunit, used to allocate a camp gain value to the first player character if the first player character is in a disadvantageous camp; and an update unit, used to calculate the basic attribute value of the attack command and the life decay value caused by the camp gain value, and update the current life value of the second player character according to the life decay value.
[0027] Optionally, the control unit is also used to: calculate a speed debuff value of the second player character based on the available virtual currency amount before updating the current life value of the second player character based on the attack instruction, wherein the speed debuff value is positively correlated with the available virtual currency amount; and reduce the movement speed of the second player character in the game scene based on the speed debuff value.
[0028] Optionally, the control unit is further used to: before updating the current life value of the second player character based on the attack instruction, respond to the resource transfer instruction of the second player character to transfer the available virtual currency amount to a third player character, wherein the second player character and the third player character belong to the same character set.
[0029] Optionally, the first allocation module includes at least one of the following: a first allocation unit, used to allocate a first amount of game resources to the first character set and a second amount of game resources to the second character set if the first accumulated amount of virtual resources is greater than the second accumulated amount of virtual resources, wherein the first amount is greater than the second amount; if the first accumulated amount of virtual resources is less than the second accumulated amount of virtual resources, allocate a third amount of game resources to the first character set and a fourth amount of game resources to the second character set, wherein the third amount is less than the fourth amount; a second allocation unit, used to calculate, for each player character in the first character set and the second character set, a contribution of the player character to the first accumulated amount of virtual resources or the second accumulated amount of virtual resources, and allocate a fifth amount of game resources to the corresponding player character based on the contribution, wherein the amount of game resources is positively correlated with the contribution of the corresponding player character.
[0030] Optionally, the device also includes: a display module, which is used to display the first virtual resource accumulation amount and the second virtual resource accumulation amount at the current time in the game scene in real time after the acquisition module acquires in real time the first virtual resource accumulation amount generated by the first character set performing the game task, and acquires in real time the second virtual resource accumulation amount generated by the second character set performing the game task.
[0031] Optionally, the device further includes: a second allocation module, configured to allocate the same attack and defense attribute value to each player character in the first character set and the second character set after the matching module matches the first character set and the second character set in the game scene.
[0032] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0033] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0034] Through the present invention, a first character set and a second character set are matched in a game scene, and starting from a start time, a first cumulative amount of virtual resources generated by the first character set executing a game task is obtained in real time, and a second cumulative amount of virtual resources generated by the second character set executing a game task is obtained in real time. After an end time is reached, game resources are allocated to player characters of the first character set and the second character set according to the first cumulative amount of virtual resources and the second cumulative amount of virtual resources. By updating the cumulative amount of virtual resources accumulated by both camps in the game for executing game tasks in real time, players can understand the task completion progress of their respective camps in real time, which solves the technical problem that the task completion progress of both camps cannot be updated in real time in the related art, and at the same time provides a method for allocating game resources, thereby improving the user's gaming experience and the sense of immersion in the game. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0036] Figure 1 It is a hardware structure block diagram of a computer for allocating game resources according to an embodiment of the present invention;
[0037] Figure 2 is a flowchart of a method for allocating game resources according to an embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of a game scene according to an embodiment of the present invention;
[0039] Figure 4 is a schematic diagram of a mobile marker according to an embodiment of the present invention;
[0040] Figure 5is a structural block diagram of a device for allocating game resources according to an embodiment of the present invention;
[0041] Figure 6 It is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] Example 1
[0045] The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, tablet, server, computer or similar electronic terminal. Taking running on a computer as an example, Figure 1 FIG. 1 is a hardware structure diagram of a computer for distributing game resources according to an embodiment of the present invention. Figure 1 As shown, the computer 10 may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1More or fewer components as shown, or with Figure 1 Different configurations shown.
[0046] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for allocating game resources in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. In this embodiment, the processor 104 is used to respond to human-computer interaction instructions and game strategies, and control the target virtual character to perform specified operations to complete the game task. The memory 104 is used to store program scripts, configuration information, attribute information of virtual characters, etc. of electronic games.
[0047] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0048] Optionally, the input-output device 108 further includes a human-computer interaction screen for obtaining human-computer interaction instructions through a human-computer interaction interface, and for presenting a game screen in a game scene;
[0049] In this embodiment, a method for allocating game resources is provided. Figure 2 is a flow chart of a method for allocating game resources according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0050] Step S202, matching a first character set and a second character set in a game scene, wherein the first character set and the second character set include the same number of multiple player characters;
[0051] In this embodiment, the first character set and the second character set are two hostile camps in the game scene. There is a competition for resources when performing game tasks. The player characters (Player-Controlled Character, PCC for short, player characters or player-controlled characters) of both camps are controlled by the main controlling player through the game client.
[0052] Step S204, starting from the start time, obtaining in real time a first cumulative amount of virtual resources generated by a first character set performing a game task, and obtaining in real time a second cumulative amount of virtual resources generated by a second character set performing a game task, wherein the first character set includes a plurality of first player characters, and the second character set includes a plurality of second player characters;
[0053] From the start time to the end time is the execution time of the game task. The game task of this embodiment can be a collection task of any game element in the game scene, a combat task, etc. The start time is the start time or trigger time of the game task. The virtual game resources can be accumulated in real time according to the time period. The accumulated amount of virtual resources is characterized by the progress of the first character set and the second character set in completing the game task.
[0054] Step S206, after the expiration time arrives, allocating game resources to the player characters of the first character set and the second character set according to the first virtual resource accumulation amount and the second virtual resource accumulation amount;
[0055] Optionally, the end time can be a fixed time interval from the start time, such as 10 minutes. The end time can also be generated based on a specific event, that is, the time when a specific event occurs or the time when a specific condition is met, the end of the game task, such as the time when the accumulated amount of the first virtual resource or the accumulated amount of the second virtual resource reaches a threshold value, the time when all the soldiers in a certain camp are killed, etc.
[0056] Through the above steps, the first character set and the second character set are matched in the game scene, and starting from the start time, the first virtual resource accumulation amount generated by the first character set performing the game task is obtained in real time, and the second virtual resource accumulation amount generated by the second character set performing the game task is obtained in real time. After the end time arrives, the game resources are allocated to the player characters of the first character set and the second character set according to the first virtual resource accumulation amount and the second virtual resource accumulation amount. By updating the virtual resource accumulation amount accumulated by both camps in the game for performing the game tasks in real time, the players can understand the task completion progress of their respective camps in real time, which solves the technical problem that the task completion progress of both camps cannot be updated in real time in the related technology, and at the same time provides a method for allocating game resources, which improves the user's gaming experience and enhances the game immersion.
[0057] In different implementation scenarios, the accumulated amount of virtual resources in this embodiment is accumulated through different game tasks, and the accumulated amount of virtual resources can also be calculated and displayed in different ways. Here is an example:
[0058] In an implementation scenario of this embodiment, obtaining in real time the accumulated amount of first virtual resources generated by the first character set performing the game task, and obtaining in real time the accumulated amount of second virtual resources generated by the second character set performing the game task includes:
[0059] S11, starting from the start time, obtaining in real time according to the settlement period a first stay time of the first player character in a specified range of the game map and the number of the first player characters, and obtaining in real time a second stay time of the second player character in the specified range and the number of the second player characters, wherein the first character set includes a plurality of first player characters, the second character set includes a plurality of second player characters, and the number of player characters that can be accommodated in the specified range is less than the total number of player characters in the first character set and the second character set;
[0060] In this implementation scenario, the accumulated amount of virtual resources is a quantifiable integral value or experience value, and the accumulated amount of virtual resources is related to the number of members within a specified range in the camp and the length of stay of the members.
[0061] Optionally, the center of the designated range is indicated in the game scene by scene objects such as flags and trophies.
[0062] In one embodiment of the present implementation scenario, before obtaining the first residence time of the first player character within the specified range of the game map and the number of the first player characters in real time according to the settlement period, and obtaining the second residence time of the second player character within the specified range and the number of the second player characters in real time, it also includes: monitoring the running status of each player character in the first character set and the second character set at the initial time of the settlement period, wherein the running status includes one of the following: activation status, cooling status; deleting the designated first player character and the designated second player character whose running status is cooling status in the first character set and the second character set, respectively.
[0063] Through this implementation, the activation state is the running state of the player character, and the cooling state is the death state of the player character. In the death state, the player character cannot perform game tasks and generates an accumulated amount of virtual resources.
[0064] S12, calculating a first gain based on the first stay time and the number of the first player characters, and calculating a second gain based on the second stay time and the number of the second player characters, wherein the gain is positively correlated with the stay time and positively correlated with the number of the player characters;
[0065] In one example, in one settlement cycle, the first stay time is t1, the number of the first player characters is m1, the second stay time is t2, and the number of the second player characters is m2. By calculation, the first gain amount H1 = a*t1+b*m1, the second gain amount H2 = a*t2+b*m2. In one example, a and b are both preset constants. In another example, a is a related function of t and is negatively correlated with t, that is, the longer the stay time, the smaller the value of a. b is a constant and is a related function of m and is negatively correlated with m, that is, the larger the number of player characters, the smaller the value of b. The longer the player characters stay in the area, the slower the growth rate of the gain. The more players in a single camp have in the area, the slower the growth rate of the gain, and vice versa. By using the algorithm of the double-correlation function, the playability and fairness of the game can be improved, and the calculation accuracy of the accumulated amount of virtual resources can be improved.
[0066] In some other embodiments, the calculation is performed based on a single player character in the camp, and the length of stay of each first player character and each second player character is obtained in real time according to the settlement period, and converted into a gain for each player character (the gain for a single player character is related to the length of stay of the corresponding player character), and then the gains of all player characters in the entire camp are accumulated.
[0067] S13, using the first gain amount to update the first virtual resource accumulation amount at the current time, and using the second gain amount to update the second virtual resource accumulation amount at the current time.
[0068] In this implementation scenario, after the game starts, players from both camps approach the middle area of the scene map. The center of the area can be guided by a flag or a trophy or other props. The more players enter the area, the more gains the camp will get. At the same time, the current accumulated amount of virtual resources can be displayed in the form of a progress bar, etc. The area can only accommodate a specific number of players. When the area is full, players who want to enter must kill at least one player in the area before entering. Players from both camps can fight each other in the area. If a player from one camp is killed in the area or takes the initiative to walk out of the area, the number of people staying in the area will decrease. Figure 3 It is a schematic diagram of a game scene of an embodiment of the present invention, including two camps A and B. Each camp includes 5 members. The designated area can only accommodate 5 members. After the members are killed, they return to the base of the corresponding camp and revive within a certain period of time.
[0069] In another embodiment of the present implementation scenario, real-time acquisition of the accumulated amount of first virtual resources generated by the first set of characters performing game tasks, and real-time acquisition of the accumulated amount of second virtual resources generated by the second set of characters performing game tasks include: starting from the start time, real-time acquisition of the number of first player characters within a specified range of the game map according to the settlement period, and real-time acquisition of the number of second player characters within the specified range; comparing the number of first player characters with the number of second player characters, and calculating the difference between the number of first player characters and the number of second player characters; calculating the accumulated amount of the first virtual resource or the accumulated amount of the second virtual resource based on the difference in quantity.
[0070] Optionally, calculating the first virtual resource accumulation amount or the second virtual resource accumulation amount based on the quantity difference includes: when the number of the first player characters is large, the number of virtual resources is increased for the first camp based on the current number of virtual resources, and vice versa. Furthermore, the color and offset position of the marker can be set according to the quantity difference, and the color and offset position of the marker are used to indicate which camp obtains resources and the growth rate of resources. Taking the marker as a flag as an example, Figure 4 This is a schematic diagram of a mobile marker in an embodiment of the present invention. The flag area is represented by a special effect circle, with the flag as the center. The progress of the clan flag occupation can be obtained in this area. When one camp occupies the flag (i.e., there are more people), the flag will change to the color of the camp to which it belongs. The flag has three subordinate states, namely neutral state, first camp occupation, and second camp occupation. When the player enters the flag stand, a flag occupation progress bar will appear, and the progress of the flag occupation can be obtained at the same time, such as Figure 4 As shown. The default is neutral. When the progress bar is in the third color area, neither side will obtain resources. When the second camp has more players, the progress bar moves to the right, and when the first camp has more players, the progress bar moves to the left. The progress bar can only move to one side at the same time. The flag area detects the surrounding players every second and increases or decreases the progress according to the number of players on both sides within the range. If the number of players on both sides is equal, the progress remains in the original state. If the number of players in the second camp is greater than that in the first camp, the progress bar moves to the right according to the difference in the number of players, otherwise it moves to the left.
[0071] In another implementation scenario of this embodiment, obtaining in real time the accumulated amount of first virtual resources generated by the first character set performing the game task, and obtaining in real time the accumulated amount of second virtual resources generated by the second character set performing the game task includes:
[0072] S21, obtaining in real time a first virtual currency amount transferred from a first player character to a designated non-player character in a game scene, and obtaining in real time a second virtual currency amount transferred from a second player character to a designated non-player character;
[0073] In one embodiment of the present implementation scenario, before obtaining in real time the first amount of virtual currency transferred by the first player character to the designated non-player character in the game scene, it also includes: detecting an attack instruction output by the first player character to the second player character, wherein the designated position of the second player character displays the amount of available virtual currency to be transferred by the second player character to the designated non-player character; updating the current life value of the second player character based on the attack instruction, and when the current life value of the second player character reaches a preset threshold, transferring the available virtual currency from the second player character to the first player character, and / or transferring the attack and defense attribute values of the second player character to the second player character, and / or allocating an attack gain value in the next life cycle to the second player character, and / or allocating a defense loss value in the current life cycle to the first player character.
[0074] Optionally, before updating the current health value of the second player character based on the attack instruction, the method further includes: responding to the resource transfer instruction of the second player character, transferring the available virtual currency to the third player character, wherein the second player character and the third player character belong to the same character set. Any two player characters in the character set of the same camp can realize resource transfer.
[0075] In this implementation scenario, in addition to the above-mentioned designated non-player characters and players from both camps, the game scene also includes other game elements in the map, through which virtual currency can be collected, such as by brushing BUFFs or picking up props in the wild area of the map, thereby collecting virtual currency. At the same time, by completing a certain amount of game tasks or events, the combat effectiveness of oneself and the camp team can be improved (a combat attribute value, obtained through attack attribute value, defense attribute value, blood recovery attribute value, movement speed, weapon gain, etc.). Player characters from one camp can also go to the opponent's wild area to brush the wild or kill the enemy. If killed, the collected virtual currency is transferred to the member who killed the player character, and the combat effectiveness disappears, and part of the combat effectiveness is transferred to the winning player (the combat effectiveness may not be transferred, and the winning party receives a certain number of head rewards). The killed player is resurrected within a certain period of time (at the starting position or on the original location) and continues the game.
[0076] In one example, the current combat power and available virtual currency amount of each player character in the game scene are displayed in the player character's head area and move in real time with the player character, so that player characters of both camps in the entire area can see the combat power and available virtual currency amount of other player characters.
[0077] S22, using the first virtual currency amount to update the first virtual resource accumulation amount at the current time, and using the second virtual currency amount to update the second virtual resource accumulation amount at the current time.
[0078] In this implementation scenario, after the game starts, players can fight monsters in the wild area, brush buffs, pick up props, accumulate gold coins, and then hand in gold coins at a designated location in the scene map. During the game time (start time to end time), the one who hands in more gold coins (or prioritizes to fill a certain threshold value) wins. Players can only accumulate virtual resource accumulations by handing in gold coins at a designated location in the scene map. During the handing in process, or when the player is in the map, players in other camps can snatch gold coins, and players duel with players in the hostile camp, and the winner will get the number of gold coins of the loser. When each player moves in the map, the current gold coin accumulation of each player (gold coins that have not been handed in to the designated location, cleared after handing in successfully) is displayed in a certain position of the player through a progress bar, etc., which is visible to other players. At the same time, gold coins can also be transferred to each other between two player characters in the same camp, such as a player with low combat effectiveness transferring gold coins to a player with high combat effectiveness.
[0079] In some embodiments, as the accumulated amount of virtual resources of both camps is updated, the team attributes of both camps and the attributes of individual player characters in the camps can also be updated according to the current accumulated amount of virtual resources, thereby balancing the combat capability values of the two camps. For example, if the accumulated amount of virtual resources accumulated by camp A is greater than that of camp B, the combat capability (such as attack power, movement speed, etc.) of each player character in camp A can be reduced or increased according to a certain ratio (the ratio is related to the difference in the accumulated amount of virtual resources of the two camps). For example, the more gold coins a camp accumulates, the slower the movement speed of the players in that camp.
[0080] In one example, updating the current health value of the second player character based on the attack instruction includes: determining the current power status of the camps where the first player character and the second player character are located, wherein the power status includes an advantageous camp and a disadvantageous camp; if the first player character is in a disadvantageous camp, assigning a camp gain value to the first player character; calculating the basic attribute value of the attack instruction and the life decay value caused by the camp gain value, and updating the current health value of the second player character according to the life decay value. The power status is determined according to the accumulated amount of virtual resources that the current camp has accumulated. If the accumulated amount of virtual resources is high, it is an advantageous camp, otherwise it is a disadvantageous camp.
[0081] In another example, before updating the current health value of the second player character based on the attack instruction, it also includes: calculating a speed debuff value of the second player character based on the amount of available virtual currency, wherein the speed debuff value is positively correlated with the amount of available virtual currency; and reducing the movement speed of the second player character in the game scene based on the speed debuff value.
[0082] In one example, the above two implementation scenarios correspond to two game play events, namely the low-level version and the high-level version, which correspond to different player levels, and are matched in different types of player sets. Players are matched into corresponding versions of the game according to their levels in the big world. All players can apply to participate in the low-level version. After entering the game, the combat power values of the player characters of all camps are the same, which has nothing to do with the levels in the big world scene. In the high-level version, only players of a certain level can participate, and the levels and combat power values of the players matched in the same game are similar. Players can bring level gains, character skills, props, pets, etc. in the big world into the game and use them in each round.
[0083] Optionally, after matching the first character set and the second character set in the game scene, wherein the first character set and the second character set include the same number of multiple player characters, the method further includes: assigning the same attack and defense attribute value to each player character in the first character set and the second character set.
[0084] Optionally, an average value may be calculated based on the attack and defense attribute values of multiple player characters, or a median attack and defense attribute value may be calculated based on the highest attack and defense attribute value and the lowest attack and defense attribute value among multiple player characters, and then configured as the attack and defense attribute value of each player character in the first character set and the second character set.
[0085] In this embodiment, the allocation of game resources to the player characters of the first character set and the second character set according to the first virtual resource accumulation amount and the second virtual resource accumulation amount may be, but is not limited to, as follows:
[0086] If the first accumulated amount of virtual resources is greater than the second accumulated amount of virtual resources, a first amount of game resources is allocated to the first character set, and a second amount of game resources is allocated to the second character set, wherein the first amount is greater than the second amount; if the first accumulated amount of virtual resources is less than the second accumulated amount of virtual resources, a third amount of game resources is allocated to the first character set, and a fourth amount of game resources is allocated to the second character set, wherein the third amount is less than the fourth amount;
[0087] For each player character in the first character set and the second character set, the contribution of the player character to the first virtual resource accumulation amount or the second virtual resource accumulation amount is calculated, and a fifth portion of game resources is allocated to the corresponding player character based on the contribution amount, wherein the portion of the game resources is positively correlated with the contribution amount of the corresponding player character.
[0088] When the game settles rewards, it includes personal rewards and team rewards. Personal rewards are proportional to the amount of gold coins accumulated by the player in the round, the number of enemies killed, and the time spent in the area. Team rewards are related to the victory or defeat of the camp.
[0089] Optionally, after obtaining the first virtual resource accumulation amount generated by the first character set performing the game task in real time, and obtaining the second virtual resource accumulation amount generated by the second character set performing the game task in real time, the method further includes: displaying the first virtual resource accumulation amount and the second virtual resource accumulation amount at the current time in the game scene in real time. The display may be in the form of a progress bar, numbers, color depth, etc.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0091] Example 2
[0092] In the present embodiment, a kind of allocation device of game resources is also provided, for realizing the above-mentioned embodiment and preferred implementation mode, and what has been described is not repeated here. As used below, the term "module" can realize the combination of software and / or hardware of predetermined function. Although the device described in the following embodiments is preferably realized with software, the realization of hardware, or the combination of software and hardware is also possible and conceived.
[0093] Figure 5 is a structural block diagram of a device for allocating game resources according to an embodiment of the present invention, such as Figure 5 As shown, the device includes: a matching module 50, an acquisition module 52, and a first allocation module 54, wherein:
[0094] A matching module 50, for matching a first character set and a second character set in a game scene, wherein the first character set and the second character set include the same number of multiple player characters;
[0095] an acquisition module 52, configured to acquire, starting from a start time, in real time a first cumulative amount of virtual resources generated by the first character set executing a game task, and to acquire in real time a second cumulative amount of virtual resources generated by the second character set executing the game task, wherein the first character set includes a plurality of first player characters, and the second character set includes a plurality of second player characters;
[0096] The first allocation module 54 is configured to allocate game resources to the player characters of the first character set and the second character set according to the first accumulated amount of virtual resources and the second accumulated amount of virtual resources after the expiration time arrives.
[0097] Optionally, the acquisition module includes: a first acquisition unit, which is used to obtain in real time according to the settlement period the first stay time of the first player character in a specified range of the game map and the number of the first player characters after the matching module matches the first character set and the second character set in the game scene, and to obtain in real time the second stay time of the second player character in the specified range and the number of the second player characters, wherein the number of player characters that can be accommodated in the specified range is less than the total number of player characters in the first character set and the second character set; a first calculation unit, which is used to calculate a first gain based on the first stay time and the number of the first player characters, and to calculate a second gain based on the second stay time and the number of the second player characters, wherein the gain is positively correlated with the stay time and the number of player characters; a first update unit, which is used to use the first gain to update the first virtual resource accumulation at the current time, and to use the second gain to update the second virtual resource accumulation at the current time.
[0098] Optionally, the calculation unit also includes: a calculation subunit, used to calculate the first gain amount H1=a*t1+b*m1 using the following formula, wherein the first stay time is t1, the number of first player characters is m1, a is negatively correlated with t1, and b is negatively correlated with m1.
[0099] Optionally, the acquisition module also includes: a monitoring unit, used to monitor the running status of each player character in the first character set and the second character set at the initial time of the settlement cycle before the acquisition unit acquires the first stay duration of the first player character in the specified range of the game map and the number of the first player characters in real time according to the settlement cycle, and acquires the second stay duration of the second player character in the specified range and the number of the second player characters in real time, wherein the running status includes one of the following: an activation status and a cooling-down status; and a deleting unit, used to delete the specified first player character and the specified second player character whose running status is the cooling-down status in the first character set and the second character set, respectively.
[0100] Optionally, the acquisition module includes: a second acquisition unit, used to acquire the number of the first player characters within a specified range of the game map in real time according to the settlement period starting from the start time, and to acquire the number of the second player characters within the specified range in real time; a comparison unit, used to compare the number of the first player characters with the number of the second player characters, and calculate the difference between the number of the first player characters and the number of the second player characters; a second calculation unit, used to calculate the first virtual resource cumulative amount or the second virtual resource cumulative amount based on the difference in quantity.
[0101] Optionally, the acquisition module includes: a third acquisition unit, used to acquire in real time the amount of first virtual currency transferred by the first player character to a designated non-player character in the game scene, and to acquire in real time the amount of second virtual currency transferred by the second player character to the designated non-player character; a second updating unit, used to use the first virtual currency amount to update the accumulated amount of first virtual resources at the current time, and to use the second virtual currency amount to update the accumulated amount of second virtual resources at the current time.
[0102] Optionally, the acquisition module also includes: a detection unit, used to detect an attack instruction output by the first player character to the second player character before the third acquisition unit acquires in real time the first virtual currency amount transferred by the first player character to the designated non-player character in the game scene, wherein the designated position of the second player character displays the available virtual currency amount to be transferred by the second player character to the designated non-player character; a control unit, used to update the current life value of the second player character based on the attack instruction, and when the current life value of the second player character reaches a preset threshold, transfer the available virtual currency amount from the second player character to the first player character, and / or transfer the attack and defense attribute values of the second player character to the second player character, and / or assign an attack gain value in the next life cycle to the second player character, and / or assign a defense loss value in the current life cycle to the first player character.
[0103] Optionally, the control unit includes: a determination subunit, used to determine the current power status of the camps where the first player character and the second player character are located, wherein the power status includes an advantageous camp and a disadvantageous camp; an allocation subunit, used to allocate a camp gain value to the first player character if the first player character is in a disadvantageous camp; and an update unit, used to calculate the basic attribute value of the attack command and the life decay value caused by the camp gain value, and update the current life value of the second player character according to the life decay value.
[0104] Optionally, the control unit is also used to: calculate a speed debuff value of the second player character based on the available virtual currency amount before updating the current life value of the second player character based on the attack instruction, wherein the speed debuff value is positively correlated with the available virtual currency amount; and reduce the movement speed of the second player character in the game scene based on the speed debuff value.
[0105] Optionally, the control unit is further used to: before updating the current life value of the second player character based on the attack instruction, respond to the resource transfer instruction of the second player character to transfer the available virtual currency amount to a third player character, wherein the second player character and the third player character belong to the same character set.
[0106] Optionally, the first allocation module includes at least one of the following: a first allocation unit, used to allocate a first amount of game resources to the first character set and a second amount of game resources to the second character set if the first accumulated amount of virtual resources is greater than the second accumulated amount of virtual resources, wherein the first amount is greater than the second amount; if the first accumulated amount of virtual resources is less than the second accumulated amount of virtual resources, allocate a third amount of game resources to the first character set and a fourth amount of game resources to the second character set, wherein the third amount is less than the fourth amount; a second allocation unit, used to calculate, for each player character in the first character set and the second character set, a contribution of the player character to the first accumulated amount of virtual resources or the second accumulated amount of virtual resources, and allocate a fifth amount of game resources to the corresponding player character based on the contribution, wherein the amount of game resources is positively correlated with the contribution of the corresponding player character.
[0107] Optionally, the device also includes: a display module, which is used to display the first virtual resource accumulation amount and the second virtual resource accumulation amount at the current time in the game scene in real time after the acquisition module acquires in real time the first virtual resource accumulation amount generated by the first character set performing the game task, and acquires in real time the second virtual resource accumulation amount generated by the second character set performing the game task.
[0108] Optionally, the device further includes: a second allocation module, configured to allocate the same attack and defense attribute value to each player character in the first character set and the second character set after the matching module matches the first character set and the second character set in the game scene.
[0109] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0110] Example 3
[0111] The present application also provides an electronic device, Figure 6 is a structural diagram of an electronic device according to an embodiment of the present invention, such as Figure 6 As shown, it includes a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64, and the memory 63 is used to store computer programs;
[0112] The processor 61 is used to execute the program stored in the memory 63 to implement the following steps: matching a first character set and a second character set in a game scene, wherein the first character set and the second character set include a plurality of player characters of the same number; obtaining in real time from a start time a first cumulative amount of virtual resources generated by the first character set performing a game task, and obtaining in real time a second cumulative amount of virtual resources generated by the second character set performing the game task, wherein the first character set includes a plurality of first player characters and the second character set includes a plurality of second player characters; after an end time is reached, allocating game resources to the player characters of the first character set and the second character set according to the first cumulative amount of virtual resources and the second cumulative amount of virtual resources.
[0113] Optionally, real-time acquisition of the accumulated amount of first virtual resources generated by the first character set performing the game task, and real-time acquisition of the accumulated amount of second virtual resources generated by the second character set performing the game task include: acquiring in real time according to the settlement period the first residence time of the first player character within a specified range of the game map, and the number of the first player characters, and acquiring in real time the second residence time of the second player character within the specified range, and the number of the second player characters, wherein the number of player characters that can be accommodated in the specified range is less than the total number of player characters of the first character set and the second character set; calculating a first gain based on the first residence time and the number of the first player characters, and calculating a second gain based on the second residence time and the number of the second player characters, wherein the gain is positively correlated with the residence time and positively correlated with the number of player characters; using the first gain to update the accumulated amount of first virtual resources at the current time, and using the second gain to update the accumulated amount of second virtual resources at the current time.
[0114] Optionally, calculating the first gain based on the first stay duration and the number of the first player characters includes: using the following formula to calculate the first gain H1=a*t1+b*m1, wherein the first stay duration is t1, the number of first player characters is m1, a is negatively correlated with t1, and b is negatively correlated with m1.
[0115] Optionally, before obtaining the first residence time of the first player character within the specified range of the game map and the number of the first player characters in real time according to the settlement period, and obtaining the second residence time of the second player character within the specified range and the number of the second player characters in real time according to the settlement period, the method further includes: monitoring the running status of each player character in the first character set and the second character set at the initial time of the settlement period, wherein the running status includes one of the following: activation status, cooling down status; and deleting the designated first player character and the designated second player character whose running status is cooling down status in the first character set and the second character set, respectively.
[0116] Optionally, real-time acquisition of the accumulated amount of first virtual resources generated by the first set of characters performing the game task, and real-time acquisition of the accumulated amount of second virtual resources generated by the second set of characters performing the game task include: starting from the start time, real-time acquisition of the number of the first player characters within a specified range of the game map according to the settlement period, and real-time acquisition of the number of the second player characters within the specified range; comparing the number of the first player characters with the number of the second player characters, and calculating the difference between the number of the first player characters and the number of the second player characters; calculating the first accumulated amount of virtual resources or the second accumulated amount of virtual resources based on the difference in number.
[0117] Optionally, allocating game resources to player characters of the first character set and the second character set based on the first amount of virtual currency and the second amount of virtual currency includes: calculating a first gain amount based on the first amount of virtual currency, and calculating a second gain amount based on the second amount of virtual currency, wherein the gain amount is positively correlated with the amount of virtual currency; using the first gain amount to update the third cumulative amount of virtual resources at the current time, and using the second gain amount to update the fourth cumulative amount of virtual resources at the current time; allocating game resources to player characters of the first character set and the second character set based on the third cumulative amount of virtual resources and the fourth cumulative amount of virtual resources.
[0118] Optionally, before obtaining in real time the first amount of virtual currency transferred by the first player character to the designated non-player character in the game scene, the method further includes: detecting an attack instruction output by the first player character to the second player character, wherein the designated position of the second player character displays the amount of available virtual currency to be transferred by the second player character to the designated non-player character; updating the current life value of the second player character based on the attack instruction, and when the current life value of the second player character reaches a preset threshold, transferring the available amount of virtual currency from the second player character to the first player character, and / or transferring the attack and defense attribute values of the second player character to the second player character, and / or allocating an attack gain value in the next life cycle to the second player character, and / or allocating a defense loss value in the current life cycle to the first player character.
[0119] Optionally, updating the current health value of the second player character based on the attack instruction includes: determining the current power status of the camps where the first player character and the second player character are located, wherein the power status includes an advantageous camp and a disadvantageous camp; if the first player character is in a disadvantageous camp, allocating a camp gain value to the first player character; calculating the basic attribute value of the attack instruction and the life decay value caused by the camp gain value, and updating the current health value of the second player character according to the life decay value.
[0120] Optionally, before updating the current health value of the second player character based on the attack instruction, the method also includes: calculating a speed debuff value of the second player character based on the available virtual currency amount, wherein the speed debuff value is positively correlated with the available virtual currency amount; and reducing the movement speed of the second player character in the game scene based on the speed debuff value.
[0121] Optionally, before updating the current health value of the second player character based on the attack instruction, the method further includes: responding to a resource transfer instruction of the second player character, transferring the available virtual currency amount to a third player character, wherein the second player character and the third player character belong to the same character set.
[0122] Optionally, allocating game resources to player characters of the first character set and the second character set according to the first accumulated amount of virtual resources and the second accumulated amount of virtual resources includes at least one of the following: if the first accumulated amount of virtual resources is greater than the second accumulated amount of virtual resources, allocating a first amount of game resources to the first character set and a second amount of game resources to the second character set, wherein the first amount is greater than the second amount; if the first accumulated amount of virtual resources is less than the second accumulated amount of virtual resources, allocating a third amount of game resources to the first character set and a fourth amount of game resources to the second character set, wherein the third amount is less than the fourth amount; for each player character in the first character set and the second character set, calculating the contribution of the player character to the first accumulated amount of virtual resources or the second accumulated amount of virtual resources, and allocating a fifth amount of game resources to the corresponding player character based on the contribution, wherein the amount of game resources is positively correlated with the contribution of the corresponding player character.
[0123] Optionally, after obtaining in real time the accumulated amount of first virtual resources generated by the first set of characters performing a game task, and obtaining in real time the accumulated amount of second virtual resources generated by the second set of characters performing the game task, the method further includes: displaying in real time in the game scene the accumulated amount of the first virtual resources and the accumulated amount of the second virtual resources at the current time.
[0124] Optionally, after matching the first character set and the second character set in the game scene, the method further includes: assigning the same attack and defense attribute value to each player character in the first character set and the second character set.
[0125] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0126] The communication interface is used for communication between the above terminal and other devices.
[0127] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0128] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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.
[0129] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the risk level data processing method described in any of the above embodiments.
[0130] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the risk level data processing method described in any of the above embodiments.
[0131] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0132] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0133] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0134] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0135] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0136] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0138] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for allocating game resources. It is characterized in that include: matching a first character set and a second character set in a game scene, wherein the first character set and the second character set include the same number of multiple player characters; Starting from the start time, obtaining in real time a first cumulative amount of virtual resources generated by the first character set executing a game task, and obtaining in real time a second cumulative amount of virtual resources generated by the second character set executing the game task, wherein the first character set includes a plurality of first player characters, and the second character set includes a plurality of second player characters; After the expiration time arrives, allocating game resources to the player characters of the first character set and the second character set according to the first accumulated amount of virtual resources and the second accumulated amount of virtual resources; The first accumulated amount of virtual resources and the second accumulated amount of virtual resources respectively represent the progress of the first character set and the second character set in completing the game task.
2. The method according to claim 1, It is characterized in that Acquiring in real time the first cumulative amount of virtual resources generated by the first character set performing the game task, and acquiring in real time the second cumulative amount of virtual resources generated by the second character set performing the game task comprises: Starting from the start time, obtaining in real time according to the settlement period a first stay time of a first player character in a specified range of a game map and the number of the first player characters, and obtaining in real time a second stay time of a second player character in the specified range and the number of the second player characters, wherein the number of player characters that can be accommodated in the specified range is less than the total number of player characters in the first character set and the second character set; Calculating a first gain based on the first stay time and the number of the first player characters, and calculating a second gain based on the second stay time and the number of the second player characters, wherein the gain is positively correlated with the stay time and positively correlated with the number of player characters; The first virtual resource accumulation amount at the current time is updated by using the first gain amount, and the second virtual resource accumulation amount at the current time is updated by using the second gain amount.
3. The method according to claim 2, It is characterized in that Calculating the first gain amount based on the first stay time and the number of the first player characters includes: The first gain amount H1=a*t1+b*m1 is calculated using the following formula, wherein the first stay duration is t1, the number of first player characters is m1, a is negatively correlated with t1, and b is negatively correlated with m1.
4. The method according to claim 2, It is characterized in that Before obtaining in real time according to a settlement period a first length of stay of a first player character within a specified range of a game map and the number of the first player characters, and obtaining in real time a second length of stay of a second player character within the specified range and the number of the second player characters, the method further comprises: monitoring the running state of each player character in the first character set and the second character set at the initial time of a settlement cycle, wherein the running state includes one of the following: an activation state and a cooling state; The designated first player character and the designated second player character whose running status is the cooling state are deleted from the first character set and the second character set respectively.
5. The method according to claim 1, It is characterized in that Acquiring in real time the first cumulative amount of virtual resources generated by the first character set performing the game task, and acquiring in real time the second cumulative amount of virtual resources generated by the second character set performing the game task comprises: Starting from the start time, obtaining the number of the first player characters within a specified range of the game map in real time according to the settlement period, and obtaining the number of the second player characters within the specified range in real time; comparing the number of the first player characters with the number of the second player characters, and calculating a difference in number between the number of the first player characters and the number of the second player characters; The first virtual resource accumulation amount or the second virtual resource accumulation amount is calculated according to the quantity difference.
6. The method according to claim 1, It is characterized in that Acquiring in real time the first cumulative amount of virtual resources generated by the first character set performing the game task, and acquiring in real time the second cumulative amount of virtual resources generated by the second character set performing the game task comprises: Acquire in real time a first virtual currency amount transferred from the first player character to a designated non-player character in the game scene, and acquire in real time a second virtual currency amount transferred from the second player character to the designated non-player character; The first virtual currency amount is used to update the first virtual resource accumulation amount at the current time, and the second virtual currency amount is used to update the second virtual resource accumulation amount at the current time.
7. The method according to claim 6, It is characterized in that Before obtaining in real time the first virtual currency amount transferred from the first player character to the designated non-player character in the game scene, the method further includes: detecting an attack command output by the first player character against the second player character, wherein a designated position of the second player character displays an amount of available virtual currency to be transferred by the second player character to the designated non-player character; The current health value of the second player character is updated based on the attack instruction, and when the current health value of the second player character reaches a preset threshold, the available virtual currency amount is transferred from the second player character to the first player character, and / or the attack and defense attribute values of the second player character are transferred to the second player character, and / or an attack gain value in the next life cycle is allocated to the second player character, and / or a defense loss value in the current life cycle is allocated to the first player character.
8. The method according to claim 7, It is characterized in that Updating the current health value of the second player character based on the attack instruction includes: Determine the current power status of the camps where the first player character and the second player character are located, wherein the power status includes an advantageous camp and a disadvantageous camp; If the first player character is in a weak camp, assigning a camp gain value to the first player character; Calculate the life decay value caused by the basic attribute value of the attack command and the camp gain value, and update the current life value of the second player character according to the life decay value.
9. The method according to claim 7, It is characterized in that Before updating the current health value of the second player character based on the attack instruction, the method further includes: Calculating a speed debuff value of the second player character based on the available virtual currency amount, wherein the speed debuff value is positively correlated with the available virtual currency amount; The movement speed of the second player character in the game scene is reduced based on the speed deduction value.
10. The method according to claim 7, It is characterized in that Before updating the current health value of the second player character based on the attack instruction, the method further includes: In response to the resource transfer instruction of the second player character, the available virtual currency amount is transferred to a third player character, wherein the second player character and the third player character belong to the same character set.
11. The method according to claim 1, It is characterized in that Allocating game resources to the player characters of the first character set and the second character set according to the first accumulated amount of virtual resources and the second accumulated amount of virtual resources comprises at least one of the following: If the first accumulated amount of virtual resources is greater than the second accumulated amount of virtual resources, a first amount of game resources is allocated to the first character set, and a second amount of game resources is allocated to the second character set, wherein the first amount is greater than the second amount; if the first accumulated amount of virtual resources is less than the second accumulated amount of virtual resources, a third amount of game resources is allocated to the first character set, and a fourth amount of game resources is allocated to the second character set, wherein the third amount is less than the fourth amount; For each player character in the first character set and the second character set, calculate the contribution of the player character to the first accumulated amount of virtual resources or the second accumulated amount of virtual resources, and allocate a fifth amount of game resources to the corresponding player character based on the contribution, wherein the amount of game resources is positively correlated with the contribution of the corresponding player character.
12. The method according to claim 1, It is characterized in that After obtaining in real time the first cumulative amount of virtual resources generated by the first character set performing the game task, and obtaining in real time the second cumulative amount of virtual resources generated by the second character set performing the game task, the method further includes: The first virtual resource accumulation amount and the second virtual resource accumulation amount at the current time are displayed in real time in the game scene.
13. The method according to claim 1, It is characterized in that Matching the first character set and the second character set in the game scene, the method further comprising: The same attack and defense attribute values are assigned to each player character in the first character set and the second character set.
14. A device for distributing game resources, It is characterized in that include: A matching module, configured to match a first character set and a second character set in a game scene, wherein the first character set and the second character set include the same number of multiple player characters; an acquisition module, used to acquire, starting from a start time, in real time a first cumulative amount of virtual resources generated by the first character set executing a game task, and to acquire in real time a second cumulative amount of virtual resources generated by the second character set executing the game task, wherein the first character set includes a plurality of first player characters, and the second character set includes a plurality of second player characters; A first allocation module, configured to allocate game resources to the player characters of the first character set and the second character set according to the first accumulated amount of virtual resources and the second accumulated amount of virtual resources after the expiration time arrives; The first accumulated amount of virtual resources and the second accumulated amount of virtual resources respectively represent the progress of the first character set and the second character set in completing the game task.
15. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 13 when executed.
16. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Copy management method and system based on random mission incident
CN104606885A
Upgrading method and upgrading system for user level in social networking software
CN105727555A
Display control method and system and storage medium of game scene
CN107050862A
Virtual resource distribution method and device
CN107115674A
Control method and device for virtual character in virtual world, storage medium and equipment
CN111672110A
