WO2023061381A1 - 暂停游戏的方法及电子设备 - Google Patents

暂停游戏的方法及电子设备 Download PDF

Info

Publication number
WO2023061381A1
WO2023061381A1 PCT/CN2022/124714 CN2022124714W WO2023061381A1 WO 2023061381 A1 WO2023061381 A1 WO 2023061381A1 CN 2022124714 W CN2022124714 W CN 2022124714W WO 2023061381 A1 WO2023061381 A1 WO 2023061381A1
Authority
WO
WIPO (PCT)
Prior art keywords
game
user
user operation
pause
electronic device
Prior art date
Application number
PCT/CN2022/124714
Other languages
English (en)
French (fr)
Inventor
姜永航
黄磊
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023061381A1 publication Critical patent/WO2023061381A1/zh

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/49Saving the game status; Pausing or ending the game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/54Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F9/00Games not otherwise provided for
    • A63F9/24Electric games; Games using electronic circuits not otherwise provided for

Definitions

  • the present application relates to the field of computer technology, in particular to a method for pausing a game and an electronic device.
  • the user can input a user operation, and when the electronic device recognizes that the user operation is a preset user operation for pausing the game, the game can be suspended, but it takes a certain time to recognize the user operation Yes, during this process, the user generally will not play the game normally, and adverse game events may occur, resulting in a loss of control of the game.
  • a user uses a smart screen to play a somatosensory game
  • he can make a specific gesture to pause the game.
  • the smart screen recognizes that the user maintains the specific gesture within 3 seconds, it is determined that the user wants to pause the game. It takes at least 3 seconds from the gesture to the smart screen recognizing that the user wants to pause the game. During these 3 seconds, the user will not perform game operations, and adverse events such as deviation from the normal travel route and death may occur.
  • the user experience is not good.
  • the embodiment of the present application discloses a method for pausing a game and an electronic device, which can avoid the problem that the game is out of control when the user pauses the game, and ensure the normal progress of the game.
  • the embodiment of the present application provides a method for pausing a game, which is applied to an electronic device.
  • the method includes: receiving a first user operation by a first user when running a game; When pausing the game, returning to the first game point to suspend the game, the first game point is the starting game point according to the first user operation received from the first user, the receiving the second game point determined by one or more of a cut-off game point for a user's first user action and a game point at which a game event occurs during said first user action is received, said first game point being earlier than The cutoff game point.
  • the electronic device determines that the received first user operation is to suspend the game
  • it can be understood that when it recognizes that the user intends to suspend the game, it will fall back to the earlier first game point to suspend the game, so as to avoid receiving When the game is out of control during the operation of the first user, for example, an adverse game event occurs, the normal progress of the game is guaranteed.
  • the first user operation includes a second user operation and a third user operation
  • the receiving the first user operation of the first user includes: receiving the second user operation; In response to the second user operation, identifying whether the first user intends to pause the game; receiving the third user operation; based on the second user operation and the third user operation, identifying the The first user intends to pause the game.
  • the receiving the second user operation includes: receiving the first gesture at the second game point; the receiving the third user operation includes: The first gesture is received within a time period, and the time interval between the second game point and the cut-off game point is the preset recognition time period.
  • the second user operation is a second gesture
  • the third user operation is a third gesture
  • the gesture composed of the second gesture and the third gesture is used to pause the game.
  • the second user operation is a first voice input
  • the third user operation is a second voice input
  • the voice input composed of the first voice input and the second voice input Used to pause the game in question.
  • the second user operation is a movement gesture
  • the degree of change of the second user operation is greater than or equal to a preset change threshold
  • the third user operation includes the user acting on the first key. operate.
  • the first user operation for pausing the game may be gestures, voice input, motion gestures and operation buttons, which can meet the needs of various scenarios and have a wide range of application scenarios.
  • the first game point is earlier than the starting game point, or the first game point is the starting game point.
  • the first game point to fall back can be preset as the initial game point that receives the first user operation or earlier, without the complicated process of determining the first game point, it can avoid receiving the first user operation Product availability is higher during situations where the game gets out of hand.
  • the stepping back to the first game point to suspend the game includes: if a game event occurs during the first user operation received from the first user, returning to the first game point A game point to suspend the game; the method further includes: when determining that the first user operation is used to suspend the game, if no game event occurs during the receiving of the first user operation from the first user, at the The cut-off game point pauses the game.
  • the game when no game event occurs during the first user operation, the game may not be rolled back, but the game is only paused; when a game event occurs during the first user operation, the game is paused and the game is rolled back, that is, In other words, if there is no loss caused by receiving the first user operation, it can also be understood that when there is no loss caused by identifying the user's intention, the game may not be rolled back, reducing unnecessary rollback processes, thereby reducing the use of processing resources and improving user experience. better.
  • the first game point is determined according to the game point at which a game event occurs during the first user operation received from the first user, and the first game point is earlier than the third game point.
  • the first game point that is rolled back may be earlier than the game point at which the first preset event occurs, so as to avoid receiving the first preset event that occurs during the first user operation, thereby preventing the first preset event from causing the game
  • more targeted rollbacks can further ensure the normal progress of the game.
  • the first preset event is a game event that occurs earliest during the period of receiving the first user operation from the first user.
  • the first game point that is rolled back may be earlier than the game point that received the earliest game event during the first user operation, so as to avoid receiving any game event that occurred during the first user operation, and further ensure the stability of the game. Work properly.
  • the time interval between the first game point and the fourth game point is greater than or equal to a preset time interval
  • the fourth game point is the first game point and the cut-off game point The game point between the earliest game events.
  • the first game point to roll back can be earlier than the fourth game point by at least a preset time interval, so as to avoid the next game event being too close to the user after the rollback game, and the user cannot effectively operate to complete the game event, ensuring that the user can normally Play games to further enhance the user experience.
  • the method further includes: when a second preset event is triggered during the receiving of the first user operation by the first user, suspending the game.
  • the running game ends, for example, the second preset event is the death of the game character.
  • the game when the second preset event is detected to occur during the first user operation, the game can be paused first, so as to avoid the second preset event causing the game to be seriously affected, for example, the death of the game character causes the game to end directly In order to further ensure the normal progress of the game.
  • the game is a multiplayer game
  • the method further includes: during receiving the first user operation of the first user, receiving a fourth user operation of the second user, the A fourth user action is to pause the game.
  • the game is a multiplayer game
  • the method further includes: receiving a fifth user operation by the first user; In response to the fifth user operation, resume running the game; after resuming running the game, play the game process of the second user between the first game point and the fifth game point;
  • the sixth user operation of the second user is received during the first user operation of a user
  • the fifth game point is the starting game point for receiving the sixth user operation of the second user, so
  • the sixth user operation is used to trigger the electronic device to identify whether the second user intends to suspend the game;
  • the fifth game point is the cut-off game point.
  • the second user can play the game normally while receiving the operation of the first user, and after the game is resumed, the process of the second user's normal game play can be replayed to avoid repeated operations by the second user and improve user experience.
  • the embodiment of the present application provides an electronic device, including a transceiver, a processor, and a memory, the memory is used to store a computer program, and the processor invokes the computer program to execute the first aspect of the embodiment of the present application , and the method for pausing the game provided by any one of the implementation manners of the first aspect.
  • the embodiment of the present application provides a computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by a processor, the first aspect of the embodiment of the present application and any one of the first aspect can be realized.
  • an embodiment of the present application provides a computer program product, which, when running on an electronic device, causes the electronic device to execute the first aspect of the embodiment of the present application, and any implementation of the first aspect The method provided by method to pause the game.
  • the embodiments of the present application provide an electronic device, and the electronic device includes executing the method or apparatus introduced in any embodiment of the present application.
  • the aforementioned electronic device is, for example, a chip.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application
  • Fig. 2-Fig. 5 are schematic diagrams of some user interface embodiments provided by the embodiments of the present application.
  • FIGS 6-8 are schematic flowcharts of some methods for pausing the game provided by the embodiments of the present application.
  • Figure 9 Figure 10A and Figure 10B are schematic diagrams of the progress of some games provided by the embodiments of the present application.
  • Fig. 11 is a schematic flowchart of another method for pausing a game provided by the embodiment of the present application.
  • the electronic device in the embodiment of the present application is a device that can play somatosensory games, such as user terminal devices such as mobile phones, tablet computers, handheld computers, and personal digital assistants (Personal Digital Assistant, PDA), and smart home devices such as smart TVs and smart cameras.
  • user terminal devices such as mobile phones, tablet computers, handheld computers, and personal digital assistants (Personal Digital Assistant, PDA)
  • smart home devices such as smart TVs and smart cameras.
  • Devices, wearable devices such as smart bracelets, smart watches, smart glasses, and other devices such as desktop computers, laptop computers, notebook computers, ultra-mobile personal computers (Ultra-mobile Personal Computer, UMPC), netbooks, etc.
  • Game consoles such as somatosensory game consoles, and devices such as smart screens.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110 , a memory 120 , a transceiver 130 , a display screen 140 and a perception module 150 .
  • the processor 110 may be one or more central processing units (central processing unit, CPU).
  • the processor 110 may be a single-core CPU or a multi-core CPU.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor (modem), a graphics processor (graphics processing unit, GPU), image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • different processing units may be independent devices, or may be integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the memory 120 may be used to store computer-executable program codes including instructions.
  • the processor 110 can execute various functional applications and data processing of the electronic device 100 by executing instructions stored in the memory 120 .
  • the memory 120 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • Memory 120 includes, for example but not limited to, random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or Portable read-only memory (compact disc read-only memory, CD-ROM).
  • the transceiver 130 is used to receive and/or transmit data. In some embodiments, transceiver 130 is used to communicate with other devices via wireless communication techniques.
  • Wireless communication technologies may include but are not limited to global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), new wireless access (new radio, NR), wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS) , frequency modulation (frequency modulation, FM), short-range wireless communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple
  • GNSS can include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi-zenith) satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the display screen 140 is used for displaying images, videos and the like.
  • the display screen 140 includes a display panel, and the display panel may include a non-self-luminous screen and a self-luminous screen.
  • the non-self-illuminating screen may be a liquid crystal display (LCD).
  • Self-luminous screens can be organic light-emitting diodes (organic light-emitting diode, OLED), active matrix organic light-emitting diodes or active-matrix organic light emitting diodes (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diodes (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include one or more display screens 140 .
  • the electronic device 100 may implement a display function through a GPU, a display screen 140, and an AP.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 140 and the AP. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 140 can be integrated inside the electronic device 100 . In other embodiments, the display screen 140 can be separately installed or connected to the electronic device 100.
  • the electronic device 100 is a somatosensory game machine
  • the display screen 140 is a somatosensory game machine through a wired method (such as a universal serial bus (universal serial bus, USB)) connected Smart TV's display.
  • a wired method such as a universal serial bus (universal serial bus, USB)
  • the perception module 150 may be used to acquire user data, such as user voice data, user image data, touch operations, and user gestures (such as gestures).
  • user data such as user voice data, user image data, touch operations, and user gestures (such as gestures).
  • the perception module 150 can include an audio module, and the electronic device 100 can implement audio functions through the audio module (optionally and AP, etc.), such as audio playback, recording and other functions, and the recording function can be used to obtain the user's voice Data (may also be referred to as sound signal).
  • the audio module may be set in the processor 110 , or some functional modules of the audio module may be set in the processor 110 .
  • the audio module can be used to convert digital audio information into an analog audio signal for output.
  • the audio module can include a speaker, which is also called a "speaker", and is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can pass Speakers for music, hands-free calls, and more.
  • the audio module can also be used to convert the analog audio input into a digital audio signal.
  • the audio module can include a microphone, which is also called “microphone” or “microphone”, and is used to convert the sound signal into an electrical signal, that is, It is said that the microphone can be used to collect the user's voice signal, such as when making a call, sending a voice message, or recording, the user can pass the human mouth close to the microphone to make a sound, and input the voice signal to the microphone.
  • the electronic device 100 may be provided with one or more microphones, which not only collect sound signals, but also realize noise reduction, sound source identification, directional recording, and the like.
  • the audio module can also be used to encode and decode audio signals.
  • the sensing module 150 may include a camera, and the electronic device may implement a shooting function through the camera (optionally, ISP, GPU, display screen, AP, etc.), and the shooting function may be used to obtain the user's image data, and the user's Image data can be used to capture user gestures.
  • the ISP is used to process the data fed back by the camera. For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also optimize the algorithm for image noise and brightness.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • ISP can be set in the camera.
  • a camera is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras, where N is a positive integer greater than 1.
  • the perception module 150 may include one or more sensors, and the electronic device may acquire a user's touch operation and user gesture through one or more sensors.
  • the sensing module 150 may include a touch sensor, which is also called a "touch device”. Screen".
  • the touch sensor is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the AP to determine the type of the touch event.
  • Visual output related to the touch operation can be provided through the display screen 140 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 140 .
  • the sensing module 150 may include a proximity light sensor, which may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 may detect motion gestures such as user's gesture operation through the proximity light sensor.
  • the perception module 150 may include a gyroscope sensor, which may be used to determine the movement posture of the electronic device 100, and the movement posture of the electronic device 100 may be used to determine the user posture, so as to realize the function of the somatosensory game.
  • the angular velocity of the electronic device 100 around three axes ie, x, y and z axes
  • the gyro sensor can be used for image stabilization.
  • the gyro sensor detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • Gyroscope sensors can also be used in scenarios such as navigation.
  • the sensing module 150 may also include wearable devices such as smart bracelets, millimeter wave radar, etc., and the specific type of the sensing module 150 is not limited in this application.
  • the sensing module 150 may be integrated inside the electronic device 100, for example, the electronic device 100 is a smart TV, and the sensing module 150 is a microphone set on the smart TV for acquiring voice data of the user.
  • the sensing module 150 can be installed separately or connected to the electronic device 100, for example, the electronic device 100 is the host of a somatosensory game machine, and the sensing module 150 is a handle of the somatosensory game machine, on which one or more The sensor is used to detect motion gestures such as user gestures.
  • the electronic device 100 is a smart screen, and the perception module 150 is a smart camera connected to the smart screen through Bluetooth, for acquiring image data of the user.
  • the sensing module 150 can send it to the processor 110, and the processor 110 can identify the user's intention based on the user's data, such as pausing the game, shutting down the computer, and the like.
  • FIG. 1 the schematic structural diagram of the electronic device shown in FIG. 1 is only an exemplary implementation in the embodiment of the present application.
  • the electronic device in the embodiment of the present application includes but is not limited to the above structure.
  • the modules of the above example can be based on Additions or deletions are actually required, and FIG. 1 should not be construed as limiting the embodiment of the present application.
  • the processor 110 in the electronic device 100 may be configured to read computer program codes stored in the memory 120, and execute the processes shown in FIG. 6-FIG. 8 and FIG. 11 .
  • the user interface embodiments involved in the embodiments of the present application are exemplarily introduced.
  • the following embodiments only show the display screen 140 of the electronic device 100, the display screen 140 is used to display the user interface of the somatosensory game, and the sensing module 150 for obtaining user data is not shown. It can be understood that the sensing module 150 can be used with the display
  • the screen 140 is integrated together, and can also be installed or connected separately, which is not limited in this application.
  • FIG. 2 exemplarily shows a schematic diagram of a user interface.
  • a of FIG. 2 shows the user interface before the user makes the pause gesture
  • FIG. 2(B) shows the user interface after the user makes the pause gesture.
  • the electronic device 100 can display a user interface 200 of a somatosensory game, the user interface 200 can include a first area 210 and a second area 220, and the first area 210 can be used to display actions to be performed, The second area 220 can be used to display the user's current action.
  • the user can obtain the action to be performed through the first area 210 and execute the action.
  • the electronic device 100 can acquire the user's gesture through the sensing module 150 (for example, through the camera to acquire the user's gesture). image data), and display the acquired posture data in the second area 220 after processing.
  • the first area 210 may include a schematic model 210A, an operation name 210B, an operation sequence 210C and a game duration 210D, wherein: the schematic model 210A may be a dynamic avatar for performing the operation name 210B
  • the user can obtain the specific execution method of "bending the arm” through the schematic model 210A, and it can also be understood as the movement mode of various parts of the body.
  • the operation sequence 210C is used to characterize the execution of "bending the arm”. For example, the operation sequence 210C is "5/10", which means that the action of "bending the arm” needs to be performed 10 times in total, and the current schematic model 210A has been performed 5 times.
  • the game duration 210D is used to represent the effective duration of the user's game, which is the duration for the user to perform the actions shown in the first area 210, excluding the duration of the game being in a paused state, that is, the somatosensory game continues normally , the game duration 210D will increase, and when the somatosensory game is in a paused state, the game duration 210D remains unchanged.
  • the second area 220 can include a user model 220A, an operation level 220B and a game score 220C, wherein: the user model 220A can be used to characterize the user's motion posture, and the electronic device 100 can pass through the perception module 150 Obtain user gestures (for example, acquire image data of the user through a camera), and convert the acquired gesture data into motion gestures of the user model 220A.
  • the user model 220A can be used to characterize the user's motion posture
  • the electronic device 100 can pass through the perception module 150
  • Obtain user gestures for example, acquire image data of the user through a camera
  • the operation level 220B is used to represent the matching degree of the action currently performed by the user and the action indicated by the first area 210, for example, the degree of similarity between the schematic model 210A of the first area 210 and the user model 220A, and the game score 220C is used to indicate that the user performs a somatosensory game get the score.
  • the operation level 220B may be "Miss", and the game score 220C will not increase at this time, and the matching degree is greater than 0 and less than or equal to the matching threshold, the operation level 220B can be "standard (Good)", the game score 220C can be increased by 20, and when the matching degree is greater than the matching threshold, the operation level 220B can be "perfect (Perfect) ", the game score 220C can be increased by 30.
  • a pause gesture such as crossing his hands in front of his chest.
  • the electronic device 100 detects through the sensing module 150 that the user has performed a preset pause gesture (for example, the similarity between the gesture recognized from the user's image data and the pause gesture is greater than or equal to the preset similarity threshold), it can be identified in the preset Continue to recognize whether the user maintains the pause gesture within the duration.
  • the electronic device 100 can determine that the user intends to pause the game, so the game can be paused.
  • An example of the recognition process is shown in (B) of FIG. 2 below. .
  • the user model 220A can represent that the user is currently performing a pause gesture, and the electronic device 100 will still judge the matching degree between the action currently performed by the user and the action indicated in the first area 210, but since the user is currently performing A pause gesture is performed, so the degree of match is 0, and the operation level 220B may be "Miss".
  • the game duration 210D shown in (A) of FIG. 2 the game duration 210D shown in (B) of FIG. 2 has increased by 2 (seconds).
  • a prompt box 230 is newly added to the user interface 200 shown in (B) of FIG. It includes a prompt 230A (such as "recognizing"), a schematic diagram of a pause gesture 230B, and a progress bar 230C.
  • the progress bar 230C can represent the progress of recognizing the pause gesture. The more black parts, the more the progress, and the longer the time for recognizing the pause gesture.
  • the duration of recognizing the pause gesture is 2 seconds increased by the above-mentioned game duration 210D (compared to the start of detecting the pause gesture in FIG. 2 ).
  • the game duration of (A) is 210D).
  • the electronic device 100 determines that the user maintains the pause gesture within the preset recognition time (that is, 3 seconds), the electronic device 100 can determine that the user intends to pause the game, which can be understood as a successful pause operation recognition, so the game can be paused, and the progress bar 230C can be fully becomes black, as shown in Figure 3 and Figure 4 below for specific examples.
  • the electronic device 100 can determine that the user intends to suspend the game after recognizing that the user maintains the pause gesture for a preset period of time, so the game can be suspended directly.
  • a specific example is shown in FIG. 3 below.
  • FIG. 3 exemplarily shows a schematic diagram of another user interface.
  • the progress bar 230C is all black, and the prompt 230A becomes "recognition successful" and includes "pause", which can represent The pause gesture is recognized successfully, and the game is currently paused.
  • the user interface 200 does not include the operation level 220B.
  • the game duration 210D shown in (B) of FIG. 2 has increased by 1 (second), compared to the operation sequence 210C shown in FIG. 2 (B), the The operation sequence 210C changes to "7/10", which can represent that the schematic model 210A has performed another operation of "bending the arm" within 1 second.
  • the duration of recognizing the pause gesture is 3 seconds added to the above game duration 210D (compared to the game duration 210D in (A) of FIG. 2 when the pause gesture is first detected). Since the game has been paused, the first area 210 remains unchanged until the user unpauses it.
  • the above-mentioned electronic device 100 detects that the user performs a preset pause gesture, which can be understood as the electronic device 100 starts to recognize the pause operation, and the electronic device 100 recognizes that the user keeps the pause gesture unchanged within the preset recognition time, which can be understood as the electronic device 100 Suspend operation was successfully identified.
  • This application provides a method for pausing the game, which can pause the game and roll back the game to an earlier scene, such as when the electronic device starts to recognize the pause operation or earlier, to avoid adverse game events that occur when the pause operation is recognized , to ensure the normal progress of the game, a specific example is shown in Figure 4 below.
  • FIG. 4 exemplarily shows a schematic diagram of another user interface.
  • the electronic device 100 determines that the user maintains the pause gesture within the preset recognition time, and can determine that the user intends to pause the game, so it can fall back to the moment when it is detected that the user has performed the preset pause gesture, and pause the game, That is, return to the game scene shown in (A) of FIG. 2 and pause the game, so the user interface 200 shown in FIG. 4 is similar to the user interface 200 shown in (A) of FIG. 2 , the difference is that:
  • the user interface 200 shown also includes a prompt box 230, which is consistent with the prompt box 230 shown in FIG. 3, which can indicate that the pause gesture recognition is successful, and the game has been paused currently.
  • the electronic device 100 may pause the game and return the game to an earlier scene when the pause operation is recognized successfully, as shown in FIG. 4 for example.
  • the electronic device 100 may only pause the game without returning when the pause operation is recognized successfully, such as the scenario shown in FIG. 3 . That is to say, if there is no loss due to the recognition of the pause operation (for example, no game event occurs), the game may not be rolled back, reducing unnecessary rollback processes, thereby reducing the use of processing resources and improving user experience.
  • the earlier scene of the rollback may be the game scene before the earliest game event occurs during the process of identifying the pause operation.
  • the earlier scene of the above-mentioned rollback may be the game scene before the occurrence of the game event that satisfies the preset condition among the game events that occur during the identification of the pause operation.
  • the preset condition is, for example, a preset major adverse event, Or other game events whose risk level is less than a major adverse event.
  • the electronic device 100 detects a trigger game event when it recognizes the pause operation (optionally, the trigger is imminent, such as executing the game event in the next second), when the game event is a preset major adverse event , the game can be paused first, and the pause operation can be recognized at the same time.
  • a trigger game event when it recognizes the pause operation (optionally, the trigger is imminent, such as executing the game event in the next second)
  • the game event is a preset major adverse event
  • the game can be paused first, and the pause operation can be recognized at the same time.
  • Figure 5 The specific example is shown in Figure 5 below.
  • FIG. 5 exemplarily shows a schematic diagram of another user interface.
  • the electronic device 100 After detecting that the user has performed a preset pause gesture, the electronic device 100 will recognize the pause gesture within a preset recognition time period, and will detect whether a game event is triggered at the same time. If a preset major adverse event (such as a game event with a risk level greater than or equal to the risk threshold, a game event in the preset event list) is detected within the preset recognition time period, for example, it is indicated that the model 210A will execute the sixth " If you bend your arm", the electronic device 100 can suspend the game before the major adverse event occurs, for example, the user interface 200 shown in FIG. 5 can be displayed, that is, the electronic device 100 will pause the game before the major adverse event occurs And will continue to recognize the pause gesture.
  • a preset major adverse event such as a game event with a risk level greater than or equal to the risk threshold, a game event in the preset event list
  • the electronic device 100 determines that the user keeps the pause gesture unchanged within the preset recognition time, it can be determined that the user intends to pause the game, so the pause state of the game can be kept unchanged, so that after the user cancels the pause of the game, the game can be played normally, avoiding the recognition of the pause operation leading to material adverse events.
  • the electronic device 100 recognizes that the user's action has changed to an action other than the pause gesture within the preset recognition time period, the pause of the game can be canceled.
  • the display of the prompt box 230 can be canceled, and the above-mentioned triggered game events are executed, for example, the schematic model 210A executes For the 6th "bending arm” action, the game duration 210D will increase normally, the operation sequence 210C can be changed to "6/10", the second area 220 can display the operation level 220B, and the game score 220C may also change, for example When the operation level 220B is "Miss", the game score 220C remains unchanged, or when the operation level 220B is "Good”, the game score 220C becomes "120".
  • d is, for example, greater than 1, such as the preset length of time required to perform operations normally to avoid a major adverse event , and for example, start to recognize the moment of pausing the operation or before, which can avoid the situation that the user cannot effectively operate because the major adverse event triggered is too close after the user unpauses the game.
  • the electronic device 100 detects a triggering game event when it recognizes the pause operation, when the game event is not a preset major adverse event, it can continue to recognize the pause operation and play the game normally (that is, execute the game normally. event), such as the scene of recognizing the pause gesture shown in (B) of FIG.
  • the major adverse event may be an event such as the death of a game character that leads to the termination of the game). Understandably, when the electronic device determines that a major adverse event is triggered, the game may be suspended first, and at the same time, the suspension operation may be recognized. When the pause operation is recognized successfully, keep the pause state of the game unchanged; when the pause operation fails to be recognized, the major adverse event will be executed normally. In this way, problems that seriously affect the progress of the game, such as a major adverse event triggered during the process of identifying the pause operation and the game ends directly, can be avoided, and the normal progress of the game can be further ensured.
  • the electronic device when the electronic device recognizes that the user's action has changed to an action other than the pause gesture within the preset recognition time, it can also be understood that the pause gesture recognition fails, the electronic device can first Keep the paused state of the game, and display a prompt message to remind the user that the pause gesture recognition fails.
  • the electronic device when it determines that the user intends to pause the game, it may roll back the game to before the start of recognizing the pause operation, for example, the game scene where the game duration 210D is "00:08", and The game can be rolled back to after the start of recognizing the pause operation and before the pause operation is recognized successfully, that is, during the process of recognizing the pause operation, for example, to roll back to a scene that is d seconds earlier than the time when the game event occurs, where d is greater than 0. It can be understood that in the game scene after the game is rolled back, the user can continue the game normally after the user unpauses the game, so as to avoid unfavorable events caused by the recognition of the pause operation.
  • the pause gesture can also be replaced by a gesture for triggering menu display, and the electronic device determines that the user keeps the gesture unchanged within a preset recognition time period, and can determine that the user intends to view the menu, so The menu may be displayed, including a pause option.
  • the electronic device may receive a user operation (such as a gesture) for the pause option, and in response to the user operation, the game is paused.
  • the user can make multiple gestures in order to pause the game. For example, the electronic device starts to recognize the pause operation as the first of the multiple gestures recognized. gestures, the electronic device successfully recognizes the pause operation as the last gesture among the multiple gestures.
  • the user can also pause the game through hardware devices such as handles and remote controls. For example, the electronic device starts to recognize the pause operation. If the movement posture of the user changes greatly, the electronic device successfully recognizes the pause operation as receiving a touch operation acting on a specific button. Take the controller to pause the game. In some other embodiments, the user can also pause the game through voice.
  • the electronic device starts to recognize the pause operation as detecting the user's voice input, and the electronic device successfully recognizes the pause operation as recognizing that the user's voice input includes "pause (pause). )" and other keywords used to pause the game.
  • This application does not limit the specific user operation of pausing the game.
  • This application does not limit the specific game mode of the somatosensory game, this application does not limit the value of the preset recognition time, and this application does not limit the user interface displayed when the recognition pause operation and the game are paused.
  • the method for pausing the game provided by the embodiment of the present application is introduced as an example, and the method can be applied to the electronic device 100 shown in FIG. 1 .
  • FIG. 6 is a schematic flowchart of a method for pausing a game provided by an embodiment of the present application.
  • the method may include, but is not limited to, the following steps:
  • S101 The electronic device caches game data.
  • game data includes, but is not limited to, user operations, game events, game duration, game progress, game scores, character life (such as remaining blood), scene data (such as background, obstacles, props, etc.) and the like.
  • the electronic device may cache the game data of the last n seconds since starting the game, where n is greater than 0. For example, when the duration of the cached data is greater than or equal to n seconds, the earliest 1-second game data in the cached game data can be deleted, and the latest 1-second game data at the current moment can be cached. The cached game data can be used to roll back the game.
  • n is greater than or equal to t
  • t is the time required to identify the pause operation in the embodiments shown in Figures 1-5 above, that is, from the start of identifying the pause operation to the pause operation
  • the time elapsed for successful recognition that is, the elapsed time elapsed from the electronic device confirming that the first trigger condition is met to confirming that the suspending condition is met, so that when the electronic device rolls back the game, it can roll back to the moment when the recognition pause operation starts or before.
  • the electronic device may continuously cache game data from the start of the game.
  • S102 The electronic device determines that a first trigger condition is met.
  • S103 The electronic device judges whether a suspension condition is met.
  • S102 and S103 can be understood as the process of the electronic device identifying the user's intention, specifically to determine whether the user intends to suspend the game, and S102 can be understood as the electronic device begins to recognize the pause operation, which can correspond to the initial moment of the process of recognizing the pause operation , S103 can be understood as the electronic device obtains the result of identifying the suspending operation. If the suspending condition is met, the result is that the suspending operation is successfully identified. If the suspending condition is not met, the result is that the suspending operation fails to be identified, which can correspond to the termination time of the identifying suspending operation.
  • the electronic device determines that the first trigger condition is satisfied is the start of the recognition pause operation in the embodiments shown in FIGS. 2-5 above, for example, the electronic device 100 detects that the user performs a preset pause gesture.
  • the determination by the electronic device that the pause condition is met is the successful recognition of the pause operation in the embodiments shown in FIGS.
  • the electronic device determines that the first trigger condition is met, it will continue to judge whether the suspension condition is met.
  • the suspension condition it can be determined that the user intends to suspend the game, and the game can be suspended and rolled back.
  • S104 is executed. , the game can be played normally and the game data will continue to be cached.
  • the pause condition may include that the user maintains the pause gesture within a preset recognition time period.
  • the electronic device can obtain user images in real time, and identify whether each frame of user images includes a pause gesture. When there is a frame of user images that includes a pause gesture (user images before this frame do not include a pause gesture), it can be determined When the first trigger condition is met, when each frame within the preset recognition duration after this frame includes a pause gesture, it can be determined that the pause condition is satisfied; otherwise, the pause condition is not satisfied. For example, in this case, the user is pausing the game with a gesture.
  • the first trigger condition includes that the change degree of the user's motion posture is greater than or equal to a preset change threshold
  • the pause condition may include receiving a user operation for a pause option.
  • the change degree of the user's motion posture is: the change degree of the current motion posture compared with the motion posture before k seconds, where k is greater than or equal to 0, for example, the electronic device can acquire the user image in real time, and judge the adjacent frame The degree of similarity between user images, when the degree of similarity is greater than or equal to a preset similarity threshold, it may be determined that the first trigger condition is met.
  • the degree of change of the motion posture is: the degree of change of the current motion posture compared with the action performed by the somatosensory game instruction.
  • the electronic device can acquire the user image in real time, and judge the user image of each frame and the motion sense game instruction.
  • the degree of similarity of actions when the degree of similarity is greater than or equal to a preset similarity threshold, it may be determined that the first trigger condition is met.
  • the pause option is a physical button on a hardware device such as a handle or a remote control. In this case, the user pauses the game through a hardware device such as a handle or a remote control. For example, when the user moves a lot, the electronic device determines that the first trigger condition is met, and when the button for pausing the game on the handle is pressed, it determines that the pause condition is met.
  • the first trigger condition includes detecting the user's voice input
  • the pause condition may include recognizing that the user's voice input includes keywords such as "pause” and "pause” for pausing the game.
  • the electronic device presets the keyword used to suspend the game as "pause”.
  • the keyword for pausing the game is not clear or known, it may try to make the voice "pause” and "pause” multiple times.
  • the electronic device detects that the voice input by the user includes "pause”, it determines that the pause condition is met. For example, in this case, the user pauses the game by voice.
  • the first trigger condition may also include recognition of a gesture used to trigger menu display, and when the electronic device determines that the user keeps the gesture unchanged within a preset recognition time period, it may determine that the user The intent is to view the menu, so it can be displayed, which includes a virtual key:pause option.
  • the electronic device may receive a user operation (such as a gesture, a voice, etc.) for the pause option, and at this time, the electronic device may determine that the pause condition is met, and thus the game may be paused.
  • the present application does not limit the specific method for identifying whether the user intends to suspend the game, but it should be noted that, from the electronic device starting to identify the suspending operation (that is, determining that the first trigger condition is met) to successfully identifying the suspending operation (that is, determining that the suspending condition is met), It takes a certain period of time, that is, it takes a certain period of time to identify the pause operation, and the period of time is t in S101.
  • S104 The electronic device suspends the game and rolls back the game.
  • the game when the electronic device recognizes that the user intends to suspend the game, the game may be returned to an earlier game scene and the game may be suspended.
  • the earlier game scene is the scene h seconds before the moment when the electronic device successfully recognizes the pause operation, and h is greater than 0.
  • the game data cached by the electronic device is the game data of the last n seconds, and n is greater than or equal to h, the electronic device can use the cached game data to display earlier game scenes.
  • the electronic device when the game is suspended, the electronic device may not cache the game data, and after the game is unpaused, the electronic device may continue to cache the game data for the next rollback of the game.
  • h is equal to the time length t required to recognize the pause operation, that is, back to the moment when the electronic device starts to recognize the pause operation, in other embodiments, h is greater than the time length t required to recognize the pause operation, that is, to return to Step back before the electronic device begins to recognize the paused action.
  • the application can roll back the game when the game is suspended, so as to avoid the situation that the game is out of control when the pause operation is recognized, such as the occurrence of adverse game events.
  • the game can be paused and rolled back when the pause condition is met (the pause operation is recognized successfully). If the game event is not detected during the process, the game can only be paused when the pause condition is met (the pause operation is recognized successfully). Rollback the game, reduce unnecessary rollback process, thereby reducing the use of processing resources, and the user experience is better.
  • FIG. 7 is a schematic flowchart of another method for pausing a game provided by an embodiment of the present application.
  • the method may include, but is not limited to, the following steps:
  • S201 The electronic device caches game data.
  • S202 The electronic device determines that a first trigger condition is met.
  • S201-S202 is similar to S101-S102 in FIG. 6 , and for details, refer to the description of S101-S102 in FIG. 6 .
  • S203 The electronic device judges whether the process of identifying the pause operation has experienced a game event, and whether a pause condition is satisfied.
  • the process of identifying the suspending operation is a process from when the electronic device determines that the first trigger condition is met to when the electronic device obtains a result of identifying the suspending operation.
  • Game events are, for example, the arrival of obstacles, the arrival of props, the arrival of the next action to be executed (the arrival of the sixth action of "bending the arm” as shown in Figures 2-5 above), etc.
  • the electronic device when the electronic device recognizes the pause operation, it can record the triggered game event (such as whether it occurs, the number of occurrences, the time of occurrence, the event type, etc.), and when the result of recognizing the pause operation is obtained, according to the recorded content Determines whether the process of recognizing the pause operation experienced a game event.
  • the triggered game event such as whether it occurs, the number of occurrences, the time of occurrence, the event type, etc.
  • the electronic device determines that the first trigger condition is satisfied, it will continue to judge whether the suspension condition is satisfied.
  • the suspension condition it can be determined that the user intends to suspend the game. Exit the game, execute S204, see Figure 4 above for a specific example. If there is no game event in the process of identifying the pause operation, the electronic device may only pause the game, execute S205, and not roll back the game. For a specific example, refer to FIG. 3 above.
  • the electronic device can play the game normally and continue to cache the game data.
  • S204 The electronic device suspends the game and rolls back the game.
  • S204 is similar to S104 in FIG. 6 , and for details, refer to the description of S104 in FIG. 6 .
  • the game scene that rolls back can be the game scene before the game event that occurs when the pause operation is recognized. event, the game scene that rolls back is h seconds before the moment when the electronic device successfully recognizes the pause operation, then h is greater than s.
  • S205 The electronic device suspends the game.
  • the electronic device detects a triggering game event during the process of identifying the pause operation, when the game event is a preset major adverse event, the game can be suspended first, so as to avoid major disadvantages when the pause operation is identified.
  • the event causes the game to be seriously affected, for example, the death of a game character causes the game to end directly, further ensuring the normal progress of the game.
  • FIG. 8 is a schematic flowchart of another method for pausing a game provided by an embodiment of the present application.
  • the method may include, but is not limited to, the following steps:
  • S301 The electronic device caches game data.
  • S302 The electronic device determines that a first trigger condition is met.
  • S301-S302 is similar to S101-S102 in FIG. 6 , and for details, refer to the description of S101-S102 in FIG. 6 .
  • S303 The electronic device judges whether the triggered game event is a preset event (preset major adverse event).
  • a trigger game event may be detected.
  • the trigger is about to occur, for example, the game event will be executed in the next frame or several frames (such as the next second), and the electronic device may Determine whether the triggered game event is a preset major adverse event, such as a game event with a risk level greater than or equal to a risk threshold, or a game event in the preset event list.
  • the game can be suspended before executing the game event, for example, when the game event is determined to be a major adverse event, the game is suspended, and S304 is executed, and the pause operation will also continue to be recognized at the same time , see Figure 5 above for a specific example.
  • the electronic device can continue to judge whether the suspension condition is satisfied, that is, continue to recognize the suspension operation, execute S305, and continue the game. For a specific example, see (B) in Figure 2 above.
  • the execution of preset major adverse events will cause the game to be seriously affected. If you can't return to the normal route, you can only restart the game and so on.
  • Game events other than major adverse events include, for example, the arrival of obstacles, the arrival of props, the arrival of the next action to be executed, etc. Although the player is stuck at the current position and cannot get game points, the game can still continue.
  • S304 The electronic device suspends the game.
  • the electronic device can suspend the game before executing the major adverse event, and continue to judge whether the suspension condition is met, that is, continue to identify the suspension operation, and execute S305.
  • S305 The electronic device judges whether a suspension condition is met.
  • the manner in which the electronic device judges whether the suspend condition is satisfied is similar to that of S103 in FIG. 6 .
  • the manner in which the electronic device judges whether the suspend condition is satisfied is similar to that of S103 in FIG. 6 .
  • S103 in FIG. 6 refers to the description of S103 in FIG. 6 .
  • the electronic device has suspended the game before executing the major adverse event, that is, S304 is executed. Different from pausing the game and rolling back the game when the electronic device determines that the pause condition is met in S103 of FIG. No need to pause the game anymore.
  • S304 when the electronic device recognizes that the suspension operation is not triggered, no major adverse event is triggered, and S304 is not executed.
  • the electronic device determines that the pause condition is satisfied, the game will be suspended and the game will be rolled back.
  • S305 is consistent with S103 in FIG. 6 . For details, please refer to the description of S103 in FIG. 6 .
  • the method of reverting the game by the electronic device is similar to the method of reverting the game in S104 of FIG. 6 , and will not be repeated here.
  • the electronic device executes S306, the game remains in a paused state in the rolled-back game scene, which is the same as the state of the game after execution of S104 in FIG. 6 .
  • FIG. 4 see FIG. 4 above.
  • S307 is similar to S104 in FIG. 6 , and for details, refer to the description of S104 in FIG. 6 .
  • the electronic device recognizes that the pause operation does not trigger a major adverse event, other game events are triggered.
  • the rolled back game scene can be the game scene before the occurrence of the other game events mentioned above. is h seconds before the moment when the electronic device successfully recognizes the pause operation, then h is greater than s.
  • the electronic device when the electronic device rolls back the game, if the difference between the time of the rolled back game scene and the execution time of the next game event is less than or equal to the preset time interval, the electronic device can roll back the game
  • the scene is set to an earlier game scene to prevent the user from being able to effectively operate to complete the game event after the next game event is too close after the game is rolled back, so as to ensure that the user can play the game normally.
  • the specific example is shown in Figure 9 below.
  • FIG. 9 exemplarily shows a schematic diagram of a process of a game.
  • the time axis t is the time axis of the somatosensory game, which is not equal to the time axis of the actual time.
  • the same moment indicates that the current game scene is the same, that is, the game data is the same, but the actual time
  • the time may be different. For example, when the somatosensory game is played at 8:45 am and 3:45 pm on January 1, 2021, the game scene is the game scene at time t1 . . Any moment on this timeline can also be called a game point.
  • the electronic device can start to recognize the pause operation, for example, it detects that the user has performed a preset pause gesture, and at time t2 , the electronic device successfully recognizes the pause operation, for example, it recognizes that the user keeps pausing within the preset recognition time The gesture remains unchanged, the preset recognition time is (t 2 -t 1 ), and the period between t 1 and t 2 can be understood as the process of recognizing the pause operation.
  • the electronic device recognizes the pause operation, it detects that the game event A is executed at time t3 , that is, the event A occurs during the process of recognizing the pause operation.
  • the moment of the originally set rollback game scene (referred to as the rollback point) is the moment when the electronic device starts to recognize the pause operation, that is, t 1 , but due to The difference between the occurrence times t 3 and t 1 of the game event A is less than or equal to the preset time interval d, so the electronic device advances the rollback point to the time t 0 when (t 3 -t 0 ) ⁇ d, that is to say , the electronic device will return the game scene to the game scene where t 0 is located, and pause the game at t 0 . After unpausing the game, the user has enough time to operate to deal with event A, and the user experience is good.
  • the game data cached by the electronic device is the game data of the last n seconds, and n is greater than or equal to (t 2 -t 0 ), and the electronic device can use the cached game data to fall back to time t 0 .
  • the rollback point is the time t 1 when the pause operation is started to be identified, and n is greater than or equal to (t 2 ⁇ t 1 ), that is, n is greater than or equal to the time required for identifying the pause operation.
  • the somatosensory game played by the electronic device may be a multiplayer game, that is, multiple users may play the game at the same time.
  • the way the electronic device rolls back the game is consistent with the way the game is rolled back in the above embodiment.
  • other users can For a normal game, the electronic device can replay the game process of other users after canceling the pause, as shown in Figure 10A below for a specific example.
  • FIG. 10A exemplarily shows a schematic diagram of the progress of another game.
  • the time axis t is the time axis of the somatosensory game.
  • the electronic device detects that user A has performed a pause operation, which can be understood as the electronic device begins to recognize user A’s pause operation, for example, the voice of user A is detected, and at time t2 , the electronic device successfully recognizes the user A's pause operation, for example, it is recognized that user A's voice includes "pause", and the period from t 1 to t 2 can be understood as the process of recognizing user A's pause operation (referred to as recognition process A).
  • recognition process A the process of recognizing user A's pause operation
  • time t 0 and t 1 before the identification process A and during the identification process A, user B can play the game normally.
  • time t 2 when the electronic device successfully recognizes the user A's pause operation, the electronic device will pause the game and roll back the game.
  • the time at which the rollback game scene is set (referred to as the rollback point) is when the electronic device starts to recognize the user.
  • Time t 0 before the pause operation of A that is to say, the electronic device rolls back the game scene to the game scene where t 0 is located, and pauses the game at t 0 .
  • process B the period between the rollback point t 0 and the moment t 2 when user A’s pause operation is successfully recognized is called process B, before the rollback game, user B can play the game normally in process B.
  • the electronic device can remind the user through indicator lights, flashing game characters, ghost images, etc., for example, the closer the current time is to time t 2 , the faster the flashing frequency of the game characters is.
  • the somatosensory game played by the electronic device may be a multiplayer game, that is, multiple users may play the game at the same time.
  • the electronic device rolls back the game based on the user who performed the pause operation (successfully recognized pause operation) earliest, and the specific method is consistent with the method of rolling back the game described in the above embodiment , where the suspend action is the suspend action for the benchmark.
  • the electronic device can replay the other user's game process during the period before the other user performs the pause operation after the suspension is canceled. After the operation, other users can play the game normally, as shown in Figure 10B below for a specific example.
  • FIG. 10B exemplarily shows a schematic diagram of the progress of another game.
  • the time axis t is the time axis of the somatosensory game.
  • the electronic device recognizes user A's pause operation is consistent with that shown in Figure 10A above, and will not be repeated here.
  • the electronic device detects that the user B has performed a pause operation, which can be understood as the electronic device starts to recognize the user B's pause operation.
  • User A's pause operation and user B's pause operation may be of the same type, or different types, for example, at time t 4 , the electronic device detects that the change degree of user B's motion gesture is greater than or equal to a preset change threshold.
  • the electronic device will pause the game and roll back the game, even if the electronic device successfully recognizes user B's pause operation at a time earlier than the time t when it successfully recognizes user A's pause operation 2.
  • the electronic device will also suspend the game and roll back the game after obtaining the recognition result of the user A's pause operation.
  • the electronic device will return the game scene to the game scene where t 0 is located, and pause the game at t 0 . Assuming that the period between the rollback point t0 and the moment t4 when the electronic device starts to recognize user B's pause operation is called process C, before the rollback game, user B can play the game normally in process C.
  • the electronic device will pause the game and roll back the game based on the pause operation executed earlier, so as to avoid The electronic device recognizes the situation that the game is out of control caused by any user's pause operation, so as to ensure the normal progress of the game.
  • the pause operation performed first fails to be recognized
  • the pause operation performed later (such as the pause operation of user B) is recognized successfully
  • the electronic device can perform the pause operation later Pause the game as a benchmark to pause the game and/or roll back the game.
  • the electronic device may not replay the game operation of user B, but, like user A, can operate the game at the rollback point and play the game again.
  • different users can be given different operation rights. For example, only users with an administrator account can suspend the game. Whether to perform a pause operation to determine whether to pause the game and/or roll back the game can be understood as the pause operation in the embodiments shown in Figures 1-9 above is for users with an administrator account. In this case, an example of what happens after rewinding the game and unpausing the game can be found in Figures 9, 10A and 10B above.
  • FIG. 9 , FIG. 10A or FIG. 10B can be understood as an execution mode of the rollback game in S104 of FIG. 6 above, S204 of FIG. 7 above, and S307 of FIG. 8 above.
  • FIG. 9 , FIG. 10A or FIG. 10B can be understood as an execution manner of S306 in FIG. 8 above.
  • FIG. 11 is another method for pausing the game provided by the embodiment of the present application. This method can be applied to the electronic device 100 shown in FIG. 1 . The method may include, but is not limited to, the following steps:
  • the game run by the electronic device is a somatosensory game.
  • the first user operation includes a second user operation and a third user operation.
  • the above receiving the first user operation of the first user includes: receiving the second user operation; in response to the second user operation, identifying whether the first user intends to pause the game; receiving the third user operation; based on the second user operation and The third user operates and recognizes that the first user intends to pause the game.
  • receiving the second user operation above, in response to the second user operation, identifying whether the first user intends to pause the game can be understood as meeting the first trigger condition in the above embodiment, or it can be understood as the above implementation The start in the example recognizes the pause operation.
  • the third user operation is received above; based on the second user operation and the third user operation, it is recognized that the first user intends to suspend the game, which can be understood as satisfying the suspension condition in the above embodiments, or as being Success in the above example identifies the suspend operation.
  • the starting game point of receiving the second user's operation (that is, the starting game point of receiving the first user's operation) may be the game point of starting to identify the pause operation
  • the cut-off game point of receiving the third user's operation (That is, the cut-off game point for receiving the third user's operation) may be the game point for successfully identifying the pause operation.
  • a game point can correspond to a moment in the game.
  • the same game scene and game data are the same at the same game point, but the corresponding actual moment may be different.
  • the game point is the same as the first game point that is rolled back to when the game is paused, but the actual time corresponding to the former is earlier than the actual time corresponding to the latter.
  • receiving the second user operation above includes: receiving the first gesture at the second game point.
  • this step may be detecting that the user has performed a preset pause gesture in the above embodiment .
  • the above-mentioned receiving of the third user operation includes: receiving the first gesture within the preset recognition duration, and the duration of the interval between the second game point and the cut-off game point for receiving the first user operation is the preset recognition duration, and this step can be In the above embodiment, it is determined that the user keeps the pause gesture unchanged within the preset recognition time period. It can be understood that the user's first user operation for pausing the game is to keep a gesture unchanged for a preset recognition period.
  • the second user operation is a second gesture
  • the third user operation is a third gesture
  • the gesture composed of the second gesture and the third gesture is used to pause the game. It can be understood that the user's first user operation for pausing the game is a plurality of gestures performed in sequence.
  • the second user operation is the first voice input
  • the third user operation is the second voice input
  • the voice input composed of the first voice input and the second voice input is used to pause the game, for example, the first voice input
  • the first voice input is "play”
  • the second voice input is "game pause”.
  • the second voice input includes keywords used to pause the game in the above embodiments, such as "pause”. It can be understood that the user's first user operation for pausing the game is voice input, and the voice input may include keywords for pausing the game.
  • the second user operation is a movement gesture
  • the degree of change of the second user operation is greater than or equal to a preset change threshold
  • the third user operation includes a user operation acting on the first key
  • the third User operations also include motion gestures, for example, the second user operation is that the user walks from position 1 to position 2, and the third user operation includes the user walking from position 2 to position 3, and receiving a key that acts on the handle for pausing. Press to operate. It can be understood that the user does not hold a hardware device such as a handle or a remote control that includes a button for pausing when playing the game.
  • the user's first user operation for pausing the game includes the user taking the hardware device and operating the button for pausing.
  • the electronic device determines that the first user operation is for pausing the game, which can be understood as satisfying the pause condition in the above embodiments, or can be understood as successfully identifying the pause operation in the above embodiments.
  • the electronic device determines that the first user operation is for pausing the game, which can be understood as satisfying the pause condition in the above embodiments, or can be understood as successfully identifying the pause operation in the above embodiments.
  • the first user operation is for pausing the game, which can be understood as satisfying the pause condition in the above embodiments, or can be understood as successfully identifying the pause operation in the above embodiments.
  • the electronic device determines that the first user operation is for pausing the game, which can be understood as satisfying the pause condition in the above embodiments, or can be understood as successfully identifying the pause operation in the above embodiments.
  • the first game point is earlier than the cut-off game point at which the first user operation is received.
  • the first game point is determined according to one or more of the following: a start game point at which the first user operation is received, an end game point, and a game point at which a game event between the start game point and the end game point occurs.
  • the first game point is a preset game point, for example, the initial game point at which the first user operation is received, or earlier than the initial game point at which the first user operation is received.
  • a first preset event occurs during the period of receiving the first user operation (that is, between the start game point and the end game point), and the first game point may be the first game point that occurs according to the first preset event. Three game points are determined, for example earlier than the third game point.
  • the first preset event is a game event that occurs earliest during the period when the first user operation is received.
  • the first preset event is a game event with a risk level greater than or equal to a preset level threshold.
  • the electronic device may divide the risk level of the game event into three categories: Type 1 less than the first threshold, Type 2 greater than or equal to the first threshold and less than the second threshold, Type 3 greater than or equal to the second threshold, wherein Type 3
  • the game event can be the preset major adverse event in the above embodiment, the first preset event is a type two game event, for example, the major adverse event is the death of a game character, the first preset event is the arrival of obstacles, the arrival of props .
  • the first game point is a game point that is at least a predetermined time interval earlier than the fourth game point, the fourth game point being the earliest game point between the first game point and the cut-off game point at which the first user action was received. The game point at which the game event occurred.
  • the electronic device may first determine a game point to be rolled back according to one or more of the starting game point, the ending game point, and the game points where game events occur during which the first user operation is received, but The electronic device finds that the time interval between the game point and the fourth game point is less than the preset time interval, so the first game point can be adjusted to an earlier game point than the game point to ensure that the first game point and the fourth game point
  • the time interval of the four game points is greater than or equal to the preset time interval.
  • the electronic device determines that the first user operation is for pausing the game, if a game event occurs during the receiving of the first user operation, the electronic device returns to the first game point to pause the game. In some other embodiments, when the electronic device determines that the first user operation is to suspend the game, if no game event occurs during the period of receiving the first user operation, the electronic device suspends the game at the cut-off point of the game.
  • the specific example process can be seen in Figure 7 above.
  • the electronic device when the second preset event is triggered during the first user operation, the electronic device pauses the game.
  • the game event triggered may be that the game event is about to occur, for example, the game event occurs in the next frame.
  • the electronic device suspends the game at a game point before the game point where the second preset event occurs, for example, the electronic device pauses the game at the game point that triggers the second preset event, optionally, the second preset event
  • the game will be seriously affected after the occurrence of the second preset event, for example, the major adverse event includes the death of the game character, and the game will end directly after the death of the game character.
  • the electronic device when the electronic device determines that the first user operation is for pausing the game, it can keep the paused state of the game unchanged; optionally, when the electronic device determines that the first user operation is for pausing the game, it can return to the first game point, the first game point is earlier than the game point at which the electronic device suspends the game during the period when the first user operation is received.
  • the electronic device determines that the first user operation is for pausing the game
  • the game run by the electronic device is a multiplayer game, that is, multiple players can play the game at the same time, but when the game is suspended, none of the multiple players can play the game normally.
  • the plurality of persons are the first user and the second user.
  • the electronic device can playback the second user's first game.
  • the electronic device receives the second user's fourth user operation.
  • the electronic device may replay the game process of the second user between the first game point and the starting game point where the second user's operation was received. For a specific example, refer to FIG. 10B above.
  • the electronic device when it determines that the received first user operation is for pausing the game, that is, when it recognizes that the user intends to pause the game, it can fall back to the earlier first game point to pause the game, so as to avoid receiving Unfavorable game events that occur during the operation of the first user ensure the normal progress of the game.
  • the electronic device can determine whether to roll back and roll back the game points based on receiving the game event that occurred during the first user operation, for example, do not roll back when no event occurs, and reduce unnecessary Processing resources, and for example, the first game point to fall back to is earlier than the game point where the earliest game event occurred during the first user operation is received.
  • the preset time interval avoids the next game event being too close after the game is resumed and the user cannot be effective. Operation problems, improve the user's game experience.
  • words such as “first” and “second” are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order .
  • Features defined as “first” and “second” may explicitly or implicitly include one or more of these features.
  • words such as “exemplary” or “for example” are used as examples, illustrations or descriptions. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • the processes can be completed by computer programs or hardware related to the computer programs.
  • the computer programs can be stored in computer-readable storage media.
  • the computer programs During execution, it may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: various media capable of storing computer program codes such as read-only memory (ROM) or random access memory (RAM), magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请实施例提供了一种暂停游戏的方法及电子设备,该方法应用于电子设备,该方法包括:运行游戏时,接收到第一用户的第一用户操作;确定第一用户操作用于暂停游戏时,回退到第一游戏点暂停游戏,第一游戏点是根据接收到第一用户的第一用户操作的起始游戏点、截止游戏点和接收到第一用户的第一用户操作期间的游戏事件发生的游戏点中的一项或多项确定的,第一游戏点早于截止游戏点。采用本申请实施例能够避免接收到用于暂停游戏的第一用户操作期间发生的不利游戏事件,保证恢复运行游戏之后游戏可以正常进行。

Description

暂停游戏的方法及电子设备
本申请要求于2021年10月15日提交中国专利局、申请号为202111205009.2、申请名称为“暂停游戏的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种暂停游戏的方法及电子设备。
背景技术
用户使用电子设备进行体感游戏的过程中,可以输入用户操作,电子设备识别出该用户操作为预设的用于暂停游戏的用户操作时,可以暂停该游戏,但是,识别用户操作是需要一定时间的,该过程用户一般不会正常进行游戏,可能会产生不利的游戏事件,从而导致游戏失控。例如,用户使用智慧屏进行体感游戏时,可以做出特定手势来暂停游戏,当智慧屏识别到3秒内用户均保持该特定手势,则确定用户想要暂停游戏,但是,从用户停止游戏做手势到智慧屏识别出用户想要暂停游戏,至少需要3秒,这3秒内用户不会进行游戏操作,可能出现偏离正常行进路线、死亡等不利事件,用户体验不佳。
发明内容
本申请实施例公开了一种暂停游戏的方法及电子设备,可以避免用户暂停游戏时造成游戏失控的问题,保证游戏的正常进行。
第一方面,本申请实施例提供了一种暂停游戏的方法,应用于电子设备,所述方法包括:运行游戏时,接收到第一用户的第一用户操作;确定所述第一用户操作用于暂停所述游戏时,回退到第一游戏点暂停所述游戏,所述第一游戏点是根据所述接收到第一用户的第一用户操作的起始游戏点、所述接收到第一用户的第一用户操作的截止游戏点和所述接收到第一用户的第一用户操作期间的游戏事件发生的游戏点中的一项或多项确定的,所述第一游戏点早于所述截止游戏点。
本申请中,电子设备可以在确定接收到的第一用户操作用于暂停游戏时,可以理解为是识别到用户意图暂停游戏时,回退到更早的第一游戏点暂停游戏,从而避免接收到第一用户操作期间游戏失去控制的情况,例如发生的不利游戏事件,保证游戏的正常进行。
在一种可能的实现方式中,所述第一用户操作包括第二用户操作和第三用户操作,所述接收到第一用户的第一用户操作,包括:接收到所述第二用户操作;响应于所述第二用户操作,识别所述第一用户是否意图暂停所述游戏;接收到所述第三用户操作;基于所述第二用户操作和所述第三用户操作,识别到所述第一用户意图暂停游戏。
在一种可能的实现方式中,所述接收到所述第二用户操作,包括:在第二游戏点接收到第一手势;所述接收到所述第三用户操作,包括:在预设识别时长内接收到所述第一手势,所述第二游戏点和所述截止游戏点间隔的时长为所述预设识别时长。
在一种可能的实现方式中,所述第二用户操作为第二手势,所述第三用户操作为第三手势,所述第二手势和所述第三手势组成的手势用于暂停所述游戏。
在一种可能的实现方式中,所述第二用户操作为第一语音输入,所述第三用户操作为第二语音输入,所述第一语音输入和所述第二语音输入组成的语音输入用于暂停所述游戏。
在一种可能的实现方式中,所述第二用户操作为运动姿态,所述第二用户操作的变化程度大于或等于预设变化阈值,所述第三用户操作包括作用于第一按键的用户操作。
本申请中,用于暂停游戏的第一用户操作可以是手势,也可以是语音输入,还可以是运动姿态和操作按键,可以满足多种场景下的需求,应用场景较为广泛。
在一种可能的实现方式中,所述第一游戏点早于所述起始游戏点,或者所述第一游戏点为所述起始游戏点。
本申请中,回退的第一游戏点可以预设为接收到第一用户操作的起始游戏点或者更早,无需复杂的确定第一游戏点的过程,即可避免接收到第一用户操作期间游戏失去控制的情况,产品可用性更高。
在一种可能的实现方式中,所述回退到第一游戏点暂停所述游戏,包括:若所述接收到第一用户的第一用户操作期间发生了游戏事件,回退到所述第一游戏点暂停所述游戏;所述方法还包括:确定所述第一用户操作用于暂停所述游戏时,若所述接收到第一用户的第一用户操作期间未发生游戏事件,在所述截止游戏点暂停所述游戏。
本申请中,接收到第一用户操作期间未发生游戏事件时,可以不回退游戏,仅暂停游戏,接收到第一用户操作期间发生了游戏事件时,才暂停游戏和回退游戏,也就是说,没有因为接收第一用户操作造成损失,也可理解为是没有因为识别用户意图造成损失时,可以不回退游戏,减少不必要的回退过程,从而减少处理资源的使用,用户体验也更好。
在一种可能的实现方式中,所述第一游戏点是根据所述接收到第一用户的第一用户操作期间的游戏事件发生的游戏点确定的,所述第一游戏点早于第三游戏点,所述第三游戏点为所述接收到第一用户的第一用户操作期间的第一预设事件发生的游戏点。
本申请中,回退的第一游戏点可以早于第一预设事件发生的游戏点,以避免接收到第一用户操作期间发生的第一预设事件,从而避免第一预设事件导致游戏无法正常进行的情况,更有针对性的回退,可以进一步保证游戏的正常进行。
在一种可能的实现方式中,所述第一预设事件为所述接收到第一用户的第一用户操作期间最早发生的游戏事件。
本申请中,回退的第一游戏点可以早于接收到第一用户操作期间最早的游戏事件发生的游戏点,以避免接收到第一用户操作期间发生的任意一个游戏事件,进一步保证游戏的正常进行。
在一种可能的实现方式中,所述第一游戏点和第四游戏点的时间间隔大于或等于预设时间间隔,所述第四游戏点是所述第一游戏点和所述截止游戏点之间最早的游戏事件发生的游戏点。
本申请中,回退的第一游戏点可以早于第四游戏点至少预设时间间隔,避免回退游戏后下一个游戏事件过近导致用户无法有效操作来完成该游戏事件,保证用户可以正常进行游戏,进一步提升用户体验。
在一种可能的实现方式中,所述方法还包括:当所述接收到第一用户的第一用户操作期间触发了第二预设事件时,暂停所述游戏。
在一些实施例中,电子设备执行第二预设事件后,运行的游戏结束,例如第二预设事件为游戏人物死亡。
本申请中,接收到第一用户操作期间检测到即将发生第二预设事件时,可以先暂停游戏, 这样可以避免第二预设事件导致游戏受到严重影响,例如游戏人物死亡导致游戏直接结束的情况,进一步保证游戏的正常进行。
在一种可能的实现方式中,所述游戏为多人游戏,所述方法还包括:所述接收到第一用户的第一用户操作期间,接收到第二用户的第四用户操作,所述第四用户操作用于暂停所述游戏。
本申请中,即使接收到第一用户操作期间接收到其他进行游戏的用户的第四用户操作,也会以第一用户操作为基准来回退游戏和暂停游戏,从而避免接收到第四用户操作之前游戏失控的情况。
在一种可能的实现方式中,所述游戏为多人游戏,所述回退到第一游戏点暂停所述游戏之后,所述方法还包括:接收所述第一用户的第五用户操作;响应于所述第五用户操作,恢复运行所述游戏;恢复运行所述游戏之后,播放第二用户在所述第一游戏点和第五游戏点之间的游戏过程;当所述接收到第一用户的第一用户操作期间接收到所述第二用户的第六用户操作时,所述第五游戏点为所述接收到所述第二用户的第六用户操作的起始游戏点,所述第六用户操作用于触发所述电子设备识别所述第二用户是否意图暂停所述游戏;当所述接收到第一用户的第一用户操作期间未接收到所述第二用户的所述第六用户操作时,所述第五游戏点为所述截止游戏点。
本申请中,接收到第一用户操作期间第二用户可以正常进行游戏,恢复运行游戏之后,可以回放第二用户正常进行游戏的过程,避免第二用户重复操作,提升用户体验。
第二方面,本申请实施例提供了一种电子设备,包括收发器、处理器和存储器,上述存储器用于存储计算机程序,上述处理器调用上述计算机程序,用于执行本申请实施例第一方面,以及第一方面的任意一种实现方式提供的暂停游戏的方法。
第三方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该计算机程序被处理器执行时,实现本申请实施例第一方面,以及第一方面的任意一种实现方式提供的暂停游戏的方法。
第四方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行本申请实施例第一方面,以及第一方面的任意一种实现方式提供的暂停游戏的方法。
第五方面,本申请实施例提供一种电子设备,该电子设备包括执行本申请任一实施例所介绍的方法或装置。上述电子设备例如为芯片。
应当理解的是,本申请中对技术特征、技术方案、有益效果或类似语言的描述并不是暗示在任意的单个实施例中可以实现所有的特点和优点。相反,可以理解的是对于特征或有益效果的描述意味着在至少一个实施例中包括特定的技术特征、技术方案或有益效果。因此,本说明书中对于技术特征、技术方案或有益效果的描述并不一定是指相同的实施例。进而,还可以任何适当的方式组合本实施例中所描述的技术特征、技术方案和有益效果。本领域技术人员将会理解,无需特定实施例的一个或多个特定的技术特征、技术方案或有益效果即可实现实施例。在其他实施例中,还可在没有体现所有实施例的特定实施例中识别出额外的技术特征和有益效果。
附图说明
以下对本申请实施例用到的附图进行介绍。
图1是本申请实施例提供的一种电子设备的硬件结构示意图;
图2-图5是本申请实施例提供的一些用户界面实施例的示意图;
图6-图8是本申请实施例提供的一些暂停游戏的方法的流程示意图;
图9、图10A和图10B是本申请实施例提供的一些游戏的进程示意图;
图11是本申请实施例提供的又一种暂停游戏的方法的流程示意图。
具体实施方式
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。本申请实施例的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
本申请实施例中的电子设备为可以进行体感游戏的设备,例如手机、平板电脑、手持计算机、个人数字助理(Personal Digital Assistant,PDA)等用户终端设备,又例如智能电视、智能摄像头等智能家居设备,智能手环、智能手表、智能眼镜等可穿戴设备,又例如桌面型电脑、膝上型电脑、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、上网本等设备,又例如体感游戏机等游戏机,又例如智慧屏等设备。
接下来介绍本申请实施例示例性的电子设备100。
请参见图1,图1是本申请实施例提供的一种电子设备的硬件结构示意图。
如图1所示,电子设备100可以包括处理器110、存储器120、收发器130、显示屏140和感知模块150。
处理器110可以是一个或多个中央处理器(central processing unit,CPU),在处理器110是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。在一些实施例中,处理器110可以包括一个或多个处理单元,例如,处理器110可以包括应用处理器(application processor,AP),调制解调处理器(modem),图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。可选地,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。可选地,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
在一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。可选地,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,存储器120可以用于存储计算机可执行程序代码,上述可执行程序代码包括指令。处理器110可以通过运行存储在存储器120的指令,从而执行电子设备100的各种功能应用以及数据处理。在一些实施例中,存储器120可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。在一些实施例中,存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。在一些实施例中,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。存储器120例如但不限于包括随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器 (erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM)。
收发器130用于接收和/或发送数据。在一些实施例中,收发器130用于通过无线通信技术和其他设备通信。无线通信技术可以包括但不限于全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),新无线接入(new radio,NR),无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
显示屏140用于显示图像,视频等。显示屏140包括显示面板,显示面板可以包括非自发光屏和自发光屏。非自发光屏可以为液晶显示屏(liquid crystal display,LCD)。自发光屏可以为有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。可选地,电子设备100可以包括一个或多个显示屏140。
在一些实施例中,电子设备100可以通过GPU,显示屏140,以及AP等实现显示功能。GPU为图像处理的微处理器,连接显示屏140和AP。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
在一些实施例中,显示屏140可以集成在电子设备100内部。在另一些实施例中,显示屏140可以和电子设备100分开安装或者连接,例如电子设备100为体感游戏机,显示屏140为体感游戏机通过有线方式(如通用串行总线(universal serial bus,USB))连接的智能电视的显示屏。
感知模块150可以用于获取用户的数据,例如用户的语音数据、用户的图像数据、触摸操作、用户姿态(如手势)。
在一些实施例中,感知模块150可以包括音频模块,电子设备100可以通过音频模块(可选地以及AP等)实现音频功能,例如音频播放、录音等功能,录音功能可以用于获取用户的语音数据(也可称为声音信号)。可选地,音频模块可以设置于处理器110中,或者将音频模块的部分功能模块设置于处理器110中。可选地,音频模块可以用于将数字音频信息转换成模拟音频信号输出,例如音频模块可以包括扬声器,扬声器也称“喇叭”,用于将音频电信号转换为声音信号,电子设备100可以通过扬声器收听音乐、免提通话等音频。可选地,音频模块也可以用于将模拟音频输入转换为数字音频信号,例如音频模块可以包括麦克风,麦克风也称“话筒”或“传声器”,用于将声音信号转换为电信号,也就是说麦克风可以用于采集用户的声音信号,如拨打电话、发送语音信息、录音时,用户可以通过人嘴靠近麦克风发声,将声音信号输入到麦克风。电子设备100可以设置一个或多个麦克风,不仅实现采集声音信号,而且实现降噪、识别声音来源、定向录音等。可选地,音频模块还可以用于对音频 信号编码和解码。
在一些实施例中,感知模块150可以包括摄像头,电子设备可以通过摄像头(可选地以及ISP、GPU、显示屏、AP等)实现拍摄功能,拍摄功能可以用于获取用户的图像数据,用户的图像数据可以用于获取用户姿态。可选地,ISP用于处理摄像头反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。可选地,ISP可以设置在摄像头中。可选地,摄像头用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。可选地,电子设备100可以包括1个或N个摄像头,N为大于1的正整数。
在一些实施例中,感知模块150可以包括一个或多个传感器,电子设备可以通过一个或多个传感器获取用户的触摸操作,用户姿态。
示例性地,感知模块150可以包括触摸传感器,触摸传感器也称“触控器件”,可选地,触摸传感器可以设置于显示屏140,由触摸传感器与显示屏140组成触摸屏,也称“触控屏”。触摸传感器用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给AP,以确定触摸事件类型。可以通过显示屏140提供与触摸操作相关的视觉输出。可选地,触摸传感器180K也可以设置于电子设备100的表面,与显示屏140所处的位置不同。
示例性地,感知模块150可以包括接近光传感器,接近光传感器可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以通过接近光传感器检测用户的手势操作等运动姿态。
示例性地,感知模块150可以包括陀螺仪传感器,陀螺仪传感器可以用于确定电子设备100的运动姿态,电子设备100的运动姿态可以用于确定用户姿态,以实现体感游戏的功能。在一些实施例中,可以通过陀螺仪传感器确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器还可以用于导航等场景。
不限于上述示例,感知模块150还可以包括智能手环等可穿戴设备,毫米波雷达等,本申请对感知模块150的具体类型不作限定。
在一些实施例中,感知模块150可以集成在电子设备100内部,例如,电子设备100为智能电视,感知模块150为设置在智能电视上的麦克风,用于获取用户的语音数据。在另一些实施例中,感知模块150可以和电子设备100分开安装或者连接,例如电子设备100为体感游戏机的主机,感知模块150为体感游戏机的手柄,该手柄上安装有一个或多个传感器,用于检测用户的手势操作等运动姿态。又例如,电子设备100为智慧屏,感知模块150为智慧屏通过蓝牙方式连接的智能摄像头,用于获取用户的图像数据。
在一些实施例中,感知模块150获取到用户的数据后,可以发送给处理器110,处理器 110可以基于用户的数据识别用户的意图,例如暂停游戏、关机等意图。
可以理解地,图1所示的电子设备的结构示意图只是本申请实施例中的一种示例性的实施方式,本申请实施例中的电子设备包括但不仅限于以上结构,上述示例的模块可以根据实际需要增添或者删除,图1不应理解为对本申请实施例的限制。
在一些实施例中,电子设备100中的处理器110可以用于读取存储器120中存储的计算机程序代码,执行图6-图8、图11所示的流程。
接下来示例性介绍本申请实施例涉及的用户界面实施例。以下实施例仅示出了电子设备100的显示屏140,显示屏140用于显示体感游戏的用户界面,未示出用于获取用户数据的感知模块150,可以理解地,感知模块150可以和显示屏140集成在一起,也可以分开安装或者连接,本申请对此不作限定。
请参见图2,图2示例性示出一种用户界面的示意图。图2的(A)示出了用户做出暂停手势之前的用户界面,图2的(B)示出了用户做出暂停手势之后的用户界面。
如图2的(A)所示,电子设备100可以显示体感游戏的用户界面200,用户界面200可以包括第一区域210和第二区域220,第一区域210可以用于显示待执行的动作,第二区域220可以用于显示用户当前的动作,用户可以通过第一区域210获取到要执行的动作,并执行该动作,电子设备100可以通过感知模块150获取用户姿态(例如通过摄像头获取用户的图像数据),并将获取到的姿态数据处理后显示在第二区域220中。
如图2的(A)所示,第一区域210可以包括示意模型210A、操作名称210B、操作序列210C和游戏时长210D,其中:示意模型210A可以为动态的虚拟人物,用于执行操作名称210B指示的动作(“弯曲手臂”),用户可以通过示意模型210A获取到“弯曲手臂”的具体执行方式,也可以理解为是身体各部位的运动方式。操作序列210C用于表征“弯曲手臂”的执行情况,例如操作序列210C为“5/10”,表示“弯曲手臂”的动作共需执行10次,当前示意模型210A已执行了5次。游戏时长210D用于表征用户已进行游戏的有效时长,该有效时长为用户执行第一区域210示出的动作的时长,不包括游戏处于暂停状态所经过的时长,也就是说,体感游戏正常进行时,游戏时长210D会增加,体感游戏处于暂停状态时,游戏时长210D保持不变。
如图2的(A)所示,第二区域220可以包括用户模型220A、操作等级220B和游戏得分220C,其中:用户模型220A可以用于表征用户的运动姿态,电子设备100可以通过感知模块150获取用户姿态(例如通过摄像头获取用户的图像数据),并将获取到的姿态数据转换为用户模型220A的运动姿态。操作等级220B用于表征用户当前执行的动作和第一区域210示意的动作的匹配程度,例如第一区域210的示意模型210A和用户模型220A的相似程度,游戏得分220C用于表征用户进行体感游戏得到的分数。示例性地,用户当前执行的动作和第一区域210示意的动作的匹配程度等于0时,操作等级220B可以为“未达到(Miss)”,此时游戏得分220C不会增加,该匹配程度大于0且小于或等于匹配阈值时,操作等级220B可以为“符合标准的(Good)”,该游戏得分220C可以增加20,该匹配程度大于匹配阈值时,操作等级220B可以为“完美的(Perfect)”,该游戏得分220C可以增加30。
在一些实施例中,用户想要暂停游戏,可以做出暂停手势,例如在胸前交叉双手。当电子设备100通过感知模块150检测到用户执行了预设的暂停手势(例如从用户的图像数据中识别出的手势和暂停手势的相似程度大于或等于预设相似阈值),可以在预设识别时长内继续识别用户是否保持暂停手势,当预设识别时长内用户均保持暂停手势,电子设备100可以确 定用户意图暂停游戏,因此可以暂停游戏,识别过程的示例如下图2的(B)所示。
如图2的(B)所示,用户模型220A可以表征用户当前正在执行暂停手势,电子设备100仍会判断用户当前执行的动作和第一区域210示意的动作的匹配程度,但由于用户当前正在执行暂停手势,因此匹配程度为0,操作等级220B可以为“Miss”。相比图2的(A)所示的游戏时长210D,图2的(B)所示的游戏时长210D增加了2(秒),相比图2的(A)所示的操作序列210C,图2的(B)所示的操作序列210C变为“6/10”,可以表征这2秒内示意模型210A又执行了1次“弯曲手臂”。相比图2的(A)所示的用户界面200,图2的(B)所示的用户界面200新增了提示框230,提示框230用于表征当前正在识别暂停手势,提示框230可以包括提示语230A(如“识别中”)、暂停手势的示意图230B和进度条230C。进度条230C可以表征识别暂停手势的进度,黑色部分越多,进度越多,识别暂停手势经过的时长越久。图2的(B)所示的进度条230C表征当前进度为总进度的三分之二,识别暂停手势经过的时长为上述游戏时长210D增加的2秒(相比开始检测到暂停手势的图2的(A)的游戏时长210D)。当电子设备100在预设识别时长内识别到用户动作变更为暂停手势以外的动作时,可以理解为是暂停操作识别失败,可以取消显示提示框230,用户可以继续游戏。当电子设备100确定预设识别时长(即3秒)内用户均保持暂停手势,电子设备100可以确定用户意图暂停游戏,可以理解为是暂停操作识别成功,因此可以暂停游戏,进度条230C可以全部变为黑色,具体示例如下图3和图4所示。
在一些实施例中,电子设备100识别到预设时长内用户均保持暂停手势,可以确定用户意图暂停游戏,因此可以直接暂停游戏,具体示例如下图3所示。
请参见图3,图3示例性示出又一种用户界面的示意图。
相比图2的(B)所示的用户界面200,图3所示的用户界面200中,进度条230C全部为黑色,提示语230A变为“识别成功”,并且包括“暂停”,可以表征暂停手势识别成功,当前已经暂停游戏,此时用户界面200不包括操作等级220B。相比图2的(B)所示的游戏时长210D,图3所示的游戏时长210D增加了1(秒),相比图2的(B)所示的操作序列210C,图3所示的操作序列210C变为“7/10”,可以表征这1秒内示意模型210A又执行了1次“弯曲手臂”的操作。由于当前已成功识别暂停手势,因此识别暂停手势经过的时长为上述游戏时长210D增加的3秒(相比开始检测到暂停手势的图2的(A)的游戏时长210D)。由于游戏已被暂停,在用户取消暂停之前,第一区域210保持不变。
在图2和图3的示例中,识别暂停手势需要3秒,也就是上述预设识别时长为4秒,这3秒内用户需保持暂停手势,不会执行第一区域210示意的动作,因此操作等级220B均为“Miss”,游戏得分220C也不会增加,可以理解为发生了不利事件,用户取消暂停游戏之后,会基于图3所示的用户界面200继续游戏,但不利事件已经发生,用户实际继续的是非正常的游戏,影响了用户的游戏体验。
并且,对于不同的体感游戏,不利事件不同,例如偏离正常的行进路线,甚至游戏人物死亡等导致游戏终止的不利事件,用户取消暂停游戏之后很可能无法继续游戏,极大地影响了游戏的运行,用户体验感很差。
上述电子设备100检测到用户执行了预设的暂停手势,可以理解为是电子设备100开始识别暂停操作,电子设备100识别到预设识别时长内用户保持暂停手势不变,可以理解为电子设备100成功识别暂停操作。
本申请提供了一种暂停游戏的方法,可以暂停游戏,并且将游戏回退到更早的场景,例如电子设备开始识别暂停操作的时候或者更早,避免识别暂停操作时导致发生的不利游戏事 件,保证游戏的正常进行,具体示例如下图4所示。
请参见图4,图4示例性示出又一种用户界面的示意图。
如图4所示,电子设备100确定预设识别时长内用户均保持暂停手势,可以确定用户意图暂停游戏,因此可以回退到检测到用户执行了预设的暂停手势的时刻,并且暂停游戏,即回退到图2的(A)所示的游戏场景,并暂停游戏,因此图4所示的用户界面200和图2的(A)所示的用户界面200类似,区别在于:图4所示的用户界面200还包括提示框230,该提示框230和图3所示的提示框230一致,可以表征暂停手势识别成功,当前已经暂停游戏。这样用户取消暂停游戏之后,可以执行第一区域210示意的第6次和第7次的“弯曲手臂”,保证这两次的游戏过程是正常进行的,不会出现图3那样由于暂停手势导致“Miss”的情况。
在一些实施例中,若电子设备100在识别暂停操作的过程中检测到触发了游戏事件,可以在暂停操作识别成功时,暂停游戏并将游戏回退到更早的场景,例如图4所示场景,若电子设备100识别暂停操作的过程中未检测到触发了游戏事件,可以在暂停操作识别成功时,仅暂停游戏而不回退,例如图3所示场景。也就是说,未因为识别暂停操作造成损失(例如未发生游戏事件)的情况可以不回退游戏,减少不必要的回退过程,从而减少处理资源的使用,用户体验也更好。
可选地,上述回退的更早的场景可以为识别暂停操作的过程中最早发生的游戏事件发生之前的游戏场景。可选地,上述回退的更早的场景可以为识别暂停操作的过程中发生的游戏事件中满足预设条件的游戏事件发生之前的游戏场景,预设条件例如为预设的重大不利事件,或者为其他风险等级小于重大不利事件的游戏事件。
在一些实施例中,若电子设备100识别暂停操作时检测到触发游戏事件(可选地,触发为即将发生,例如下一秒执行该游戏事件),当该游戏事件为预设的重大不利事件时,可以先暂停游戏,同时识别暂停操作,具体示例如下图5所示。
请参见图5,图5示例性示出又一种用户界面的示意图。
如图5所示,电子设备100检测到用户执行了预设的暂停手势之后,会在预设识别时长内识别暂停手势,同时会检测是否触发游戏事件。若在预设识别时长内检测到触发预设的重大不利事件(例如风险等级大于或等于风险阈值的游戏事件,预设事件列表中的游戏事件),例如示意模型210A要执行第6次的“弯曲手臂”的动作,则电子设备100可以在执行重大不利事件之前暂停游戏,例如可以显示图5所示的用户界面200,也就是说,电子设备100会在重大不利事件发生前先暂停游戏,并且会继续识别暂停手势。暂停游戏时,第一区域210不会改变,提示框230可以变化,例如进度条230C中的黑色部分可以逐渐增多。当电子设备100确定预设识别时长内用户保持暂停手势不变,可以确定用户意图暂停游戏,因此可以保持游戏的暂停状态不变,这样用户取消暂停游戏之后,可以正常进行游戏,避免识别暂停操作导致发生的重大不利事件。当电子设备100在预设识别时长内识别到用户动作变更为暂停手势以外的动作时,可以取消暂停游戏,此时可以取消显示提示框230,并且执行上述触发的游戏事件,例如示意模型210A执行第6次的“弯曲手臂”的动作,此时游戏时长210D会正常增加,操作序列210C可以变为“6/10”,第二区域220可以显示操作等级220B,游戏得分220C也可能变化,例如操作等级220B为“Miss”,游戏得分220C不变,或者操作等级220B为“Good”,游戏得分220C变为“120”。
不限于上述示例的情况,在另一些示例中,当电子设备100确定预设识别时长内用户保持暂停手势不变,可以确定用户意图暂停游戏,不仅可以保持游戏的暂停状态不变,并且可以将游戏回退到更早的场景,例如回退到早于发生重大不利事件的时刻d秒的场景,d例如 大于1,例如为预设的可以正常执行操作以避免发生重大不利事件所需的时长,又例如开始识别暂停操作的时刻或者之前,这样可以避免用户取消暂停游戏之后,由于触发的重大不利事件过近导致用户无法有效操作的情况。
在另一些实施例中,若电子设备100识别暂停操作时检测到触发游戏事件,当该游戏事件不为预设的重大不利事件时,可以继续识别暂停操作和正常进行游戏(即正常执行上述游戏事件),例如图2的(B)所示的识别暂停手势的场景,当暂停操作识别成功时再回退和暂停游戏,例如图4所示的场景。
不限于上述示例的情况,在另一些示例中,重大不利事件可以为游戏人物死亡等导致游戏终止的事件)。可以理解地,电子设备确定触发了重大不利事件时,可以先暂停游戏,同时识别暂停操作。当暂停操作识别成功时,保持游戏的暂停状态不变,当暂停操作识别失败,则正常执行该重大不利事件。这样可以避免识别暂停操作的过程中触发了重大不利事件导致游戏直接结束等严重影响游戏进行的问题,进一步保证游戏的正常进行。
不限于上述示例的情况,在另一些示例中,当电子设备在预设识别时长内识别到用户动作变更为暂停手势以外的动作时,也可以理解为是暂停手势识别失败时,电子设备可以先保持游戏的暂停状态,并显示提示信息,以提示用户暂停手势识别失败。
不限于上述示例的情况,在另一些示例中,电子设备确定用户意图暂停游戏时,也可以将游戏回退到开始识别暂停操作之前,例如游戏时长210D为“00:08”的游戏场景,还可以将游戏回退到开始识别暂停操作之后和暂停操作识别成功之前,也就是识别暂停操作的过程中,例如回退到早于发生游戏事件的时刻d秒的场景,d大于0。可以理解地,游戏回退后的游戏场景下,用户取消暂停游戏之后,可以正常进行游戏,从而避免识别暂停操作导致发生的不利事件。
不限于上述示例的情况,在另一些示例中,暂停手势也可以替换为用于触发菜单显示的手势,电子设备确定预设识别时长内用户保持该手势不变,可以确定用户意图查看菜单,因此可以显示该菜单,该菜单包括暂停选项。电子设备可以接收针对暂停选项的用户操作(如手势),响应于该用户操作,暂停游戏。
不限于上述示例的通过手势暂停的情况,在另一些实施例中,用户可以按照顺序依次作出多个手势来暂停游戏,例如,电子设备开始识别暂停操作为识别到这多个手势中的第一个手势,电子设备成功识别暂停操作为识别到这多个手势中的最后一个手势。在另一些实施例中,用户也可以通过手柄、遥控器等硬件装置来暂停游戏,例如,电子设备开始识别暂停操作为电子设备识别到相比之前的运动姿态或者体感游戏指示执行的动作,用户的运动姿态发生较大的变化,电子设备成功识别暂停操作为接收作用于特定按钮的触摸操作,这种情况例如为体感游戏不需要手柄,用户进行游戏时没拿手柄,想要暂停时再去拿手柄来暂停游戏。在另一些实施例中,用户也可以通过语音来暂停游戏,例如,电子设备开始识别暂停操作为检测到用户的语音输入,电子设备成功识别暂停操作为识别到用户的语音输入包括“暂停(pause)”等用于暂停游戏的关键词。本申请对暂停游戏的具体用户操作不作限定。
以上实施例仅为示例,本申请对体感游戏的具体游戏方式不作限定,本申请对预设识别时长的数值不作限定,本申请对识别暂停操作和暂停游戏时显示的用户界面不作限定。
接下来示例性介绍本申请实施例提供的暂停游戏的方法,该方法可以应用于图1所示的电子设备100。
请参见图6,图6是本申请实施例提供的一种暂停游戏的方法的流程示意图。该方法可 以包括但不限于如下步骤:
S101:电子设备缓存游戏数据。
具体地,游戏数据例如但不限于包括用户操作、游戏事件、游戏时长、游戏进程、游戏分数、人物生命(如剩余血量)、场景数据(如背景、障碍物、道具等)等。
在一些实施例中,电子设备可以从开始游戏起,缓存最近n秒的游戏数据,n大于0。例如,当缓存数据的时长大于或等于n秒时,可以删除缓存的游戏数据中最早的1秒的游戏数据,并缓存当前时刻最近1秒的游戏数据。缓存的游戏数据可以用于回退游戏,可选地,n大于或等于t,t为上图1-图5所示实施例中识别暂停操作所需的时长,即开始识别暂停操作到暂停操作识别成功所经过的时长,也就是电子设备确定满足第一触发条件到确定满足暂停条件所经过的时长,这样电子设备回退游戏时,可以回退到开始识别暂停操作的时刻或者之前。在另一些实施例中,电子设备可以从开始游戏起,持续缓存游戏数据。
S102:电子设备确定满足第一触发条件。
S103:电子设备判断是否满足暂停条件。
具体地,S102和S103可以理解为是电子设备识别用户意图的过程,具体为判断用户是否意图暂停游戏,S102可以理解为是电子设备开始识别暂停操作,可以对应识别暂停操作的过程的起始时刻,S103可以理解为是电子设备得到识别暂停操作的结果,满足暂停条件则结果是成功识别暂停操作,不满足暂停条件则结果是识别暂停操作失败,可以对应识别暂停操作的终止时刻。
在一些实施中,电子设备确定满足第一触发条件为上图2-图5所示实施例中的开始识别暂停操作,例如电子设备100检测到用户执行了预设的暂停手势。电子设备确定满足暂停条件为上图2-图5所示实施例中的成功识别暂停操作,例如电子设备100识别到预设识别时长内用户保持暂停手势不变。
具体地,电子设备确定满足第一触发条件之后,会继续判断是否满足暂停条件,当满足暂停条件时,可以确定用户意图暂停游戏,可以暂停游戏和回退游戏,执行S104,当不满足暂停条件时,可以正常进行游戏,并且继续缓存游戏数据。
在一些实施例中,第一触发条件包括识别到预设的暂停手势的情况下,暂停条件可以包括在预设识别时长内用户均保持暂停手势。示例性地,电子设备可以实时获取用户图像,识别每一帧的用户图像是否包括暂停手势,当存在一帧的用户图像包括暂停手势(这一帧之前的用户图像不包括暂停手势),可以确定满足第一触发条件,当这一帧之后预设识别时长内的每一帧均包括暂停手势,可以确定满足暂停条件,否则不满足暂停条件。例如,这种情况下,用户是通过手势来暂停游戏。
在另一些实施例中,第一触发条件包括用户的运动姿态的变化程度大于或等于预设变化阈值,暂停条件可以包括接收针对暂停选项的用户操作。可选地,用户的运动姿态的变化程度为:当前的运动姿态相比k秒之前的运动姿态的变化程度,其中k大于或等于0,例如,电子设备可以实时获取用户图像,判断相邻帧的用户图像之间的相似程度,当相似程度大于或等于预设相似阈值时,可以确定满足第一触发条件。可选地,运动姿态的变化程度为:当前的运动姿态相比体感游戏指示执行的动作的变化程度,例如,电子设备可以实时获取用户图像,判断每一帧的用户图像和体感游戏指示执行的动作的相似程度,当相似程度大于或等于预设相似阈值时,可以确定满足第一触发条件。例如,暂停选项为手柄、遥控器等硬件装置上的实体按键,这种情况下,用户是通过手柄、遥控器等硬件装置来暂停游戏。例如,用户发生较多的位移时,电子设备确定满足第一触发条件,接收按压手柄上用于暂停游戏的按 钮时,确定满足暂停条件。
在另一些实施例中,第一触发条件包括检测到用户的语音输入,暂停条件可以包括识别到用户的语音输入包括“暂停”、“pause”等用于暂停游戏的关键词。例如,电子设备预设用于暂停游戏的关键词为“暂停”,用户一开始发出语音“停止”,当电子设备检测到用户输入的语音时,可以确定满足第一触发条件,用户例如吐词不清或者不知道用于暂停游戏的关键词时,可能多次尝试发出语音“pause”、“暂停”,当电子设备检测到用户输入的语音包括“暂停”时,确定满足暂停条件。例如,这种情况下,用户是通过语音来暂停游戏。
不限于上述示例的情况,在另一些实施例中,第一触发条件也可以包括识别到用于触发菜单显示的手势,电子设备确定预设识别时长内用户保持该手势不变时,可以确定用户意图查看菜单,因此可以显示该菜单,该菜单包括虚拟按键:暂停选项。电子设备可以接收针对暂停选项的用户操作(如手势、语音等),此时电子设备可以确定满足暂停条件,因此可以暂停游戏。本申请对识别用户是否意图暂停游戏的具体方式不作限定,但需要说明的是,电子设备从开始识别暂停操作(即确定满足第一触发条件)到成功识别暂停操作(即确定满足暂停条件),需要一定时长,也就是识别暂停操作需要一定时长,该时长即为S101中的t。
S104:电子设备暂停游戏和回退游戏。
具体地,电子设备识别出用户意图暂停游戏的情况下,可以将游戏回退到更早的游戏场景,并且暂停游戏,具体示例可参见上图4。其中,更早的游戏场景为电子设备成功识别暂停操作的时刻之前h秒的场景,h大于0,在一些实施例中,电子设备缓存的游戏数据为最近n秒的游戏数据,n大于或等于h,电子设备可以使用缓存的游戏数据显示更早的游戏场景。
在一些实施例中,暂停游戏时,电子设备可以不缓存游戏数据,取消暂停游戏之后,可以继续缓存游戏数据,以用于下一次回退游戏。
在一些实施例中,h等于识别暂停操作所需的时长t,即回退到电子设备开始识别暂停操作的时刻,在另一些实施例中,h大于识别暂停操作所需的时长t,即回退到电子设备开始识别暂停操作之前。
本申请可以在暂停游戏的时候回退游戏,从而避免识别暂停操作时导致游戏失去控制的情况,例如发生不利游戏事件。
在一些实施例中,若电子设备在识别暂停操作的过程中检测到触发了游戏事件,可以在满足暂停条件(暂停操作识别成功)时,暂停游戏和回退游戏,若电子设备在识别暂停操作的过程中未检测到触发了游戏事件,可以在满足暂停条件(暂停操作识别成功)时,仅暂停游戏,也就是说,未因为识别暂停操作造成损失(例如未发生游戏事件)的情况可以不回退游戏,减少不必要的回退过程,从而减少处理资源的使用,用户体验也更好。
请参见图7,图7是本申请实施例提供的又一种暂停游戏的方法的流程示意图。该方法可以包括但不限于如下步骤:
S201:电子设备缓存游戏数据。
S202:电子设备确定满足第一触发条件。
具体地,S201-S202和图6的S101-S102类似,具体可参见图6的S101-S102的说明。
S203:电子设备判断识别暂停操作的过程是否经历游戏事件,以及是否满足暂停条件。
具体地,电子设备判断是否满足暂停条件的方式和图6的S103类似,具体可参见图6的S103的说明。识别暂停操作的过程为:从电子设备确定满足第一触发条件开始,到电子设备得到识别暂停操作的结果之间的过程。游戏事件例如为障碍到达、道具到达、下一个待执 行的动作到达(如上图2-图5所示的第6次的“弯曲手臂”的动作到达)等。
在一些实施例中,电子设备可以在识别暂停操作时,可以记录触发的游戏事件(例如是否发生、发生次数、发生时刻、事件类型等),当得到识别暂停操作的结果时,根据记录的内容判断识别暂停操作的过程是否经历游戏事件。
具体地,电子设备确定满足第一触发条件之后,会继续判断是否满足暂停条件,当满足暂停条件时,可以确定用户意图暂停游戏,若识别暂停操作的过程经历了游戏事件,可以暂停游戏和回退游戏,执行S204,具体示例可参见上图4。若识别暂停操作的过程未经历游戏事件,电子设备可以仅暂停游戏,执行S205,不回退游戏,具体示例可参见上图3。当不满足暂停条件时,电子设备可以正常进行游戏,并且继续缓存游戏数据。
S204:电子设备暂停游戏和回退游戏。
具体地,S204和图6的S104类似,具体可参见图6的S104的说明。
在一些实施例中,电子设备回退游戏时,回退的游戏场景可以为识别暂停操作时发生的游戏事件之前的游戏场景,例如,假设电子设备成功识别暂停操作的时刻之前s秒发生了游戏事件,回退的游戏场景为电子设备成功识别暂停操作的时刻之前h秒,则h大于s。
S205:电子设备暂停游戏。
在一些实施例中,若电子设备在识别暂停操作的过程中检测到触发游戏事件,当该游戏事件为预设的重大不利事件时,可以先暂停游戏,这样可以避免识别暂停操作时发生重大不利事件导致游戏受到严重影响,例如游戏人物死亡导致游戏直接结束,进一步保证游戏的正常进行。
请参见图8,图8是本申请实施例提供的又一种暂停游戏的方法的流程示意图。该方法可以包括但不限于如下步骤:
S301:电子设备缓存游戏数据。
S302:电子设备确定满足第一触发条件。
具体地,S301-S302和图6的S101-S102类似,具体可参见图6的S101-S102的说明。
S303:电子设备判断触发的游戏事件是否为预设事件(预设的重大不利事件)。
具体地,电子设备识别暂停操作的过程中,可以检测到触发游戏事件,可选地,触发为即将发生,例如下一帧或下几帧(如下一秒)会执行该游戏事件,电子设备可以判断触发的游戏事件是否为预设的重大不利事件,例如风险等级大于或等于风险阈值的游戏事件,预设事件列表中的游戏事件。当电子设备确定触发的游戏事件为预设的重大不利事件,可以在执行该游戏事件之前暂停游戏,例如确定该游戏事件为重大不利事件的时候暂停游戏,执行S304,同时也会继续识别暂停操作,具体示例可参见上图5。当该游戏事件不为重大不利事件,电子设备可以继续判断是否满足暂停条件,即继续识别暂停操作,执行S305,并且会继续进行游戏,具体示例可参见上图2的(B)。
在一些实施例中,预设的重大不利事件执行后会导致游戏受到严重影响,例如重大不利事件包括游戏人物死亡,游戏人物死亡后游戏会直接结束,或者重大不利事件包括行进路线偏离严重,导致无法回到正常路线只能重新开始游戏等。重大不利事件以外的游戏事件例如包括障碍到达、道具到达、下一个待执行的动作到达等,虽然卡在当前位置不懂或者无法获得游戏分数,但是游戏仍然可以继续。
S304:电子设备暂停游戏。
具体地,电子设备可以在执行重大不利事件之前暂停游戏,并且继续判断是否满足暂停 条件,即继续识别暂停操作,执行S305。
S305:电子设备判断是否满足暂停条件。
具体地,电子设备判断是否满足暂停条件的方式和图6的S103类似,具体可参见图6的S103的说明。
在一些实施例中,电子设备已在执行重大不利事件之前暂停游戏,即执行了S304。和图6的S103中电子设备确定满足暂停条件时暂停游戏和回退游戏不同,S305中,电子设备确定满足暂停条件时,仅回退游戏,执行S306,因为此时游戏已处于暂停状态,因此无需再暂停游戏。
在另一些实施例中,电子设备识别暂停操作时未触发重大不利事件,未执行S304。当电子设备确定满足暂停条件时会暂停游戏和回退游戏,S305和图6的S103一致,具体可参见图6的S103的说明。
S306:电子设备回退游戏。
具体地,电子设备回退游戏的方式和图6的S104中回退游戏的方式类似,不再赘述。电子设备执行S306后,游戏在回退后的游戏场景下保持暂停状态,和图6的S104执行之后游戏的状态相同,具体示例可参见上图4。
S307:暂停游戏和回退游戏。
具体地,S307和图6的S104类似,具体可参见图6的S104的说明。
在一些实施例中,电子设备识别暂停操作时虽然未触发重大不利事件,但触发了其他游戏事件。电子设备回退游戏时,回退的游戏场景可以为上述其他游戏事件发生之前的游戏场景,例如,假设电子设备成功识别暂停操作的时刻之前s秒发生了上述其他游戏事件,回退的游戏场景为电子设备成功识别暂停操作的时刻之前h秒,则h大于s。
在一些实施例中,电子设备回退游戏时,回退的游戏场景所处的时刻和下一个游戏事件的执行时刻的差值小于或等于预设时间间隔,则电子设备可以将回退的游戏场景设置为更早的游戏场景,避免回退游戏后下一个游戏事件过近导致用户无法有效操作来完成该游戏事件,保证用户可以正常进行游戏,具体示例如下图9所示。
请参见图9,图9示例性示出一种游戏的进程示意图。
如图9所示,时间轴t为体感游戏的时间轴,不等同于实际时间的时间轴,在该时间轴上,同一时刻表征当前所处的游戏场景相同,即游戏数据相同,但实际所处时刻可能不同,例如在2021年1月1日的上午八点四十五分和下午三点四十五分进行该体感游戏时,所处的游戏场景为均为时刻t 1所在的游戏场景。在该时间轴上的任一时刻也可以称为游戏点。当前时刻为t 1时,电子设备可以开始识别暂停操作,例如检测到用户执行了预设的暂停手势,在时刻t 2,电子设备成功识别暂停操作,例如识别到预设识别时长内用户保持暂停手势不变,预设识别时长为(t 2-t 1),t 1到t 2之间可以理解为是识别暂停操作的过程。电子设备识别暂停操作时,在时刻t 3检测到执行了游戏事件A,即识别暂停操作的过程中发生了事件A。电子设备成功识别暂停操作时,会暂停游戏和回退游戏,原本设置回退的游戏场景所处的时刻(简称为回退点)为电子设备开始识别暂停操作的时刻,即t 1,但由于游戏事件A的发生时刻t 3和t 1的差值小于或等于预设时间间隔d,因此电子设备将回退点提早为满足(t 3-t 0)≥d的时刻t 0,也就是说,电子设备会将游戏场景回退到t 0所在的游戏场景,并在t 0暂停游戏。取消暂停游戏之后,用户有足够的时间进行操作来应对事件A,用户体验感好。
在一些实施例中,图9所示情况下,电子设备缓存的游戏数据为最近n秒的游戏数据,n大于或等于(t 2-t 0),电子设备可以使用缓存的游戏数据回退到时刻t 0。在另一些实施例中,回退点为开始识别暂停操作的时刻t 1时,n大于或等于(t 2-t 1),即n大于或等于识别暂停操 作所需的时长。
在一些实施例中,电子设备进行的体感游戏可以为多人游戏,即可以有多个用户同时进行游戏。这多个用户中仅有一个用户执行暂停操作时,电子设备回退游戏的方式和以上实施例所述的回退游戏的方式一致,可选地,其他用户可以在电子设备识别暂停操作时可以正常游戏,取消暂停之后电子设备可以回放其他用户的游戏过程,具体示例如下图10A所示。
请参见图10A,图10A示例性示出又一种游戏的进程示意图。
如图10A所示,时间轴t为体感游戏的时间轴,具体可参见图9的时间轴t的说明。当前时刻为t 1时,电子设备检测到用户A执行了暂停操作,可以理解为是电子设备开始识别用户A的暂停操作,例如检测到用户A的语音,在时刻t 2,电子设备成功识别用户A的暂停操作,例如识别到用户A的语音包括“pause”,t 1到t 2之间可以理解为是识别用户A的暂停操作的过程(简称识别过程A)。在识别过程A之前的时刻t 0到t 1之间,以及识别过程A中,用户B可以正常进行游戏。在时刻t 2,电子设备成功识别用户A的暂停操作时,电子设备会暂停游戏和回退游戏,假设设置回退的游戏场景所处的时刻(简称为回退点)为电子设备开始识别用户A的暂停操作之前的时刻t 0,也就是说,电子设备会将游戏场景回退到t 0所在的游戏场景,并在t 0暂停游戏。假设回退点t 0到成功识别用户A的暂停操作的时刻t 2之间称为过程B,回退游戏之前,用户B可以在过程B中正常进行游戏。
如图10A所示,在回退点t 0取消暂停游戏之后,用户A可以操作游戏,以正常进行游戏,而用户B此时还不可以操作游戏,电子设备会播放回退游戏之前用户B在回退点t 0和成功识别用户A的暂停操作的时刻t 2之间的游戏过程,即回放过程B,回放过程B时用户B不可以操作游戏,直到时刻t 2用户B才可以操作游戏,以正常进行游戏。例如,在到达用户可操作的时刻t 2之前,电子设备可通过指示灯,游戏人物闪烁、虚影等提示用户,如当前时刻越接近时刻t 2,游戏人物闪烁的频率越快。
在另一些实施例中,电子设备进行的体感游戏可以为多人游戏,即可以有多个用户同时进行游戏。这多个用户中不止一个用户执行暂停操作时,电子设备以最早执行暂停操作(成功识别的暂停操作)的用户为基准来回退游戏,具体方式和以上实施例所述的回退游戏的方式一致,其中的暂停操作即为该基准的暂停操作。可选地,若其他用户在电子设备识别基准的暂停操作时执行了暂停操作,则取消暂停之后电子设备可以在其他用户执行暂停操作之前的时段内回放其他用户的游戏过程,在其他用户执行暂停操作之后其他用户可以正常进行游戏,具体示例如下图10B所示。
请参见图10B,图10B示例性示出又一种游戏的进程示意图。
如图10B所示,时间轴t为体感游戏的时间轴,具体可参见图9的时间轴t的说明。电子设备识别用户A的暂停操作和上图10A一致,不再赘述。在识别过程A之前的时刻t 4,电子设备检测到用户B执行了暂停操作,可以理解为是电子设备开始识别用户B的暂停操作。用户A的暂停操作和用户B的暂停操作可以为相同类型,也可以为不同类型,例如在时刻t 4,电子设备检测到用户B的运动姿态的变化程度大于或等于预设变化阈值。在时刻t 2,电子设备成功识别用户A的暂停操作时,电子设备会暂停游戏和回退游戏,即使电子设备成功识别用户B的暂停操作的时刻早于成功识别用户A的暂停操作的时刻t 2,电子设备也会在得到用户A的暂停操作的识别结果之后,再暂停游戏和回退游戏。电子设备会将游戏场景回退到t 0所在的游戏场景,并在t 0暂停游戏。假设回退点t 0到电子设备开始识别用户B的暂停操作的时刻t 4之间称为过程C,回退游戏之前,用户B可以在过程C中正常进行游戏。
如图10B所示,在回退点t 0取消暂停游戏之后,用户A可以操作游戏,以正常进行游戏,而用户B此时还不可以操作游戏,电子设备会播放回退游戏之前用户B在回退点t 0到开始识别用户B的暂停操作的时刻t 4之间的游戏过程,即回放过程C,回放过程C时用户B不可以 操作游戏,直到时刻t 4用户B才可以操作游戏,以正常进行游戏。
在图10B所示示例中,只要先执行的暂停操作识别成功,不论后执行的暂停操作是否识别成功,电子设备均会以先执行的暂停操作为基准,来暂停游戏和回退游戏,从而避免电子设备识别任意一个用户的暂停操作时造成游戏失控的情况,保证游戏的正常进行。
不限于上述示例的情况,在另一些示例中,先执行的暂停操作(如用户A的暂停操作)识别失败,后执行的暂停操作(如用户B的暂停操作)识别成功,电子设备可以以后执行的暂停操作为基准,来暂停游戏和/或回退游戏。
不限于上述示例的情况,在另一些示例中,电子设备也可以不回放用户B的游戏操作,而是和用户A一样,在回退点即可操作游戏,重新进行游戏。
在另一些实施例中,不同用户可以赋予不同的操作权限,例如仅有管理员账号的用户可以暂停游戏,即使其他账号的用户执行了暂停操作,电子设备也仍然会以有管理员账号的用户是否执行暂停操作,来判断是否暂停游戏和/或回退游戏,可以理解为是上图1-图9所示实施例中的暂停操作是针对有管理员账号的用户而言的。在这种情况下,回退游戏和取消暂停游戏之后的情况示例可参见上图9、图10A和图10B。
示例性地,图9、图10A或者图10B可以理解为是上图6的S104、上图7的S204、上图8的S307中的回退游戏的一种执行方式。图9、图10A或者图10B可以理解为是上述图8的S306的一种执行方式。
基于上图1-图9、图10A-图10B所示的实施例,接下来介绍本申请实施例提供的暂停游戏的方法。
请参见图11,图11是本申请实施例提供的又一种暂停游戏的方法。该方法可以应用于图1所示的电子设备100。该方法可以包括但不限于如下步骤:
S401:电子设备运行游戏时,接收到第一用户的第一用户操作。
在一些实施例中,电子设备运行的游戏为体感游戏。
在一些实施例中,第一用户操作包括第二用户操作和第三用户操作。上述接收到第一用户的第一用户操作,包括:接收到第二用户操作;响应于第二用户操作,识别第一用户是否意图暂停游戏;接收到第三用户操作;基于第二用户操作和第三用户操作,识别到第一用户意图暂停游戏。可选地,上述接收到第二用户操作,响应于第二用户操作,识别第一用户是否意图暂停游戏,可以理解为是以上实施例中的满足第一触发条件,也可以理解为是以上实施例中的开始识别暂停操作。可选地,上述接收到第三用户操作;基于第二用户操作和第三用户操作,识别到第一用户意图暂停游戏,可以理解为是以上实施例中的满足暂停条件,也可以理解为是以上实施例中的成功识别暂停操作。示例性地,接收到第二用户操作的起始游戏点(也就是接收到第一用户操作的起始游戏点)可以为开始识别暂停操作的游戏点,接收到第三用户操作的截止游戏点(也就是接收到第三用户操作的截止游戏点)可以为成功识别暂停操作的游戏点。
其中,一个游戏点可以对应游戏中的一个时刻,在同一个游戏点所处的游戏场景相同,游戏数据相同,但对应的实际时刻可能不同,例如暂停游戏之前接收到第一用户操作的起始游戏点,和暂停游戏时回退到的第一游戏点相同,但是前者对应的实际时刻早于后者对应的实际时刻。具体示例可参见图9、图10A、图10B所示的时间轴上的时刻。
在一些实施例中,上述接收到第二用户操作,包括:在第二游戏点接收到第一手势,可选地,该步骤可以为以上实施例中的检测到用户执行了预设的暂停手势。上述接收到第三用 户操作,包括:在预设识别时长内接收到第一手势,第二游戏点和接收到第一用户操作的截止游戏点间隔的时长为预设识别时长,该步骤可以为以上实施例中的确定预设识别时长内用户保持暂停手势不变。可以理解为是用户用于暂停游戏的第一用户操作为在预设识别时长内保持一个手势不变。
在另一些实施例中,第二用户操作为第二手势,第三用户操作为第三手势,第二手势和第三手势组成的手势用于暂停游戏。可以理解为是用户用于暂停游戏的第一用户操作为按照顺序执行的多个手势。
在另一些实施例中,第二用户操作为第一语音输入,第三用户操作为第二语音输入,第一语音输入和第二语音输入组成的语音输入用于暂停所述游戏,例如,第一语音输入为“游”,第二语音输入为“戏暂停”,可选地,第二语音输入包括以上实施例中用于暂停游戏的关键词,例如“暂停”。可以理解为是用户用于暂停游戏的第一用户操作为语音输入,该语音输入可以包括用于暂停游戏的关键词。
在另一些实施例中,第二用户操作为运动姿态,第二用户操作的变化程度大于或等于预设变化阈值,第三用户操作包括作用于第一按键的用户操作,可选地,第三用户操作还包括运动姿态,例如,第二用户操作为用户从位置1走到位置2,第三用户操作包括用户从位置2走到位置3,以及接收到作用于手柄上用于暂停的按键的按压操作。可以理解为是用户原本进行游戏时未手持手柄、遥控器等包括用于暂停的按键的硬件装置,用户用于暂停游戏的第一用户操作包括用户拿到硬件装置和操作用于暂停的按键。
S402:电子设备确定第一用户操作用于暂停游戏时,回退到第一游戏点暂停游戏。
在一些实施例中,电子设备确定第一用户操作用于暂停游戏,可以理解为是以上实施例中满足暂停条件,也可以理解为是以上实施例中的成功识别暂停操作。图11的示例流程可参见上图6。
具体地,第一游戏点早于接收到第一用户操作的截止游戏点。第一游戏点是根据以下一项或多项确定的:接收到第一用户操作的起始游戏点、截止游戏点,以及起始游戏点和截止游戏点之间的游戏事件发生的游戏点。
在一些实施例中,第一游戏点为预设的游戏点,例如接收到第一用户操作的起始游戏点,又例如早于接收到第一用户操作的起始游戏点。
在另一些实施例中,接收到第一用户操作期间(即起始游戏点和截止游戏点之间)发生了第一预设事件,第一游戏点可以是根据第一预设事件发生的第三游戏点确定的,例如早于第三游戏点。可选地,第一预设事件为接收到第一用户操作期间最早发生的游戏事件,可选地,第一预设事件为风险等级大于或等于预设等级阈值的游戏事件,可选地,电子设备可以将游戏事件的风险等级划分为三类:小于第一阈值的类型一、大于或等于第一阈值并小于第二阈值的类型二、大于或等于第二阈值的类型三,其中类型三的游戏事件可以为以上实施例中的预设的重大不利事件,第一预设事件为类型二的游戏事件,例如,重大不利事件为游戏人物死亡,第一预设事件为障碍到达、道具到达。
在一些实施例中,第一游戏点为早于第四游戏点至少预设时间间隔的游戏点,第四游戏点为第一游戏点和接收到第一用户操作的截止游戏点之间最早的游戏事件发生的游戏点。可选地,电子设备可以先根据接收到第一用户操作的起始游戏点、截止游戏点和这期间的游戏事件发生的游戏点中一项或多项确定一个待回退的游戏点,但电子设备发现该游戏点和第四游戏点之间的时间间隔小于预设时间间隔,因此可以将第一游戏点调整为相比该游戏点更早的游戏点,以保证第一游戏点和第四游戏点的时间间隔大于或等于预设时间间隔。具体示例 可参见上图9。
在一些实施例中,电子设备确定第一用户操作用于暂停游戏时,若接收到第一用户操作期间发生了游戏事件,则回退到第一游戏点暂停游戏。在另一些实施例中,电子设备确定第一用户操作用于暂停游戏时,若接收到第一用户操作期间未发生游戏事件,则就在截止游戏点暂停游戏。具体示例流程可参见上图7。
在一些实施例中,当接收到第一用户操作期间触发了第二预设事件时,电子设备暂停游戏,可选地,触发游戏事件可以为即将发生该游戏事件,例如下一帧发生该游戏事件,可选地,电子设备在发生第二预设事件的游戏点之前的游戏点暂停游戏,例如电子设备在触发第二预设事件的游戏点暂停游戏,可选地,第二预设事件为以上实施例中的重大不利事件,可选地,发生第二预设事件后游戏会受到严重影响,例如重大不利事件包括游戏人物死亡,游戏人物死亡后游戏会直接结束。可选地,电子设备确定第一用户操作用于暂停游戏时,可以保持游戏的暂停状态不变,可选地,电子设备确定第一用户操作用于暂停游戏时,可以回退到第一游戏点,第一游戏点早于上述接收到第一用户操作期间电子设备暂停游戏的游戏点。具体示例流程可参见上图8。
在一些实施例中,电子设备运行的游戏为多人游戏,即可以有多个人同时进行游戏,但游戏暂停时,这多个人均无法正常进行游戏。假设这多个人为第一用户和第二用户。在一些实施例中,接收到第一用户操作期间第二用户正常进行游戏,则恢复运行游戏之后(也就是以上实施例中的取消暂停游戏之后),电子设备可以回放第二用户在第一游戏点到接收到第一用户操作的截止游戏点之间的游戏过程,具体示例可参见上图10A。在另一些实施例中,接收到第一用户操作期间电子设备接收第二用户的第四用户操作,即使先成功识别第四用户操作用于暂停游戏,电子设备仍会在成功识别第一用户操作用于暂停游戏时,再回退到第一游戏点暂停游戏。可选地,恢复运行游戏之后,电子设备可以回放第二用户在第一游戏点和接收到第二用户操作的起始游戏点之间的游戏过程,具体示例可参见上图10B。
本申请实施例中,电子设备可以在确定接收到的第一用户操作用于暂停游戏时,即识别到用户意图暂停游戏时,回退到更早的第一游戏点暂停游戏,从而避免接收到第一用户操作期间发生的不利游戏事件,保证游戏的正常进行。
并且,电子设备可以结合接收到第一用户操作期间发生的游戏事件来判断是否回退、回退的游戏点,例如未发生事件时不回退,在保证游戏正常进行的同时,减少不必要的处理资源,又例如回退到的第一游戏点早于接收到第一用户操作期间最早的游戏事件发生的游戏点预设时间间隔,避免恢复运行游戏后下一个游戏事件过近导致用户无法有效操作的问题,提升用户的游戏体验。
需要说明的是,本申请实施例中“至少一个”是指一个或者多个,多个是指两个或两个以上。除非另有定义,本文所使用的所有的技术和科学术语与属于本申请中的技术领域的技术人员通常理解的含义相同。本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。应理解,本申请中除非另有说明,“/”表示或的意思。例如,A/B可以表示A或B。本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。需要说明的是,本申请实施例中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方 案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来计算机程序相关的硬件完成,该计算机程序可存储于计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可存储计算机程序代码的介质。

Claims (16)

  1. 一种暂停游戏的方法,其特征在于,应用于电子设备,所述方法包括:
    运行游戏时,接收到第一用户的第一用户操作;
    确定所述第一用户操作用于暂停所述游戏时,回退到第一游戏点暂停所述游戏,所述第一游戏点是根据所述接收到第一用户的第一用户操作的起始游戏点、所述接收到第一用户的第一用户操作的截止游戏点和所述接收到第一用户的第一用户操作期间的游戏事件发生的游戏点中的一项或多项确定的,所述第一游戏点早于所述截止游戏点。
  2. 如权利要求1所述的方法,其特征在于,所述第一用户操作包括第二用户操作和第三用户操作,所述接收到第一用户的第一用户操作,包括:
    接收到所述第二用户操作;
    响应于所述第二用户操作,识别所述第一用户是否意图暂停所述游戏;
    接收到所述第三用户操作;
    基于所述第二用户操作和所述第三用户操作,识别到所述第一用户意图暂停游戏。
  3. 如权利要求2所述的方法,其特征在于,所述接收到所述第二用户操作,包括:
    在第二游戏点接收到第一手势;
    所述接收到所述第三用户操作,包括:
    在预设识别时长内接收到所述第一手势,所述第二游戏点和所述截止游戏点间隔的时长为所述预设识别时长。
  4. 如权利要求2所述的方法,其特征在于,所述第二用户操作为第二手势,所述第三用户操作为第三手势,所述第二手势和所述第三手势组成的手势用于暂停所述游戏。
  5. 如权利要求2所述的方法,其特征在于,所述第二用户操作为第一语音输入,所述第三用户操作为第二语音输入,所述第一语音输入和所述第二语音输入组成的语音输入用于暂停所述游戏。
  6. 如权利要求2所述的方法,其特征在于,所述第二用户操作为运动姿态,所述第二用户操作的变化程度大于或等于预设变化阈值,所述第三用户操作包括作用于第一按键的用户操作。
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述第一游戏点早于所述起始游戏点,或者所述第一游戏点为所述起始游戏点。
  8. 如权利要求1-6任一项所述的方法,其特征在于,所述回退到第一游戏点暂停所述游戏,包括:
    若所述接收到第一用户的第一用户操作期间发生了游戏事件,回退到所述第一游戏点暂停所述游戏;
    所述方法还包括:
    确定所述第一用户操作用于暂停所述游戏时,若所述接收到第一用户的第一用户操作期 间未发生游戏事件,在所述截止游戏点暂停所述游戏。
  9. 如权利要求8所述的方法,其特征在于,所述第一游戏点是根据所述接收到第一用户的第一用户操作期间的游戏事件发生的游戏点确定的,所述第一游戏点早于第三游戏点,所述第三游戏点为所述接收到第一用户的第一用户操作期间的第一预设事件发生的游戏点。
  10. 如权利要求9所述的方法,其特征在于,所述第一预设事件为所述接收到第一用户的第一用户操作期间最早发生的游戏事件。
  11. 如权利要求1-6任一项所述的方法,其特征在于,所述第一游戏点和第四游戏点的时间间隔大于或等于预设时间间隔,所述第四游戏点是所述第一游戏点和所述截止游戏点之间最早的游戏事件发生的游戏点。
  12. 如权利要求1-11任一项所述的方法,其特征在于,所述方法还包括:
    当所述接收到第一用户的第一用户操作期间触发了第二预设事件时,暂停所述游戏。
  13. 如权利要求1-12任一项所述的方法,其特征在于,所述游戏为多人游戏,所述方法还包括:
    所述接收到第一用户的第一用户操作期间,接收到第二用户的第四用户操作,所述第四用户操作用于暂停所述游戏。
  14. 如权利要求1-13任一项所述的方法,其特征在于,所述游戏为多人游戏,所述回退到第一游戏点暂停所述游戏之后,所述方法还包括:
    接收所述第一用户的第五用户操作;
    响应于所述第五用户操作,恢复运行所述游戏;
    恢复运行所述游戏之后,播放第二用户在所述第一游戏点和第五游戏点之间的游戏过程;当所述接收到第一用户的第一用户操作期间接收到所述第二用户的第六用户操作时,所述第五游戏点为所述接收到所述第二用户的第六用户操作的起始游戏点,所述第六用户操作用于触发所述电子设备识别所述第二用户是否意图暂停所述游戏;当所述接收到第一用户的第一用户操作期间未接收到所述第二用户的所述第六用户操作时,所述第五游戏点为所述截止游戏点。
  15. 一种电子设备,其特征在于,包括收发器、处理器和存储器,所述存储器用于存储计算机程序,所述处理器调用所述计算机程序,用于执行如权利要求1-14任一项所述的方法。
  16. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现权利要求1-14任一项所述的方法。
PCT/CN2022/124714 2021-10-15 2022-10-11 暂停游戏的方法及电子设备 WO2023061381A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111205009.2 2021-10-15
CN202111205009.2A CN115970273A (zh) 2021-10-15 2021-10-15 暂停游戏的方法及电子设备

Publications (1)

Publication Number Publication Date
WO2023061381A1 true WO2023061381A1 (zh) 2023-04-20

Family

ID=85963510

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124714 WO2023061381A1 (zh) 2021-10-15 2022-10-11 暂停游戏的方法及电子设备

Country Status (2)

Country Link
CN (1) CN115970273A (zh)
WO (1) WO2023061381A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080004095A1 (en) * 2006-07-03 2008-01-03 Sony Computer Entertainment Inc. Game control method and apparatus for controlling resumption of game
US20130172070A1 (en) * 2011-12-19 2013-07-04 Empire Technology Development Llc Pause and resume schemes for gesture-based game
US10173136B1 (en) * 2016-03-23 2019-01-08 United Services Automobile Association (Usaa) Methods and systems for gamification
CN113332713A (zh) * 2015-09-30 2021-09-03 索尼互动娱乐美国有限责任公司 用于云游戏的多用户演示流式传输服务

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080004095A1 (en) * 2006-07-03 2008-01-03 Sony Computer Entertainment Inc. Game control method and apparatus for controlling resumption of game
US20130172070A1 (en) * 2011-12-19 2013-07-04 Empire Technology Development Llc Pause and resume schemes for gesture-based game
CN113332713A (zh) * 2015-09-30 2021-09-03 索尼互动娱乐美国有限责任公司 用于云游戏的多用户演示流式传输服务
US10173136B1 (en) * 2016-03-23 2019-01-08 United Services Automobile Association (Usaa) Methods and systems for gamification

Also Published As

Publication number Publication date
CN115970273A (zh) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2020228815A1 (zh) 一种语音唤醒方法及设备
US20210306700A1 (en) Method for displaying interaction information, and terminal
WO2021008534A1 (zh) 一种语音唤醒的方法和电子设备
CN110505408B (zh) 终端拍摄方法、装置、移动终端及可读存储介质
WO2020103763A1 (zh) 根据眼球焦点控制显示屏的方法和头戴电子设备
AU2014230175B2 (en) Display control method and apparatus
EP3179474A1 (en) User focus activated voice recognition
US20220343919A1 (en) Voice-Controlled Split-Screen Display Method and Electronic Device
US11335345B2 (en) Method for voice control, terminal, and non-transitory computer-readable storage medium
US11785331B2 (en) Shooting control method and terminal
CN110139116B (zh) 直播间切换方法、装置及存储介质
WO2019149044A1 (zh) 屏幕亮灭控制方法、移动终端
WO2019214502A1 (zh) 多媒体内容的操作方法和移动终端
WO2019085774A1 (zh) 应用程序控制方法和移动终端
CN109618218B (zh) 一种视频处理方法及移动终端
WO2022042274A1 (zh) 一种语音交互方法及电子设备
WO2019019232A1 (zh) 基于vr头戴设备播放视频的方法及vr头戴设备
CN114095437A (zh) 发送数据包的方法、装置、电子设备和存储介质
WO2018139036A1 (ja) 情報処理装置、情報処理方法およびプログラム
WO2021190509A1 (zh) 基于运动的呼叫处理方法、装置及电子设备
WO2023061381A1 (zh) 暂停游戏的方法及电子设备
EP4060956A1 (en) Data processing method and electronic device
US20220323848A1 (en) Intelligent Voice Playing Method and Device
CN110532050B (zh) 运动数据刷新方法、可穿戴设备及计算机可读存储介质
WO2023173894A1 (zh) 手表表冠控制视频播放的方法、手表及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22880318

Country of ref document: EP

Kind code of ref document: A1