CN109814736A - A kind of processing method of rocking bar numerical value - Google Patents

A kind of processing method of rocking bar numerical value Download PDF

Info

Publication number
CN109814736A
CN109814736A CN201811478040.1A CN201811478040A CN109814736A CN 109814736 A CN109814736 A CN 109814736A CN 201811478040 A CN201811478040 A CN 201811478040A CN 109814736 A CN109814736 A CN 109814736A
Authority
CN
China
Prior art keywords
rocking bar
increment
offset
mobile increment
numerical value
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.)
Withdrawn
Application number
CN201811478040.1A
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.)
Suzhou Snail Digital Technology Co Ltd
Original Assignee
Suzhou Snail Digital 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 Suzhou Snail Digital Technology Co Ltd filed Critical Suzhou Snail Digital Technology Co Ltd
Priority to CN201811478040.1A priority Critical patent/CN109814736A/en
Publication of CN109814736A publication Critical patent/CN109814736A/en
Withdrawn legal-status Critical Current

Links

Abstract

A kind of processing method of rocking bar numerical value, comprising the following steps: report rocking bar numerical value and pre-processed;Interval division is carried out to rocking bar offset and is identified;Calculate the mobile increment in each section;The final mobile increment of output;According to the contact position of the current location of analog contacts and final mobile incremental computations subsequent time.The processing method of rocking bar numerical value of the invention, can allow viewing angle control more friendly, and for the scene at the intense adjustments visual angles such as gun aiming, aiming experience, which has, significantly to be promoted, to enhance the experience of game.

Description

A kind of processing method of rocking bar numerical value
Technical field
The present invention relates to game engine technical fields, more particularly to a kind of processing method of rocking bar numerical value.
Background technique
In the intelligent platforms such as mobile phone, some game do not support rocking bar originally, and a kind of solution is the number rocking bar Value is converted into the touch point on screen, can achieve the effect of the movement of control role position, visual angle rotation (hereinafter referred to as visual angle). The scene (claiming visual field mode below) for controlling visual angle is discussed herein primarily.
In visual field mode, the contact simulated is some preset point from screen, is then deviated according to rocking bar Amount calculates the mobile increment (unit is pixel) of analog contacts, and the contact position of last moment and the increment calculated every time are total With the position for determining subsequent time contact.
There are many scenes of viewing angle control in game: large viewing mobile context, small range fine-tuning visual angle scene, similar rifle Branch aiming operation very fine adjusts visual angle scene, needs different visual angle velocities of rotation under different scenes.Therefore how basis is shaken It is the key factor for influencing rocking bar experience that the offset of bar, which calculates contact increment,.
Technical solution common at present has following three kinds:
1. constant scheme: as long as offset is not 0, increment is constant.The shortcomings that such scheme is that there is no according to partially for increment Shifting amount changes and changes, therefore only a kind of angular speed, can not meet different viewing angle control scenes simultaneously --- and it can not be fine Visual angle adjustment.
2. linear arrangement: increment=offset x accelerator coefficient, and be rounded.The shortcomings that such scheme is increment with offset Linear variation, although alleviate to a certain extent constant scheme there are the problem of, in the field for needing intense adjustment visual angle Scape is still unable to do what one wishes.
3. segmentation speeding scheme: on the basis of " linear arrangement ", offset being divided into several sections, and be each Define different accelerator coefficients.The shortcomings that such scheme is the difference that various angular speed are enhanced on the basis of linear arrangement, But in the improvement of the scene for needing intense adjustment visual angle not substantially.
4. curve matching scheme: the relationship from offset to increment is fitted to a curvilinear function, and (wherein offset is Independent variable, increment are from variable), calculated result is rounded.The shortcomings that such scheme, is as the shortcomings that segmentation speeding scheme.
Summary of the invention
In order to solve the shortcomings of the prior art, the purpose of the present invention is to provide a kind of processing sides of rocking bar numerical value Method can allow viewing angle control more friendly, significantly promoted and aim at experience.
To achieve the above object, the processing method of a kind of rocking bar numerical value provided by the invention, comprising:
It reports rocking bar numerical value and is pre-processed;
Interval division is carried out to rocking bar offset and is identified;
Calculate the mobile increment in each section;
The final mobile increment of output;
According to the contact position of the current location of analog contacts and final mobile incremental computations subsequent time.
Further, described the step of is carried out by interval division and is identified for rocking bar offset, further comprise:
Three different sections are divided into rocking bar offset according to different visual angle velocities of rotation and are respectively as follows: big offset field Between, fine tuning section and accurate adjustment section.
Further, the step of mobile increment for calculating each section, comprising:
Calculate the mobile increment between big offset field, formula are as follows:
FunA= d*ViewSpeed;
Wherein, FunA is the corresponding mobile increment of large rotation angle visual angle scene, and d is offset, and ViewSpeed is preset Visual angle speed;
Calculate the mobile increment in fine tuning section, formula are as follows:
FuncB=fPrecision * (d +800)/1000;
Wherein, FuncB is the corresponding mobile increment of Small-angle Rotation visual angle scene, and fPrecision is trimming precision, and d is offset Amount;
Calculate the mobile increment in accurate adjustment section, formula are as follows:
FuncC= fPrecision * d / L;
Wherein, FuncC is the corresponding mobile increment of accurate adjustment visual angle scene, and fPrecision is trimming precision, and d is offset, and L is Value constant.
Further, described the step of exporting final mobile increment, further comprise: if mobile increment absolute value Greater than 1, then its integer part is exported as final mobile increment;It otherwise will mobile increment accumulation.
To achieve the above object, the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer and refer to It enables, which is characterized in that the computer instruction executes the process method step of rocking bar numerical value as described above when running.
To achieve the above object, the present invention also provides a kind of game stations, which is characterized in that including memory and processing Device, the computer instruction run on the processor is stored on the memory, and the processor runs the computer The process method step of rocking bar numerical value as described above is executed when instruction.
A kind of processing method of rocking bar numerical value of the invention, has the advantages that
1) make viewing angle control more friendly: for quickly turn round, small range adjustment direction, gun aim at etc. scenes provide respectively fastly Speed, at a slow speed, pole three kinds of different visual angle velocities of rotation at a slow speed.
2) for the scene at the intense adjustments visual angles such as gun aiming, this patent provides unprecedented numerical value processing hand Section, there is important breakthrough in principle, has aiming experience and is significantly promoted.
3) overall experience of game station is enhanced.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, and with it is of the invention Embodiment together, is used to explain the present invention, and is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the processing method flow chart of rocking bar numerical value according to the present invention;
Fig. 2 is the mobile increment flow chart according to the present invention according to rocking bar offset calculating simulation contact;
Fig. 3 is rocking bar theoretical values distribution map according to the present invention and rocking bar ideal data distribution map.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Fig. 1 is that the processing method flow chart of rocking bar numerical value according to the present invention shakes of the invention below with reference to Fig. 1 The processing method of bar numerical value is described in detail.
Firstly, reporting rocking bar numerical value in step 101 and being pre-processed to waist bar numerical value.In the step, data are located in advance Reason is including debounce etc..
In step 102, according to the mobile increment of rocking bar offset calculating simulation contact.
Fig. 2 is the mobile increment flow chart according to the present invention according to rocking bar offset calculating simulation contact, below will ginseng Fig. 2 is examined, the mobile increment of calculating simulation contact is described in detail.
In step 201, rocking bar offset is divided into large, medium and small three sections, and is individually identified as first interval, Two sections and 3rd interval, in this way, three different visual angle velocities of rotation can define different sections.
In step 202, if current offset calculates mobile increment in first interval, by formula F uncA.First interval Between representing big offset field, FuncA represents the corresponding mobile increment of large rotation angle visual angle scene, calculation formula are as follows:
FunA= d*ViewSpeed;
Wherein, d is offset, and ViewSpeed is preset visual angle speed;ViewSpeed can by user according to the actual situation into Row adjustment, with reference to value range [3,30].
In step 203, if current offset calculates mobile increment in second interval, by formula F uncB.Second interval Fine tuning section is represented, FuncB represents the corresponding mobile increment of Small-angle Rotation visual angle scene, calculation formula are as follows:
FuncB=fPrecision * (d + 800)/1000;
Wherein, d is offset, and fPrecision is trimming precision, with reference to value range [1.0,3.0].
In step 204, if current offset calculates mobile increment in 3rd interval, by formula F uncC.3rd interval Accurate adjustment section is represented, FuncC represents the corresponding mobile increment of accurate adjustment visual angle scene (such as gun aiming), calculation formula are as follows:
FuncC= fPrecision * d / L;
Wherein, L is value constant, and L value is bigger, and visual angle rotation is slower, can be adjusted according to practical debugging effect, with reference to value model Enclose [800,1500].
In step 205, the output of final mobile increment: if this movement increment absolute value is greater than 1, its integer is exported Part, otherwise mobile increment accumulation.Cumulative of mobile increment comes into force to offset in the case where 3rd interval, belongs to accurate adjustment The latter half at visual angle.
In this step, mobile increment is cumulative, for the different operation demand of user under different scenes, it may be considered that with Lower strategy:
1) when d=(800,1000], a=d*ViewSpeed;
2) when d=(300,800], a=fPrecision * (d+800)/1000;
3) when d=(0,300], a '=d/800 fPrecision *;
If a ' > 1.0, a=a '
Otherwise a +=a ' (sigma delta)
4) when d=0, contact is lifted.
Wherein, ViewSpeed indicates visual field movement speed, and fPrecision indicates Adjustment precision, is set by the user, a ' For the interim mobile increment that this is calculated, a is sigma delta.
A +=a ' is equivalent to: a=a+a ', and here it is the calculation methods of mobile increment.Such as current a=0, and have company Continuous 10 offsets input (in 0 ~ 300 section), it is assumed that 10 times a ' calculated is 0.1, then the value of a is to change in this way :
After 1st input :+a '=0 a=a+0.1=0.1
After 2nd input :+a '=0.1 a=a+0.1=0.2
After 3rd input :+a '=0.2 a=a+0.1=0.3
After the 4th input :+a '=0.3 a=a+0.1=0.4
After the 5th input :+a '=0.4 a=a+0.1=0.5
After 6th input :+a '=0.5 a=a+0.1=0.6
After 7th input :+a '=0.6 a=a+0.1=0.7
After 8th input :+a '=0.7 a=a+0.1=0.8
After 9th input :+a '=0.8 a=a+0.1=0.9
After 10th input :+a '=0.9 a=a+0.1=1.0
It can be seen that first 9 times input obtained cumulative mobile increment and are both less than 1, therefore the mobile increment exported is 0;And the 10th After secondary input, obtained cumulative mobile increment is just equal to 1, and the mobile increment that can be exported at this time is 1(pixel).
In step 103, according to the analog contacts position of the current location of analog contacts and mobile incremental computations subsequent time. In the step, the condition that the present invention comes into force is with " controlling visual angle according to rocking bar numerical simulation contact " for background.
During rocking bar event is converted into touch event, shaken by what the processing method of rocking bar numerical value of the invention was handled Bar numerical simulation contact controls visual angle, and user can more accurately run-home when aiming at.
Fig. 3 is rocking bar theoretical values distribution map according to the present invention and rocking bar ideal data distribution map, as shown in figure 3, shaking Bar data are made of { X, Y } coordinate, and X is orthogonal with Y, and distribution of the theoretical possible valued combinations on two-dimensional surface is square Shape.And general rocking bar root glomeration, ideal rocking bar data distribution is positive round.Rocking bar timing reports current location when work, Report numerical value linear with position.
Visual field mode Imitating is a free contact, then every according to rocking bar from preset position The secondary coordinate (x, y) reported calculates this contact increment, and the position co-determination of this increment and last moment contact is touched The position at point next moment.It is worth noting that, this increment is also two-dimensional.In view of the equity of X and Y, Wo Men Processing method when calculating separately its increment is also completely the same.Therefore by taking X as an example, Y is repeated no more the discussion below.
The numberical range of rocking bar is not quite similar, and illustrates the implementation method of this patent for 0 ~ 2000 below:
If x is certain X value reported, d=x-1000 indicates offset of the rocking bar in X-axis, and a is the mould calculated according to d The mobile increment of quasi- contact.The strategy at visual angle is converted to the calculating to a value at this time.
For the different operation demand of user under different scenes, it may be considered that following strategy:
1) when d=(800,1000], a=d*ViewSpeed;
2) when d=(300,800], a=fPrecision * (d+800)/1000;
3) when d=(0,300], a '=d/800 fPrecision *;
If a ' > 1.0, a=a '
Otherwise a +=a ' (sigma delta)
4) when d=0, contact is lifted.
Wherein ViewSpeed indicates visual field movement speed, and fPrecision indicates Adjustment precision, is set by the user.
It is necessary to the effect expections to different sections to be briefly described:
Section (800,1000]: visual angle fast moves, and meets large viewing mobile context;
Section (300,800]: visual angle fine tuning meets small range fine-tuning visual angle scene;
Section (0,300]: visual angle intense adjustment meets the scene that gun aiming etc. needs intense adjustment visual angle;
Section [0,0]: visual angle stops operating.
Root is needed it should be noted that the section of (0,300), 800 in a '=d/800 fPrecision * It is adjusted according to actual effect, value is bigger, adjusts finer.Wherein most worthy is added up when increment is less than 1.0, This have the effect that: it, can be because after repeatedly reporting although this numerical value reported moves contact position immediately Sigma delta is greater than 1.0 and makes mobile 0 one pixels in contact.In this way user can aim at when fine sight target ?.
The specific division in above-mentioned several sections can adjust according to the actual situation, the number that be not necessarily divided into example Value.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer instruction, and the computer refers to Enable the process method step that rocking bar numerical value as described above is executed when operation.
The present invention also provides a kind of game station, including memory and processor, store on the memory described The computer instruction run on processor, the processor execute rocking bar number as described above when running the computer instruction The process method step of value.
Those of ordinary skill in the art will appreciate that: the foregoing is only a preferred embodiment of the present invention, and does not have to In the limitation present invention, although the present invention is described in detail referring to the foregoing embodiments, for those skilled in the art For, still can to foregoing embodiments record technical solution modify, or to part of technical characteristic into Row equivalent replacement.All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should all include Within protection scope of the present invention.

Claims (6)

1. a kind of processing method of rocking bar numerical value, comprising the following steps:
It reports rocking bar numerical value and is pre-processed;
Interval division is carried out to rocking bar offset and is identified;
Calculate the mobile increment in each section;
The final mobile increment of output;
According to the contact position of the current location of analog contacts and final mobile incremental computations subsequent time.
2. the method according to claim 1, wherein it is described to rocking bar offset carry out interval division and identify Step further comprises:
Three different sections are divided into rocking bar offset according to different visual angle velocities of rotation and are respectively as follows: big offset field Between, fine tuning section and accurate adjustment section.
3. the method according to claim 1, wherein the step of mobile increment for calculating each section, packet It includes:
Calculate the mobile increment between big offset field, formula are as follows:
FunA= d*ViewSpeed;
Wherein, FunA is the corresponding mobile increment of large rotation angle visual angle scene, and d is offset, and ViewSpeed is preset Visual angle speed;
Calculate the mobile increment in fine tuning section, formula are as follows:
FuncB=fPrecision * (d +800)/1000;
Wherein, FuncB is the corresponding mobile increment of Small-angle Rotation visual angle scene, and fPrecision is trimming precision, and d is offset Amount;
Calculate the mobile increment in accurate adjustment section, formula are as follows:
FuncC= fPrecision * d / L;
Wherein, FuncC is the corresponding mobile increment of accurate adjustment visual angle scene, and fPrecision is trimming precision, and d is offset, and L is Value constant.
4. method according to the claims, which is characterized in that described the step of exporting final mobile increment, further wrap It includes: if mobile increment absolute value is greater than 1, exporting its integer part as final mobile increment;It otherwise will mobile increment It is cumulative.
5. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the computer instruction fortune Perform claim requires the process method step of 1 to 4 described in any item rocking bar numerical value when row.
6. a kind of game station, which is characterized in that including memory and processor, stored on the memory in the processing The computer instruction run on device, perform claim requires described in 1 to 4 any one when the processor runs the computer instruction Rocking bar numerical value process method step.
CN201811478040.1A 2018-12-05 2018-12-05 A kind of processing method of rocking bar numerical value Withdrawn CN109814736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811478040.1A CN109814736A (en) 2018-12-05 2018-12-05 A kind of processing method of rocking bar numerical value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811478040.1A CN109814736A (en) 2018-12-05 2018-12-05 A kind of processing method of rocking bar numerical value

Publications (1)

Publication Number Publication Date
CN109814736A true CN109814736A (en) 2019-05-28

Family

ID=66601915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811478040.1A Withdrawn CN109814736A (en) 2018-12-05 2018-12-05 A kind of processing method of rocking bar numerical value

Country Status (1)

Country Link
CN (1) CN109814736A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104548596A (en) * 2015-02-02 2015-04-29 陈荣 Aiming method and device of shooting games
US20160041717A1 (en) * 2011-10-04 2016-02-11 Microsoft Technology Licensing, Llc Game controller on mobile touch-enabled devices
CN105446525A (en) * 2015-11-10 2016-03-30 网易(杭州)网络有限公司 Method for controlling behavior of game role
CN106292727A (en) * 2015-05-22 2017-01-04 浙江大华技术股份有限公司 A kind of method and device being controlled cloud platform rotation by keyboard of network rocking bar
CN108027660A (en) * 2015-08-07 2018-05-11 索尼互动娱乐股份有限公司 System and method for determining the orientation of the photoelectric sensor of HMD or another controllers using MEMS projecting apparatus
CN108854063A (en) * 2018-04-24 2018-11-23 网易(杭州)网络有限公司 Method of sight, device, electronic equipment and storage medium in shooting game

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160041717A1 (en) * 2011-10-04 2016-02-11 Microsoft Technology Licensing, Llc Game controller on mobile touch-enabled devices
CN104548596A (en) * 2015-02-02 2015-04-29 陈荣 Aiming method and device of shooting games
CN106292727A (en) * 2015-05-22 2017-01-04 浙江大华技术股份有限公司 A kind of method and device being controlled cloud platform rotation by keyboard of network rocking bar
CN108027660A (en) * 2015-08-07 2018-05-11 索尼互动娱乐股份有限公司 System and method for determining the orientation of the photoelectric sensor of HMD or another controllers using MEMS projecting apparatus
CN105446525A (en) * 2015-11-10 2016-03-30 网易(杭州)网络有限公司 Method for controlling behavior of game role
CN108854063A (en) * 2018-04-24 2018-11-23 网易(杭州)网络有限公司 Method of sight, device, electronic equipment and storage medium in shooting game

Similar Documents

Publication Publication Date Title
CN106945042B (en) A kind of discrete S type curve speed control method of manipulator
US6434465B2 (en) Method for controlling/regulating a process in a motor vehicle and device for implementing the method
CN108064197B (en) Method and device for determining position information of stacking point and robot
CN107102634B (en) A kind of parameter Estimation and tracking and controlling method based on table servo system
CN105446525A (en) Method for controlling behavior of game role
CN109960157A (en) Smoothing processing method, device, terminal device and the storage medium of steering engine movement
CN105096384A (en) Method and device for adjusting position and attitude angle of virtual object
CN104570735A (en) Arc-shaped movement-track algorithm for palletizing robot
CN105252911A (en) Correction method and device for laser marking
WO2004111927B1 (en) Three-dimensional modeling from arbitrary three-dimensional curves
CN106292727A (en) A kind of method and device being controlled cloud platform rotation by keyboard of network rocking bar
CN111191359A (en) Method for constructing air-defense missile space killer area model and calculating shooting data based on small amount of actual data
US10331819B2 (en) System, method and readable recording medium of controlling virtual model
CN102626554B (en) Mechanical shadow structure and movement angle and movement positioning control methods thereof
CN109814736A (en) A kind of processing method of rocking bar numerical value
CN110264553A (en) The method and apparatus of surface vegetation processing
CN104847889B (en) The ecp shift control method and system of a kind of vehicle
CN110007786A (en) Method and related device for optimizing handle mapping to mouse sensitivity
CN108549759A (en) A kind of part coating layer thickness for automatic spraying technique calculates and emulation mode
CN105278462A (en) Acceleration-deceleration interpolation algorithm for robot control system trajectory
CN105224179A (en) Method for information display and device
CN109543817A (en) Model distillating method and device for convolutional neural networks
CN100421451C (en) Instantaneous initialization positioning method in virtual studio system
CN110231823B (en) Direct control method of two-wheeled robot
CN109388063A (en) Adaptive Kalman filter composite control method

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190528