[go: up one dir, main page]

CN116400857A - A method for efficiently storing material data of leisure action mobile games - Google Patents

A method for efficiently storing material data of leisure action mobile games Download PDF

Info

Publication number
CN116400857A
CN116400857A CN202310288738.1A CN202310288738A CN116400857A CN 116400857 A CN116400857 A CN 116400857A CN 202310288738 A CN202310288738 A CN 202310288738A CN 116400857 A CN116400857 A CN 116400857A
Authority
CN
China
Prior art keywords
background
moment
foreground
read
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310288738.1A
Other languages
Chinese (zh)
Other versions
CN116400857B (en
Inventor
李燕晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Baoyi Network Technology Co ltd
Original Assignee
Shenzhen Baoyi Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Baoyi Network Technology Co ltd filed Critical Shenzhen Baoyi Network Technology Co ltd
Priority to CN202310288738.1A priority Critical patent/CN116400857B/en
Publication of CN116400857A publication Critical patent/CN116400857A/en
Application granted granted Critical
Publication of CN116400857B publication Critical patent/CN116400857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及数据处理技术领域,具体涉及一种休闲动作类手游素材数据高效存储方法。该方法包括:获取游戏前景素材和背景素材,确定待读取背景素材,确定初始时刻至当前时刻中每个时刻前景素材的移动速度和所有时刻的平均速度变化量;确定前景素材在当前时刻的惯性速度变化量和下一时刻的预测移动距离;根据当前时刻前景素材的位置,确定下一时刻前景素材距离预设触发边界的触发距离,计算得到不同预设触发边界的触边系数;根据触边系数确定下一时刻触发待读取背景素材的背景读取可能性,根据背景读取可能性对待读取背景素材进行压缩处理,得到压缩数据,将压缩数据存储至预设存储空间中。本发明能够有效提升游戏素材的存储效率。

Figure 202310288738

The invention relates to the technical field of data processing, in particular to a method for efficiently storing leisure action mobile game material data. The method includes: obtaining game foreground material and background material, determining the background material to be read, determining the moving speed of the foreground material at each time from the initial time to the current time and the average speed change at all times; determining the foreground material at the current time Inertial speed variation and the predicted moving distance at the next moment; according to the position of the foreground material at the current moment, determine the trigger distance of the foreground material at the next moment from the preset trigger boundary, and calculate the edge coefficient of different preset trigger boundaries; The edge coefficient determines the background reading possibility of triggering the background material to be read at the next moment, performs compression processing on the background material to be read according to the background reading possibility, obtains compressed data, and stores the compressed data in a preset storage space. The invention can effectively improve the storage efficiency of game materials.

Figure 202310288738

Description

Efficient storage method for leisure action hand-free material data
Technical Field
The invention relates to the technical field of data processing, in particular to a high-efficiency storage method for leisure action hand-free material data.
Background
The process of the mobile device in hardware and software for the material data reading process of the hand game is mainly that a player sends a reading instruction to a Read Only Memory (ROM) at the front end of the game, and the material required by the game needs to be Read into a high-speed Memory module (Random Access Memory, RAM) of the mobile device because the random reading performance of the Read Only Memory module is weak, and then is processed and rendered through a System On Chip (SOC) platform and displayed On a display interface of the mobile device.
In the related art, through all the game materials are read into the RAM, and the game material data comprise a game target model, a background and the like, occupy a larger storage space, require frequent reading and storage of the RAM, and in order to pursue reality, the hand tour tends to increase the inertia effect on the controlled game target model, thereby further causing that the background material is influenced by the inertia effect, the storage efficiency of the materials is lower, and the use experience of a user is reduced.
Disclosure of Invention
In order to solve the technical problem of low storage efficiency of background materials, the invention provides a high-efficiency storage method for leisure action hand-tour material data, which adopts the following technical scheme:
the invention provides a high-efficiency storage method of leisure action hand-free material data, which comprises the following steps:
acquiring a game foreground material and a background material, determining the background material to be read according to the background material being read at the current moment, taking the moment when the foreground material starts to move as an initial moment, and determining the moving speed of the foreground material and the average speed variation of all moments from the initial moment to each moment;
determining the inertia speed variation of the foreground material at the current moment according to the moving speed and the average speed variation of the foreground material at the current moment and the previous moment, and determining the predicted moving distance of the foreground material at the next moment according to the inertia speed variation of the current moment, the moving speed and the interval time of the adjacent moment;
determining the triggering distance of the foreground material from a preset triggering boundary at the next moment according to the position of the foreground material at the current moment, and determining the edge touching coefficients of the foreground material on different preset triggering boundaries at the next moment according to the predicted moving distance, the triggering distance and the average speed variation of the foreground material in the moving process;
and determining background reading possibility of the background material to be read at the next moment according to the touch edge coefficient, compressing the background material to be read according to the background reading possibility of the background material to be read to obtain compressed data, and storing the compressed data into a preset storage space.
Further, the determining the inertial velocity variation of the foreground material at the current moment according to the moving velocity of the foreground material and the average velocity variation at the current moment and the previous moment includes:
calculating a difference value between the moving speed of the foreground material at the current moment and the moving speed of the foreground material at the previous moment to serve as a moving speed variation of the current moment;
and calculating the sum of the average speed variation and the moving speed variation at the current moment to be used as the inertia speed variation of the foreground material at the current moment.
Further, the determining the predicted moving distance of the foreground material at the next moment according to the inertial velocity variation at the current moment, the moving velocity and the interval time between adjacent moments includes:
calculating the product of the interval time and the inertia speed variation as the speed variation of the next moment;
calculating the sum of the moving speed at the current moment and the speed variation at the next moment to be used as the predicted speed at the next moment;
and calculating the product of the predicted speed and the interval time as the predicted moving distance.
Further, the determining, according to the predicted moving distance, the triggering distance and the average speed variation of the foreground material in the moving process, the edge touching coefficients of the foreground material on different preset triggering boundaries at the next moment includes:
taking the predicted moving distance as a numerator, taking the sum of the triggering distance of the preset triggering boundary and a preset coefficient as a denominator, and calculating a triggering length ratio;
when the average speed variation is not 0, normalizing the product of the average speed variation and the triggering length ratio to obtain a triggering edge coefficient corresponding to a preset triggering boundary;
and when the average speed variation is 0, normalizing the trigger length ratio to obtain a touch edge coefficient corresponding to a preset trigger boundary.
Further, the determining, according to the touch edge coefficient, a background reading possibility of the background material to be read at the next moment includes:
and taking the touch edge coefficient of the preset trigger boundary as the background reading possibility of the background material to be read corresponding to the preset trigger boundary.
Further, the compressing the background material to be read according to the background reading possibility of the background material to be read to obtain compressed data includes:
when the background reading possibility of the background material to be read is smaller than or equal to a preset background reading threshold value, compressing the background material to be read in a first preset compression mode to obtain compressed data;
and when the background reading possibility of the background material to be read is larger than a preset background reading threshold, compressing the background material to be read by adopting a second preset compression mode to obtain compressed data, wherein the compression rate of the first preset compression mode is higher than that of the second preset compression mode.
Further, the storing the compressed data in a preset storage space includes:
and storing the compressed data into a preset storage space according to the sequence of the corresponding background reading possibility from high to low.
Further, the determining the background material to be read according to the background material being read at the current moment includes:
and determining other background materials which have direct connection relation with the background materials being read at the current moment as the background materials to be read.
Further, the determining the moving speed of the foreground material and the average speed variation of all the moments from the initial moment to the current moment includes:
determining position coordinates of foreground materials at different moments, and calculating the moving speed of the foreground materials at each moment according to the position coordinates of adjacent moments and the time interval of the adjacent moments;
calculating the difference value of the moving speed at each moment and the previous moment respectively according to a speed variation calculation formula to serve as the speed variation of the corresponding moment;
and calculating the average value of the speed variation of the foreground material at each time except the initial time as an average speed variation.
The invention has the following beneficial effects:
according to the method, the moving speed and the average speed variation of the foreground materials in the moving process at each moment are determined, so that the states of the foreground materials in the moving process can be effectively counted, the background materials to be read are determined through the background materials being read at the current moment, and the situation that the preset storage space is excessively bloated due to the fact that all the background materials are read into the preset storage space in advance can be effectively avoided, and therefore the storage efficiency of the preset storage space is affected; according to the invention, the change amount of the inertia speed of the foreground material at the current moment is calculated as the movement trend, the predicted movement distance at the next moment is determined, the predicted movement distance is determined through the inertia of the foreground material, so that the reality of game performance is effectively improved, meanwhile, reasonable prediction of the movement distance of the foreground material at the next moment can be realized through determining the predicted movement distance, so that the touch coefficients of different preset trigger boundaries are conveniently analyzed according to the predicted movement distance, then, the triggering probability of different preset trigger boundaries is realized according to the touch coefficients, the background reading possibility corresponding to different background materials to be read is obtained, the self-adaptive compression and storage of the background materials to be read can be carried out according to the background reading possibility, the compressed data can be directly read from the preset storage space in a self-adaptive compression and storage mode, the storage efficiency of the background materials to be read is further improved while the compression effect of the background materials to be read is ensured, the movement state of the foreground materials is analyzed according to the predicted, the touch coefficients are then, the background reading possibility corresponding to the different preset trigger boundaries is realized, the self-adaptive compression and the storage capacity of the background materials is reduced, and the storage capacity of the background materials to be read is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for efficiently storing leisure action hand-tour material data according to an embodiment of the present invention;
fig. 2 is a schematic diagram of foreground material movement according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a method for efficiently storing the leisure action type hand-play material data according to the invention, which is provided by combining the accompanying drawings and the preferred embodiment, and the specific implementation, structure, characteristics and effects thereof are described in detail below. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The invention provides a specific scheme of a high-efficiency storage method for leisure action hand-free material data, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for efficiently storing leisure action hand-tour material data according to an embodiment of the present invention is shown, where the method includes:
s101: the method comprises the steps of obtaining a game foreground material and a background material, determining the background material to be read according to the background material being read at the current moment, taking the moment when the foreground material starts to move as an initial moment, and determining the moving speed of the foreground material at each moment from the initial moment to the current moment and the average speed variation of all moments.
It will be appreciated that the material read at the display interface may include foreground material that primarily includes objects operated by the game player or items controlled by the player, etc., and background material that may include non-player characters, independently modeled flowers and plants, a scene elevation drawing representing sky, land, sea, etc. When the target operated by the game player moves, the corresponding foreground material and background material may change on the display interface.
When the target operated by the game player moves, the corresponding foreground material reading and background material changing possibly occur, that is, the foreground material and the background material need to be stored in the memory in advance so as to be convenient for timely calling the foreground material and the background material.
Further, in the embodiment of the present invention, determining the background material to be read according to the background material being read at the current time includes: and determining other background materials which have direct connection relation with the background materials being read at the current moment as the background materials to be read.
The direct connection relationship may include a switching relationship, when the foreground material moves, a scene may be triggered to be switched to another scene, and the relationship between the background materials corresponding to the two corresponding scenes may be referred to as the switching relationship.
It can be appreciated that when the current Jing Sucai triggers a corresponding context switch condition, such as moving to a boundary or moving to a switch point, a new context may be read, and then the corresponding new context may be referred to as a context to be read. It will be appreciated that the background material to be read having a direct connection relationship with the background material being read at the present time may include at least one, without limitation.
In the embodiment of the present invention, when the foreground material starts to move, the time when the foreground material starts to move is taken as the initial time, and further, in the embodiment of the present invention, the moving speed of the foreground material from the initial time to each time in the current time and the average speed variation of all the times are determined, including: determining position coordinates of foreground materials at different moments, and calculating the moving speed of the foreground materials at each moment according to the position coordinates of adjacent moments and the time interval of the adjacent moments; calculating the difference value of the moving speed at each moment and the previous moment respectively according to a speed variation calculation formula to serve as the speed variation of the corresponding moment; and calculating the average value of the speed variation of the foreground material at each time except the initial time as an average speed variation.
In the embodiment of the present invention, the movement speed at the initial time may be 0.
The two-dimensional coordinate system can be built according to the scene so as to determine the position coordinates of the foreground materials in the scene at different moments.
In the embodiment of the invention, the moving speed of the foreground material at each moment can be calculated based on a speed calculation formula, that is, the distance between the position coordinates at adjacent moments can be calculated based on a distance formula between two points, and then the ratio of the distance to the time interval at the adjacent moments is calculated as the moving speed, so that the moving speeds corresponding to different moments are obtained, wherein the distance formula of the position coordinates at the adjacent moments is shown as follows:
Figure BDA0004140620580000051
wherein s is i The movement distance at the i-th time is represented, and the position coordinate corresponding to the i-th time is (x i ,y i ) The position coordinate corresponding to the (i-1) th time is (x) i-1 ,y i-1 ) I denotes an index of a time other than the initial time, that is, x i Represents the abscissa value, y, corresponding to the i-th moment i Represents the ordinate value, x, corresponding to the i-th moment i-1 Represents the abscissa value, y, corresponding to the (i-1) th moment i-1 The ordinate value corresponding to the (i-1) th time is shown.
And then calculating the ratio of the moving distance at the ith moment to the time interval from the (i-1) th moment to the ith moment as the moving speed at the ith moment.
After determining the moving speeds corresponding to different moments, the difference between the moving speeds at each moment and the previous moment can be calculated according to a speed change amount calculation formula as the speed change amount at the corresponding moment, wherein the corresponding calculation formula is as follows:
a i =v i -v i-1
wherein a is i Indicating the speed change amount at the i-th time, i indicating the index of the time other than the initial time, v i Indicating the movement speed at the ith moment, v i-1 The movement speed at the (i-1) th time is shown.
From this, calculate the initial time to the current time, the average value of the speed variation of the foreground material at each time except the initial time is taken as the average speed variation, the corresponding calculation formula is:
Figure BDA0004140620580000052
in an embodiment of the present invention,
Figure BDA0004140620580000053
representing the average speed from the initial time to the current timeDegree of change, a i The I-th time is the speed change amount, I is the index of the time other than the initial time, I is the total number of all the time from the initial time to the current time, and may be the index value of the current time.
It can be appreciated that the average speed variation can be used to represent the overall movement variation of the foreground material at the current time, and then the movement trend of the foreground material can be determined according to the average speed variation, so as to facilitate the analysis of the reading of the background material according to the movement trend.
S102: and determining the inertia speed variation of the foreground material at the current moment according to the moving speed and the average speed variation of the foreground material at the current moment and determining the predicted moving distance of the foreground material at the next moment according to the inertia speed variation of the current moment, the moving speed and the interval time of the adjacent moment.
Further, in the embodiment of the present invention, according to the moving speed and the average speed variation of the foreground material at the current time and the previous time, determining the inertial speed variation of the foreground material at the current time includes: calculating a difference value between the moving speed of the foreground material at the current moment and the moving speed of the foreground material at the previous moment to serve as a moving speed variation of the current moment; and calculating the sum of the average speed variation and the moving speed variation at the current moment as the inertia speed variation of the foreground material at the current moment.
In the embodiment of the present invention, the difference between the moving speed at the current time and the moving speed at the previous time may be used as the moving speed variation of the current time, and it may be understood that the moving speed variation of the current time may be a positive value, a negative value or 0, when the moving speed variation of the current time is a positive value, it may indicate that the moving speed at the current time is increased, when the moving speed variation of the current time is a negative value, it may indicate that the moving speed at the current time is decreased, and when the moving speed variation of the current time is 0, it may indicate that the moving speed at the current time is unchanged.
The calculation formula corresponding to the inertial velocity variation comprises:
Figure BDA0004140620580000061
wherein k is i Indicating the inertial velocity variation amount at the i-th time, i indicating the index of the time other than the initial time, a i Indicating the amount of change in the movement speed at the i-th time,
Figure BDA0004140620580000062
indicating the average speed variation.
Therefore, the sum of the average speed variation and the moving speed variation at the current moment is calculated as the inertia speed variation of the foreground material at the current moment, and the overall inertia of the foreground material in the moving time and the moving inertia of the foreground material at the current moment can be effectively combined, so that the inertia speed variation at the current moment is obtained.
Further, in the embodiment of the present invention, determining a predicted moving distance of a foreground material at a next time according to an inertial velocity variation at a current time, a moving speed and an interval time between adjacent times includes: calculating the product of the interval time and the inertia speed variation as the speed variation of the next moment; calculating the sum of the moving speed at the current moment and the speed variation quantity at the next moment to be used as the predicted speed at the next moment; the product of the predicted speed and the interval time is calculated as the predicted moving distance.
It can be understood that, when the adjacent time is the interval time of continuously acquiring the foreground material twice, the interval time corresponding to the adjacent time continuously acquires the interval time of the foreground material twice, and the calculation formula corresponding to the predicted moving distance includes:
s I+1 =(v I +h*k I )*h
wherein s is I+1 Indicating the predicted movement distance for the next time (i+1), since I indicates the total number of all the times from the initial time to the current time, i.e., time I may indicate the current time, the corresponding (i+1) indicates the next time of the current time, v I Indicating the moving speed at the current time I, and h indicating the interval between adjacent timesBetween k I Indicating the change amount of inertial velocity at the current time I, h.times.k I Indicating the speed change amount (v) at the next time (I+1) I +h*k I ) The predicted speed at the next time (i+1) is shown.
The motion inertia of the foreground material can be accurately determined by calculating the predicted moving distance at the next moment through the inertia speed variation and the moving speed at the current moment, and the phenomena of material reading delay and the like caused by lack of inertia consideration of the foreground material are effectively avoided while the reality of a game is improved.
S103: and determining the triggering distance of the foreground material from a preset triggering boundary at the next moment according to the position of the foreground material at the current moment, and determining the touch edge coefficients of the foreground material to different preset triggering boundaries at the next moment according to the predicted moving distance, the triggering distance and the average speed variation of the foreground material in the moving process.
In the embodiment of the invention, the triggering boundary at the current moment can be preset, when the foreground material is overlapped with the triggering boundary, the corresponding background material is triggered to be switched and read, it can be understood that the preset triggering boundary can be determined based on the content being displayed by the display interface and the position of the foreground material at the current moment, for example, the edge of the display interface or a certain position in the display interface, the number of the preset triggering boundaries can be at least one, that is, a plurality of preset triggering boundaries can be arranged around the foreground material, and the method is not limited.
After determining the preset trigger boundary, the trigger distance between the position of the foreground material at the current time and the preset trigger boundary may be determined, and it may be understood that in some games, the moving manner of the foreground material includes forward and backward movement, and in other embodiments, the moving manner of the foreground material may further include jumping, flying, etc., so that the shortest distance between the position of the foreground material at the current time and the preset trigger boundary may be calculated as the trigger distance, which is not limited.
For example, as shown in fig. 2, fig. 2 is a schematic diagram of moving foreground materials provided by an embodiment of the present invention, the outer dashed border corresponds to 4 preset trigger boundaries, L1, L2, L3, L4 respectively represent trigger distances of the foreground materials at the current time from the 4 preset trigger boundaries, FI represents a position of the foreground materials at the current time, FI-1 represents a position of the foreground materials at the previous time, fi+1 represents a position for predicting the foreground materials at the next time, and si+1 represents a predicted moving distance at the next time.
Further, in the embodiment of the present invention, according to the predicted moving distance, the triggering distance and the average speed variation of the foreground material in the moving process, determining the touch edge coefficients of the foreground material for different preset triggering boundaries at the next moment includes: taking the predicted moving distance as a numerator, presetting the sum value of the triggering distance of the triggering boundary and the preset coefficient as a denominator, and calculating the triggering length ratio; when the average speed variation is not 0, carrying out normalization processing on the product of the average speed variation and the triggering length ratio to obtain a triggering coefficient corresponding to a preset triggering boundary; and when the average speed variation is 0, normalizing the trigger length ratio to obtain a touch edge coefficient corresponding to a preset trigger boundary.
The calculation formula corresponding to the touch edge coefficient is as follows:
Figure BDA0004140620580000071
wherein τ (I+1)x The touch edge coefficient indicating that the next moment (I+1) touches the x-th preset trigger boundary, since I indicates the total number of all the moments from the initial moment to the current moment, that is, the moment I can indicate the current moment, the corresponding (I+1) indicates the next moment of the current moment, x indicates the index of the preset trigger boundary,
Figure BDA0004140620580000072
representing the average speed variation, s I+1 Indicating the predicted movement distance, L, for the next time (I+1) x The normalization function in the embodiment of the present invention may specifically be, for example, maximum and minimum normalization, where γ represents a preset coefficient, and γ represents a preset coefficient, where γ represents a preset coefficientIn order to prevent a safety value set by a denominator of 0, optionally, γ=0.01, +.>
Figure BDA0004140620580000081
Representing the trigger length ratio.
It can be understood that, because of uncertainty of player operation, an effective determination cannot be made on the moving angle of the foreground material at the next moment, the trigger length ratio is determined directly by predicting the moving distance and the trigger distance of the preset trigger boundary, and it can be understood that when the predicted moving distance is greater than or equal to the trigger distance of the preset trigger boundary, the foreground material has a greater probability of triggering the preset trigger boundary, that is, when the trigger length ratio is greater than or equal to 1, the corresponding touch edge coefficient is greater, and when the predicted moving distance is less than the trigger distance of the preset trigger boundary, the foreground material cannot reach the preset trigger boundary, that is, when the trigger length ratio is less than 1, the corresponding touch edge coefficient is smaller.
When the average speed variation is 0, it may indicate that the foreground material is in uniform motion in the overall motion trend, so that the touch edge coefficient may be determined directly according to the trigger length ratio, and when the average speed variation is not equal to 0, it may indicate that the corresponding foreground material is in variable motion in the overall motion trend, that is, the next moment may be affected by acceleration to trigger the preset trigger boundary, so that it is determined that the average speed variation is in direct proportion to the touch edge coefficient.
S104: and determining background reading possibility of the background material to be read triggered at the next moment according to the touch edge coefficient, compressing the background material to be read according to the background reading possibility of the background material to be read to obtain compressed data, and storing the compressed data into a preset storage space.
Further, in the embodiment of the present invention, determining, according to the touch edge coefficient, a background reading possibility of triggering a background material to be read at a next time includes: and taking the touch edge coefficient of the preset trigger boundary as the background reading possibility of the background material to be read corresponding to the preset trigger boundary.
It can be understood that, since the display interface may include a plurality of preset trigger boundaries, each preset trigger boundary has a corresponding touch edge coefficient and a background material to be read. In the embodiment of the invention, the touch edge coefficient of the preset trigger boundary can be directly used as the background reading possibility of the background material to be read corresponding to the preset trigger boundary. The greater the background reading possibility is, the greater the possibility that the corresponding background material to be read is read to the display interface at the next moment is.
Further, in the embodiment of the present invention, compressing the background material to be read according to the background reading possibility of the background material to be read to obtain compressed data, including: when the background reading possibility of the background material to be read is smaller than or equal to a preset background reading threshold value, compressing the background material to be read by adopting a first preset compression mode to obtain compressed data; when the background reading possibility of the background material to be read is larger than a preset background reading threshold, compressing the background material to be read by adopting a second preset compression mode to obtain compressed data, wherein the compression rate of the first preset compression mode is higher than that of the second preset compression mode.
The first preset compression mode and the second preset compression mode are different preset compression modes, the compression rate of the first preset compression mode is higher than that of the second preset compression mode, for example, the first preset compression mode can be specifically a lossy data compression mode, and the second preset compression mode can be specifically a lossless data compression mode, for example, without limitation.
The preset background reading threshold is a threshold of background reading possibility of the background material to be read, and optionally, the preset background reading threshold may be specifically, for example, 0.8, which is not limited.
When the background reading possibility of the background material to be read is smaller than or equal to a preset background reading threshold value, the possibility that the background material to be read needs to be read to the display interface at the next moment is lower, and the background material to be read is compressed in a first preset compression mode to obtain compressed data.
When the background reading possibility of the background material to be read is larger than the preset background reading threshold, the possibility that the background material to be read needs to be read to the display interface at the next moment is higher, and the background material to be read is compressed in a second preset compression mode to obtain compressed data.
It can be understood that, since the compression rate of the first preset compression mode is higher than that of the second preset compression mode, that is, for the same background material to be read, the storage occupation of the compressed data obtained by the first preset compression mode is lower, the storage occupation of the compressed data obtained by the second preset compression mode is higher, but the decompression speed and the decompression effect of the compressed data obtained by the second preset compression mode are better in the subsequent rendering process.
Further, in an embodiment of the present invention, storing compressed data in a preset storage space includes: and storing the compressed data into a preset storage space according to the sequence of the corresponding background reading possibility from high to low.
The running memory space for storing the background material can be called as a preset memory space, and compressed data is stored in the preset memory space according to the sequence of the background reading possibility from large to small, so that the data with the maximum background reading possibility can be preferentially identified and called, and the reading efficiency of the background material to be read is effectively improved.
According to the method, the moving speed and the average speed variation of the foreground materials in the moving process at each moment are determined, so that the states of the foreground materials in the moving process can be effectively counted, the background materials to be read are determined through the background materials being read at the current moment, and the situation that the preset storage space is excessively bloated due to the fact that all the background materials are read into the preset storage space in advance can be effectively avoided, and therefore the storage efficiency of the preset storage space is affected; according to the invention, the change amount of the inertia speed of the foreground material at the current moment is calculated as the movement trend, the predicted movement distance at the next moment is determined, the predicted movement distance is determined through the inertia of the foreground material, so that the reality of game performance is effectively improved, meanwhile, reasonable prediction of the movement distance of the foreground material at the next moment can be realized through determining the predicted movement distance, so that the touch coefficients of different preset trigger boundaries are conveniently analyzed according to the predicted movement distance, then, the triggering probability of different preset trigger boundaries is realized according to the touch coefficients, the background reading possibility corresponding to different background materials to be read is obtained, the self-adaptive compression and storage of the background materials to be read can be carried out according to the background reading possibility, the compressed data can be directly read from the preset storage space in a self-adaptive compression and storage mode, the storage efficiency of the background materials to be read is further improved while the compression effect of the background materials to be read is ensured, the movement state of the foreground materials is analyzed according to the predicted, the touch coefficients are then, the background reading possibility corresponding to the different preset trigger boundaries is realized, the self-adaptive compression and the storage capacity of the background materials is reduced, and the storage capacity of the background materials to be read is guaranteed.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (9)

1. The efficient storage method of the leisure action hand-play material data is characterized by comprising the following steps:
acquiring a game foreground material and a background material, determining the background material to be read according to the background material being read at the current moment, taking the moment when the foreground material starts to move as an initial moment, and determining the moving speed of the foreground material and the average speed variation of all moments from the initial moment to each moment;
determining the inertia speed variation of the foreground material at the current moment according to the moving speed and the average speed variation of the foreground material at the current moment and the previous moment, and determining the predicted moving distance of the foreground material at the next moment according to the inertia speed variation of the current moment, the moving speed and the interval time of the adjacent moment;
determining the triggering distance of the foreground material from a preset triggering boundary at the next moment according to the position of the foreground material at the current moment, and determining the edge touching coefficients of the foreground material on different preset triggering boundaries at the next moment according to the predicted moving distance, the triggering distance and the average speed variation of the foreground material in the moving process;
and determining background reading possibility of the background material to be read at the next moment according to the touch edge coefficient, compressing the background material to be read according to the background reading possibility of the background material to be read to obtain compressed data, and storing the compressed data into a preset storage space.
2. The efficient storage method of leisure action hand-tour material data according to claim 1, wherein the determining the inertial velocity variation of the foreground material at the current time according to the moving velocity of the foreground material and the average velocity variation at the current time and the previous time comprises:
calculating a difference value between the moving speed of the foreground material at the current moment and the moving speed of the foreground material at the previous moment to serve as a moving speed variation of the current moment;
and calculating the sum of the average speed variation and the moving speed variation at the current moment to be used as the inertia speed variation of the foreground material at the current moment.
3. The efficient storage method of leisure action hand-tour material data according to claim 1, wherein the determining the predicted moving distance of the foreground material at the next time according to the inertial velocity variation at the current time, the moving speed and the interval time between adjacent times comprises:
calculating the product of the interval time and the inertia speed variation as the speed variation of the next moment;
calculating the sum of the moving speed at the current moment and the speed variation at the next moment to be used as the predicted speed at the next moment;
and calculating the product of the predicted speed and the interval time as the predicted moving distance.
4. The efficient storage method of leisure action hand-tour material data according to claim 1, wherein the determining the touch edge coefficient of the foreground material for different preset trigger boundaries at the next moment according to the predicted moving distance, the trigger distance and the average speed variation of the foreground material in the moving process comprises:
taking the predicted moving distance as a numerator, taking the sum of the triggering distance of the preset triggering boundary and a preset coefficient as a denominator, and calculating a triggering length ratio;
when the average speed variation is not 0, normalizing the product of the average speed variation and the triggering length ratio to obtain a triggering edge coefficient corresponding to a preset triggering boundary;
and when the average speed variation is 0, normalizing the trigger length ratio to obtain a touch edge coefficient corresponding to a preset trigger boundary.
5. The method for efficiently storing the leisure action hand-tour material data according to claim 1, wherein the determining the background reading possibility of triggering the background material to be read at the next time according to the touch edge coefficient comprises:
and taking the touch edge coefficient of the preset trigger boundary as the background reading possibility of the background material to be read corresponding to the preset trigger boundary.
6. The method for efficiently storing the leisure action hand-tour material data according to claim 1, wherein the compressing the background material to be read according to the background reading possibility of the background material to be read to obtain compressed data comprises the following steps:
when the background reading possibility of the background material to be read is smaller than or equal to a preset background reading threshold value, compressing the background material to be read in a first preset compression mode to obtain compressed data;
and when the background reading possibility of the background material to be read is larger than a preset background reading threshold, compressing the background material to be read by adopting a second preset compression mode to obtain compressed data, wherein the compression rate of the first preset compression mode is higher than that of the second preset compression mode.
7. The efficient storing method of the leisure action hand-tour material data according to claim 6, wherein storing the compressed data in a preset storage space comprises:
and storing the compressed data into a preset storage space according to the sequence of the corresponding background reading possibility from high to low.
8. The efficient storage method of the leisure action hand-tour material data according to claim 1, wherein the determining the background material to be read according to the background material being read at the current time comprises:
and determining other background materials which have direct connection relation with the background materials being read at the current moment as the background materials to be read.
9. The method for efficiently storing the leisure action hand-tour material data according to claim 1, wherein the determining the moving speed of the foreground material and the average speed variation of all the time points from the initial time point to the current time point comprises:
determining position coordinates of foreground materials at different moments, and calculating the moving speed of the foreground materials at each moment according to the position coordinates of adjacent moments and the time interval of the adjacent moments;
calculating the difference value of the moving speed at each moment and the previous moment respectively according to a speed variation calculation formula to serve as the speed variation of the corresponding moment;
and calculating the average value of the speed variation of the foreground material at each time except the initial time as an average speed variation.
CN202310288738.1A 2023-03-23 2023-03-23 A method for efficiently storing casual action mobile game material data Active CN116400857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310288738.1A CN116400857B (en) 2023-03-23 2023-03-23 A method for efficiently storing casual action mobile game material data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310288738.1A CN116400857B (en) 2023-03-23 2023-03-23 A method for efficiently storing casual action mobile game material data

Publications (2)

Publication Number Publication Date
CN116400857A true CN116400857A (en) 2023-07-07
CN116400857B CN116400857B (en) 2024-11-22

Family

ID=87015233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310288738.1A Active CN116400857B (en) 2023-03-23 2023-03-23 A method for efficiently storing casual action mobile game material data

Country Status (1)

Country Link
CN (1) CN116400857B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020052235A1 (en) * 2000-10-27 2002-05-02 Hirsch Jeffrey R. Gaming device having animation including multiple sprites
US20060025218A1 (en) * 2004-07-29 2006-02-02 Nintendo Co., Ltd. Game apparatus utilizing touch panel and storage medium storing game program
JP2014236819A (en) * 2013-06-06 2014-12-18 株式会社セガ Game device and program
CN106937135A (en) * 2015-12-31 2017-07-07 幸福在线(北京)网络技术有限公司 The real time playing method and relevant apparatus and system of a kind of scene of game
CN113730913A (en) * 2021-09-03 2021-12-03 网易(杭州)网络有限公司 Data processing method and device in game and electronic terminal
CN114786024A (en) * 2022-04-01 2022-07-22 广州方硅信息技术有限公司 Live broadcast room game synchronization method, system, device, equipment and storage medium
WO2022193612A1 (en) * 2021-03-16 2022-09-22 天津亚克互动科技有限公司 Motion processing method and apparatus for game character, and storage medium and computer device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020052235A1 (en) * 2000-10-27 2002-05-02 Hirsch Jeffrey R. Gaming device having animation including multiple sprites
US20060025218A1 (en) * 2004-07-29 2006-02-02 Nintendo Co., Ltd. Game apparatus utilizing touch panel and storage medium storing game program
JP2014236819A (en) * 2013-06-06 2014-12-18 株式会社セガ Game device and program
CN106937135A (en) * 2015-12-31 2017-07-07 幸福在线(北京)网络技术有限公司 The real time playing method and relevant apparatus and system of a kind of scene of game
WO2022193612A1 (en) * 2021-03-16 2022-09-22 天津亚克互动科技有限公司 Motion processing method and apparatus for game character, and storage medium and computer device
CN113730913A (en) * 2021-09-03 2021-12-03 网易(杭州)网络有限公司 Data processing method and device in game and electronic terminal
CN114786024A (en) * 2022-04-01 2022-07-22 广州方硅信息技术有限公司 Live broadcast room game synchronization method, system, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116400857B (en) 2024-11-22

Similar Documents

Publication Publication Date Title
JP7597298B2 (en) Method, device, electronic device, computer-readable storage medium, and computer program for controlling virtual characters
JP7703596B2 (en) Method, device, terminal and storage medium for controlling virtual objects
US10325390B2 (en) Geometric work scheduling with dynamic and probabilistic work trimming
CN109758760B (en) Shooting control method and device in football game, computer equipment and storage medium
US20100073367A1 (en) Image processing program and image processing device
CN111589135B (en) Virtual object control method, device, terminal and storage medium
CN109011559A (en) Control method, device, equipment and the storage medium of virtual carrier in game
CN104731307A (en) Somatic action identifying method and man-machine interaction device
CN110264554B (en) Method and device for processing animation information, storage medium and electronic device
EP3821963A1 (en) Method for providing close-range battle royale game in which permitted number of players and permitted area in game map are determined dynamically and game server using the same
CN109876458A (en) Game role control method and device
WO2006000824A2 (en) Control of data processing using inter-frame motion and audio signal
KR100460009B1 (en) Method and system for loading of the image resource
CN114870399A (en) A virtual character movement control method, device, electronic device and storage medium
CN116400857B (en) A method for efficiently storing casual action mobile game material data
CN115430153A (en) Collision detection method, device, equipment, medium and program in virtual environment
US8219018B2 (en) Image generating program, storage medium, image processing method, and image processing device
CN115631535A (en) Method, system and device for recognizing actions based on optical flow guidance and double-flow network
CN118732820A (en) Virtual object interaction method, device, computer equipment and storage medium
CN110390693B (en) Control method, control device and terminal equipment
CN114288647A (en) Artificial intelligence game engine based on AI Designer, game rendering method and device
JP7809839B2 (en) Virtual tool processing method, device, electronic device, and computer program
US20260021404A1 (en) Storage medium, game system, and game processing method
WO2024216939A1 (en) Virtual-map rendering method and apparatus, and computer device and storage medium
WO2024222231A1 (en) Virtual vehicle gear shifting method and apparatus, device, and storage medium

Legal Events

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