CN115845356A - Motion sensing game method based on swiping action - Google Patents

Motion sensing game method based on swiping action Download PDF

Info

Publication number
CN115845356A
CN115845356A CN202211632304.0A CN202211632304A CN115845356A CN 115845356 A CN115845356 A CN 115845356A CN 202211632304 A CN202211632304 A CN 202211632304A CN 115845356 A CN115845356 A CN 115845356A
Authority
CN
China
Prior art keywords
acceleration
motion
motion sensing
acceleration data
swiping
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
CN202211632304.0A
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.)
Shenzhen Shimi Network Technology Co ltd
Original Assignee
Shenzhen Shimi 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 Shimi Network Technology Co ltd filed Critical Shenzhen Shimi Network Technology Co ltd
Priority to CN202211632304.0A priority Critical patent/CN115845356A/en
Publication of CN115845356A publication Critical patent/CN115845356A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a motion sensing game method, a motion sensing game device, motion sensing game equipment and a computer readable storage medium based on a swiping action, wherein the motion sensing game method based on the swiping action comprises the following steps: after the motion sensing game is started, original acceleration data are obtained from the bound motion sensing equipment; calculating the acceleration change trend of the hand when the player performs the swiping action according to the original acceleration data; judging whether the player finishes the appointed swiping action according to the acceleration change trend; and if so, executing a matched swiping instruction in the motion sensing game. The motion sensing game method has the advantages of low requirement on hardware of the motion sensing device, high precision, wide applicable crowd and the like.

Description

Motion sensing game method based on swiping action
Technical Field
The invention relates to the technical field of motion sensing games, in particular to a motion sensing game method, device and equipment based on a swiping action and a computer readable storage medium.
Background
At present, most somatosensory games realize the input of game instructions through acceleration data and angular velocity data acquired by an IMU (inertial measurement Unit) sensor. However, some motion sensing devices are only provided with a gravity sensor, so that the motion sensing devices can only collect gravity acceleration data, and a player cannot normally play a motion sensing game by using the motion sensing devices.
Therefore, it is desirable to provide a motion sensing game method for implementing motion sensing instruction input based on a gravity sensor, so as to reduce the hardware requirements of the motion sensing game.
Disclosure of Invention
The embodiment of the application provides a motion sensing game method based on a swiping motion, and aims to reduce the hardware requirement of the motion sensing game.
In order to achieve the above object, an embodiment of the present application provides a motion sensing game method based on a swiping motion, including:
after the motion sensing game is started, original acceleration data are obtained from the bound motion sensing equipment;
calculating the acceleration change trend of the hand when the player performs the swiping action according to the original acceleration data;
judging whether the player finishes the appointed swiping action according to the acceleration change trend;
and if so, executing a matched swiping instruction in the motion sensing game.
In some embodiments, calculating the acceleration trend of the hand when the player performs the swing action according to the raw acceleration data comprises:
acquiring acceleration data associated with a designated swiping action from the original acceleration data as associated acceleration data, wherein the associated acceleration data comprises two of x-axis acceleration data, y-axis acceleration data and z-axis acceleration data; and
and calculating the acceleration change trend according to the associated acceleration data.
In some embodiments, calculating the acceleration trend from the associated acceleration data comprises:
determining the motion direction of the hand of the player according to the acceleration data of any axis in the associated acceleration data;
judging whether the motion direction of the hand of the player is matched with the motion direction of the appointed swiping action;
and if so, calculating the acceleration change trend according to the associated acceleration data after the judgment is successful.
In some embodiments, calculating the acceleration trend according to the associated acceleration data after the determination is successful comprises:
grouping the associated acceleration data after the judgment is successful;
calculating an acceleration value of a corresponding acceleration axis according to the grouped associated acceleration data;
and calculating the acceleration change trend according to the acceleration value.
In some embodiments, calculating an acceleration value for a corresponding acceleration axis from the grouped associated acceleration data comprises:
and calculating the average value of each group of the grouped acceleration data to serve as the acceleration value of the corresponding acceleration axis.
In some embodiments, determining whether the player has completed the designated swing action according to the acceleration change trend includes:
calculating the change rate of the acceleration value in a specified time length;
and if the change rate is larger than a set threshold value, judging that the player completes the appointed swing action.
In some embodiments, if the rate of change is greater than a set threshold, determining that the player completed the designated swiping motion comprises:
when the change rates of the acceleration values of the two acceleration axes associated with the designated swing action are both greater than the corresponding set threshold values, it is determined that the player has completed the designated swing action.
In order to achieve the above object, an embodiment of the present invention further provides a motion sensing game device based on a swing motion, including:
the acquisition module is used for acquiring original acceleration data from the bound motion sensing equipment after the motion sensing game is started;
the calculation module is used for calculating the acceleration change trend of the hand when the player performs the swiping action according to the original acceleration data;
the judging module is used for judging whether the player finishes the appointed swiping action according to the acceleration change trend;
and the execution module is used for executing a matched swiping instruction in the motion sensing game after judging that the player completes the appointed swiping action.
In order to achieve the above object, an embodiment of the present invention further provides a motion sensing game device based on a swipe motion, which includes a memory, a processor, and a motion sensing game program based on a swipe motion, stored in the memory and executable on the processor, where the processor implements the motion sensing game method based on a swipe motion when executing the motion sensing game program based on a swipe motion.
In order to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, where a swing action-based somatosensory game program is stored, and the swing action-based somatosensory game program, when executed by a processor, implements the swing action-based somatosensory game method according to any one of the above aspects.
According to the body sensing game method based on the swing action, the change trend of the acceleration of the hand when the player swings the action is calculated through the original acceleration data collected by the body sensing equipment, and whether the player finishes the appointed swing action or not is judged according to the change trend of the acceleration. Therefore, the motion sensing control of the motion sensing game can be realized only by adopting the acceleration data detected by the gravity sensor, so that the hardware requirement on the motion sensing equipment can be reduced. Further, since the swing motion determination is performed using the acceleration change tendency, it is possible to have high motion determination accuracy and wider applicability even from only the acceleration data. Therefore, compared with the traditional motion sensing game method adopting gyroscope data, the motion sensing game method has the advantages of low hardware requirement of the motion sensing device, high precision, wide applicable crowd and the like.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a block diagram of a motion sensing game device according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for motion sensing game based on a swiping motion according to an embodiment of the present invention;
fig. 3 is a block diagram of a motion sensing game device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of "first," "second," and "third," etc. do not denote any order, and such words are to be interpreted as names.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a server 1 (also called a motion sensing game device based on a swiping motion) in a hardware operating environment according to an embodiment of the present invention.
The server provided by the embodiment of the invention comprises equipment with a display function, such as Internet of things equipment, an intelligent air conditioner with a networking function, an intelligent lamp, an intelligent power supply, AR/VR equipment with a networking function, an intelligent sound box, an automatic driving automobile, a PC, a smart phone, a tablet personal computer, an electronic book reader, a portable computer and the like.
As shown in fig. 1, the server 1 includes: memory 11, processor 12, and network interface 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the server 1, for example a hard disk of the server 1. The memory 11 may also be an external storage device of the server 1 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the server 1.
Further, the memory 11 may also include an internal storage unit of the server 1 and also an external storage device. The memory 11 may be used to temporarily store data that has been output or is to be output, as well as application software installed in the server 1 and various types of data, such as codes of the motion sensing game program 10 based on a swiping motion.
The processor 12 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the motion sensing game program 10 based on a swing motion.
The network interface 13 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), typically used for establishing a communication connection between the server 1 and other electronic devices.
The network may be the internet, a cloud network, a wireless fidelity (Wi-Fi) network, a Personal Area Network (PAN), a Local Area Network (LAN), and/or a Metropolitan Area Network (MAN). Various devices in the network environment may be configured to connect to the communication network according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of: transmission control protocol and internet protocol (TCP/IP), user Datagram Protocol (UDP), hypertext transfer protocol (HTTP), file Transfer Protocol (FTP), zigBee, EDGE, IEEE 802.11, optical fidelity (Li-Fi), 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communications, wireless Access Points (APs), device-to-device communications, cellular communication protocol, and/or bluetooth (Blue Tooth) communication protocol, or a combination thereof.
Optionally, the server may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is used for displaying information processed in the server 1 and for displaying a visualized user interface.
While fig. 1 shows only a server 1 with components 11-13 and a swipe action based motion-sensing game program 10, those skilled in the art will appreciate that the structure shown in fig. 1 is not limiting of the server 1, and may include fewer or more components than shown, or some components combined, or a different arrangement of components.
In this embodiment, the processor 12 may be configured to call the motion sensing game program based on the swiping motion stored in the memory 11, and perform the following operations:
after the motion sensing game is started, original acceleration data are obtained from the bound motion sensing equipment;
calculating the acceleration change trend of the hand when the player performs the swiping action according to the original acceleration data;
judging whether the player finishes the appointed swing action according to the acceleration change trend;
and if so, executing a matched swiping instruction in the motion sensing game.
In an embodiment, the processor 12 may be configured to call the motion sensing game program based on the swiping motion stored in the memory 11, and perform the following operations:
acquiring acceleration data associated with the designated swiping action from the original acceleration data as associated acceleration data, wherein the associated acceleration data comprises two of x-axis acceleration data, y-axis acceleration data and z-axis acceleration data; and
and calculating the acceleration change trend according to the associated acceleration data.
In one embodiment, the processor 12 may be configured to call the somatosensory game program stored in the memory 11 based on the swiping motion, and perform the following operations:
determining the motion direction of the hand of the player according to the acceleration data of any axis in the associated acceleration data;
judging whether the hand movement direction of the player is matched with the movement direction of the appointed swiping action;
and if so, calculating the acceleration change trend according to the associated acceleration data after the judgment is successful.
In one embodiment, the processor 12 may be configured to call the somatosensory game program stored in the memory 11 based on the swiping motion, and perform the following operations:
grouping the associated acceleration data after the judgment is successful;
calculating an acceleration value of a corresponding acceleration axis according to the grouped associated acceleration data;
and calculating the acceleration change trend according to the acceleration value.
In one embodiment, the processor 12 may be configured to call the somatosensory game program stored in the memory 11 based on the swiping motion, and perform the following operations:
and calculating the average value of each group of the grouped acceleration data to serve as the acceleration value of the corresponding acceleration axis.
In an embodiment, the processor 12 may be configured to call the motion sensing game program based on the swiping motion stored in the memory 11, and perform the following operations:
calculating the change rate of the acceleration value in a specified time length;
and if the change rate is larger than a set threshold value, judging that the player completes the appointed swing action.
In one embodiment, the processor 12 may be configured to call the somatosensory game program stored in the memory 11 based on the swiping motion, and perform the following operations:
when the change rates of the acceleration values of the two acceleration axes associated with the designated swing action are both greater than the corresponding set threshold values, it is determined that the player has completed the designated swing action.
Based on the hardware architecture of the motion sensing game device based on the swing action, the embodiment of the motion sensing game method based on the swing action is provided. The invention provides a motion sensing game method based on a swiping motion, and aims to reduce the hardware requirement of a motion sensing game.
Referring to fig. 2, fig. 2 is a diagram illustrating a motion sensing game method based on a swiping motion according to an embodiment of the present invention, where the motion sensing game method based on the swiping motion includes the following steps:
and S10, after the motion sensing game is started, acquiring original acceleration data from the bound motion sensing equipment.
Among these, this motion sensing game is a motion sensing game related to a swing motion, and requires a player to perform a swing motion using a motion sensing device to develop the game. With this motion sensing game, a player can perform an action such as a corresponding attack or a corresponding ball hit by a game character swinging an object such as a weapon or a racket. Thus, the player can feel more realistically the fun of the swipe game.
Note that the motion sensing game may be a local application, an HTML5 applet, a web application, or the like. Specifically, the motion sensing game runs on a terminal, and the terminal can be a desktop computer, a notebook computer, a game host, a portable game host, a smart phone, a tablet computer, a smart watch, a smart television and the like.
The motion sensing device is a device capable of detecting motion sensing data of a player, and generally, the motion sensing device is configured to include a six-axis IMU sensor including a three-axis accelerometer and a three-axis gyroscope, and the six-axis IMU sensor detects the motion sensing data of the player by detecting a change in three-axis acceleration and a change in three-axis angular velocity of the player.
In the technical scheme of the application, the original acceleration data acquired by the terminal from the somatosensory device are triaxial acceleration data directly acquired by an accelerometer (also called a gravity sensor). The three-axis acceleration data are x-axis acceleration data, y-axis acceleration data and z-axis acceleration data respectively. The x-axis is an acceleration axis in the horizontal direction, the z-axis is an acceleration axis in the vertical direction, and the y-axis is an acceleration axis in the front-rear direction. In this way, even if the motion sensing device includes only the gravity sensor, the input of the swing command can be completed by the motion sensing motion.
Optionally, the motion sensing device is configured to be wearable, and the form thereof includes, but is not limited to, the following: bracelets, watches, gamepads, smart phones, and the like.
Further, before playing, the motion sensing device needs to establish a communication connection with the terminal (i.e. bind with the terminal), where the motion sensing device and the terminal may establish a wired connection or a wireless connection. For example, when the somatosensory device establishes a wired connection with the terminal, the wired connection can be based on at least one of a USB2.0 protocol, a USB3.0 protocol, a thunder and lightning 3 protocol and a thunder and lightning 4 protocol; and when the somatosensory device is wirelessly connected with the terminal, the somatosensory device can be based on at least one of a Bluetooth protocol, a WiFi protocol, an infrared protocol, a 2.4G communication protocol and an NFC protocol.
And S20, calculating the acceleration change trend of the hand when the player performs the swiping action according to the original acceleration data.
The acceleration change trend refers to the change trend of the acceleration acquired by the motion sensing equipment along with time, and shows the speed of the acceleration change.
Specifically, the acceleration data collected by the motion sensing device is hand acceleration data when the player performs a swing motion, and reflects the acceleration trend when the player performs the swing motion. Therefore, by processing the raw acceleration data, the terminal can calculate the change trend of the acceleration of the hand when the player performs the swing motion.
And S30, judging whether the player finishes the appointed swiping action according to the acceleration change trend.
In the motion sensing game, acceleration change trends corresponding to different types of swing motions (such as a top swing, a bottom swing, a left swing, a right swing, and the like) are preset, and the change trends are reflected by a set of set thresholds. In an actual game, a player often only needs to perform one type of swing action for a certain time period/a certain moment, so that in an actual judgment, whether the player completes a designated swing action is judged only by adopting a set threshold of the swing action matched with the current game content.
Generally, when a player performs a swiping motion, acceleration data detected by the motion sensing device will show a specific change trend, such as a change trend which is increased and then decreased. Therefore, if the acceleration of the hand of the player shows a similar trend to the acceleration of the designated swing motion, it is determined that the player has completed the designated swing motion. On the contrary, if the variation trend of the acceleration of the hand of the player is significantly different from the variation trend of the acceleration of the designated swing motion, it is obvious that the player does not complete the designated swing motion.
It can be understood that the acceleration variation trend is adopted to determine whether the player completes the designated swing action, and compared with the scheme of adopting a fixed acceleration threshold value to determine whether the player completes the swing action, the method is more suitable for determining swing actions of players of different ages and different physical qualities. In other words, by adopting the scheme, the action judgment precision can be ensured, and meanwhile, the method has higher applicability so as to be suitable for wider user groups. In addition, the acceleration change trend needs to be obtained by calculating a plurality of continuous acceleration data, so the swing action is judged by adopting the acceleration change trend, the influence of accidental data and error data on the data quality can be reduced, and the judgment precision of the swing action of the player can be improved.
And S40, if yes, executing a matched swiping instruction in the motion sensing game.
Specifically, upon determining that the player has completed the specified swipe action, then the matching swipe instruction may be executed. This may be accomplished by adding corresponding logic in the game code. For example, if there is a manipulated character in the game, when the player completes the swing action, the character may be caused to perform an attack action or swing action, etc. Of course, other contents in the game can be controlled by executing corresponding swing instructions, such as switching scenes or starting a new game level.
The swing action-based motion sensing game method can be understood as that the change trend of the acceleration of the hand of the player during the swing action is calculated through the original acceleration data collected by the motion sensing device, and whether the player completes the designated swing action is judged according to the change trend of the acceleration. Therefore, the motion sensing control of the motion sensing game can be realized only by adopting the acceleration data detected by the gravity sensor, so that the hardware requirement of the motion sensing game on the motion sensing equipment can be reduced. Further, since the swing motion determination is performed using the acceleration change tendency, it is possible to obtain high motion determination accuracy and wider applicability even from the acceleration data alone. Therefore, compared with the traditional motion sensing game method adopting gyroscope data, the motion sensing game method has the advantages of low hardware requirement of the motion sensing device, high precision, wide applicable crowd and the like.
In some embodiments, calculating the acceleration trend of the hand when the player performs the swing action according to the raw acceleration data comprises:
s21, acquiring acceleration data associated with the appointed swiping motion from the original acceleration data as associated acceleration data, wherein the associated acceleration data comprises two of x-axis acceleration data, y-axis acceleration data and z-axis acceleration data.
Specifically, the raw acceleration data acquired from the motion sensing device includes x-axis acceleration data, y-axis acceleration data, and z-axis acceleration data, where the x-axis is an acceleration axis in a horizontal direction, the y is an acceleration axis in a front-back direction, and the z-axis is an acceleration axis in a vertical direction.
Furthermore, after the motion sensing device receives the original acceleration data, the terminal screens out the associated acceleration data from the original acceleration received data according to the current swiping action of the motion sensing game. Wherein, the swing action usually causes the acceleration in two directions to change obviously: for example, the oblique downward or oblique downward swinging motion can cause the acceleration in the z-axis direction and the acceleration in the x-axis direction to be obviously changed; the forward swiping motion causes significant changes in the acceleration in the z-axis and y-axis directions. Therefore, the data of the two associated acceleration axes are screened out from the original acceleration data as the associated data, so that the data amount and the calculation amount can be reduced, and the detection accuracy can be improved.
And S22, calculating the acceleration change trend according to the associated acceleration data.
Further, the associated acceleration data is calculated according to the associated acceleration data
From the associated acceleration data, the acceleration change tendency of the hand when the player performs the swing motion can be calculated. These calculations may determine acceleration trends of the hand through analysis of x, y, and z-axis acceleration data. For example, the acceleration variation tendency of the hand can be found by calculating the maximum value, minimum value, average value, and the like of the acceleration data of x, y, and z axes; more accurate hand acceleration variation trend can also be obtained by fitting the acceleration data of x, y and z axes.
It can be understood that through the scheme, whether the player completes the appointed swiping action can be judged more accurately, and therefore the game experience is improved.
In some embodiments, calculating the acceleration trend from the associated acceleration data comprises:
and S110, determining the motion direction of the hand of the player according to the acceleration data of any axis in the related acceleration data.
Specifically, since the acceleration data has directivity, for example, when the acceleration data of the x axis is a positive number, the surface player moves in the positive direction of the x axis at this time; conversely, if the acceleration data of the x-axis is negative, the surface player moves in the negative direction of the x-axis at that time. Thus, the hand movement direction of the player can be determined quickly and accurately by simply analyzing the associated acceleration data.
In this case, since the swing motion usually causes changes in the acceleration of the two axes, the determination may be made only from the acceleration data of any one of the axes in the associated acceleration data when determining the hand movement direction of the player. It should be noted that, in order to improve the accuracy of the determination, the player's hand movement direction is generally determined by using the most significantly varying one-axis acceleration data. For example, when determining whether or not the player has performed a swing motion of a downward swing, the hand movement direction of the player is confirmed using the acceleration data of the x-axis.
S120, judging whether the hand motion direction of the player is matched with the motion direction of the appointed swiping motion.
Specifically, after the hand movement direction of the player is determined from the associated acceleration data, it is determined whether the hand movement direction of the player matches the movement direction of the designated swing motion by comparing whether the hand movement direction of the player and the movement direction of the designated swing motion arranged in advance are the same.
By the method, whether the hand movement direction of the player is matched with the movement direction of the appointed swiping motion or not can be judged quickly and accurately.
And S130, if so, calculating the acceleration change trend according to the associated acceleration data after the judgment is successful.
Specifically, the calculation of the acceleration change tendency from the associated acceleration data after the determination is successful is the next step after the determination that the hand movement direction of the player matches the movement direction of the specified swipe motion. This step requires further processing of the associated acceleration data after the time information is determined to be successful, so as to calculate the trend of the change of the acceleration of the player's hand.
It should be added that if the hand movement direction of the player does not match the movement direction of the designated swing action all the time, the terminal does not further calculate whether the player has completed the designated swing action.
It can be understood that, because the associated acceleration data after the determination is successful contains information with a smaller data size and higher quality, by adopting the above scheme, the terminal can more quickly and more accurately determine whether the player has completed the designated swing action, so as to improve the game experience of the player.
In some embodiments, calculating the acceleration change trend according to the associated acceleration data after the determination is successful includes:
and S210, grouping the related acceleration data after the judgment is successful.
Specifically, after determining that the hand motion direction of the player matches the motion direction of the specified swiping motion, the associated acceleration data may be divided into several groups by time period, such as grouping the associated acceleration data once every 100 milliseconds; or dividing the associated acceleration data into a plurality of groups according to a set number, such as dividing every 10 pieces of acceleration data into one group.
It is worth mentioning that these grouped acceleration data sets are associated with corresponding acceleration axes, for example, if the associated acceleration data includes x-axis acceleration data and z-axis acceleration data, then the x-axis acceleration data set and the z-axis acceleration data set will be obtained after grouping.
And S220, calculating an acceleration value of the corresponding acceleration axis according to the grouped associated acceleration data.
Specifically, various methods may be employed to calculate the acceleration value of the corresponding acceleration axis from the grouped associated acceleration data. For example, an average value of each data point in each set of data may be calculated, and then the average values are connected in time order to constitute an acceleration value of the corresponding acceleration axis. Another method is to use a moving average algorithm to calculate the acceleration value of the corresponding acceleration axis by calculating the average of a number of consecutive data points in each set of data. By the method, the accuracy of the acceleration value of the acceleration axis can be kept, and meanwhile, the associated acceleration data can be subjected to smoothing processing, so that the accuracy of analysis is improved.
And S230, calculating the acceleration change trend according to the acceleration value.
Specifically, the acceleration change tendency may be calculated from the acceleration value by various methods. For example, the acceleration variation trend of the corresponding acceleration axis can be deduced by calculating the variation value of each data point in each set of data. Another method is to fit the data mathematically by fitting a curve to determine the acceleration variation trend of the corresponding acceleration axis. The methods can be used for analyzing the swing action of the player and providing basis for executing corresponding swing instructions in the motion sensing game.
It can be understood that by the scheme, the data precision can be improved, whether the player completes the appointed swing action can be judged more accurately, and the game experience of the player can be improved.
In some embodiments, determining whether the player has completed the designated swing action according to the acceleration change trend includes:
s310, calculating the change rate of the acceleration value in the specified time length.
Specifically, the rate of change of the acceleration value within the specified period of time can be calculated in various ways. For example, the difference between the acceleration values corresponding to two time points may be calculated and then divided by the time difference between the two time points to find the rate of change of the acceleration value within a specified time period. The other method is to use a fitting curve method to fit the data of the acceleration values, so as to calculate the change rate of the acceleration values in the specified time length.
And S320, if the change rate is larger than a set threshold value, judging that the player completes the appointed swing action.
The set threshold is a threshold related to the acceleration rate, which is set specifically according to the current swing motion. It should be noted that, when setting the threshold, it is necessary to consider different types of swing motions in addition to the motion levels of different players and the accuracy of the motion sensing device, so as to ensure the accuracy of determination.
Specifically, when the change rates of the acceleration values of the two acceleration axes associated with the designated swing motion are both greater than the corresponding set thresholds, it is determined that the player has completed the designated swing motion. Thus, the swing motion of the player can be recognized more accurately, and the determination error can be reduced. Here, the same determination threshold may be set for the acceleration value change rates of the two acceleration axes, or different determination thresholds may be set for the acceleration value change rates of the two acceleration axes.
Through the scheme, whether the player finishes the appointed swiping action can be judged according to the acceleration change trend of the hand of the player.
It is noted that, in some embodiments, it may be determined whether the player has completed the designated swing motion based only on the rate of change of the acceleration value of one of the two acceleration axes associated with the designated swing motion.
Further, referring to fig. 3, an embodiment of the present invention provides a motion sensing game device based on a swipe motion, including:
the obtaining module 110 is configured to obtain original acceleration data from the bound motion sensing device after the motion sensing game is started;
the calculation module 120 is configured to calculate an acceleration change trend of a hand of the player during a swiping motion according to the original acceleration data;
a determining module 130, configured to determine whether the player completes a specified swiping action according to the acceleration change trend;
and the executing module 140 is configured to execute a matched swiping instruction in the motion sensing game after determining that the player completes the specified swiping action.
The steps implemented by each functional module of the motion sensing game device based on the swiping motion can refer to each embodiment of the motion sensing game method based on the swiping motion, and are not described herein again.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, which may be any one of or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer-readable storage medium includes a motion sensing game program 10 based on a swing motion, and the specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the specific embodiment of the motion sensing game method based on a swing motion and the server 1 described above, and will not be described again here.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A motion sensing game method based on a swiping motion is characterized by comprising the following steps:
after the motion sensing game is started, original acceleration data are obtained from the bound motion sensing equipment;
calculating the acceleration change trend of the hand when the player performs the swiping action according to the original acceleration data;
judging whether the player finishes the appointed swing action according to the acceleration change trend;
and if so, executing a matched swiping instruction in the motion sensing game.
2. A motion sensing game method based on a swing motion according to claim 1, wherein calculating an acceleration change tendency of a hand when a player performs a swing motion from the raw acceleration data includes:
acquiring acceleration data associated with a designated swiping action from the original acceleration data as associated acceleration data, wherein the associated acceleration data comprises two of x-axis acceleration data, y-axis acceleration data and z-axis acceleration data; and
and calculating the acceleration change trend according to the associated acceleration data.
3. The method of a swipe-action-based somatosensory game according to claim 2, wherein calculating the acceleration change trend from the associated acceleration data comprises:
determining the hand movement direction of the player according to the acceleration data of any axis in the associated acceleration data;
judging whether the hand movement direction of the player is matched with the movement direction of the appointed swiping action;
and if so, calculating the acceleration change trend according to the associated acceleration data after the judgment is successful.
4. The motion sensing game method based on a swiping motion, according to claim 3, wherein calculating the acceleration change trend according to the associated acceleration data after the determination is successful comprises:
grouping the associated acceleration data after the judgment is successful;
calculating an acceleration value of a corresponding acceleration axis according to the grouped associated acceleration data;
and calculating the acceleration change trend according to the acceleration value.
5. The motion sensing game method based on the swing motion of claim 4, wherein calculating acceleration values of corresponding acceleration axes according to the grouped associated acceleration data comprises:
and calculating the average value of each group of the grouped acceleration data to serve as the acceleration value of the corresponding acceleration axis.
6. A motion sensing game method based on a swing action according to claim 5, wherein determining whether a player has completed a designated swing action according to the acceleration change tendency comprises:
calculating the change rate of the acceleration value in a specified time length;
and if the change rate is larger than a set threshold value, judging that the player completes the appointed swing action.
7. A motion sensing game method based on a swing action according to claim 6, wherein determining that the player has completed the designated swing action if the rate of change is greater than a set threshold value comprises:
when the change rates of the acceleration values of the two acceleration axes associated with the designated swing action are both greater than the corresponding set threshold values, it is determined that the player has completed the designated swing action.
8. A motion sensing game device based on a swiping motion, comprising:
the acquisition module is used for acquiring original acceleration data from the bound motion sensing equipment after the motion sensing game is started;
the calculation module is used for calculating the acceleration change trend of the hand when the player performs the swiping action according to the original acceleration data;
the judging module is used for judging whether the player finishes the appointed swiping action according to the acceleration change trend;
and the execution module is used for executing a matched swiping instruction in the motion sensing game after judging that the player completes the appointed swiping action.
9. A motion sensing game device based on a swiping motion, comprising a memory, a processor and a motion sensing game program based on the swiping motion, wherein the motion sensing game program based on the swiping motion is stored in the memory and can run on the processor, and when the processor executes the motion sensing game program based on the swiping motion, the motion sensing game method based on the swiping motion is realized according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a swipe motion-based somatosensory game program which, when executed by a processor, implements a swipe motion-based somatosensory game method according to any one of claims 1-7.
CN202211632304.0A 2022-12-19 2022-12-19 Motion sensing game method based on swiping action Pending CN115845356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211632304.0A CN115845356A (en) 2022-12-19 2022-12-19 Motion sensing game method based on swiping action

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211632304.0A CN115845356A (en) 2022-12-19 2022-12-19 Motion sensing game method based on swiping action

Publications (1)

Publication Number Publication Date
CN115845356A true CN115845356A (en) 2023-03-28

Family

ID=85674111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211632304.0A Pending CN115845356A (en) 2022-12-19 2022-12-19 Motion sensing game method based on swiping action

Country Status (1)

Country Link
CN (1) CN115845356A (en)

Similar Documents

Publication Publication Date Title
US11235241B2 (en) Route navigation system within a game application environment
US9044672B2 (en) Game system, game apparatus, storage medium and game controlling method
CN114949839A (en) Swimming posture-based motion sensing game method
CN116196611A (en) Somatosensory game method based on waving action
CN115845356A (en) Motion sensing game method based on swiping action
CN115531867A (en) Operation method of running somatosensory game
CN116251343A (en) Somatosensory game method based on throwing action
CN115869611A (en) Somatosensory game method based on climbing action
CN114904258A (en) Motion sensing game method based on translation motion
CN116173491A (en) Rhythmic motion sensing game method, device, equipment and computer readable storage medium
CN115337627A (en) Boxing motion sensing game method and device and computer readable storage medium
CN116271785A (en) Somatosensory game method based on slapping action
CN116173492A (en) Motion sensing game method based on boxing motion
CN117991901A (en) Motion-based somatosensory game method
CN115445201A (en) Skating motion sensing game method and device and computer readable storage medium
CN117138325A (en) Motion sensing rope skipping game method based on function fitting
CN115253270A (en) Table tennis ball feeling game method
CN115414669A (en) Motion sensing game method and device based on running posture and computer readable storage medium
CN117018594A (en) Somatosensory game method based on apple watch
CN115657786A (en) Operation method of flying somatosensory game
CN115554696A (en) Operation method of skiing somatosensory game
CN115970261A (en) Motion sensing game method based on jumping motion
CN117180744A (en) Game operation method based on bar-shaped somatosensory controller
CN114926908A (en) Motion sensing game method based on baton swinging gesture
CN116196626A (en) Somatosensory game method based on pushing action

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