CN107632809A - The method that the displacement of picture roller type plays - Google Patents

The method that the displacement of picture roller type plays Download PDF

Info

Publication number
CN107632809A
CN107632809A CN201710899262.XA CN201710899262A CN107632809A CN 107632809 A CN107632809 A CN 107632809A CN 201710899262 A CN201710899262 A CN 201710899262A CN 107632809 A CN107632809 A CN 107632809A
Authority
CN
China
Prior art keywords
picture
roller type
container
plays
content
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.)
Pending
Application number
CN201710899262.XA
Other languages
Chinese (zh)
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201710899262.XA priority Critical patent/CN107632809A/en
Publication of CN107632809A publication Critical patent/CN107632809A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses the method that a kind of displacement of picture roller type plays, including:Analysis rolls animation, extracts roll modeling out, and roll main body is separated with content is rolled;Number of containers is set according to demand, and the container participates in rolling animation effect and the image content according to corresponding opportunity more in new container;For rolling content, a subordinate ordered array is formed according to playing sequence;Whenever a unit cell is rolled, specifically first all containers are moved integrally, then the container for removing border does more new position and more new content.The present invention solve how the playback problem on the premise of any plurality of pictures, reduce repetition and render, improve the broadcast performance of roll displacement formula to greatest extent.

Description

The method that the displacement of picture roller type plays
Technical field
The present invention relates to picture playing algorithmic technique field, such as similar effect to be largely practiced in network Rich Media and answer With, game application, and in particular to a kind of method that picture roller type displacement plays.
Background technology
In the big-and-middle-sized RPG game of in general, map and scenario resources are generally large.Whole screen render it is hardly possible, greatly More using " Karma gram spool " algorithm.The main thought of " Karma gram spool " algorithm, it is exactly using buffering area, only updates wash with watercolours The part changed in dye map scene, it is reduced as far as repeating to render, to save performance.The thought is used for reference, can cover and be used in In the roller type displacement play system of picture.For example, 10 pictures levels are arranged in order placement, it is necessary to from screen right-hand member Move into, left end removal, complete the broadcasting successively of this 10 figures, but at most can only see 3 pictures on screen all the time, how this locates ReasonThe mode of most original is that this 10 pictures is loaded into internal memory, sequences order, then global displacement.But it can so take 10 The internal memory of pictures, causes performance issue.If it is not 10, but 1000, this raw mode is to cause to collapse certainly Routed.
The content of the invention
Instant invention overcomes the deficiencies in the prior art, there is provided a kind of method that picture roller type displacement plays, solution are asked Topic is to lift the broadcast performance of roll displacement formula to greatest extent how on the premise of any plurality of pictures.
In view of the above mentioned problem of prior art, according to one side disclosed by the invention, the present invention uses following technology Scheme:
A kind of method that picture roller type displacement plays, including:
Step 1: analysis rolls animation, extracts roll modeling out, roll main body is separated with content is rolled;
Step 2: set number of containers according to demand, the container participate in rolling animation effect and according to corresponding opportunity more Image content in new container;
Step 3: for rolling content, a subordinate ordered array is formed according to playing sequence;
Step 4: whenever a unit cell is rolled, specifically first all containers are moved integrally, then for removing side The container on boundary does more new position and more new content.
In order to which the present invention is better achieved, further technical scheme is:
According to one embodiment of the invention, the index of current results picture is represented in the step 3 with cursor.
According to another embodiment of the invention, represent currently to index with next in the step 3 follow-up first Index, follow-up second position index that currently indexes is represented with next2.
According to another embodiment of the invention, the front and continued first that currently indexes is represented with prev in the step 3 Index, next2 represent the position index of front and continued second currently indexed.
During according to another embodiment of the invention, more new content, photo current is first discharged, then reloads new figure Piece.
According to another embodiment of the invention, array is accessed by cursor next2 when loading new picture.
The present invention can also be:
According to another embodiment of the invention, the number of containers of the step 2 is normally shown in the range of viewport Quantity+2.
Compared with prior art, one of beneficial effects of the present invention are:
The method that a kind of picture roller type displacement of the present invention plays, is solved how on the premise of any plurality of pictures Playback problem, reduce repetition and render, improve the broadcast performance of roll displacement formula to greatest extent.
Brief description of the drawings
, below will be to embodiment for clearer explanation present specification embodiment or technical scheme of the prior art Or the required accompanying drawing used is briefly described in the description of prior art, it should be apparent that, drawings in the following description are only It is the reference to some embodiments in present specification, for those skilled in the art, is not paying creative work In the case of, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic appearance of Slot Machine prize drawing, it is illustrated that is 3*3, i.e., finally in viewport, shows 3 rollers, often Bar roller shows 3 numerals, but the numeral of only middle row is winning digit.
Fig. 2 is the roller model schematic of Slot Machine prize drawing, wherein on every roller, numeral is sequentially arranged in disk appearance Face, similar " round-robin queue ".
Fig. 3 is the displacement schematic diagram by turn of a roller.
Fig. 4 is that the roller on a roller simplifies schematic diagram.
Fig. 5 is the schematic diagram that scroll wheel positions are extracted into container on the premise of roller is simplified.
Fig. 6 is rolling step schematic diagram after roller containerization.
Fig. 7 is cursor, next, prev, next2, prev2 diagram of picture array.
Fig. 8 is that the roller type that 3 pictures are shown in viewport shifts broadcasting schematic diagram by turn.
Fig. 9 is that the roller type that 5 pictures are shown in viewport shifts broadcasting schematic diagram by turn.
Figure 10 is the displacement of 3 pictures, with the schematic diagram of container.
Figure 11 is the displacement of 3 pictures, and with container, the schematic diagram of one is moved to left on the basis of Fig. 8.
Embodiment
The present invention is described in further detail with reference to embodiment, but the implementation of the present invention is not limited to this.
The embodiments of the invention provide the method that a kind of picture roller type displacement of performance optimization plays.So-called " roller type Displacement ", is just analogous to the rotation of a wheel, each lines on wheel, equivalent to a pictures, whenever a lines Contacted with ground, so can be so that circularly displacement plays forward or backward equivalent to a pictures are played.Picture is seen Wheel surface is distributed in into a rule lines, the round-robin queue orderly equivalent to one, therefore tissue data can be gone with array Structure.Picture is few, and wheel is small, and array length is small;More than picture, wheel is big, and array length is big.So when vehicle wheel rotation gets up Afterwards, the lines contacted with ground is equivalent to currently playing picture;The lines just produced is equivalent to just rolling the picture that plays; The lines that will be transferred to is then equivalent to the picture that will roll broadcasting.It is similar that most intuitively application scenarios are such as:Slot Machine is drawn a lottery System.
It is exactly the outward appearance diagram of Slot Machine lottery system such as accompanying drawing 1.It is that a Slot Machine for having 3 rollers is taken out in this figure Prize system.There are 0-9 totally 10 numerals on every roller, be arranged in order distribution.Every roller model extraction is come out, is exactly such as The diagram of accompanying drawing 2, therefrom it can more be intuitive to see, the roller of Slot Machine and the above-mentioned wheel are essentially identical, by turning Dynamic roller, form the roller displacement result of broadcast of numeral.From Fig. 1 it can also be seen that on " window " of Slot Machine, every rolling 3 numerals are at most can only see on wheel, are somebody's turn to do " window " namely viewport (viewport), although roller may be very big, often It is secondary that 3 numerals can only be at most shown in viewport.Accompanying drawing 3 is seen again, and white portion is exactly viewport here, while extracts one here Bar roller has made shift roll effect displaying twice:Most middle white number, current results numeral is represented, at the beginning number of results Word is 4, and after roller rotates down one, current results numeral is changed into 3, is rotated further by one, is changed into 2.Here realization, can be 10 numerals make 10 figures:Picture 0, picture 1 ... picture 9, then all put well from 0 to 9, from top to bottom, it is then overall Displacement.When movement, most nethermost picture is checked continually on either with or without removal viewport lower boundary:If out of just will be most lower Square picture moves on to the top of all pictures;It is not overall toward bottom offset beyond then continuing.
Although the above method can realize effect well, previously described performance issue (picture is not accounted for The problem of a lot).If can accomplish only to change the picture in viewport region, and pipe is not had to outside viewport, performance issue is just met Sword and solve.In view of not make mobile animation not plan a successor, adding former and later two buffering areas again outside viewport, can so protect Animation effect is demonstrate,proved, and can meets that performance gets a promotion.As shown in Figure 4, in a roller, 3 digitized maps can be seen in viewport Piece, outside viewport up and down again respectively plus one, altogether 5.In order to only roll this 5, also need to do an action, exactly allow image content Separated with the picture of rolling:Roll 5 picture containers.As shown in Figure 5, in this figure, the part of rolling is container, numeral Picture, which is filled out, to be put into container.Whenever roller scrolls down through one, actually 5 containers integrally move down one, The bottom container beyond bottom is moved on to most upper.Then by array and vernier come the digital picture more in new container.Such as Shown in accompanying drawing 6:Here rolled twice, rolled include two steps each time:Entirety moves down, updates out-of-bounds container.Wherein, more New out-of-bounds container, which refers to, to remove bottom container, is reset to most upper;The image content in the container is updated simultaneously.Before Say that every roller can describe data structure by array, be formed " round-robin queue ", herein 10 on a roller in face Digital picture can have individual cursor verniers record current results to form an array [0,1,2,3,4,5,6,7,8,9] Index (the namely digital index of most middle white).Cursor next represents lower adjacent first, cursor next2 It is as lower adjacent second;Adjacent first in cursor prev expressions, neighbour second is (see accompanying drawing 7 in cursor prev2 expressions Diagram).Picture 23456 in the array is first put into container 12345 to (picture 2 puts container 1, picture 3 puts container 2nd ..., picture 6 puts container 5), cursor 4;After next displacement, cursor is updated to 3, it is found that container 5 removes Bottom, now just container 5 is moved on to and is topmost close to container 1, while picture 6 original in container 5 is discharged, be put into picture 1 (current cursor prev2).
The core of " roller type displacement " namely rolls container, more new content.Certainly, Slot Machine lottery system is more multiple It is miscellaneous, acceleration, beginning acceleration, the animation effect of middle stopping of slowing down at the uniform velocity, below are also related to, this does not discuss model in this patent Within enclosing.
Except Slot Machine lottery system, the roller translation displaying of picture is also such.If accompanying drawing 8 is in computer screen See the displaying of three pictures, accompanying drawing 9 is the displaying of 5 pictures.Then in fig. 8,5 rolling containers can be designed, in fig.9 can Design 7 rolling containers.(since it is desired that setting buffering area, to coordinate release picture, Load Image, and form seamless rolling Effect.) take viewport in three pictures rolling displaying exemplified by, such as accompanying drawing 10 and accompanying drawing 11, devise 5 containers, this 5 containers It is responsible for rolling effect, renewal image content.99 figures are come in Figure 10 and Figure 11, cursor, next as described above, Prev, next2, prev2, to insert container successively, formed and rolled.
In two above example, buffering area is all only front and rear each 1.But configuration variables can be made, carry out matching somebody with somebody for quantity Put.Such as can be with front and rear each 2, each 3 etc..In general, front and rear each 1 enough, only when rolling speed exceeds During rolling height (or rolling width) of one grid, just consider to set multiple buffering area.
According to Fig. 1, in 3*3 Slot Machine lottery system, when final rotation is stopped, middle row is final result.
According to Fig. 2, every roller namely disk of Slot Machine.0-9 10 numerals are uniformly distributed around disk.
According to Fig. 3, the rotation of one roller of Slot Machine, raw mode is that 10 digital pictures both participate in movement.Now property Energy and non-optimal.
According to Fig. 4, on the basis of Fig. 3, some pictures have been simplified.The mode simplified is:Picture number+2 in viewport Buffering area.The Slot Machine of citing in this patent, there are 3 in viewport, then the picture after finally simplifying is 3+2=5.I.e.:5 Figure can just be completed to rotate animation effect.
According to Fig. 5, on the basis of Fig. 4, roll main body is separated with content is rolled, forms the mode of " container+content ". What is rolled is container, and the content in more new container of specific opportunity is understood in rolling process, adjusts the position of container.
According to Fig. 6, one is often rolled, actually experienced two steps:All containers integrally move down, update and exceed border Container.Wherein, container of the renewal beyond border includes two aspects again:The renewal of position, the renewal of content.
According to Fig. 7, there are 0~9 totally 10 numerals on every roller of Slot Machine, then can regard 10 pictures as, this 10 figures Piece is put into an array.I.e. so-called " content array ".In content array, there is individual vernier cursor to indicate current results all the time Picture (i.e. picture most middle in viewport in Slot Machine), next represent follow-up first pictures of current results picture, next2 Represent follow-up second pictures;Prev represents that front and continued first is opened, prev2 represents front and continued chapter 2 figure.When cursor is in different positions When putting, prev2, prev, next, next2 also have difference.
According to Fig. 8 and Fig. 9, the application for having many picture presentations is all presented with the mode of " roller displacement ".
According to Figure 10 and Figure 11, by way of " container+content ", any pictures can be played.But in internal memory all the time Only 5 containers and 5 figures.(because resource can be discharged at any time)
The present invention is combined with performance prioritization scheme and original a set of algorithm and method, unlimited for the technical program Fixed any language, as long as there is identical demand, no matter the corresponding system of which kind of language development can use the solution of the present invention. The present invention is illustrated by and illustrated with game, the photograph album application developed based on flash.
" one embodiment " for being spoken of in this manual, " another embodiment ", " embodiment ", etc., refer to tying Specific features, structure or the feature for closing embodiment description are included at least one embodiment of the application generality description In.It is not necessarily to refer to same embodiment that statement of the same race, which occur, in multiple places in the description.Appoint furthermore, it is understood that combining When one embodiment describes a specific features, structure or feature, what is advocated is this to realize with reference to other embodiment Feature, structure or feature are also fallen within the scope of the present invention.
Although reference be made herein to invention has been described for multiple explanatory embodiments of the invention, however, it is to be understood that Those skilled in the art can be designed that a lot of other modifications and embodiment, and these modifications and embodiment will fall in this Shen Please be within disclosed spirit and spirit.More specifically, can be to master in the range of disclosure and claim The building block and/or layout for inscribing composite configuration carry out a variety of variations and modifications.Except what is carried out to building block and/or layout Outside variations and modifications, to those skilled in the art, other purposes also will be apparent.

Claims (7)

1. a kind of method that picture roller type displacement plays, it is characterised in that including:
Step 1: analysis rolls animation, extracts roll modeling out, roll main body is separated with content is rolled;
Step 2: setting number of containers according to demand, the container participates in rolling animation effect and being updated according to corresponding opportunity holding Image content in device;
Step 3: for rolling content, a subordinate ordered array is formed according to playing sequence;
Step 4: whenever a unit cell is rolled, specifically first all containers are moved integrally, then for removing border Container does more new position and more new content.
2. the method that picture roller type displacement according to claim 1 plays, it is characterised in that used in the step 3 Cursor represents the index of current results picture.
3. the method that picture roller type displacement according to claim 2 plays, it is characterised in that used in the step 3 Next represents follow-up first position index that currently indexes, and follow-up second position index that currently indexes is represented with next2.
4. the method that picture roller type displacement according to claim 2 plays, it is characterised in that used in the step 3 The position index of front and continued first that prev represents currently to index, next2 represent the position index of front and continued second that currently indexes.
5. the method that picture roller type displacement according to claim 1 plays, it is characterised in that during more new content, first discharge Photo current, then reload new picture.
6. the method that picture roller type displacement according to claim 1 plays, it is characterised in that pass through when loading new picture Cursor next2 accesses array.
7. the method that picture roller type displacement according to claim 1 plays, it is characterised in that the container of the step 2 Quantity is the normal display number+2 in the range of viewport.
CN201710899262.XA 2017-09-28 2017-09-28 The method that the displacement of picture roller type plays Pending CN107632809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710899262.XA CN107632809A (en) 2017-09-28 2017-09-28 The method that the displacement of picture roller type plays

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710899262.XA CN107632809A (en) 2017-09-28 2017-09-28 The method that the displacement of picture roller type plays

Publications (1)

Publication Number Publication Date
CN107632809A true CN107632809A (en) 2018-01-26

Family

ID=61104149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710899262.XA Pending CN107632809A (en) 2017-09-28 2017-09-28 The method that the displacement of picture roller type plays

Country Status (1)

Country Link
CN (1) CN107632809A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176788A (en) * 2011-12-26 2013-06-26 中国移动通信集团福建有限公司 Method and device used for smooth transition of animation content of mobile phone desktop
CN105843493A (en) * 2016-03-31 2016-08-10 武汉斗鱼网络科技有限公司 Home page slide show and operation method and device
CN107092655A (en) * 2017-03-21 2017-08-25 武汉斗鱼网络科技有限公司 Circularly exhibiting method and system for organizing figure in Android widescreen equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176788A (en) * 2011-12-26 2013-06-26 中国移动通信集团福建有限公司 Method and device used for smooth transition of animation content of mobile phone desktop
CN105843493A (en) * 2016-03-31 2016-08-10 武汉斗鱼网络科技有限公司 Home page slide show and operation method and device
CN107092655A (en) * 2017-03-21 2017-08-25 武汉斗鱼网络科技有限公司 Circularly exhibiting method and system for organizing figure in Android widescreen equipment

Similar Documents

Publication Publication Date Title
EP0171120B1 (en) Method and device for creating and modifying a synthetic picture
US9478107B2 (en) Game machine, and control method of controlling computer and computer program used therefor
CN106296785A (en) A kind of picture rendering intent and picture rendering apparatus
CN108379832A (en) A kind of game synchronization method and apparatus
CN105939493A (en) Video barrage display method and video barrage display device
CN102736940B (en) Resource loading method
EP3142761B1 (en) Generation and distribution of in-game tutorials
CN100421119C (en) Method for drawing map in game
WO2021135591A1 (en) Map generation method and apparatus, electronic device, and computer storage medium
WO2012178001A1 (en) Computer-implemented video puzzles
CN105931256A (en) CUDA (compute unified device architecture)-based large-format remote sensing image fast segmentation method
CN106162298A (en) A kind of method and system realizing barrage
CN107730583A (en) A kind of terrain tile data dynamic dispatching method and device based on three-dimensional scenic
CN107632809A (en) The method that the displacement of picture roller type plays
CN103559352B (en) A kind of standard block and foundation, using method
CN1142194A (en) Video game device for simulation game of comic book
CN102842145B (en) Tiled graphics architecture
CN113342233B (en) Interaction method, device, computer equipment and storage medium
TW201541332A (en) Animating content display
CN107741870A (en) The method that terminal, display screen and control display screen are shown
CN106709229B (en) The method and device of NPC object priority response in a kind of game system
CN107204199A (en) Semiconductor memory system and its address control method
CN113546416A (en) Game scene processing method and device, computer equipment and storage medium
CN111445576B (en) Map data acquisition method and device, storage medium and electronic device
CN105512194A (en) Game scene management method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180126

RJ01 Rejection of invention patent application after publication