Object interaction method and device, electronic equipment, storage medium and program product
By introducing virtual natural elements into virtual scenes and responding to interactive instructions based on their positional relationship with virtual objects, the problem of single interaction mode of virtual objects is solved, the human-computer interaction efficiency and hardware resource utilization rate are improved, and the interaction in virtual space is enhanced Experience.
Patent Information
- Application Number
- CN202310741052.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the interaction method of virtual objects in the virtual space is single, resulting in low human-computer interaction efficiency, low hardware resource utilization, and the interaction is too simple or too fast, so that the processing resources of electronic devices cannot be fully utilized.
By introducing virtual natural elements into the virtual scene, responding to interactive instructions based on their positional relationship with the virtual object, controlling the virtual object to perform different interaction operations, using the functions of virtual natural elements to interfere with and affect the interaction of virtual objects, enriching the interaction methods and improving the Interaction efficiency.
It realizes diversified interaction between virtual objects, improves human-computer interaction efficiency and hardware resource utilization, and enhances the interactive experience in virtual space.
Smart Images

Figure CN119158263A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet and human-computer interaction technology, and in particular to an object interaction method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] Display technology based on graphics processing hardware has expanded the channels for perceiving the environment and obtaining information, especially multimedia technology for virtual scenes. With the help of human-computer interaction engine technology, it can realize diversified interactions between virtual objects controlled by users or artificial intelligence according to actual application needs. It has various typical application scenarios. For example, in game scenarios, it can simulate the real interaction process between virtual objects.
[0003] In the related art, virtual objects are restricted from interacting freely in a virtual space. Virtual objects in the virtual space can only interact based on their own virtual props. The interaction method is single and only uses the interaction method of virtual props. Or, virtual objects need to interact multiple times to end the interaction in the virtual space, resulting in low human-computer interaction efficiency and waste of hardware processing resources of electronic devices. Or, the interaction between virtual objects is too simple and ends too quickly, resulting in low utilization of hardware resources. Summary of the invention
[0004] The embodiments of the present application provide an object interaction method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the diversity of interaction methods and human-computer interaction efficiency in game scenes.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides an object interaction method, including:
[0007] Displaying a first virtual object in a first virtual space of a virtual scene and displaying at least one second virtual object;
[0008] displaying a first virtual natural element in the first virtual space;
[0009] When the relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition, in response to a first interaction instruction, controlling the first virtual object to perform a first interaction operation on the second virtual object, and during the execution of the first interaction operation, the target attribute value of the second virtual object remains unchanged;
[0010] When the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, in response to a second interaction instruction, the first virtual object is controlled to perform a second interaction operation on the second virtual object. During the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
[0011] The present application provides an object interaction device, including:
[0012] A display module, configured to display a first virtual object in a first virtual space of a virtual scene and to display at least one second virtual object;
[0013] and, for displaying a first virtual natural element in the first virtual space;
[0014] a control module, configured to control the first virtual object to perform a first interaction operation on the second virtual object in response to a first interaction instruction when the relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition, wherein during the execution of the first interaction operation, a target attribute value of the second virtual object remains unchanged;
[0015] And, when the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, in response to a second interaction instruction, control the first virtual object to perform a second interaction operation on the second virtual object, and during the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
[0016] In the above solution, the display module is further used to display the first virtual object in a second virtual space, and the second virtual space includes a second virtual natural element belonging to a natural phenomenon.
[0017] When the distance between the first virtual object and the second virtual natural element is less than a distance threshold, transmitting the first virtual object from the second virtual space to the first virtual space;
[0018] The first virtual object is displayed at a target position in the first virtual space.
[0019] In the above solution, the display module is further used to control the second virtual natural element to transform into a virtual portal when the distance between the first virtual object and the second virtual natural element is less than a distance threshold;
[0020] When the first virtual object enters the virtual portal, the first virtual object is transmitted from the second virtual space to the first virtual space.
[0021] In the above solution, the display module is further used to display the first virtual object and task guidance information in the second virtual space, and the task guidance information is used to indicate that the first virtual space can be entered by completing the target task;
[0022] The control module is further configured to control the first virtual object to execute the target task in response to an execution instruction for the target task based on the task guidance information;
[0023] The display module is further configured to transmit the first virtual object from the second virtual space to the first virtual space when the target task is completed;
[0024] The first virtual object is displayed at a target position in the first virtual space.
[0025] In the above solution, the display module is further used to display the first virtual object in the second virtual space and dynamically display the interaction score of the first virtual object;
[0026] The interaction score is obtained by the first virtual object interacting with the third virtual object in the virtual scene, and the first virtual object and the third virtual object are in a hostile relationship;
[0027] When the interaction score reaches a score threshold, transmitting the first virtual object from the second virtual space to the first virtual space;
[0028] The first virtual object is displayed at a target position in the first virtual space.
[0029] In the above solution, the display module is further used to display the first virtual object transmitted from the second virtual space to the first virtual space in the first virtual space of the virtual scene;
[0030] and, for dynamically displaying, in the first virtual space, a remaining time that the first virtual object can stay in the first virtual space;
[0031] When the remaining time is zero, the first virtual object is transmitted back to the second virtual space.
[0032] In the above solution, the display module is further used to obtain the center position of the first virtual space;
[0033] Determine a circular area with the center position as the center and the target length as the radius;
[0034] At the edge of the circular area, a first virtual natural element belonging to a natural phenomenon is displayed.
[0035] In the above solution, the first virtual space includes at least two natural element display positions, and the natural element display positions are used to display the first virtual natural element;
[0036] The display module is further used to display a first virtual natural element belonging to a natural phenomenon at a first natural element display position in the first virtual space;
[0037] and, after displaying a first virtual natural element belonging to a natural phenomenon at a first natural element display position in the first virtual space, obtaining a position change period of the first virtual natural element;
[0038] When it is determined based on the position change period that the position change time arrives, the first virtual natural element is changed from the first natural element display position to the second natural element display position, so that the first virtual natural element is displayed through the second natural element display position.
[0039] In the above solution, the device further comprises:
[0040] A determination module, configured to obtain a position change strategy of the first virtual natural element when it is determined based on the position change period that a position change time has arrived;
[0041] The position change strategy is used to indicate the display order of the first virtual natural element at the display positions of the at least two natural elements;
[0042] Based on the position transformation strategy and the first natural element display position, the second natural element display position is determined from the at least two natural element display positions.
[0043] In the above solution, the display module is further used to display a first virtual natural element belonging to a natural phenomenon and having a first size in the first virtual space;
[0044] And, after displaying a first virtual natural element belonging to a natural phenomenon and having a first size in the first virtual space, the size of the first virtual natural element is transformed from the first size to a second size, where the second size is different from the first size.
[0045] In the above solution, the display module is further used to display the outline corresponding to the entity of the second virtual object when the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset condition;
[0046] When the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, the entity of the second virtual object is displayed.
[0047] In the above solution, the display module is further used to control the brightness of the first virtual space to be lower than a brightness threshold when the relative position relationship between the first virtual object and the first virtual natural element does not meet a preset condition;
[0048] When the relative position relationship between the first virtual object and the first virtual natural element meets a preset condition, the brightness of the first virtual space is controlled to reach a brightness threshold.
[0049] In the above solution, the display module is further used to display virtual resources used as rewards in the first virtual space when the first virtual object kills the second virtual object in the first virtual space, and the virtual resources are used in the first virtual space;
[0050] The control module is further configured to receive the virtual resource in response to a receiving operation on the virtual resource.
[0051] In the above solution, the display module is further used to display the first virtual object transmitted from the second virtual space to the first virtual space in the first virtual space of the virtual scene;
[0052] and, for displaying a virtual portal when the first virtual object kills the second virtual object in the first virtual space;
[0053] When the first virtual object enters the virtual portal, the first virtual object is teleported back to the second virtual space.
[0054] In the above solution, the display module is further used to dynamically display, in the first virtual space, the remaining time that the first virtual object can be in the first virtual space;
[0055] When the remaining time is zero and there is a second virtual object in a survival state in the first virtual space, failure indication information is displayed, where the failure indication information is used to indicate that the interaction of the first virtual object in the first virtual space has failed.
[0056] In the above solution, the display module is further used to display a target special effect at a target part of the second virtual object when the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition;
[0057] The target special effect is used to indicate that the target part is a weak part of the second virtual object.
[0058] In the above solution, the control module is further used to control the movement of the first virtual natural element in the first virtual space;
[0059] The moving trajectory of the first virtual natural element in the first virtual space is the target trajectory.
[0060] An embodiment of the present application provides an electronic device, including:
[0061] A memory for storing executable instructions;
[0062] The processor is used to implement the object interaction method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0063] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the object method provided in the embodiment of the present application.
[0064] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the object interaction method provided in the embodiment of the present application.
[0065] The embodiments of the present application have the following beneficial effects:
[0066] A first virtual natural element is displayed in a first virtual space. When the relative position relationship between the second virtual object and the first virtual natural element does not meet a preset condition, the first virtual object performs a first interactive operation on the second virtual object, and the first virtual natural element makes the target attribute value of the second virtual object remain unchanged. When the relative position relationship between the second virtual object and the first virtual natural element meets the preset condition, the first virtual object performs a second interactive operation on the second virtual object, and the first virtual natural element makes the target attribute value of the second virtual object decrease. In this way, the first virtual natural element is used to interfere with the interaction between virtual objects, so that the virtual objects can interact with each other with the help of the function of the first virtual natural element, enriching the interaction mode of virtual objects in the virtual space, improving the efficiency of human-computer interaction, and also improving the utilization rate of hardware resources of electronic equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 is a schematic diagram of the architecture of the object interaction system 100 provided in an embodiment of the present application;
[0068] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0069] Figure 3 is a flowchart of an object interaction method provided in an embodiment of the present application;
[0070] Figure 4 A schematic diagram of an interface in which a second virtual natural element provided in an embodiment of the present application is transformed into a virtual portal;
[0071] Figure 5 A schematic diagram of a display interface for task guidance information provided in an embodiment of the present application;
[0072] Figure 6 A schematic diagram of position transformation of a first virtual natural element provided in an embodiment of the present application;
[0073] Figure 7 A schematic diagram of displaying a second virtual object in a first virtual space provided by an embodiment of the present application;
[0074] Figure 8 A flowchart of an object interaction method provided in an embodiment of the present application;
[0075] Fig. 9 A flowchart of an object interaction method provided in an embodiment of the present application;
[0076] Fig.10 A blueprint for implementing a virtual light beam provided in an embodiment of the present application;
[0077] Fig.11 A blueprint for implementing the movement of a virtual light beam provided in an embodiment of the present application;
[0078] Fig.12 A collision blueprint of virtual light beams provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0080] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0081] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0083] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0084] 1) Shooting games, including first-person shooting games, third-person shooting games, and other games that use firearms for long-range attacks, including but not limited to these.
[0085] 2) Third-person perspective: the in-game camera is positioned a certain distance behind the player character, and the character and all combat elements in the surrounding environment can be seen on the screen.
[0086] 3) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.
[0087] 4) A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal. The virtual scene can be a simulation environment of the real world, a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene may include the sky, land, ocean, etc., and the land may include environmental elements such as deserts and cities. The user can control the virtual character to move in the virtual scene. In some embodiments, the virtual scene can be a game scene, such as a multiplayer online tactical competitive game (Multiplayer Online Battle Arena, MOBA), a shooting game, an auto chess game, etc.
[0088] The user can control the virtual object to perform activities in the game scene, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. The game scene can be displayed from a first-person perspective (for example, the user plays the role of a virtual object in the game from his own perspective); it can also be displayed from a third-person perspective (for example, the user chases the virtual object in the game to play the game); it can also be displayed from a bird's-eye view, and the above perspectives can be switched at will.
[0089] 5) Virtual objects, images of various people and objects that can interact in a virtual scene, or movable objects in a virtual scene. The movable objects can be virtual characters, virtual animals, cartoon characters, etc. The virtual object can be a virtual image in a virtual scene that represents a user. A virtual scene can include multiple virtual objects, each of which has its own shape and volume in the game scene and occupies a part of the space in the virtual scene.
[0090] For example, the virtual object may be a user character controlled by an operation on the client, an artificial intelligence (AI) trained to fight in a virtual scene, or a non-player character (NPC) set in a virtual scene interaction. The number of virtual objects participating in the interaction in the virtual scene may be preset or dynamically determined according to the number of clients joining the interaction.
[0091] 6) Client, also known as the user end, refers to the program corresponding to the server that provides local services to users. Except for some applications that can only run locally, it is generally installed on an ordinary client and needs to cooperate with the server to run. That is, there must be corresponding servers and service programs in the network to provide corresponding services. In this way, specific communication connections need to be established between the client and server to ensure the normal operation of the application, such as the game client.
[0092] Based on the above explanations of the nouns and terms involved in the embodiments of the present application, in order to facilitate easier understanding of the object interaction method provided in the embodiments of the present application, the object interaction system provided in the embodiments of the present application is first described. Figure 1 , Figure 1It is a schematic diagram of the architecture of the object interaction system 100 provided in the embodiment of the present application. In order to support an exemplary application, the terminal 400 is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and a wireless or wired link is used to realize data transmission. In practical applications, the computing power of the server 200 is used to complete the virtual scene calculation and output the virtual scene at the terminal 400. Taking the visual perception of the virtual scene as an example, the server 200 calculates the display data related to the virtual scene (such as scene data) and sends it to the terminal 400 through the network 300. The terminal 400 relies on the graphics computing hardware to complete the loading, parsing and rendering of the display data, and relies on the graphics output hardware to output the virtual scene to form a visual perception. For example, a two-dimensional video frame can be presented on the display screen of a smartphone, or a video frame that realizes a three-dimensional display effect can be projected on the lenses of augmented reality / virtual reality glasses; for the perception of the form of the virtual scene, it can be understood that the corresponding hardware output of the terminal device 400 can be used, such as using a microphone to form an auditory perception, using a vibrator to form a tactile perception, and so on. Specifically,
[0093] The terminal 400 is used to send a data acquisition request corresponding to the first virtual space of the virtual scene to the server 200;
[0094] The server 200 is used to return data corresponding to the first virtual space to the terminal 400 in response to the data acquisition request sent by the terminal;
[0095] The terminal 400 is further configured to display a first virtual object in the first virtual space of the virtual scene and at least one second virtual object when receiving data corresponding to the first virtual space returned by the server 200; and display a first virtual natural element in the first virtual space;
[0096] The terminal 400 is further configured to, when the relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition, respond to a first interaction instruction to control the first virtual object to perform a first interaction operation on the second virtual object, and during the execution of the first interaction operation, the target attribute value of the second virtual object remains unchanged;
[0097] And, when the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, in response to a second interaction instruction, control the first virtual object to perform a second interaction operation on the second virtual object, and during the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
[0098] As an example, a client of a virtual scene is running on the terminal, such as an online game client (such as a shooting game client), which obtains data corresponding to the first virtual space by connecting to a game server (such as server 200), and based on the data, displays a first virtual object and at least one second virtual object in the first virtual space of the virtual scene; displays a first virtual natural element belonging to a natural phenomenon in the first virtual space; when the relative position relationship between the second virtual object and the first virtual natural element does not meet a preset condition, in response to a first interaction instruction, controls the first virtual object to perform a first interaction operation on the second virtual object, and during the execution of the first interaction operation, the target attribute value of the second virtual object remains unchanged; when the relative position relationship between the second virtual object and the first virtual natural element meets the preset condition, in response to a second interaction instruction, controls the first virtual object to perform a second interaction operation on the second virtual object, and during the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
[0099] By applying the above-mentioned embodiments of the present application, the first virtual natural element is used to interfere with the interaction between virtual objects, so that the virtual objects can interact with each other with the help of the function of the first virtual natural element, thereby enriching the interaction methods of virtual objects in the virtual space, improving the efficiency of human-computer interaction, and providing hardware resource utilization of electronic devices.
[0100] In some embodiments, the object interaction method provided in the embodiments of the present application can be implemented by various electronic devices or computer devices, for example, it can be implemented by a terminal alone, it can also be implemented by a server alone, or it can be implemented by a terminal and a server in collaboration. The embodiments of the present application can be applied to various scenarios, including but not limited to video playback, instant messaging, cloud technology, artificial intelligence, smart transportation, assisted driving, games, metaverse, etc.
[0101] In some embodiments, the embodiments of the present application can be implemented with the aid of cloud technology (Cloud Technology), which refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model application, which can form a resource pool and be used on demand, flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources; for example, when the virtual scene is a game scene, the corresponding game is a cloud game, and the images of the virtual scene displayed by the terminal are all rendered by the server.
[0102] As an example, the electronic device for implementing the object interaction method provided in the embodiment of the present application can be various types of terminal devices or servers, wherein the server (e.g., server 200) can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms. The terminal (e.g., terminal 400) can be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device (e.g., an intelligent speaker), a smart home appliance (e.g., a smart TV), a smart watch, a vehicle-mounted terminal, a wearable device, a virtual reality (VR, Virtual Reality) device, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected by wired or wireless communication, and the embodiment of the present application does not limit this.
[0103] In some embodiments, the terminal or server can implement the object interaction method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.
[0104] In some embodiments, multiple servers may form a blockchain, and the servers are nodes on the blockchain. Information connections may exist between each node in the blockchain, and information may be transmitted between nodes through the above information connections. Among them, data related to the object interaction method provided in the embodiment of the present application (such as the picture data of the virtual scene, the data of the virtual natural element, etc.) may be stored on the blockchain.
[0105] The following describes an electronic device for implementing an object interaction method provided by an embodiment of the present application. Figure 2 , Figure 2 : is a schematic diagram of the structure of an electronic device 500 for implementing an object interaction method provided in an embodiment of the present application. The electronic device 500 provided in an embodiment of the present application includes:
[0106] At least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 540 is not used in the following examples. Figure 2 Various buses are labeled as bus system 540 .
[0107] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0108] The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0109] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices that are physically remote from the processor 510.
[0110] The memory 550 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.
[0111] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0112] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0113] A network communication module 552, used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;
[0114] a display module 553 for enabling presentation of information via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with the user interface 530 (e.g., a user interface for operating peripherals and displaying content and information);
[0115] The input processing module 554 is used to detect user input or interaction from one or more input devices 532 and translate the detected input or interaction.
[0116] In some embodiments, the object interaction device provided in the embodiments of the present application can be implemented in a software manner. Figure 2 An object interaction device 555 stored in the memory 550 is shown, which can be software in the form of programs and plug-ins, including the following software modules: a display module 5551 and a control module 5552. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0117] In other embodiments, the object interaction device 555 provided in the embodiments of the present application can be implemented in hardware. As an example, the object interaction device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the object interaction method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0118] Based on the above description of the object interaction system and electronic device of the embodiment of the present application, the object interaction method provided by the embodiment of the present application is described below. In some embodiments, the object interaction method provided by the embodiment of the present application can be implemented by a server or a terminal alone, or by a server and a terminal in collaboration. The object interaction method provided by the embodiment of the present application is described below using the terminal implementation as an example.
[0119] See also Figure 3 , Figure 3 : is a flow chart of an object interaction method provided in an embodiment of the present application. The object interaction method provided in an embodiment of the present application includes:
[0120] Step 101: The terminal displays a first virtual object in a first virtual space of a virtual scene, displays at least one second virtual object, and displays a first virtual natural element in the first virtual space.
[0121] Step 102: When the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset condition, in response to the first interaction instruction, the first virtual object is controlled to perform a first interaction operation on the second virtual object. During the execution of the first interaction operation, the target attribute value of the second virtual object remains unchanged.
[0122] Step 103: When the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, in response to a second interaction instruction, the first virtual object is controlled to perform a second interaction operation on the second virtual object. During the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
[0123] Here, it should be noted that the embodiment of the present application does not limit the execution order of step 102 and step 103. Step 102 can be executed first, and then step 103, or step 103 can be executed first, and then step 102.
[0124] In actual applications, a client supporting virtual scenes (such as a game client) is installed on the terminal, and a client with integrated virtual scene functions (such as an instant messaging client, a live broadcast client, an education client, etc.) can also be installed on the terminal. When a user opens the client on the terminal and the terminal runs the client, the user can interact with virtual characters based on the screen of the virtual scene displayed by the client; for example, when the client is a game client, the user can interact with game characters (virtual characters) in the game scene (such as conducting a virtual battle) based on the game screen displayed by the game client.
[0125] In some embodiments, the first virtual object may be a virtual object controlled by a player (user) through a client, the first virtual object being a player character, and the second virtual object may be an NPC in a virtual scene, the second virtual object being a non-player character, such as a monster in a game scene.
[0126] In some embodiments, the virtual scene may include at least two virtual spaces. For example, the virtual scene includes a first virtual space and a second virtual space, wherein the second virtual space may be the virtual space that the player initially enters by controlling the first virtual object after the terminal runs the client, such as the virtual space corresponding to a game match started by the terminal. Accordingly, the first virtual space may be the virtual space that the first virtual object subsequently enters based on the second virtual space. For example, when the virtual scene is a shooting game scene, the second virtual space may be a shooting game space for the first virtual object to play a shooting game with virtual objects controlled by other players, and the first virtual space is an expanded dark tide that the first virtual object subsequently enters based on the shooting game space.
[0127] Based on this, the process of the first virtual object entering the first virtual space from the second virtual space is described. In some embodiments, the terminal can display the first virtual object in the first virtual space of the virtual scene in the following manner: display the first virtual object in the second virtual space, and the second virtual space includes a second virtual natural element belonging to a natural phenomenon; when the distance between the first virtual object and the second virtual natural element is less than the distance threshold, the first virtual object is transmitted from the second virtual space to the first virtual space; and the first virtual object is displayed at the target position in the first virtual space. In this way, by setting the second virtual natural element in the second virtual space, a way to enter the first virtual space is provided for the player. On the one hand, the diversity of the scene content of the second virtual space is enriched, so that the player has an immersive feeling, and the switching of the virtual space is smooth. On the other hand, the hardware display resources of the terminal are fully utilized, and the utilization rate of the terminal hardware resources is improved.
[0128] In actual implementation, the second virtual natural element can be an undercurrent, such as a virtual tornado, a virtual rainbow, a virtual flame, etc. When the first virtual object moves (such as walking) in the second virtual space, when the first virtual object is close to the second virtual natural element, such as when the distance to the second virtual natural element is less than a distance threshold (the size of the distance threshold can be set according to actual conditions), the second virtual natural element is activated, and the first virtual object is transmitted from the second virtual space to the first virtual space to display the first virtual object at the target position in the first virtual space.
[0129] In some embodiments, the second virtual natural element has a sensing function. When the first virtual object moves into the sensing range of the second virtual natural element, the first virtual object is transmitted from the second virtual space to the first virtual space, and the first virtual object is displayed at the target position in the first virtual space; wherein the sensing range of the second virtual natural element can be a circular area with the second virtual natural element as the center and the target length (which can be set according to actual conditions) as the radius.
[0130] In some embodiments, when the distance between the first virtual object and the second virtual natural element is less than a distance threshold, the terminal may transfer the first virtual object from the second virtual space to the first virtual space in the following manner: when the distance between the first virtual object and the second virtual natural element is less than the distance threshold, the second virtual natural element is controlled to transform into a virtual portal; when the first virtual object enters the virtual portal, the first virtual object is transferred from the second virtual space to the first virtual space. In this way, by transforming the second virtual natural element into a virtual portal and guiding the player to control the first virtual object to enter, the switching of virtual spaces is made more reasonable, the hardware display resources of the terminal are fully utilized, and the utilization rate of the terminal hardware resources is improved.
[0131] For example, Figure 4 The interface diagram of the second virtual natural element transformed into a virtual portal provided in the embodiment of the present application is shown in FIG. Figure 4 In the second virtual space, the second virtual natural element is a virtual flame 41. When the distance between the first virtual object and the virtual flame 41 is less than a distance threshold, the virtual flame 41 is transformed into a virtual portal 42 to guide the first virtual object to enter. When the player controls the first virtual object to enter the virtual portal 42, the first virtual object is teleported from the second virtual space to the first virtual space.
[0132] In some embodiments, the first virtual object can also be transferred from the second virtual space to the first virtual space by completing a task. Accordingly, the terminal can display the first virtual object in the first virtual space of the virtual scene in the following manner: display the first virtual object and task guide information in the second virtual space, the task guide information is used to indicate that the first virtual space can be entered by completing the target task; based on the task guide information, in response to the execution instruction for the target task, the first virtual object is controlled to perform the target task; when the target task is completed, the first virtual object is transferred from the second virtual space to the first virtual space, and the first virtual object is displayed at the target position in the first virtual space. In this way, by displaying the task guide information in the second virtual space for task prompts, the player can know the way to enter the first virtual space, and then can perform the corresponding task based on the guidance of the task guide information, while making full use of the terminal hardware display resources, the human-computer interaction efficiency is improved.
[0133] Among them, the task guidance information can be periodically displayed in the second virtual space, or displayed when the duration of the first virtual object in the second virtual space reaches a duration threshold (the size of the duration threshold can be set according to actual conditions); in actual implementation, the task guidance information can be displayed in a variety of forms, such as the task guidance information can be in text form, graphic form, animation form, etc.; the target task can be a shooting task, a synthesis task, etc., among which the shooting task is used to instruct the execution of a shooting operation on the target virtual object (such as a virtual balloon) in the second virtual space, and the synthesis task is used to instruct the collection of at least two virtual objects (such as virtual gems) in the second virtual space, and the execution of a synthesis operation on the at least two virtual objects.
[0134] For example, Figure 5 A schematic diagram of a display interface for task guidance information provided in an embodiment of the present application, see Figure 5 The second virtual space is the game space corresponding to the player after starting the game. The first virtual object interacts with virtual objects or NPCs controlled by other players in the game space. When the time the first virtual object stays in the game space reaches the target time, the task guidance information is displayed, such as Figure 5 The task guidance information 51 shown in the figure is "Synthesize rubies and emeralds and enter the competition space". Here, the competition space is the first virtual space. The task guidance information indicates that the first virtual space can be entered by completing the gem synthesis task. If the current first virtual object has collected rubies and emeralds, the terminal responds to the synthesis instruction for rubies and emeralds, and executes the synthesis operation for rubies and emeralds. When the synthesis operation is completed, it is determined that the corresponding synthesis task has been completed.
[0135] In some embodiments, the first virtual object can also be transferred from the second virtual space to the first virtual space by improving the interaction score in the virtual scene. Accordingly, the terminal can display the first virtual object in the first virtual space of the virtual scene in the following manner: display the first virtual object in the second virtual space, and dynamically display the interaction score of the first virtual object; wherein the interaction score is obtained by the first virtual object interacting with the third virtual object in the virtual scene, and the first virtual object and the third virtual object are in a hostile relationship; when the interaction score reaches the score threshold, the first virtual object is transferred from the second virtual space to the first virtual space; and the first virtual object is displayed at the target position in the first virtual space. In this way, the player can be prompted to control the first virtual object to strengthen the interaction with the third virtual object to obtain sufficient interaction scores, thereby improving the number of human-computer interactions and the utilization rate of the terminal hardware processing resources.
[0136] Exemplarily, the second virtual space may be a virtual space corresponding to a target game of a virtual scene. In the second virtual space, the first virtual object and the third virtual object are in a hostile relationship. For example, the first virtual object and the third virtual object belong to two teams respectively. In the second virtual space, the first virtual object and multiple third virtual objects engage in a virtual battle. When the first virtual object kills the third virtual object, the first virtual object obtains a corresponding interaction score. When the first virtual object kills the target number of third virtual objects so that the interaction score of the first virtual object reaches a score threshold, the first virtual object is transferred from the second virtual space to the first virtual space.
[0137] The above describes the process of the first virtual object entering the first virtual space from the second virtual space. As mentioned above, when the first virtual object is transmitted to the first virtual space, the terminal will display the first virtual object at the target position in the first virtual space; the target position is described here. In some embodiments, the target position can be a random position in the first virtual space, that is, a position is randomly determined in the first virtual space and the position is used as the target position; in other embodiments, the first virtual space includes a first virtual natural element belonging to a natural phenomenon, and the target position can be a position with a target distance from the first virtual natural element. The size of the target distance can be negatively correlated with the level of the first virtual object, that is, the first virtual object has a certain level in the virtual scene. The higher the level of the first virtual object, the farther it is from the first virtual natural element. In this way, the interaction difficulty of the low-level first virtual object in the first virtual space can be reduced, and the enthusiasm of the player can be improved.
[0138] The first virtual natural element may be a scene element belonging to a natural phenomenon in the first virtual space. The first virtual natural element is different from the second virtual natural element. In practical applications, the first virtual natural element may be a virtual light beam, a virtual fog, etc., wherein the virtual fog is a virtual fog. The first virtual natural element forms a target area, which is also the spatial area occupied by the first virtual natural element. For example, when the first virtual natural element is a virtual light beam, the target area is the spatial area illuminated by the virtual light beam. When the first virtual natural element is a virtual fog, the target area is the spatial area where the virtual fog is located. The first virtual space includes one or more (i.e., at least two) second virtual objects. The second virtual object may be an NPC that is not a player character, such as a monster character in a game. The first virtual object and the second virtual object may be in a hostile relationship. When the first virtual natural element is a virtual light beam, the second virtual object is in the target area, i.e., the second virtual object is in the virtual light beam. When the first virtual natural element is a virtual fog, the second virtual object is in the target area, i.e., the second virtual object is in the virtual fog.
[0139] In some embodiments, when the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset conditions, the interaction operation performed by the first virtual object on the second virtual object is an invalid operation, that is, when the interaction operation is an attack operation (such as a shooting operation), it will not affect the target attribute value of the second virtual object; in actual applications, the above preset conditions may be one of the following: the position of the second virtual object in the first virtual space overlaps with the position of the first virtual natural element in the first virtual space (that is, there is an intersection), the second virtual object is in the target area formed by the first virtual natural element, and the second virtual object is in the sensing area of the first virtual natural element.
[0140] Here, in actual applications, collision detection can be used to determine whether the second virtual object and the first virtual natural element have a position overlap in the first virtual space. Specifically, collision detection can be performed in the first virtual space through a trigger volume. For example, the trigger is a cylinder, and the cylinder can be a shape corresponding to when the first virtual natural element is a virtual light beam. When the trigger collides with the second virtual object in the first virtual space, it can be determined that the second virtual object and the first virtual natural element have a position overlap in the first virtual space.
[0141] In actual applications, when the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset conditions, the terminal responds to the first interaction instruction instructing interaction with the second virtual object, controls the first virtual object to perform a first interaction operation on the second virtual object, and during the execution of the first interaction operation, the target attribute value of the second virtual object remains unchanged; wherein the target attribute value is an attribute value that is strongly related to the interaction in the virtual scene, for example, when the interaction in the virtual scene is racing, the target attribute value of the second virtual object may be the speed of the second virtual object, and when the interaction in the virtual scene is a battle in the virtual scene, the target attribute value of the second virtual object may be the health value of the second virtual object.
[0142] When the relative position relationship between the second virtual object and the first virtual natural element meets the preset conditions, the interaction operation performed by the first virtual object on the second virtual object is a valid operation, that is, when the interaction operation is an attack operation (such as a shooting operation), the target attribute value of the second virtual object can be reduced. In actual applications, the terminal responds to the second interaction instruction instructing to interact with the second virtual object, controls the first virtual object to perform the second interaction operation on the second virtual object, and during the execution of the second interaction operation, the target attribute value of the second virtual object is reduced. In this way, when the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset conditions, the interactive operation executed on the second virtual object is an invalid operation, and when the relative position relationship between the second virtual object and the first virtual natural element meets the preset conditions, the interactive operation executed on the second virtual object is a valid operation, which can prompt the player to control the first virtual object to move the position or control the first virtual object to guide the second virtual object to move, so that the relative position relationship between the second virtual object and the first virtual natural element meets the preset conditions, such as controlling the first virtual object to attract the second virtual object to enter the target area formed by the first virtual natural element, so as to kill the second virtual object in the target area, thereby improving the number of human-computer interactions and the utilization rate of terminal hardware processing resources. At the same time, by interfering with the interaction between virtual objects through the first virtual natural element, the virtual objects can interact with each other with the help of the function of the first virtual natural element, enriching the interaction methods of virtual objects in the virtual space.
[0143] In some embodiments, there is a time limit for the first virtual object in the first virtual space. After the first virtual object enters the first virtual space, the terminal in the first virtual space dynamically displays the remaining time that the first virtual object can stay in the first virtual space; when the remaining time is zero, the first virtual object is transferred back to the second virtual space. In other words, the first virtual object can only stay in the first virtual space for the target time. After the first virtual object enters the first virtual space, the countdown can be seen. After the countdown is cleared, the first virtual object needs to be transferred back to the second virtual space; in this way, due to the time limit, the player is prompted to improve the object interaction efficiency in the first virtual space, thereby improving the human-computer interaction efficiency of the terminal.
[0144] Here, in actual application, when the remaining time is zero, the terminal controls the first virtual natural element to transform into a virtual portal, and when the first virtual object enters the virtual portal, the first virtual object is transmitted from the first virtual space back to the second virtual space.
[0145] The display position of the first virtual natural element in the first virtual space is described. In some embodiments, the terminal can display the first virtual natural element belonging to the natural phenomenon in the first virtual space in the following manner: obtain the center position of the first virtual space; determine a circular area with the center position as the center and the target length as the radius; display the first virtual natural element belonging to the natural phenomenon at the edge of the circular area. That is, the first virtual natural element is displayed on a circumference, which takes the center position of the first virtual space as the center and the target length set according to actual needs as the radius. In actual applications, when it is necessary to display the first virtual natural element in the first virtual space, after determining the above circular area, a position can be randomly determined at the edge of the circular area as the display position of the first virtual natural element, and the first virtual natural element can be displayed at this position. In some embodiments, the number of first virtual natural elements in the first virtual space can be multiple. When the number of first virtual natural elements is multiple, multiple first virtual natural elements are evenly distributed at the edge of the above circular area. In this way, when the first virtual object is at the center position of the above-mentioned first virtual space, the distance between it and each first virtual natural element is equal. This facilitates the rapid movement of the first virtual object, so that the relative position relationship between the second virtual object and the first virtual natural element meets the preset conditions, thereby improving the efficiency of human-computer interaction.
[0146] In some embodiments, the position of the first virtual natural element in the first virtual space may change. Exemplarily, the first virtual space includes at least two natural element display positions, and the at least two natural element display positions include a first natural element display position and a second natural element display position, and the natural element display position is used to display the first virtual natural element. In actual applications, the first virtual natural element may periodically switch display positions in the first virtual space. For example, the terminal may display the first virtual natural element belonging to a natural phenomenon in the first natural element display position in the first virtual space. After displaying the first virtual natural element, the terminal obtains a position change period of the first virtual natural element (which may be set according to actual needs, such as 1 minute). When it is determined that the position change time has arrived based on the position change period, the first virtual natural element is changed from the first natural element display position to the second natural element display position, so as to display the first virtual natural element through the second natural element display position.
[0147] Here, when the position change time is determined to have arrived based on the position change cycle, the position change strategy of the first virtual natural element is obtained; wherein the position change strategy is used to indicate the display order of the first virtual natural element in at least two natural element display positions; based on the position change strategy and the first natural element display position, the second natural element display position is determined from at least two natural element display positions.
[0148] For example, Figure 6 The schematic diagram of the position change of the first virtual natural element provided in the embodiment of the present application is shown in FIG. Figure 6 , on a circle 61 with the center position of the first virtual space as the center and the target length as the radius, four natural element display positions AD are evenly distributed. The position change period of the first virtual natural element is 1 minute. After the terminal displays the first virtual natural element at the natural element display position A, the position change period is obtained. When it is determined based on the position change period that the position change time of the first virtual natural element has arrived, the position change strategy of the first virtual natural element is obtained. In this example, the position change strategy indicates that the natural element display position is switched clockwise, that is, the switching order of the natural element display position is ABCD. Based on the position change strategy, the display position of the first virtual natural element is switched from the natural element display position A to the natural element display position B, that is, after the first virtual natural element is displayed at the natural element display position A for 1 minute, the display at the natural element display position A is canceled, and the first virtual natural element is displayed at the natural element display position B.
[0149] In some embodiments, the first virtual natural element can also be controlled to move in the first virtual space. After the terminal displays the first virtual natural element belonging to the natural phenomenon in the first virtual space, the first virtual natural element is controlled to move in the first virtual space; wherein, the movement trajectory of the first virtual natural element in the first virtual space is the target trajectory. In practical applications, the target trajectory can be set according to actual needs, such as the target trajectory is S-shaped, circular, etc. In this way, the target trajectory constitutes a puzzle that the player needs to solve. The first virtual natural element moves in the first virtual space according to the target trajectory, that is, the movement law of the first virtual natural element, so that the player can solve the puzzle, that is, master the movement law, and then control the movement of the first virtual object in the first virtual space in a targeted manner, thereby improving the fun of the player's interaction in the first virtual space.
[0150] Continue to see Figure 6 If the first virtual natural element is displayed at the natural element display position A after the first virtual object enters the first virtual space, the terminal controls the first virtual natural element to move the first virtual natural element clockwise along the circumference 61 at the target speed to the natural element display position B. Since the second virtual object is in the target area formed by the first virtual natural element, the interactive operation implemented by the first virtual object is effective. In this way, the player is forced to quickly master the movement law of the first virtual natural element and guide the second virtual object to enter the target area to interact with it, which increases the diversity of the gameplay for the player and allows the player to obtain a better flow experience.
[0151] In some embodiments, the size of the first virtual natural element, that is, the size of the target area formed by the first virtual natural element, can change. For example, after the first virtual object enters the first virtual space, the terminal displays the first virtual natural element of a first size belonging to a natural phenomenon in the first virtual space. After displaying the first virtual natural element, the size of the first virtual natural element can be gradually changed from the first size to a second size. The second size is different from the first size, for example, the second size is smaller than the first size. The values of the second size and the first size can be set according to actual needs.
[0152] Here, in actual applications, the change in the size of the first virtual natural element can be periodic. For example, when the transformation period is 1 minute, based on the period, the size of the first virtual natural element can be transformed from the second size to the first size, and then the size of the first virtual natural element can be transformed from the first size to the second size, and then the size of the first virtual natural element can be transformed from the second size to the first size, and so on. The time interval between each transformation is the above-mentioned transformation period.
[0153] In some embodiments, when the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset conditions, the outline corresponding to the entity of the second virtual object is displayed; when the relative position relationship between the second virtual object and the first virtual natural element meets the preset conditions, the entity of the second virtual object is displayed. That is to say, when the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset conditions, it will be invisible, and the player can only see the outline of the second virtual object, and when the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset conditions, it will be visible, and the player can see the entity of the second virtual object; in this way, when the relative position relationship between the first virtual object and the first virtual natural element does not meet the preset conditions, the difficulty of interacting with the second virtual object is increased, forcing the player to control the first virtual object to move, or guide the second virtual object to move, so that the relative position relationship between the first virtual object and the first virtual natural element meets the preset conditions, and the utilization rate of the terminal hardware resources is improved.
[0154] For example, Figure 7 A schematic diagram of displaying the second virtual object in the first virtual space provided in an embodiment of the present application is shown in FIG. Figure 7 In this example, the second virtual object is a monster, and the first virtual natural element is a virtual beam, wherein, Figure 7 (1) is a schematic diagram of a monster in a virtual beam. When the monster enters the target area formed by the virtual beam, that is, the monster is in the virtual beam, the player can see the entity of the monster, that is, the terminal can display the monster, and can control the first virtual object to perform an attack operation on the monster, and the attack operation can reduce the life value of the monster; Figure 7(2) is a schematic diagram of a monster outside a virtual beam. When the monster is outside a virtual beam, it is in a stealth state, and the terminal only displays the outline of the monster, which increases the difficulty for the player to find the monster. At the same time, if the player controls the first virtual object to perform an attack operation on the monster, the attack operation is an invalid operation for the monster, that is, it will not cause the monster's health to decrease.
[0155] In some embodiments, when the relative positional relationship between the second virtual object and the first virtual natural element meets a preset condition, in addition to being able to display the entity of the second virtual object, the weakness of the second virtual object can be further exposed, that is, the terminal displays a target special effect at the target part of the second virtual object, and the target special effect is used to indicate that the target part is a weak part of the second virtual object. Wherein, relative to the regular part (non-weak part) of the second virtual object, when the first virtual object performs the same attack operation, when the attack operation is directed to the weak part, the health value of the second virtual object is reduced more.
[0156] In actual applications, when a monster is in a virtual light beam, the terminal can not only display the monster but also expose the monster's weaknesses, that is, the terminal displays the monster's weak parts, for example, a crack effect is displayed at the monster's weak parts. The crack effect is a crack that glows at the same time, which can indicate that the part where the crack effect is located is the monster's weak part. In this way, when the player controls the first virtual object to perform an attack operation on the monster's weak part, the monster's health value is reduced more than that performed on a regular part.
[0157] In some embodiments, when the relative position relationship between the first virtual object and the first virtual natural element does not meet the preset condition, the screen becomes darker. When the relative position relationship between the first virtual object and the first virtual natural element changes from not meeting the preset condition to meeting the preset condition, such as when the screen moves from outside the target area to inside the target area, the brightness of the screen returns to normal. Specifically, when the relative position relationship between the first virtual object and the first virtual natural element does not meet the preset condition, the terminal controls the brightness of the first virtual space to be lower than the brightness threshold; when the relative position relationship between the first virtual object and the first virtual natural element meets the preset condition, the brightness of the first virtual space is controlled to reach the brightness threshold. The size of the brightness threshold can be set according to actual needs, such as setting the brightness threshold to the normal brightness of the screen of the corresponding virtual scene. In this way, when the relative position relationship between the first virtual object and the first virtual natural element does not meet the preset condition, the brightness of the screen will be reduced, so that the player can actively control the movement of the first virtual object so that the relative position relationship meets the preset condition, thereby improving the object interaction efficiency in the first virtual space.
[0158] In some embodiments, when the first virtual object wins the interaction with the second virtual object in the first virtual space, that is, when the first virtual object kills the second virtual object in the first virtual space, a virtual resource used as a reward is displayed in the first virtual space, and the virtual resource is used for use in the first virtual space; in response to a claiming operation for the virtual resource, the virtual resource is claimed. In this way, the player is encouraged to win the interaction in the first virtual space, and the player's enthusiasm is improved.
[0159] Here, when there are multiple second virtual objects in the first virtual space, the interaction victory between the first virtual object and the second virtual object can be the first virtual object killing all the second virtual objects in the first virtual space, or the number of second virtual objects killed by the first virtual object reaches a quantity threshold; the virtual resources can be virtual props that can be used to perform interactive operations on second virtual objects, or experience points that increase the level of the first virtual object, or virtual currency that can be used to purchase virtual props, etc.
[0160] In some embodiments, when the first virtual object successfully interacts with the second virtual object in the first virtual space, the terminal displays a virtual portal; when the first virtual object enters the virtual portal, the first virtual object is teleported back to the second virtual space. In this way, the virtual portal provides a channel for the player to return to the original second virtual space, so that the player can control the first virtual object to return to the second virtual space based on the virtual portal and continue to interact with the virtual object in the second virtual space.
[0161] By applying the above-mentioned embodiment of the present application, a first virtual natural element belonging to a natural phenomenon is displayed in a first virtual space. When the relative position relationship between the second virtual object and the first virtual natural element does not meet the preset condition, the first virtual object performs a first interactive operation on the second virtual object, and the first virtual natural element makes the target attribute value of the second virtual object remain unchanged. When the relative position relationship between the second virtual object and the first virtual natural element meets the preset condition, the first virtual object performs a second interactive operation on the second virtual object, and the first virtual natural element makes the target attribute value of the second virtual object decrease. In this way, the first virtual natural element interferes with the interaction between virtual objects, so that the virtual objects can interact with each other with the help of the function of the first virtual natural element, enriching the interaction mode of virtual objects in the virtual space, improving the efficiency of human-computer interaction, and also providing the hardware resource utilization of electronic equipment.
[0162] The following will take a virtual scene as a shooting game, a second virtual object as a monster, a first virtual natural element as a virtual fog, and a second virtual natural element as a virtual tornado as an example to illustrate an exemplary application of the embodiment of the present application in an actual application scenario. Figure 8For a flow chart of the object interaction method provided in the embodiment of the present application, see Figure 8 , the object interaction methods include:
[0163] Step 201: The terminal displays a second virtual space of the virtual scene, and displays a target virtual object and a virtual tornado in the second virtual space.
[0164] Here, a client with a virtual scene is running on the terminal, the target virtual object is the virtual object controlled by the current player based on the client, and the second virtual space is the game scene space in the shooting game, that is, when the client starts a game of a shooting game, the game space entered by the target virtual object.
[0165] Step 202: In response to a first movement instruction for a target virtual object, the target virtual object is controlled to move toward the virtual tornado, and when the distance between the target virtual object and the virtual tornado is less than a distance threshold, the virtual tornado is transformed into a virtual portal.
[0166] Here, the first movement instruction is used to instruct the target virtual object to move toward the virtual tornado, such as instructing the target virtual object to walk toward the virtual tornado. The player can control the target virtual object to move in the second virtual space based on the virtual joystick in the interface. When the player triggers the first movement instruction, the terminal displays the process of the target virtual object walking toward the virtual tornado. In actual applications, the size of the distance threshold is preset and can be set according to actual needs.
[0167] Step 203: In response to a second movement instruction for the target virtual object, control the target virtual object to enter the virtual portal, and transmit the target virtual object from the second virtual space to the first virtual space.
[0168] Here, in actual application, when the player controls the target virtual object to enter the virtual portal, the terminal can display a transmission animation, which can indicate that the target virtual object is in the process of spatial transmission.
[0169] Step 204: Display the target virtual object at the target position in the first virtual space, display a virtual fog on a circle with the center position of the first virtual space as the center and the target length as the radius, and display the remaining time of the target virtual object in the first virtual space.
[0170] Here, in actual application, the target position can be the center position in the first virtual space, and five (or other numbers) display positions are set on the above-mentioned circle. After the target virtual object enters the first virtual space, the initial display position of the virtual fog can be any one of the five display positions; the first virtual space includes multiple monsters; after the target virtual object enters the first virtual space, the countdown starts, and the terminal displays the remaining time of the target virtual object in the first virtual space in real time.
[0171] Step 205: For a monster in the virtual fog, the entity of the monster is displayed, and the weak parts of the monster are displayed on the entity; for a monster outside the virtual fog, the outline corresponding to the entity of the monster is displayed.
[0172] That is to say, for the monsters in the first virtual space, when the monsters are in the virtual fog, the monsters are in a visible state, that is, the entity of the monsters can be displayed, and the weak parts of the monsters can be displayed at the same time, so that the players can clearly see the weak parts of the monsters and attack them. In actual applications, the weak parts of the monsters can be indicated by special effects; and when the monsters are outside the virtual fog, the monsters are in an invisible state, that is, the entity of the monsters cannot be displayed, and only the outline of the monsters can be displayed.
[0173] Step 206: When the first attack instruction is received, in response to the first attack instruction, the target virtual object is controlled to attack the monster in the virtual fog, and the life value of the attacked monster is controlled to decrease.
[0174] Here, the first attack instruction is used to instruct the target virtual object to attack the monster in the virtual fog, that is, to execute an attack operation against the monster in the virtual fog, wherein, if the part corresponding to the attack operation executed by the target virtual object is a weak part of the monster, the life value of the monster is reduced by a first life value, and if the part corresponding to the attack operation executed by the target virtual object is a non-weak part of the monster, the life value of the monster is reduced by a second life value, and the first life value is greater than the second life value.
[0175] Step 207: When the second attack instruction is received, in response to the second attack instruction, the target virtual object is controlled to attack the monster outside the virtual fog, and the health value of the attacked monster is controlled to remain unchanged.
[0176] Here, the second attack instruction is used to instruct the target virtual object to attack the monster outside the virtual fog, that is, to execute an attack operation against the monster outside the virtual fog; when the monster is outside the virtual fog, the attack operation of the target virtual object is an invalid operation. Therefore, when the target virtual object attacks the monster outside the virtual fog, the health value of the attacked monster remains unchanged.
[0177] It should be noted that the step numbers in the embodiments of the present application do not limit the execution order of the steps, and the execution order of step 206 and step 207 are interchangeable, that is, step 207 is executed first and then step 206. The number of executions of step 206 and step 207 is not limited, and step 206 and step 207 can be executed multiple times in a cycle.
[0178] Step 208: Control the virtual fog group to move regularly on the circumference.
[0179] Here, in actual application, the virtual fog can be moved periodically on the circumference, and the display time of the virtual fog at each display position on the circumference is the same. For example, for the five display positions on the circumference, when the display time at the first display position reaches the target time (such as 2 minutes), the virtual fog is moved clockwise along the circumference at a uniform speed to the second display position, and when the display time of the virtual fog at the second display position reaches the target time, the virtual fog is moved clockwise along the circumference at a uniform speed to the third display position, and so on; wherein the first display position is adjacent to the second display position, and the second display position is adjacent to the third display position; in this way, by controlling the virtual fog to move regularly on the circumference, the difficulty of the target virtual object attacking monsters in the virtual fog is increased, forcing the player to quickly obtain the movement pattern of the virtual fog so as to quickly and accurately plan the confrontation with the monster.
[0180] It should be noted that the step numbers in the embodiments of the present application do not limit the execution order of the steps, and the execution order of step 206, step 207 and step 208 can be set arbitrarily, for example, step 208 is executed first, and then step 206 and step 207 are executed.
[0181] Step 209: When the target virtual object kills all monsters in the first virtual space and the remaining time of the target virtual object in the first virtual space has not returned to zero, display the virtual treasure chest.
[0182] Step 210: In response to the control instruction for the target virtual object, the target virtual object is controlled to open the virtual treasure box, display the virtual resources carried in the virtual treasure box, and display the virtual portal.
[0183] Here, the virtual resources may be virtual props that can be used in the second virtual space.
[0184] Step 211: In response to a movement instruction for a target virtual object, control the target virtual object to move into a virtual portal, and transmit the target virtual object from the first virtual space back to the second virtual space.
[0185] Step 212: When the remaining time of the target virtual object in the first virtual space reaches zero and there are still monsters in the first virtual space, a failure indication message is displayed, and a virtual portal is displayed.
[0186] Here, the failure indication information is used to indicate that the target virtual object has failed in the battle with the monster in the first virtual space. The failure indication information may be in the form of text, graphics, animation, etc.
[0187] By applying the above-mentioned embodiment of the present application, the target virtual object is switched from the second virtual space to the first virtual space through transmission. A virtual fog is provided in the first virtual space. The target virtual object's attack on the monster in the virtual fog is effective, thereby enriching the interaction mode of the virtual objects in the virtual space and improving the hardware resource utilization rate of the electronic device.
[0188] The following will take a virtual scene as a shooting game, a second virtual object as a monster, a first virtual natural element as a virtual beam, and a second virtual natural element as a virtual undercurrent as an example to illustrate an exemplary application of the embodiment of the present application in an actual application scenario. Fig. 9 For a flow chart of the object interaction method provided in the embodiment of the present application, see Fig. 9 , the object interaction methods include:
[0189] Step 301: The player object enters a special dark tide.
[0190] Here, the player object is a virtual object controlled by the player based on the game client. The terminal displays the game scene (i.e., the second virtual space described above, such as a shooting game scene), and displays the player object and the special dark tide 91 (i.e., the first virtual natural element described above, such as a virtual tornado) in the game scene. After the player object sees the special dark tide in the game scene, it enters the special dark tide to achieve the switching of the virtual space, that is, switching from the current game scene to the extended dark tide (i.e., the first virtual space described above). The extended dark tide can be an arena, that is, a relatively closed virtual venue with a regular geometric shape.
[0191] In actual applications, when a player object approaches a special dark tide, the internal data of the special dark tide is initialized, the remaining NPCs are cleared and the event is unbound. Specifically, when a player character approaches a special dark tide, the special dark tide will transform into a virtual portal to allow the player object to enter the extended dark tide.
[0192] Step 302: Display a countdown and a virtual light beam in the extended dark tide.
[0193] Here, after the player object enters the expansion dark tide, the gameplay logic is turned on. It is divided into two parts: the first part turns on the countdown logic, the server is responsible for timing, and distributes data to the client to ensure that players who join in the middle can also be synchronized. The second part is the birth of monsters. You can place some ordinary monsters first, bind the death count event, and place a virtual beam in the middle of the scene. The virtual beam is a separate scene object and can operate on its own.
[0194] After the player object enters the extended dark tide, it is found that the gameplay of the extended dark tide has a countdown, which is used to indicate how long the player object can stay in the extended dark tide, such as Fig. 9 Countdown 92 and virtual light beam 93 are displayed.
[0195] Compared with the game screen when the player object is in the virtual beam, when the player object is outside the virtual beam, the game screen will become very dark, and the screen will return to normal when returning to the beam.
[0196] Here, the display of the virtual beam is explained. In practical applications, the realization of the virtual beam can be realized without using a light source, but using a trigger (trigger volume) and a full-screen image processing effect (pp, post processing) to simulate light. In practical applications, the trigger corresponds to the virtual beam and has a certain shape. For example, the trigger is a cylinder. The trigger is used to perform collision detection with monsters and player objects in the extended dark tide. The effect of the virtual beam is achieved by combining collision detection with PP. For example, when the trigger detects a collision with other objects or objects, it further determines what the object that is collided with is. If it is detected that the collision is a monster, a collision event is generated and reported to the server. The collision event carries the object information (such as attributes) of the object that collides with the trigger. The server performs image post-processing, that is, pp is used to control the entity display of the monster, and at the same time controls the current screen brightness to display normally. When the trigger detects that the monster collides with itself again, that is, after the monster is detected to have gone out of the cylinder, special effects are added through image post-processing to make the current screen brightness display darker.
[0197] When the player object is outside the virtual beam, a layer of pp will be superimposed on the screen corresponding to the player object to darken the screen. When the player object enters the virtual beam, this pp will be removed to restore the screen to normal. Fig.10 For the implementation blueprint of the virtual beam provided in the embodiment of the present application, see Fig.10 ,in, Fig.10The middle figure (1) shows the pp is turned on, which corresponds to an event. Line a, from left to right, represents the progress logic, and line b, from left to right, represents the value transfer. After an array corresponding to a group of player objects in the game scene is passed in, the array is traversed (foreachloop) to determine the player object that needs to activate (turn on) pp, and then pp is superimposed on the screen corresponding to the player object; Fig.10 The middle figure (2) shows that pp is closed. Similarly, by traversing the player object array (foreachloop), the player object whose pp needs to be deactivated (closed) is determined, and then the pp of the screen corresponding to the player object is removed.
[0198] Step 303: The player object discovers that the monster outside the beam is invisible and cannot cause damage to it.
[0199] Here, for the monster outside the virtual light beam, the terminal displays the outline of the monster, and when the player object triggers an attack operation against the monster, the life value of the monster is controlled to remain unchanged.
[0200] Here, the monster can be a dual-blade monster, which is an elite monster. It can cause a lot of damage to the player object at close range and has a high desire to attack the player object. When the monster is outside the virtual beam, the monster is invisible and only its outline is displayed, such as Fig. 9 As shown in 94, the player object cannot cause damage to the monster, and the attack operation performed by the player object on the monster is an invalid operation.
[0201] Step 304: After the player object discovers the monster in the light beam, the monster appears and can be attacked.
[0202] Here, for the monster in the virtual light beam, the terminal displays the entity of the monster, and when the player object triggers an attack operation against the monster, the life value of the monster is controlled to decrease.
[0203] Here, when the monster is in the virtual beam, the monster is in the visible state and can attack, such as Fig. 9 As shown in Figure 95, when the player attacks the monster in the virtual beam, the monster's health value decreases.
[0204] Step 305: The light beam will slowly change position and size within the scene, forcing the player to move.
[0205] Here, the virtual beam slowly changes position and size within the scene, forcing the player to move.
[0206] In the extended dark tide, the virtual light beam will slowly change its position and size. Correspondingly, the terminal displays the position change process and the size change process of the virtual light beam. In actual application, the virtual light beam can move on a circle with the center of the scene (i.e., the center of the extended dark tide) as the center and the target length (e.g., 800 units) as the radius. Five points can be evenly set on the circle. The virtual light beam moves among the five points in turn according to a preset movement rule (e.g., clockwise, counterclockwise). During the movement, the size of the light beam can change according to a preset change rule. For example, the virtual light beam becomes smaller in turn during the switching process between the five points, and the execution is cyclic. In this way, by regularly changing the position and size of the virtual light beam, the player is forced to keep moving to attract the hatred of the monsters and attract the monsters into the aperture to kill them. That is, the player object needs to attract the monsters into the virtual light beam and kill all the monsters in the extended dark tide.
[0207] Here, the movement of the virtual light beam is described by assuming that the virtual light beam moves at five points on a circle. Fig.11 For the implementation blueprint of the virtual beam movement provided in the embodiment of the present application, see Fig.11 , the movement of the virtual beam at each point can be regarded as an animation. The logic corresponding to each animation is the same. Taking the animation corresponding to timeline_1 as an example, the timeline contains a function for controlling the position change of the virtual beam. The function can be a linear function, a quadratic function, etc. Fig.11 In the figure, X indicates time (such as 0 seconds to 5 seconds), and Y indicates the value of the change in the position of the virtual light beam. Each update can be regarded as an update of each frame. After determining the original position 111 of the virtual light beam, the position of the virtual light beam after the transformation is determined according to the position change 112. Among them, Lerp113 is used to make the movement of the virtual light beam smooth. After multiple frames of changes, when the movement of a corresponding point ends and reaches finish, the next animation is entered, that is, timeline_2 is entered.
[0208] Fig.12 The collision blueprint of the virtual beam provided in the embodiment of the present application is Fig.12In the figure (1), the process of a monster entering a virtual beam is shown, where line a, from left to right, represents the logic of movement, and line b, from left to right, represents the value transfer. The shape of the virtual beam can be a cylinder, which can be regarded as a cylindrical collision body. When the monster enters the virtual beam, it collides with the virtual beam, determines the parent class (Cast) to which the monster belongs, then sets the monster's mesh from transparent to opaque, and cancels the setting of the monster's invincibility (God); Figure (2) shows the process of a monster leaving the virtual beam. When the monster leaves the virtual beam, determines the parent class (Cast) to which the monster belongs, then sets the monster's mesh from opaque to transparent, and sets the monster's invincibility (God). Setting the monster invincible means changing the monster's surface material to make it invincible.
[0209] Step 306A: Destroy all monsters before the countdown ends and the player wins.
[0210] Here, after the gameplay wins (i.e., the player object wins), a virtual treasure chest will be generated in the level scene (i.e., the extended dark tide), and a virtual portal will be displayed. The player object can exit the arena (i.e., the extended dark tide) through the portal after opening the virtual treasure chest.
[0211] Step 306B: The countdown returns to zero and the game fails.
[0212] Here, when the gameplay fails, a virtual portal is displayed, and the player object can return to the original game scene through the virtual portal.
[0213] By applying the above-mentioned embodiments of the present application, when a player object approaches a special dark tide, the special dark tide is transformed into a virtual portal, and the target virtual object is transmitted through the virtual portal, so that the target virtual object is switched from the original game scene to the extended dark tide. A virtual light beam is provided in the extended dark tide. The target virtual object's attack on the monster in the virtual light beam is an effective attack, which enriches the interaction methods of virtual objects in the game scene, allows players to have a better flow experience, and improves the hardware resource utilization of electronic devices.
[0214] The following further describes an exemplary structure of the object interaction device 555 provided in the embodiment of the present application implemented as a software module. In some embodiments, the object interaction device provided in the embodiment of the present application includes:
[0215] A display module 5551, configured to display a first virtual object in a first virtual space of a virtual scene, and to display at least one second virtual object;
[0216] and, for displaying a first virtual natural element in the first virtual space;
[0217] A control module 5552 is configured to control the first virtual object to perform a first interaction operation on the second virtual object in response to a first interaction instruction when the relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition, and during the execution of the first interaction operation, the target attribute value of the second virtual object remains unchanged;
[0218] And, when the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, in response to a second interaction instruction, control the first virtual object to perform a second interaction operation on the second virtual object, and during the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
[0219] In some embodiments, the display module is further used to display the first virtual object in a second virtual space, wherein the second virtual space includes a second virtual natural element belonging to a natural phenomenon.
[0220] When the distance between the first virtual object and the second virtual natural element is less than a distance threshold, transmitting the first virtual object from the second virtual space to the first virtual space;
[0221] The first virtual object is displayed at a target position in the first virtual space.
[0222] In some embodiments, the display module is further configured to control the second virtual natural element to transform into a virtual portal when the distance between the first virtual object and the second virtual natural element is less than a distance threshold;
[0223] When the first virtual object enters the virtual portal, the first virtual object is transmitted from the second virtual space to the first virtual space.
[0224] In some embodiments, the display module is further used to display the first virtual object and task guidance information in the second virtual space, wherein the task guidance information is used to indicate that the first virtual space can be entered by completing a target task;
[0225] The control module is further configured to control the first virtual object to execute the target task in response to an execution instruction for the target task based on the task guidance information;
[0226] The display module is further configured to transmit the first virtual object from the second virtual space to the first virtual space when the target task is completed;
[0227] The first virtual object is displayed at a target position in the first virtual space.
[0228] In some embodiments, the display module is further used to display the first virtual object in the second virtual space, and dynamically display the interaction score of the first virtual object;
[0229] The interaction score is obtained by the first virtual object interacting with the third virtual object in the virtual scene, and the first virtual object and the third virtual object are in a hostile relationship;
[0230] When the interaction score reaches a score threshold, transmitting the first virtual object from the second virtual space to the first virtual space;
[0231] The first virtual object is displayed at a target position in the first virtual space.
[0232] In some embodiments, the display module is further used to display, in the first virtual space of the virtual scene, a first virtual object transmitted from the second virtual space to the first virtual space;
[0233] and, for dynamically displaying, in the first virtual space, a remaining time that the first virtual object can stay in the first virtual space;
[0234] When the remaining time is zero, the first virtual object is transmitted back to the second virtual space.
[0235] In some embodiments, the display module is further used to obtain the center position of the first virtual space;
[0236] Determine a circular area with the center position as the center and the target length as the radius;
[0237] At the edge of the circular area, a first virtual natural element belonging to a natural phenomenon is displayed.
[0238] In some embodiments, the first virtual space includes at least two natural element display positions, and the natural element display positions are used to display the first virtual natural element;
[0239] The display module is further used to display a first virtual natural element belonging to a natural phenomenon at a first natural element display position in the first virtual space;
[0240] and, after displaying a first virtual natural element belonging to a natural phenomenon at a first natural element display position in the first virtual space, obtaining a position change period of the first virtual natural element;
[0241] When it is determined based on the position change period that the position change time arrives, the first virtual natural element is changed from the first natural element display position to the second natural element display position, so that the first virtual natural element is displayed through the second natural element display position.
[0242] In some embodiments, the apparatus further comprises:
[0243] A determination module, configured to obtain a position change strategy of the first virtual natural element when it is determined based on the position change period that a position change time has arrived;
[0244] The position change strategy is used to indicate the display order of the first virtual natural element at the display positions of the at least two natural elements;
[0245] Based on the position transformation strategy and the first natural element display position, the second natural element display position is determined from the at least two natural element display positions.
[0246] In some embodiments, the display module is further used to display a first virtual natural element belonging to a natural phenomenon and having a first size in the first virtual space;
[0247] And, after displaying a first virtual natural element belonging to a natural phenomenon and having a first size in the first virtual space, the size of the first virtual natural element is transformed from the first size to a second size, where the second size is different from the first size.
[0248] In some embodiments, the display module is further configured to display a contour corresponding to an entity of the second virtual object when a relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition;
[0249] When the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, the entity of the second virtual object is displayed.
[0250] In some embodiments, the display module is further configured to control the brightness of the first virtual space to be lower than a brightness threshold when the relative position relationship between the first virtual object and the first virtual natural element does not satisfy a preset condition;
[0251] When the relative position relationship between the first virtual object and the first virtual natural element meets a preset condition, the brightness of the first virtual space is controlled to reach a brightness threshold.
[0252] In some embodiments, the display module is further configured to display virtual resources used as rewards in the first virtual space when the first virtual object kills the second virtual object in the first virtual space, and the virtual resources are used in the first virtual space;
[0253] The control module is further configured to receive the virtual resource in response to a receiving operation on the virtual resource.
[0254] In some embodiments, the display module is further used to display, in the first virtual space of the virtual scene, a first virtual object transmitted from the second virtual space to the first virtual space;
[0255] and, for displaying a virtual portal when the first virtual object kills the second virtual object in the first virtual space;
[0256] When the first virtual object enters the virtual portal, the first virtual object is teleported back to the second virtual space.
[0257] In some embodiments, the display module is further used to dynamically display, in the first virtual space, a remaining time that the first virtual object can be in the first virtual space;
[0258] When the remaining time is zero and there is a second virtual object in a survival state in the first virtual space, failure indication information is displayed, where the failure indication information is used to indicate that the interaction of the first virtual object in the first virtual space has failed.
[0259] In some embodiments, the display module is further configured to display a target special effect at a target portion of the second virtual object when a relative position relationship between the second virtual object and the first virtual natural element satisfies a preset condition;
[0260] The target special effect is used to indicate that the target part is a weak part of the second virtual object.
[0261] In some embodiments, the control module is further used to control the first virtual natural element to move in the first virtual space;
[0262] The moving trajectory of the first virtual natural element in the first virtual space is the target trajectory.
[0263] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the object interaction method described in the embodiment of the present application.
[0264] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the object interaction method provided by the embodiment of the present application.
[0265] In some embodiments, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disk, or a CD-ROM; or it may be various devices including one or any combination of the above memories.
[0266] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0267] As an example, executable instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0268] As an example, the executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0269] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A method for object interaction, It is characterized in that The method comprises: Displaying a first virtual object in a first virtual space of a virtual scene and displaying at least one second virtual object; displaying a first virtual natural element in the first virtual space; When the relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition, in response to a first interaction instruction, controlling the first virtual object to perform a first interaction operation on the second virtual object, and during the execution of the first interaction operation, the target attribute value of the second virtual object remains unchanged; When the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, in response to a second interaction instruction, the first virtual object is controlled to perform a second interaction operation on the second virtual object. During the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
2. The method according to claim 1, It is characterized in that The displaying of the first virtual object in the first virtual space of the virtual scene includes: displaying the first virtual object in a second virtual space, wherein the second virtual space includes a second virtual natural element; When the distance between the first virtual object and the second virtual natural element is less than a distance threshold, transmitting the first virtual object from the second virtual space to the first virtual space; The first virtual object is displayed at a target position in the first virtual space.
3. The method according to claim 2, It is characterized in that When the distance between the first virtual object and the second virtual natural element is less than a distance threshold, transmitting the first virtual object from the second virtual space to the first virtual space includes: When the distance between the first virtual object and the second virtual natural element is less than a distance threshold, controlling the second virtual natural element to transform into a virtual portal; When the first virtual object enters the virtual portal, the first virtual object is transmitted from the second virtual space to the first virtual space.
4. The method according to claim 1, It is characterized in that The displaying of the first virtual object in the first virtual space of the virtual scene includes: Displaying the first virtual object and task guidance information in the second virtual space, wherein the task guidance information is used to indicate that the first virtual space can be entered by completing a target task; Based on the task guidance information, in response to an execution instruction for the target task, controlling the first virtual object to execute the target task; When the target task is completed, transmitting the first virtual object from the second virtual space to the first virtual space; The first virtual object is displayed at a target position in the first virtual space.
5. The method according to claim 1, It is characterized in that The displaying of the first virtual object in the first virtual space of the virtual scene includes: Displaying the first virtual object in a second virtual space, and dynamically displaying an interaction score of the first virtual object; The interaction score is obtained by the first virtual object interacting with the third virtual object in the virtual scene, and the first virtual object and the third virtual object are in a hostile relationship; When the interaction score reaches a score threshold, transmitting the first virtual object from the second virtual space to the first virtual space; The first virtual object is displayed at a target position in the first virtual space.
6. The method according to claim 1, It is characterized in that The displaying of the first virtual object in the first virtual space of the virtual scene includes: Displaying, in a first virtual space of a virtual scene, a first virtual object transmitted from a second virtual space to the first virtual space; The method further comprises: In the first virtual space, displaying a remaining time that the first virtual object can stay in the first virtual space; When the remaining time is zero, the first virtual object is transmitted back to the second virtual space.
7. The method according to claim 1, It is characterized in that The displaying of the first virtual natural element in the first virtual space includes: Acquire the center position of the first virtual space; Determine a circular area with the center position as the center and the target length as the radius; At the edge of the circular area, a first virtual natural element belonging to a natural phenomenon is displayed.
8. The method according to claim 1, It is characterized in that The first virtual space includes at least two natural element display positions, and the natural element display positions are used to display the first virtual natural element; The displaying of the first virtual natural element in the first virtual space includes: A first natural element display position in the first virtual space displays a first virtual natural element belonging to a natural phenomenon; After displaying the first virtual natural element belonging to the natural phenomenon in the first virtual space, the method further includes: Acquire a position change period of the first virtual natural element; When it is determined based on the position change period that the position change time arrives, the first virtual natural element is changed from the first natural element display position to the second natural element display position, so that the first virtual natural element is displayed through the second natural element display position.
9. The method according to claim 8, It is characterized in that The method further comprises: When it is determined based on the position change period that the position change time has arrived, acquiring a position change strategy for the first virtual natural element; The position change strategy is used to indicate the display order of the first virtual natural element at the display positions of the at least two natural elements; Based on the position transformation strategy and the first natural element display position, the second natural element display position is determined from the at least two natural element display positions.
10. The method according to claim 1, It is characterized in that After displaying the first virtual natural element in the first virtual space, the method further includes: controlling the first virtual natural element to move in the first virtual space; The moving trajectory of the first virtual natural element in the first virtual space is the target trajectory.
11. The method according to claim 1, It is characterized in that The displaying of the first virtual natural element in the first virtual space includes: In the first virtual space, displaying a first virtual natural element having a first size; After displaying the first virtual natural element in the first virtual space, the method further includes: The size of the first virtual natural element is changed from the first size to a second size, where the second size is different from the first size.
12. The method of claim 1, It is characterized in that The displaying of at least one second virtual object comprises: When the relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition, displaying an outline corresponding to the entity of the second virtual object; When the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, the entity of the second virtual object is displayed.
13. The method of claim 1, It is characterized in that The method further comprises: When the relative position relationship between the first virtual object and the first virtual natural element does not satisfy a preset condition, controlling the brightness of the first virtual space to be lower than a brightness threshold; When the relative position relationship between the first virtual object and the first virtual natural element meets a preset condition, the brightness of the first virtual space is controlled to reach a brightness threshold.
14. The method of claim 1, It is characterized in that The method further comprises: When the first virtual object kills the second virtual object in the first virtual space, a virtual resource used as a reward is displayed in the first virtual space, and the virtual resource is used to be used in the first virtual space; In response to a claiming operation on the virtual resource, the virtual resource is claimed.
15. The method of claim 1, It is characterized in that The displaying of the first virtual object in the first virtual space of the virtual scene includes: Displaying, in a first virtual space of a virtual scene, a first virtual object transmitted from a second virtual space to the first virtual space; The method further comprises: When the first virtual object kills the second virtual object in the first virtual space, displaying a virtual portal; When the first virtual object enters the virtual portal, the first virtual object is teleported back to the second virtual space.
16. The method of claim 1, It is characterized in that The method further comprises: In the first virtual space, dynamically displaying a remaining time that the first virtual object can stay in the first virtual space; When the remaining time is zero and there is a second virtual object in a survival state in the first virtual space, failure indication information is displayed, where the failure indication information is used to indicate that the interaction of the first virtual object in the first virtual space has failed.
17. The method according to any one of claims 1 to 16, It is characterized in that The method further comprises: When the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, displaying a target special effect at a target part of the second virtual object; The target special effect is used to indicate that the target part is a weak part of the second virtual object.
18. An object interaction device, It is characterized in that The device comprises: A display module, configured to display a first virtual object in a first virtual space of a virtual scene and to display at least one second virtual object; and, for displaying a first virtual natural element in the first virtual space; a control module, configured to control the first virtual object to perform a first interaction operation on the second virtual object in response to a first interaction instruction when the relative position relationship between the second virtual object and the first virtual natural element does not satisfy a preset condition, wherein during the execution of the first interaction operation, a target attribute value of the second virtual object remains unchanged; And, when the relative position relationship between the second virtual object and the first virtual natural element meets a preset condition, in response to a second interaction instruction, control the first virtual object to perform a second interaction operation on the second virtual object, and during the execution of the second interaction operation, the target attribute value of the second virtual object decreases.
19. An electronic device, It is characterized in that include: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 17 when executing the executable instructions stored in the memory.
20. A computer-readable storage medium, It is characterized in that Executable instructions are stored, which are used to cause a processor to execute and implement the method described in any one of claims 1 to 17.
21. A computer program product comprising a computer program or instructions, It is characterized in that When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 17 is implemented.
Citation Information
Cited By
Virtual-environment-based interaction method and apparatus, device, medium, and program product
US12743858B2
Virtual-environment-based interaction method and apparatus, device, medium, and program product
US20230343054A1
