CN115317903A - Interactive control method, device and electronic device in game - Google Patents
Interactive control method, device and electronic device in game Download PDFInfo
- Publication number
- CN115317903A CN115317903A CN202210774688.3A CN202210774688A CN115317903A CN 115317903 A CN115317903 A CN 115317903A CN 202210774688 A CN202210774688 A CN 202210774688A CN 115317903 A CN115317903 A CN 115317903A
- Authority
- CN
- China
- Prior art keywords
- virtual object
- probability
- controlled virtual
- interactive
- target object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
- A63F13/57—Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/011—Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本发明涉及网络游戏技术领域,具体而言,涉及一种游戏中的交互控制方法、装置及电子设备。The present invention relates to the technical field of online games, in particular, to an interactive control method, device and electronic equipment in games.
背景技术Background technique
相关技术中,在手游游戏中,玩家控制的虚拟角色与其他虚拟对象进行交互时,通常需要玩家操作位移控件控制虚拟角色靠近目标虚拟对象,当显示目标虚拟对象的交互控件时,再操作交互控件控制虚拟角色与目标虚拟对象进行交互。该方式中,玩家的操作过程较为繁琐,有时需要两只手共同操作完成,导致玩家的体验较差。In related technologies, in mobile games, when the virtual character controlled by the player interacts with other virtual objects, the player usually needs to operate the displacement control to control the virtual character to approach the target virtual object, and then operate the interactive control when the interactive control of the target virtual object is displayed. The control controls the virtual character to interact with the target virtual object. In this method, the player's operation process is relatively cumbersome, and sometimes requires two hands to complete the operation together, resulting in poor player experience.
发明内容Contents of the invention
有鉴于此,本发明的目的在于提供一种游戏中的交互控制方法、装置及电子设备,以使玩家在控制虚拟角色进行交互的过程中操作更为快捷简便,提高了玩家的游戏体验。In view of this, the purpose of the present invention is to provide an interactive control method, device and electronic device in a game, so that the player can operate more quickly and easily in the process of controlling the virtual character to interact, and improve the player's game experience.
第一方面,本发明实施例提供了一种游戏中的交互控制方法,通过终端设备提供一图形用户界面;图形用户界面中显示位移控件、游戏场景的场景画面,游戏场景内至少包含通过终端设备进行控制的受控虚拟对象;该方法包括:响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化;响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;其中,目标对象具有可交互属性,状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;交互进度标识用于指示:受控虚拟对象与目标对象进行交互的概率;确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。In the first aspect, the embodiment of the present invention provides an interactive control method in a game. A graphical user interface is provided through a terminal device; the displacement control and the scene picture of the game scene are displayed in the graphical user interface. A controlled virtual object for control; the method includes: responding to the trigger operation for the displacement control, controlling the movement of the controlled virtual object, and controlling the scene picture to change; responding to the appearance of the target object in the scene picture, based on the state of the controlled virtual object Information display interaction progress identification; wherein, the target object has interactive properties, and the state information includes the displacement state of the controlled virtual object, and/or, the control state of the displacement control; the interaction progress identification is used to indicate: the controlled virtual object and the target object Interaction probability; determine that the state information satisfies the preset condition, display the interaction progress mark in the first display format, and control the controlled virtual object to perform interactive operation with the target object.
上述基于受控虚拟对象的状态信息显示交互进度标识的步骤,包括:基于受控虚拟对象的状态信息,确定受控虚拟对象与目标对象进行交互的概率;基于概率显示交互进度标识。The step of displaying the interaction progress indicator based on the status information of the controlled virtual object includes: determining the probability of the interaction between the controlled virtual object and the target object based on the status information of the controlled virtual object; and displaying the interaction progress indicator based on the probability.
上述基于概率显示交互进度标识的步骤,包括:基于概率,确定交互进度标识中以第二显示格式显示的目标区域,控制目标区域以第二显示格式显示;目标区域与交互进度标识的显示区域的比值与概率相匹配。The above step of displaying the interaction progress mark based on the probability includes: determining the target area displayed in the second display format in the interaction progress mark based on the probability, and controlling the target area to be displayed in the second display format; the target area and the display area of the interaction progress mark Ratios match probabilities.
上述基于概率显示交互进度标识的步骤,包括:判断概率是否大于预设的概率阈值;如果大于,在目标对象的相关区域显示交互进度标识;相关区域包括与目标对象的距离小于设定距离的区域。The above step of displaying the interactive progress indicator based on the probability includes: judging whether the probability is greater than the preset probability threshold; if greater, displaying the interactive progress indicator in the relevant area of the target object; the relevant area includes the area whose distance from the target object is less than the set distance .
上述交互操作包括多种;第一显示格式包括多个显示区域;每个显示区域包括一个交互操作对应的标识;每个显示区域对应于预设的操控区域;以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作的步骤,包括:在交互进度标识中显示多个包括交互操作对应的标识显示区域;基于触发操作的作用位置与位移控件在图形用户界面的显示位置,确定触发操作对应的操控区域;将操控区域对应的显示区域中的标识对应的交互操作确定为目标交互操作;控制受控虚拟对象与目标对象进行目标交互操作。The above-mentioned interactive operations include multiple types; the first display format includes a plurality of display areas; each display area includes an identification corresponding to an interactive operation; each display area corresponds to a preset manipulation area; the interaction progress identification is displayed in the first display format , the step of controlling the interactive operation between the controlled virtual object and the target object, including: displaying a plurality of identification display areas corresponding to the interactive operation in the interactive progress indicator; based on the action position of the trigger operation and the display position of the displacement control in the graphical user interface , determine the manipulation area corresponding to the trigger operation; determine the interaction operation corresponding to the identifier in the display area corresponding to the manipulation area as the target interaction operation; control the controlled virtual object to perform the target interaction operation with the target object.
上述预设条件包括:状态信息指示受控虚拟对象与目标对象进行交互的概率大于目标概率阈值;确定状态信息满足预设条件的步骤,包括:基于状态信息,确定受控虚拟对象与目标对象进行交互的概率;如果概率大于目标概率阈值,确定状态信息满足预设条件。The above preset conditions include: the status information indicates that the probability of the controlled virtual object interacting with the target object is greater than the target probability threshold; the step of determining that the status information meets the preset conditions includes: based on the status information, determining that the controlled virtual object interacts with the target object The probability of the interaction; if the probability is greater than the target probability threshold, it is determined that the status information satisfies the preset condition.
上述状态信息包括受控虚拟对象的位移状态及位移控件的控制状态;位移状态包括受控虚拟对象与目标对象之间的第一距离参数;控制状态包括位移控件与触发操作的作用位置之间的第二距离参数;基于状态信息,确定受控虚拟对象与目标对象进行交互的概率的步骤,包括:获取受控虚拟对象与目标对象的位置信息、以及触发操作的作用位置;基于受控虚拟对象与目标对象的位置信息,确定受控虚拟对象与目标对象之间的第一距离参数:基于作用位置与位移控件在图形用户界面的显示位置,计算作用位置与位移控件之间的第二距离参数;基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率。The above state information includes the displacement state of the controlled virtual object and the control state of the displacement control; the displacement state includes the first distance parameter between the controlled virtual object and the target object; the control state includes the distance between the displacement control and the action position of the trigger operation. The second distance parameter; based on the state information, the step of determining the probability of interaction between the controlled virtual object and the target object, including: obtaining the position information of the controlled virtual object and the target object, and the action position of the trigger operation; based on the controlled virtual object Determine the first distance parameter between the controlled virtual object and the target object based on the position information of the target object: Calculate the second distance parameter between the action position and the displacement control based on the display position of the action position and the displacement control in the GUI ; Based on the first distance parameter and the second distance parameter, determine the probability of interaction between the controlled virtual object and the target object.
上述基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率的步骤,包括:基于预设的第一负相关函数及第一距离参数,计算第一概率参数;第一负相关函数以距离参数为自变量,以概率参数为因变量;基于预设的第二负相关函数及第二距离参数,计算第二概率参数;第二负相关函数以距离参数为自变量,以概率参数为因变量;将第一概率参数与第二概率参数之和确定为受控虚拟对象与目标对象进行交互的概率。The step of determining the probability of interaction between the controlled virtual object and the target object based on the first distance parameter and the second distance parameter includes: calculating the first probability parameter based on the preset first negative correlation function and the first distance parameter; The first negative correlation function takes the distance parameter as the independent variable and the probability parameter as the dependent variable; based on the preset second negative correlation function and the second distance parameter, the second probability parameter is calculated; the second negative correlation function takes the distance parameter as the independent variable The variable takes the probability parameter as the dependent variable; the sum of the first probability parameter and the second probability parameter is determined as the probability of interaction between the controlled virtual object and the target object.
上述目标对象对应于预设的对象类别;类别包括非玩家角色虚拟对象或物品类虚拟对象;上述方法还包括:当目标对象包括非玩家角色虚拟对象时,基于预设的第一函数参数,构造第一负相关函数及第二负相关函数;当目标对象包括物品类虚拟对象时,基于预设的第二函数参数,构造第一负相关函数及第二负相关函数。The above-mentioned target object corresponds to a preset object category; the category includes a non-player character virtual object or an item-type virtual object; the above method further includes: when the target object includes a non-player character virtual object, based on a preset first function parameter, constructing A first negative correlation function and a second negative correlation function; when the target object includes an item-type virtual object, the first negative correlation function and the second negative correlation function are constructed based on preset second function parameters.
第二方面,本发明实施例提供了一种游戏中的交互控制装置,通过终端设备提供一图形用户界面;图形用户界面中显示位移控件、游戏场景的场景画面,游戏场景内至少包含通过终端设备进行控制的受控虚拟对象;该装置包括:移动控制模块,用于响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化;交互进度标识显示模块,用于响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;其中,目标对象具有可交互属性,状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;交互进度标识用于指示:受控虚拟对象与目标对象进行交互的概率;交互操作控制模块,用于确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。In the second aspect, the embodiment of the present invention provides an interactive control device in a game, which provides a graphical user interface through the terminal device; the graphical user interface displays the displacement control and the scene picture of the game scene, and the game scene contains at least The controlled virtual object for control; the device includes: a movement control module, used to respond to the trigger operation for the displacement control, control the movement of the controlled virtual object, and control the scene picture to change; an interactive progress identification display module, used to respond to A target object appears in the scene screen, and an interactive progress indicator is displayed based on the state information of the controlled virtual object; wherein, the target object has an interactive attribute, and the state information includes the displacement state of the controlled virtual object, and/or, the control state of the displacement control; The interaction progress mark is used to indicate: the probability of the controlled virtual object interacting with the target object; the interactive operation control module is used to determine that the status information meets the preset conditions, display the interaction progress mark in the first display format, and control the controlled virtual object to interact with the target object. target objects to interact with.
第三方面,本发明实施例提供了一种电子设备,包括处理器和存储器,存储器存储有能够被处理器执行的机器可执行指令,处理器执行机器可执行指令以实现上述的游戏中的交互控制方法。In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to realize the above-mentioned interaction in the game Control Method.
第四方面,本发明实施例提供了一种机器可读存储介质,该机器可读存储介质存储有机器可执行指令,机器可执行指令在被处理器调用和执行时,机器可执行指令促使处理器实现上述的游戏中的交互控制方法。In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt processing The device implements the above-mentioned interactive control method in the game.
本发明实施例带来了以下有益效果:Embodiments of the present invention bring the following beneficial effects:
上述一种游戏中的交互控制方法、装置及电子设备,响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化;响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。该方式使玩家可以通过交互进度标识查看当前受控虚拟角色与目标角色之间进行互动的概率,从而继续控制受控虚拟角色进行移动,以使在概率较高时触发二者之间的交互操作,使得交互操作的实现更为快捷简便,提高了玩家的游戏体验。The above-mentioned interactive control method, device and electronic equipment in a game control the movement of the controlled virtual object in response to the trigger operation of the displacement control, and control the change of the scene picture; in response to the appearance of the target object in the scene picture, based on the controlled virtual The state information of the object displays the interactive progress mark; the state information includes the displacement state of the controlled virtual object, and/or, the control state of the displacement control; if the state information satisfies the preset condition, the interactive progress mark is displayed in the first display format, and the controlled Control the virtual object to interact with the target object. This method allows the player to view the probability of interaction between the currently controlled virtual character and the target character through the interaction progress indicator, so as to continue to control the controlled virtual character to move, so that the interaction between the two is triggered when the probability is high , making the realization of interactive operation faster and easier, and improving the player's gaming experience.
本发明的其他特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without creative work.
图1为相关技术中包括交互控件和摇杆控件的游戏场景示意图;FIG. 1 is a schematic diagram of a game scene including interactive controls and joystick controls in the related art;
图2为本发明实施例提供的一种游戏中的交互控制方法的流程图;FIG. 2 is a flowchart of an interactive control method in a game provided by an embodiment of the present invention;
图3为本发明实施例提供的一种显示有交互进度标识的游戏场景示意图;FIG. 3 is a schematic diagram of a game scene displaying an interactive progress mark provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种显示有交互进度标识的游戏场景示意图;FIG. 4 is a schematic diagram of another game scene displaying an interactive progress mark provided by an embodiment of the present invention;
图5为本发明实施例提供的一种以第一显示格式显示交互进度标识的游戏场景示意图;FIG. 5 is a schematic diagram of a game scene displaying an interactive progress indicator in a first display format provided by an embodiment of the present invention;
图6为本发明实施例提供的一种交互进度标识的示意图;FIG. 6 is a schematic diagram of an interactive progress indicator provided by an embodiment of the present invention;
图7为本发明实施例提供的一种标示出操控区域的游戏场景图;FIG. 7 is a diagram of a game scene marked with a manipulation area provided by an embodiment of the present invention;
图8为本发明实施例提供的一种显示有环形进度条的游戏场景示意图;Fig. 8 is a schematic diagram of a game scene displaying a circular progress bar provided by an embodiment of the present invention;
图9为本发明实施例提供的一种环形进度条的变化过程的示意图;FIG. 9 is a schematic diagram of a change process of an annular progress bar provided by an embodiment of the present invention;
图10为本发明实施例提供的另一种环形进度条的变化过程的示意图;FIG. 10 is a schematic diagram of another annular progress bar change process provided by an embodiment of the present invention;
图11为本发明实施例提供的一种游戏中的交互控制装置的结构示意图;Fig. 11 is a schematic structural diagram of an interactive control device in a game provided by an embodiment of the present invention;
图12为本发明实施例提供的一种电子设备的结构示意图。FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. the embodiment. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.
相关技术中,为增加手游的趣味性,通常会在玩家的游戏场景中设置一些可交互的虚拟对象,使玩家控制自己的虚拟对象与这些虚拟对象进行交互,例如开放世界类手游中,可以设置一些草药,玩家可以控制虚拟对象靠近草药,并采集草药。玩家控制虚拟角色与NPC(非玩家角色虚拟对象)、场景、物品交互的方式基本都是通过一个通用的交互按钮来实现。在普遍的交互方式下,玩家完成完整的操作流必须用到两只手,首先需要通过左手操作摇杆(位移控件的一种),让玩家对应的虚拟对象靠近交互对象,并在靠近到一定距离时,显示与交互对象交互的按钮,然后再通过右手点击交互按钮完成交互发,如图1所示,标注1的控件为摇杆,标注2的控件为交互按钮。这样的交互方式在流程和操作性上都存在可优化空间。In related technologies, in order to increase the fun of mobile games, some interactive virtual objects are usually set in the player's game scene, so that the player can control their own virtual objects to interact with these virtual objects. For example, in open world mobile games, Some herbs can be set, and the player can control the virtual object to approach the herbs and collect them. The way the player controls the virtual character to interact with NPCs (non-player character virtual objects), scenes, and items is basically realized through a common interaction button. In the common interaction mode, the player must use two hands to complete the complete operation flow. First, the left hand needs to operate the joystick (a kind of displacement control), so that the corresponding virtual object of the player is close to the interactive object, and when it is close to a certain When distance, display the button to interact with the interactive object, and then click the interactive button with the right hand to complete the interactive sending, as shown in Figure 1, the control marked 1 is the joystick, and the control marked 2 is the interactive button. There is room for optimization in both process and operability of such an interaction method.
在本发明公开其中一种实施例中的游戏中的交互控制方法可以运行于本地终端设备或者是服务器。当游戏中的交互控制方法运行于服务器时,该方法则可以基于云交互系统来实现与执行,其中,云交互系统包括服务器和客户端设备。The interactive control method in a game disclosed in one embodiment of the present invention can run on a local terminal device or a server. When the interactive control method in the game runs on the server, the method can be realized and executed based on the cloud interactive system, wherein the cloud interactive system includes a server and a client device.
在一可选的实施方式中,云交互系统下可以运行各种云应用,例如:云游戏。以云游戏为例,云游戏是指以云计算为基础的游戏方式。在云游戏的运行模式下,游戏程序的运行主体和游戏画面呈现主体是分离的,游戏中的交互控制方法的储存与运行是在云游戏服务器上完成的,客户端设备的作用用于数据的接收、发送以及游戏画面的呈现,举例而言,客户端设备可以是靠近用户侧的具有数据传输功能的显示设备,如,移动终端、电视机、计算机、掌上电脑等;但是进行信息处理的为云端的云游戏服务器。在进行游戏时,玩家操作客户端设备向云游戏服务器发送操作指令,云游戏服务器根据操作指令运行游戏,将游戏画面等数据进行编码压缩,通过网络返回客户端设备,最后,通过客户端设备进行解码并输出游戏画面。In an optional implementation manner, various cloud applications, such as cloud games, can be run under the cloud interactive system. Taking cloud games as an example, cloud games refer to game methods based on cloud computing. In the running mode of cloud games, the running subject of the game program and the presenting subject of the game screen are separated, the storage and running of the interactive control method in the game is completed on the cloud game server, and the role of the client device is used for data storage. Receive, send and present the game screen, for example, the client device can be a display device with data transmission function near the user side, such as a mobile terminal, TV, computer, palmtop computer, etc.; but the information processing is Cloud game server in the cloud. When playing a game, the player operates the client device to send an operation command to the cloud game server, and the cloud game server runs the game according to the operation command, encodes and compresses the game screen and other data, and returns it to the client device through the network. Decode and output the game screen.
在一可选的实施方式中,以游戏为例,本地终端设备存储有游戏程序并用于呈现游戏画面。本地终端设备用于通过图形用户界面与玩家进行交互,即,常规的通过电子设备下载安装游戏程序并运行。该本地终端设备将图形用户界面提供给玩家的方式可以包括多种,例如,可以渲染显示在终端的显示屏上,或者,通过全息投影提供给玩家。举例而言,本地终端设备可以包括显示屏和处理器,该显示屏用于呈现图形用户界面,该图形用户界面包括游戏画面,该处理器用于运行该游戏、生成图形用户界面以及控制图形用户界面在显示屏上的显示。In an optional implementation manner, taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through the graphical user interface, that is, the conventional electronic device downloads and installs the game program and runs it. The local terminal device may provide the graphical user interface to the player in various manners, for example, rendering and displaying it on the display screen of the terminal, or providing it to the player through holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the graphical user interface displayed on the display.
在一种可能的实施方式中,本发明实施例提供了一种游戏中的交互控制方法,通过终端设备提供一图形用户界面;其中,终端设备可以是前述提到的本地终端设备,也可以是前述提到的云交互系统中的客户端设备。图形用户界面中显示位移控件、游戏场景的场景画面,游戏场景内至少包含通过终端设备进行控制的受控虚拟对象;如图2所示,该方法包括如下步骤:In a possible implementation, the embodiment of the present invention provides an interactive control method in a game, which provides a graphical user interface through a terminal device; wherein, the terminal device may be the local terminal device mentioned above, or it may be The client device in the aforementioned cloud interaction system. The graphical user interface displays the displacement control and the scene picture of the game scene, and the game scene contains at least a controlled virtual object controlled by a terminal device; as shown in Figure 2, the method includes the following steps:
步骤S202,响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化。Step S202, responding to the trigger operation on the displacement control, controlling the movement of the controlled virtual object and controlling the scene picture to change.
上述受控虚拟对象通过所述终端设备控制。受控虚拟对象位于游戏场景中,通常显示在图形用户界面现实的游戏场景的场景画面中。在一些情况下,受控虚拟对象也可能没有显示在终端设备的图形用户界面,如以受控虚拟对象的视角显示游戏场景的场景画面时,场景画面中通常不会出现受控虚拟角色。The above-mentioned controlled virtual object is controlled by the terminal device. The controlled virtual object is located in the game scene, and is usually displayed in the scene picture of the game scene in the graphical user interface reality. In some cases, the controlled virtual object may not be displayed on the graphical user interface of the terminal device. For example, when the scene picture of the game scene is displayed from the perspective of the controlled virtual object, the controlled virtual character usually does not appear in the scene picture.
上述针对位移控件的触发操作可以为对位移控件的点击操作,例如当玩家点击了位移控件后,受控虚拟对象就开始移动,玩家再次点击位移控件,受控虚拟对象停止移动。上述触发操作也可以为长按操作,例如在玩家长按位移控件的情况下,受控虚拟对象持续移动,当玩家放开位移控件,受控虚拟对象停止移动。The above-mentioned trigger operation for the displacement control may be a click operation on the displacement control. For example, when the player clicks the displacement control, the controlled virtual object starts to move, and the player clicks the displacement control again, and the controlled virtual object stops moving. The above-mentioned trigger operation can also be a long-press operation. For example, when the player presses and holds the displacement control, the controlled virtual object continues to move, and when the player releases the displacement control, the controlled virtual object stops moving.
为了提升玩家的游戏体验,位移控件通常还有方向控制功能和速度控制功能。例如,玩家对位移控件的触发操作的作用位置位于位移控件的左侧,则受控虚拟对象在游戏场景中向左移动;玩家对位移控件的触发操作的作用位置距离位移控件较远,可以控制受控虚拟对象以较快速度移动等。In order to improve the player's gaming experience, the displacement control usually has a direction control function and a speed control function. For example, if the action position of the player's trigger operation on the displacement control is on the left side of the displacement control, the controlled virtual object will move to the left in the game scene; Controlled virtual objects move at a faster speed, etc.
当玩家控制受控虚拟角色运动时,为了使玩家体验到移动的感觉,还需要控制场景画面发生变化,例如可以实时获取受控虚拟角色的位置信息,基于该位置信息确定场景画面,并显示在图像用户界面上。When the player controls the movement of the controlled virtual character, in order for the player to experience the feeling of movement, it is also necessary to control the scene picture to change. For example, the position information of the controlled virtual character can be obtained in real time, and the scene picture is determined based on the position information and displayed on the Graphical user interface.
步骤S204,响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;其中,目标对象具有可交互属性,状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;交互进度标识用于指示:受控虚拟对象与目标对象进行交互的概率。Step S204, in response to the target object appearing in the scene picture, display an interaction progress indicator based on the state information of the controlled virtual object; wherein, the target object has an interactive attribute, and the state information includes the displacement state of the controlled virtual object, and/or, the displacement The control state of the control; the interaction progress indicator is used to indicate: the probability that the controlled virtual object interacts with the target object.
当场景画面中出现目标对象时,如果该目标对象具有可交互属性,可以基于受控虚拟对象的状态信息,计算受控虚拟对象与目标对象进行交互的概率,然后基于该概率显示交互进度标识。该状态信息可以包括受控虚拟对象的位移状态,该位移状态可以为受控虚拟对象与目标对象的距离,该受控虚拟对象的速度等。例如,可以设置一个计算公式(也可以称为“函数”),将受控虚拟对象与目标对象的距离及受控虚拟对象的速度输入至该计算公式后即可得到受控虚拟对象与目标对象进行交互的概率。并且通过该计算公式得到的交互的概率随着受控虚拟对象与目标对象的距离和受控虚拟对象的速度减小而增大。When a target object appears in the scene picture, if the target object has an interactive attribute, the probability of the controlled virtual object interacting with the target object can be calculated based on the state information of the controlled virtual object, and then an interaction progress indicator is displayed based on the probability. The state information may include the displacement state of the controlled virtual object, and the displacement state may be the distance between the controlled virtual object and the target object, the speed of the controlled virtual object, and the like. For example, a calculation formula (also called "function") can be set, and the distance between the controlled virtual object and the target object and the speed of the controlled virtual object can be input into the calculation formula to obtain the controlled virtual object and the target object. probability of interaction. And the probability of interaction obtained by the calculation formula increases as the distance between the controlled virtual object and the target object and the speed of the controlled virtual object decrease.
上述状态信息还可以包括位移控件的控制状态,该控制状态可以为对位移控件的按压力度、对位移控件的作用位置与位移控件的距离等,当玩家对位移控件的按压力度较小,对位移控件的作用位置与位移控件的距离较小时,可以认为玩家控制受控虚拟角色移动的意愿较小,受控虚拟角色与目标对象进行交互的概率越高。在具体实现时,也可以针对于位移控件的控制状态相关的计算公式,基于位移控件的控制状态计算受控虚拟对象与目标对象进行交互的概率。该方式较为适用于受控虚拟角色与目标对象之间的距离较近的场景。The above state information may also include the control state of the displacement control, the control state may be the pressing force on the displacement control, the distance between the action position of the displacement control and the displacement control, etc. When the distance between the action position of the control and the displacement control is small, it can be considered that the player is less willing to control the movement of the controlled virtual character, and the probability of the controlled virtual character interacting with the target object is higher. During specific implementation, the calculation formula related to the control state of the displacement control may also be used to calculate the probability of interaction between the controlled virtual object and the target object based on the control state of the displacement control. This method is more suitable for scenes where the distance between the controlled virtual character and the target object is relatively short.
在具体实现时,可以同时考虑到受控虚拟对象的位移状态和位移控件的控制状态,基于受控虚拟对象的位移状态和位移控件的控制状态计算得到受控虚拟对象与目标对象进行交互的概率。In the specific implementation, the displacement state of the controlled virtual object and the control state of the displacement control can be considered at the same time, and the probability of interaction between the controlled virtual object and the target object can be calculated based on the displacement state of the controlled virtual object and the control state of the displacement control .
在显示交互进度标识时,可以直接在目标对象的相关区域内显示交互进度标识,如图3所示。目标对象可以包括多个,图3中以2个目标对象为例,交互进度标识以进度条表示。进度条灰色部分与整个进度条的面积之比可以表示受控虚拟对象与目标对象进行交互的概率。此外,还可以在游戏场景中的设定位置显示多个目标对象的交互进度标识,如图4所示。图4中,交互进度标识以进度条表示,并显示有目标对象的标识,将对象1及对象2作为目标对象1及目标对象2的标识。When displaying the interaction progress indicator, the interaction progress indicator may be directly displayed in the relevant area of the target object, as shown in FIG. 3 . There may be multiple target objects. In FIG. 3, two target objects are taken as an example, and the interactive progress indicator is represented by a progress bar. The ratio of the gray part of the progress bar to the area of the entire progress bar can represent the probability of the controlled virtual object interacting with the target object. In addition, interactive progress signs of multiple target objects may also be displayed at set positions in the game scene, as shown in FIG. 4 . In FIG. 4 , the interaction progress mark is represented by a progress bar, and the mark of the target object is displayed, and the
玩家在看到交互进度条指示的受控虚拟对象与目标对象进行交互的概率时,可以选择继续向目标对象靠近,以增加交互的概率,从而触发交互操作,也可以选择改变移动方向,远离目标对象,防止交互操作的发生。When the player sees the probability of the controlled virtual object interacting with the target object indicated by the interaction progress bar, he can choose to continue to approach the target object to increase the probability of interaction, thereby triggering the interaction operation, or he can choose to change the moving direction and move away from the target object Object that prevents interoperability from occurring.
步骤S206,确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。Step S206, determining that the state information satisfies the preset condition, displaying the interaction progress indicator in the first display format, and controlling the controlled virtual object to perform interactive operations with the target object.
上述预设条件通常为基于状态信息确定的受控虚拟对象与目标对象进行交互的概率大于预设的目标概率阈值。该目标概率阈值可以为0.9、0.95或1等。可以具体根据需求设定,通常来说,目标概率阈值越低,越容易触发交互操作,即受控虚拟对象在与目标对象相距较远,运动速度较快的时候就能触发交互操作,可以为与受控虚拟对象必须发生交互操作的目标对象设置较低的目标概率与之。The above preset condition is usually that the probability that the controlled virtual object interacts with the target object determined based on the state information is greater than a preset target probability threshold. The target probability threshold may be 0.9, 0.95 or 1, etc. It can be set according to the specific needs. Generally speaking, the lower the target probability threshold, the easier it is to trigger interactive operations, that is, the controlled virtual object can trigger interactive operations when it is far away from the target object and moves faster, which can be used for The target object that must interact with the controlled virtual object is set with a lower target probability.
上述第一显示格式可以为发光、放大等效果,如图5所示,受控虚拟对象与目标对象1的状态信息满足了预设条件,即交互的概率为1,交互进度标识显示为100%,且在周围以锯齿状表示发光效果,以指示受控虚拟对象可以和目标对象进行交互操作。在具体实现时,还可以设置等待时间,即状态信息满足了预设条件的时间达到预设时间后,如2s,控制受控虚拟对象与目标对象进行交互操作,以减少玩家的误操作触发的交互操作。The above-mentioned first display format can be effects such as lighting and zooming in. As shown in Figure 5, the state information of the controlled virtual object and the
上述一种游戏中的交互控制方法,响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化;响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。该方式使玩家可以通过交互进度标识查看当前受控虚拟角色与目标角色之间进行互动的概率,从而继续控制受控虚拟角色进行移动,以使在概率较高时触发二者之间的交互操作,使得交互操作的实现更为快捷简便,提高了玩家的游戏体验。The above interactive control method in a game responds to the trigger operation of the displacement control, controls the movement of the controlled virtual object, and controls the scene picture to change; in response to the target object appearing in the scene picture, based on the state information of the controlled virtual object, Interaction progress identification; state information includes the displacement state of the controlled virtual object, and/or, the control state of the displacement control; determine that the state information meets the preset condition, display the interaction progress identification in the first display format, and control the controlled virtual object and the target Objects interact. This method allows the player to view the probability of interaction between the currently controlled virtual character and the target character through the interaction progress indicator, so as to continue to control the controlled virtual character to move, so that the interaction between the two is triggered when the probability is high , making the realization of interactive operation faster and easier, and improving the player's gaming experience.
下述实施例提供一响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识的具体方式。The following embodiment provides a specific method of displaying an interaction progress indicator based on the status information of the controlled virtual object in response to the appearance of the target object in the scene picture.
由于交互进度标识用于指示受控虚拟对象与目标对象进行交互的概率,因此可以首先基于受控虚拟对象的状态信息,确定受控虚拟对象与目标对象进行交互的概率,再基于概率显示交互进度标识。例如,可以基于概率,确定交互进度标识中以第二显示格式显示的目标区域,控制目标区域以第二显示格式显示,上述第二显示格式可以为较为醒目的颜色,目标区域与交互进度标识的显示区域的比值与概率相匹配。如图6所示,以灰色表示高亮颜色来显示目标区域,目标区域占整个交互进度标识的显示区域的50%,表示受控虚拟对象与目标对象进行交互的概率为50%。此外,还可以直接在该标识上显示表示概率的数字,如“50%”。Since the interaction progress indicator is used to indicate the probability of the interaction between the controlled virtual object and the target object, the probability of the interaction between the controlled virtual object and the target object can be determined first based on the state information of the controlled virtual object, and then the interaction progress can be displayed based on the probability logo. For example, based on the probability, the target area displayed in the second display format in the interaction progress sign can be determined, and the target area can be controlled to be displayed in the second display format. The second display format can be a more eye-catching color, and the target area and the interaction progress sign The ratios of the displayed areas match the probabilities. As shown in FIG. 6 , the target area is displayed in gray as a highlighted color, and the target area accounts for 50% of the display area of the entire interaction progress sign, indicating that the probability of the controlled virtual object interacting with the target object is 50%. In addition, a number indicating probability, such as "50%", can also be directly displayed on the logo.
通常而言,只有场景画面中出现的目标对象时,玩家才会控制受控虚拟对象与其进行交互。因此,可以在目标对象出现在场景画面中便开始计算目标兑现与受控虚拟对象之间的交互概率。而在显示交互进度标识的时候,可以判断概率是否大于预设的概率阈值;如果大于,在目标对象的相关区域显示交互进度标识;相关区域包括与目标对象的距离小于设定距离的区域,如在目标对象的上方等位置。如果概率小于预设的概率阈值,如“30%”可以认为玩家没有想要控制受控虚拟对象与目标对象进行交互的意愿,可以不显示交互进度标识。该方式较为适合游戏场景中目标对象较多的应用场景,以避免游戏画面过于杂乱。Generally speaking, only when the target object appears in the scene picture, the player will control the controlled virtual object to interact with it. Therefore, the calculation of the interaction probability between the target fulfillment and the controlled virtual object can be started when the target object appears in the scene frame. When displaying the interactive progress mark, it can be judged whether the probability is greater than the preset probability threshold; if greater, the interactive progress mark is displayed in the relevant area of the target object; the relevant area includes the area whose distance from the target object is less than the set distance, such as above the target object. If the probability is less than a preset probability threshold, such as "30%", it can be considered that the player has no desire to control the controlled virtual object to interact with the target object, and the interaction progress indicator may not be displayed. This method is more suitable for application scenarios with many target objects in the game scene, so as to avoid the game screen from being too cluttered.
在具体实现时,上述状态信息可以同时包括受控虚拟对象的位移状态及位移控件的控制状态;位移状态为受控虚拟对象与目标对象之间的第一距离参数;控制状态为位移控件与触发操作的作用位置之间的第二距离参数。在确定受控虚拟对象与目标对象进行交互的概率时,可以首先获取受控虚拟对象与目标对象的位置信息、以及触发操作的作用位置,并基于受控虚拟对象与目标对象的位置信息,确定受控虚拟对象与目标对象之间的第一距离参数,以及基于作用位置与位移控件在图形用户界面的显示位置,计算作用位置与位移控件之间的第二距离参数;最后基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率。In specific implementation, the above state information may include the displacement state of the controlled virtual object and the control state of the displacement control; the displacement state is the first distance parameter between the controlled virtual object and the target object; the control state is the displacement control and the trigger The second distance parameter between the acting locations of the operation. When determining the probability of interaction between the controlled virtual object and the target object, the location information of the controlled virtual object and the target object and the action position of the trigger operation can be obtained first, and based on the location information of the controlled virtual object and the target object, determine The first distance parameter between the controlled virtual object and the target object, and based on the action position and the display position of the displacement control in the GUI, calculate the second distance parameter between the action position and the displacement control; finally based on the first distance parameter and a second distance parameter to determine the probability of interaction between the controlled virtual object and the target object.
当玩家想要控制受控虚拟对象与目标对象交互时,会使受控虚拟对象靠近目标对象,因此第一距离参数在一定程度上可以表示二者产生交互的可能性。当玩家想要控制受控虚拟对象与目标对象交互时,受控虚拟对象的速度需要变慢,玩家控制位移控件的作用位置会距离控件比较远,因此第二距离参数也在一定程度上可以表示二者产生交互的可能性。When the player wants to control the controlled virtual object to interact with the target object, the controlled virtual object will be brought close to the target object, so the first distance parameter can represent the possibility of interaction between the two to a certain extent. When the player wants to control the controlled virtual object to interact with the target object, the speed of the controlled virtual object needs to be slowed down, and the position where the player controls the displacement control will be far away from the control, so the second distance parameter can also be expressed to a certain extent The possibility of interaction between the two.
在基于第一距离参数和第二距离参数计算交互的概率时,可以基于预设的第一负相关函数及第一距离参数,计算第一概率参数;第一负相关函数以距离参数为自变量,以概率参数为因变量,具体的参数设置可以参考图形用户界面显示游戏场景中两个虚拟对象的最远距离,并设定能够产生交互概率的目标距离,从而在受控虚拟对象与目标对象的距离与目标距离相等时,计算得到的第一概率参数为零,随着受控虚拟对象与目标对象的距离减小,计算得到的第一概率参数增大。然后基于预设的第二负相关函数及第二距离参数,计算第二概率参数;第二负相关函数以距离参数为自变量,以概率参数为因变量;通常而言,当玩家对位置控件的触发操作的作用位置离位置控件越远,则受控虚拟对象的速度越快,因此当第二距离较小时,通过第二负相关函数计算得到的第二概率参数越大。最后将第一概率参数与第二概率参数之和确定为受控虚拟对象与目标对象进行交互的概率。When calculating the probability of interaction based on the first distance parameter and the second distance parameter, the first probability parameter can be calculated based on the preset first negative correlation function and the first distance parameter; the first negative correlation function takes the distance parameter as an independent variable , with the probability parameter as the dependent variable, the specific parameter setting can refer to the graphical user interface to display the farthest distance between two virtual objects in the game scene, and set the target distance that can generate the interaction probability, so that the controlled virtual object and the target object When the distance of is equal to the target distance, the calculated first probability parameter is zero, and as the distance between the controlled virtual object and the target object decreases, the calculated first probability parameter increases. Then, based on the preset second negative correlation function and the second distance parameter, the second probability parameter is calculated; the second negative correlation function uses the distance parameter as the independent variable and the probability parameter as the dependent variable; generally speaking, when the player controls the position The farther the action position of the trigger operation is from the position control, the faster the speed of the controlled virtual object is. Therefore, when the second distance is small, the second probability parameter calculated by the second negative correlation function is larger. Finally, the sum of the first probability parameter and the second probability parameter is determined as the probability of interaction between the controlled virtual object and the target object.
通常而言,游戏场景中包括不同种类别的虚拟对象,如非玩家角色虚拟对象、物品类虚拟对象等。不同类别的目标对象具有不同的交互特性,可以通过不同的函数参数,构造第一负相关函数及第二负相关函数。例如,当目标对象为非玩家角色虚拟对象时,可以基于预设的第一函数参数,构造第一负相关函数及第二负相关函数,此时,可以通过该函数参数,可以使得受控虚拟对象距离目标对象较近且速度较慢的时候产生交互操作;当目标对象为物品类虚拟对象时,可以基于预设的第二函数参数,构造第一负相关函数及第二负相关函数,此时,可以通过该函数参数使得受控虚拟对象距离目标对象较远且速度较快的时候(相较于目标对象为非玩家角色虚拟对象)产生交互操作。Generally speaking, the game scene includes different types of virtual objects, such as non-player character virtual objects, item virtual objects, and the like. Different types of target objects have different interaction characteristics, and the first negative correlation function and the second negative correlation function can be constructed through different function parameters. For example, when the target object is a non-player character virtual object, the first negative correlation function and the second negative correlation function can be constructed based on the preset first function parameter. At this time, the controlled virtual When the object is closer to the target object and the speed is slower, an interactive operation occurs; when the target object is an item-type virtual object, the first negative correlation function and the second negative correlation function can be constructed based on the preset second function parameters. , you can use this function parameter to make the controlled virtual object farther away from the target object and faster (compared to the target object being a non-player character virtual object) to generate interactive operations.
下述实施例提供一确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作的具体方式。The following embodiments provide a specific way of determining that the state information meets the preset condition, displaying the interaction progress mark in the first display format, and controlling the interactive operation between the controlled virtual object and the target object.
在具体实现时,上述预设条件可以为状态信息指示受控虚拟对象与目标对象进行交互的概率大于目标概率阈值。首先需要基于状态信息,确定受控虚拟对象与目标对象进行交互的概率,然后在概率大于目标概率阈值的时候,确定状态信息满足预设条件。In a specific implementation, the above preset condition may be that the status information indicates that the probability that the controlled virtual object interacts with the target object is greater than the target probability threshold. Firstly, it is necessary to determine the probability of interaction between the controlled virtual object and the target object based on the state information, and then determine that the state information satisfies the preset condition when the probability is greater than the target probability threshold.
在游戏场景中,针对一个目标对象的交互操作可能包括多种。为了使得玩家可以通过不同的操作,控制受控虚拟对象与目标对象实现多种交互操作,可以将交互标识的第一显示格式设置为包括多个显示区域;每个显示区域包括一个交互操作对应的标识;每个显示区域对应于预设的操控区域,该操作区域可以以位移控件为中心进行划分,如图7所示。In a game scene, there may be multiple types of interactive operations for a target object. In order to enable the player to control the controlled virtual object and the target object to achieve various interactive operations through different operations, the first display format of the interactive logo can be set to include multiple display areas; each display area includes an interactive operation corresponding Identification; each display area corresponds to a preset manipulation area, which can be divided centered on the displacement control, as shown in FIG. 7 .
当确定受控虚拟对象与目标对象进行交互的概率大于目标概率阈值后,可以在交互进度标识中显示多个包括交互操作对应的标识显示区域,如图7所示,交互进度标识中有两个显示区域,分别对应于交互1和交互2;然后基于触发操作的作用位置与位移控件在图形用户界面的显示位置,确定触发操作对应的操控区域,图7中以灰色显示的两个操控区域中的区域1,表示该区域为触发操作对应的操控区域;将操控区域对应的显示区域中的标识对应的交互操作确定为目标交互操作,如上所述交互1对应的交互操作即为目标交互操作,进而可以控制受控虚拟对象与目标对象进行目标交互操作。When it is determined that the probability of the controlled virtual object interacting with the target object is greater than the target probability threshold, multiple display areas including the corresponding identification display area for the interaction operation can be displayed in the interaction progress indicator, as shown in Figure 7, there are two in the interaction progress indicator The display area corresponds to
本发明实施例还提供了另一种游戏中的交互控制方法。该方法在图1所示的方法基础上实现。该方法主要通过添加一定的事件判断,来预读玩家是否想要进行交互操作(相当于“确定受控虚拟对象与目标对象进行交互的概率”),以减少需要点击交互按钮这一过程,允许玩家单手实现交互操作,同时优化整个界面的简洁度。The embodiment of the present invention also provides another interactive control method in the game. This method is realized on the basis of the method shown in FIG. 1 . This method mainly adds a certain event judgment to pre-read whether the player wants to perform interactive operations (equivalent to "determining the probability of interaction between the controlled virtual object and the target object"), so as to reduce the need to click the interaction button. Players can achieve interactive operation with one hand, while optimizing the simplicity of the entire interface.
该方法具体通过以下方式实现:This method is specifically implemented in the following ways:
(1)对于任何交互物(相当于上述“目标对象”),设置一个用来判断玩家是否想要与之交互的预读值,通过一个环形进度条(相当于上述“交互进度标识”)来显示值的结果,只要进度条值达到100%,玩家控制的虚拟对象即与交互物发生交互,如图8所示。(1) For any interactive object (equivalent to the above-mentioned "target object"), set a pre-read value to determine whether the player wants to interact with it, and use a circular progress bar (equivalent to the above-mentioned "interaction progress indicator") to As a result of displaying the value, as long as the progress bar value reaches 100%, the virtual object controlled by the player will interact with the interactive object, as shown in Figure 8.
(2)设定玩家控制的虚拟对象与交互物之间的距离远近s1(相当于上述“第一参数距离”)和预读值的增量h1(相当于上述“第一概率参数”)负相关,距离越近,环形进度条值越高。该过程中,距离s1影响预读值增量的范围是有限的。距离增量计算方式如下:s1>100m时,无任何增量;s1<=100m时,h1=(100-s1+c)*100%;c为可变参数,用于调整整个交互体验是否顺畅,假设c=5,则当s1=5,即玩家与交互物距离5m时,预读值增量达到100%且增量最多只能为100%。该过程如图9所示。(2) Set the distance s1 between the virtual object controlled by the player and the interactive object (equivalent to the above-mentioned "first parameter distance") and the increment h1 of the pre-read value (equivalent to the above-mentioned "first probability parameter") negative Related, the closer the distance, the higher the ring progress bar value. In this process, the range in which the distance s1 affects the increment of the read-ahead value is limited. The distance increment calculation method is as follows: when s1>100m, there is no increment; when s1<=100m, h1=(100-s1+c)*100%; c is a variable parameter, which is used to adjust whether the entire interactive experience is smooth , assuming c=5, then when s1=5, that is, when the distance between the player and the interactive object is 5m, the pre-read value increment reaches 100% and the increment can only be 100% at most. The process is shown in Figure 9.
(3)设定玩家操控摇杆的手指位置与摇杆中心的距离s2(可以以像素为单位,相当于上述“第二参数距离”)和预读值的增量h2相关(是手指位置,不是摇杆内的滑块,相当于上述“第二概率参数”),距离越近,环形进度条值越高。且距离远的时候,存在负增长。增量计算方式如下:h2=[(100-s2)/10-c]*100%;c为可变参数,与上面公式内的c是同一个值,且该值不可以大于10。即玩家处于移动状态时,大概率不会触发交互。处于缓慢移动状态时,仍有可能会触发交互。该过程如图10所示。(3) Set the distance s2 between the finger position of the player controlling the joystick and the center of the joystick (it can be in pixels, which is equivalent to the above-mentioned "second parameter distance") and the increment h2 of the pre-read value (it is the finger position, It is not the slider in the joystick, which is equivalent to the above "second probability parameter"), the closer the distance, the higher the value of the circular progress bar. And when the distance is long, there is a negative growth. The incremental calculation method is as follows: h2=[(100-s2)/10-c]*100%; c is a variable parameter, which is the same value as c in the above formula, and the value cannot be greater than 10. That is, when the player is in the moving state, there is a high probability that the interaction will not be triggered. Interactions may still be triggered while in slow motion. The process is shown in Figure 10.
(4)总体交互预读值h=h1+h2(相当于上述“概率”),只有h>=100%时,才会触发玩家与交互物之间的交互。(4) The overall interaction pre-reading value h=h1+h2 (equivalent to the above "probability"), only when h>=100%, will the interaction between the player and the interactive object be triggered.
(5)可变参数c不会影响总体值,但会在分别计算h1和h2时,产生一定干预,其作用就是控制不同交互物与玩家之间的交互体验,例如对于NPC类的交互物,允许玩家与其距离较远时就发生交互,此时c可以越大越好,这就意味着玩家距离NPC为10m时,h1就可达到极值,而此时,由于c也对h2进行干预,因此需要玩家完全停止操作摇杆,才会触发交互;对于一些物品类交互物,则希望玩家靠近才可交互,此时c可以越小越好,这就意味着玩家需要离交互物更近,同样由于c也对h2进行干预,玩家可以在适当移动中就与其产生交互。(5) The variable parameter c will not affect the overall value, but it will intervene when calculating h1 and h2 separately. Its function is to control the interactive experience between different interactive objects and players. For example, for NPC interactive objects, Allow the player to interact with it when it is far away. At this time, c can be as large as possible, which means that when the player is 10m away from the NPC, h1 can reach the extreme value. At this time, since c also interferes with h2, so The interaction will only be triggered if the player stops operating the joystick completely; for some item-type interactive objects, it is hoped that the player can interact only when they are close. At this time, c can be as small as possible, which means that the player needs to be closer to the interactive object. Since c also intervenes with h2, the player can interact with it while moving appropriately.
上述方法中,当玩家逐渐靠近交互物,且移动的意向在减弱时,只要达到预读值h进度条100%,玩家就会与交互物发生交互,此时玩家无需松开摇杆,交互结束后则会继续保持移动操作,比较适用于采集之类的玩法。In the above method, when the player gradually approaches the interactive object and the intention to move is weakening, as long as the pre-read value h progress bar reaches 100%, the player will interact with the interactive object. At this time, the player does not need to release the joystick, and the interaction ends After that, it will continue to maintain the mobile operation, which is more suitable for playing methods such as collection.
上述方法给玩家提供了一种单手实现交互操作的方式,且触发的控制权仍在玩家自己手上;减少了玩家控制虚拟对象与交互对象交互所需要的流程步数,优化交互体验;大幅度提升采集类玩法的体验。该方法提出了交互预读值概念,并将其在屏幕内进行显示,同时与摇杆滑动像素,场景内位置参数等多个属性挂钩;玩家能够仅通过操作摇杆,在单手操作下,实现与交互对象交互的操作。The above method provides a way for the player to realize the interactive operation with one hand, and the trigger control is still in the player's own hand; it reduces the number of process steps required for the player to control the interaction between the virtual object and the interactive object, and optimizes the interactive experience; Significantly improve the experience of gathering games. This method proposes the concept of interactive pre-reading value, and displays it on the screen, and at the same time, it is linked to multiple attributes such as joystick sliding pixels and position parameters in the scene; Implements operations for interacting with interactive objects.
对于上述方法实施例,参见图11所示的一种游戏中的交互控制装置,通过终端设备提供一图形用户界面;图形用户界面中显示位移控件、游戏场景的场景画面,游戏场景内至少包含通过终端设备进行控制的受控虚拟对象;该装置包括:For the above method embodiment, refer to the interactive control device in a game shown in FIG. 11 , which provides a graphical user interface through the terminal device; the graphical user interface displays the displacement control and the scene picture of the game scene, and the game scene contains at least A controlled virtual object controlled by a terminal device; the device includes:
移动控制模块1102,用于响应针对位移控件的触发操作,控制受控虚拟对1移动,并控制场景画面发生变化;The movement control module 1102 is used to respond to the trigger operation for the displacement control, control the movement of the controlled
交互进度标识显示模块1104,用于响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;其中,目标对象具有可交互属性,状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;交互进度标识用于指示:受控虚拟对象与目标对象进行交互的概率;The interaction progress indicator display module 1104 is configured to display the interaction progress indicator based on the state information of the controlled virtual object in response to the target object appearing in the scene picture; wherein, the target object has an interactive attribute, and the state information includes the displacement state of the controlled virtual object , and/or, the control state of the displacement control; the interaction progress indicator is used to indicate: the probability that the controlled virtual object interacts with the target object;
交互操作控制模块1106,用于确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。The interactive operation control module 1106 is configured to determine that the status information satisfies the preset condition, display the interactive progress indicator in the first display format, and control the controlled virtual object to perform interactive operation with the target object.
上述一种游戏中的交互控制装置,响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化;响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。该方式使玩家可以通过交互进度标识查看当前受控虚拟角色与目标角色之间进行互动的概率,从而继续控制受控虚拟角色进行移动,以使在概率较高时触发二者之间的交互操作,使得交互操作的实现更为快捷简便,提高了玩家的游戏体验。The aforementioned interactive control device in a game controls the movement of the controlled virtual object and changes the scene picture in response to the trigger operation of the displacement control; in response to the appearance of the target object in the scene picture, the state information based on the controlled virtual object is displayed Interaction progress identification; state information includes the displacement state of the controlled virtual object, and/or, the control state of the displacement control; determine that the state information meets the preset condition, display the interaction progress identification in the first display format, and control the controlled virtual object and the target Objects interact. This method allows the player to view the probability of interaction between the currently controlled virtual character and the target character through the interaction progress indicator, so as to continue to control the controlled virtual character to move, so that the interaction between the two is triggered when the probability is high , making the realization of interactive operation faster and easier, and improving the player's gaming experience.
上述交互进度标识显示模块还用于:基于受控虚拟对象的状态信息,确定受控虚拟对象与目标对象进行交互的概率;基于概率显示交互进度标识。The interaction progress indicator display module is further used for: determining the probability of the controlled virtual object interacting with the target object based on the state information of the controlled virtual object; and displaying the interaction progress indicator based on the probability.
上述交互进度标识显示模块还用于:基于概率,确定交互进度标识中以第二显示格式显示的目标区域,控制目标区域以第二显示格式显示;目标区域与交互进度标识的显示区域的比值与概率相匹配。The above-mentioned interactive progress sign display module is also used for: based on the probability, determine the target area displayed in the second display format in the interactive progress sign, and control the display of the target area in the second display format; the ratio of the target area to the display area of the interactive progress sign and probabilities match.
上述交互进度标识显示模块还用于:判断概率是否大于预设的概率阈值;如果大于,在目标对象的相关区域显示交互进度标识;相关区域包括与目标对象的距离小于设定距离的区域。The above interaction progress sign display module is also used to: judge whether the probability is greater than the preset probability threshold; if greater, display the interaction progress mark in the relevant area of the target object; the relevant area includes the area whose distance from the target object is less than the set distance.
上述交互操作包括多种;第一显示格式包括多个显示区域;每个显示区域包括一个交互操作对应的标识;每个显示区域对应于预设的操控区域;上述交互操作控制模块还用于:在交互进度标识中显示多个包括交互操作对应的标识显示区域;基于触发操作的作用位置与位移控件在图形用户界面的显示位置,确定触发操作对应的操控区域;将操控区域对应的显示区域中的标识对应的交互操作确定为目标交互操作;控制受控虚拟对象与目标对象进行目标交互操作。The above-mentioned interactive operations include multiple types; the first display format includes multiple display areas; each display area includes an identification corresponding to an interactive operation; each display area corresponds to a preset manipulation area; the above-mentioned interactive operation control module is also used for: In the interactive progress mark, display a plurality of mark display areas corresponding to the interactive operation; based on the action position of the trigger operation and the display position of the displacement control in the graphical user interface, determine the manipulation area corresponding to the trigger operation; place the manipulation area in the corresponding display area The interactive operation corresponding to the identification of is determined as the target interactive operation; the controlled virtual object is controlled to perform the target interactive operation with the target object.
上述预设条件包括:状态信息指示受控虚拟对象与目标对象进行交互的概率大于目标概率阈值;上述交互操作控制模块还用于:基于状态信息,确定受控虚拟对象与目标对象进行交互的概率;如果概率大于目标概率阈值,确定状态信息满足预设条件。The above preset conditions include: the state information indicates that the probability of the controlled virtual object interacting with the target object is greater than the target probability threshold; the above interactive operation control module is also used to: determine the probability of the controlled virtual object interacting with the target object based on the state information ; If the probability is greater than the target probability threshold, it is determined that the state information satisfies the preset condition.
上述状态信息包括受控虚拟对象的位移状态及位移控件的控制状态;位移状态包括受控虚拟对象与目标对象之间的第一距离参数;控制状态包括位移控件与触发操作的作用位置之间的第二距离参数;上述交互进度标识显示模块还用于:获取受控虚拟对象与目标对象的位置信息、以及触发操作的作用位置;基于受控虚拟对象与目标对象的位置信息,确定受控虚拟对象与目标对象之间的第一距离参数:基于作用位置与位移控件在图形用户界面的显示位置,计算作用位置与位移控件之间的第二距离参数;基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率。The above state information includes the displacement state of the controlled virtual object and the control state of the displacement control; the displacement state includes the first distance parameter between the controlled virtual object and the target object; the control state includes the distance between the displacement control and the action position of the trigger operation. The second distance parameter; the above-mentioned interaction progress identification display module is also used to: obtain the position information of the controlled virtual object and the target object, and the action position of the trigger operation; determine the controlled virtual object based on the position information of the controlled virtual object and the target object The first distance parameter between the object and the target object: based on the display position of the action position and the displacement control in the GUI, calculate the second distance parameter between the action position and the displacement control; based on the first distance parameter and the second distance parameter , to determine the probability that the controlled virtual object interacts with the target object.
上述基上述交互进度标识显示模块还用于:基于预设的第一负相关函数及第一距离参数,计算第一概率参数;第一负相关函数以距离参数为自变量,以概率参数为因变量;基于预设的第二负相关函数及第二距离参数,计算第二概率参数;第二负相关函数以距离参数为自变量,以概率参数为因变量;将第一概率参数与第二概率参数之和确定为受控虚拟对象与目标对象进行交互的概率。The above-mentioned interactive progress indicator display module is also used to: calculate the first probability parameter based on the preset first negative correlation function and the first distance parameter; the first negative correlation function uses the distance parameter as an independent variable and the probability parameter as a factor variable; based on the preset second negative correlation function and the second distance parameter, calculate the second probability parameter; the second negative correlation function takes the distance parameter as the independent variable and the probability parameter as the dependent variable; the first probability parameter and the second The sum of the probability parameters is determined as the probability that the controlled virtual object interacts with the target object.
上述目标对象对应于预设的对象类别;类别包括非玩家角色虚拟对象或物品类虚拟对象;上述装置还包括:第一函数构造模块,用于当目标对象包括非玩家角色虚拟对象时,基于预设的第一函数参数,构造第一负相关函数及第二负相关函数;第二函数构造模块,用于当目标对象包括物品类虚拟对象时,基于预设的第二函数参数,构造第一负相关函数及第二负相关函数。The above-mentioned target object corresponds to a preset object category; the category includes a non-player character virtual object or an item-type virtual object; the above-mentioned device also includes: a first function construction module, used to, when the target object includes a non-player character virtual object, based on a preset The first function parameter is set to construct the first negative correlation function and the second negative correlation function; the second function construction module is used to construct the first negative correlation function based on the preset second function parameter when the target object includes an item virtual object. A negative correlation function and a second negative correlation function.
本实施例还提供一种电子设备,包括处理器和存储器,存储器存储有能够被处理器执行的机器可执行指令,处理器执行机器可执行指令以实现上述游戏中的交互控制方法,例如:This embodiment also provides an electronic device, including a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above interactive control method in the game, for example:
响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化;响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;其中,目标对象具有可交互属性,状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;交互进度标识用于指示:受控虚拟对象与目标对象进行交互的概率;确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。In response to the trigger operation for the displacement control, the controlled virtual object is controlled to move, and the scene picture is controlled to change; in response to the target object appearing in the scene picture, the interactive progress indicator is displayed based on the state information of the controlled virtual object; wherein, the target object has Interaction attribute, the state information includes the displacement state of the controlled virtual object, and/or, the control state of the displacement control; the interaction progress indicator is used to indicate: the probability of the controlled virtual object interacting with the target object; determine that the state information satisfies the preset condition , displaying an interaction progress indicator in a first display format, and controlling the controlled virtual object to perform an interactive operation with the target object.
上述方法使玩家可以通过交互进度标识查看当前受控虚拟角色与目标角色之间进行互动的概率,从而继续控制受控虚拟角色进行移动,以使在概率较高时触发二者之间的交互操作,使得交互操作的实现更为快捷简便,提高了玩家的游戏体验。The above method enables the player to view the probability of interaction between the currently controlled virtual character and the target character through the interaction progress indicator, so as to continue to control the controlled virtual character to move, so that the interaction between the two is triggered when the probability is high , making the realization of interactive operation faster and easier, and improving the player's gaming experience.
可选的,上述基于受控虚拟对象的状态信息显示交互进度标识的步骤,包括:基于受控虚拟对象的状态信息,确定受控虚拟对象与目标对象进行交互的概率;基于概率显示交互进度标识。Optionally, the step of displaying the interaction progress indicator based on the state information of the controlled virtual object includes: determining the probability of the controlled virtual object interacting with the target object based on the state information of the controlled virtual object; displaying the interaction progress indicator based on the probability .
可选的,上述基于概率显示交互进度标识的步骤,包括:基于概率,确定交互进度标识中以第二显示格式显示的目标区域,控制目标区域以第二显示格式显示;目标区域与交互进度标识的显示区域的比值与概率相匹配。Optionally, the above-mentioned step of displaying the interaction progress indicator based on the probability includes: determining the target area displayed in the second display format in the interaction progress indicator based on the probability, and controlling the display of the target area in the second display format; the target area and the interaction progress indicator The ratios of the displayed areas of are matched to the probabilities.
可选的,上述基于概率显示交互进度标识的步骤,包括:判断概率是否大于预设的概率阈值;如果大于,在目标对象的相关区域显示交互进度标识;相关区域包括与目标对象的距离小于设定距离的区域。Optionally, the above step of displaying the interaction progress mark based on the probability includes: judging whether the probability is greater than a preset probability threshold; if greater, displaying the interaction progress mark in the relevant area of the target object; a certain distance area.
可选的,上述交互操作包括多种;第一显示格式包括多个显示区域;每个显示区域包括一个交互操作对应的标识;每个显示区域对应于预设的操控区域;以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作的步骤,包括:在交互进度标识中显示多个包括交互操作对应的标识显示区域;基于触发操作的作用位置与位移控件在图形用户界面的显示位置,确定触发操作对应的操控区域;将操控区域对应的显示区域中的标识对应的交互操作确定为目标交互操作;控制受控虚拟对象与目标对象进行目标交互操作。Optionally, the above-mentioned interactive operations include multiple types; the first display format includes multiple display areas; each display area includes an identification corresponding to an interactive operation; each display area corresponds to a preset manipulation area; in the first display format The step of displaying the interactive progress mark and controlling the interactive operation between the controlled virtual object and the target object includes: displaying multiple mark display areas including the corresponding interactive operation in the interactive progress mark; The display position of the interface determines the manipulation area corresponding to the trigger operation; the interactive operation corresponding to the logo in the display area corresponding to the manipulation area is determined as the target interactive operation; the controlled virtual object is controlled to perform the target interactive operation with the target object.
可选的,上述预设条件包括:状态信息指示受控虚拟对象与目标对象进行交互的概率大于目标概率阈值;确定状态信息满足预设条件的步骤,包括:基于状态信息,确定受控虚拟对象与目标对象进行交互的概率;如果概率大于目标概率阈值,确定状态信息满足预设条件。Optionally, the above preset conditions include: the state information indicates that the probability of the controlled virtual object interacting with the target object is greater than the target probability threshold; the step of determining that the state information satisfies the preset condition includes: based on the state information, determining that the controlled virtual object The probability of interacting with the target object; if the probability is greater than the target probability threshold, it is determined that the status information satisfies the preset condition.
可选的,上述状态信息包括受控虚拟对象的位移状态及位移控件的控制状态;位移状态包括受控虚拟对象与目标对象之间的第一距离参数;控制状态包括位移控件与触发操作的作用位置之间的第二距离参数;基于状态信息,确定受控虚拟对象与目标对象进行交互的概率的步骤,包括:获取受控虚拟对象与目标对象的位置信息、以及触发操作的作用位置;基于受控虚拟对象与目标对象的位置信息,确定受控虚拟对象与目标对象之间的第一距离参数:基于作用位置与位移控件在图形用户界面的显示位置,计算作用位置与位移控件之间的第二距离参数;基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率。Optionally, the above state information includes the displacement state of the controlled virtual object and the control state of the displacement control; the displacement state includes the first distance parameter between the controlled virtual object and the target object; the control state includes the effect of the displacement control and the trigger operation The second distance parameter between the positions; based on the state information, the step of determining the probability of the interaction between the controlled virtual object and the target object includes: obtaining the position information of the controlled virtual object and the target object, and the action position of the trigger operation; based on Based on the position information of the controlled virtual object and the target object, determine the first distance parameter between the controlled virtual object and the target object: based on the display position of the active position and the displacement control in the GUI, calculate the distance between the active position and the displacement control The second distance parameter; based on the first distance parameter and the second distance parameter, determine the probability of interaction between the controlled virtual object and the target object.
可选的,上述基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率的步骤,包括:基于预设的第一负相关函数及第一距离参数,计算第一概率参数;第一负相关函数以距离参数为自变量,以概率参数为因变量;基于预设的第二负相关函数及第二距离参数,计算第二概率参数;第二负相关函数以距离参数为自变量,以概率参数为因变量;将第一概率参数与第二概率参数之和确定为受控虚拟对象与目标对象进行交互的概率。Optionally, the step of determining the probability of interaction between the controlled virtual object and the target object based on the first distance parameter and the second distance parameter includes: calculating the second distance parameter based on the preset first negative correlation function and the first distance parameter. A probability parameter; the first negative correlation function takes the distance parameter as an independent variable, and takes the probability parameter as a dependent variable; based on the preset second negative correlation function and the second distance parameter, calculates the second probability parameter; the second negative correlation function uses The distance parameter is an independent variable, and the probability parameter is a dependent variable; the sum of the first probability parameter and the second probability parameter is determined as the probability of interaction between the controlled virtual object and the target object.
可选的,上述目标对象对应于预设的对象类别;类别包括非玩家角色虚拟对象或物品类虚拟对象;上述方法还包括:当目标对象包括非玩家角色虚拟对象时,基于预设的第一函数参数,构造第一负相关函数及第二负相关函数;当目标对象包括物品类虚拟对象时,基于预设的第二函数参数,构造第一负相关函数及第二负相关函数。Optionally, the above-mentioned target object corresponds to a preset object category; the category includes a non-player character virtual object or an item-type virtual object; the above method further includes: when the target object includes a non-player character virtual object, based on the preset first The function parameter is used to construct the first negative correlation function and the second negative correlation function; when the target object includes the virtual object of the item type, the first negative correlation function and the second negative correlation function are constructed based on the preset second function parameter.
参见图12所示,该电子设备包括处理器100和存储器101,该存储器101存储有能够被处理器100执行的机器可执行指令,该处理器100执行机器可执行指令以实现上述游戏中的交互控制方法。Referring to FIG. 12, the electronic device includes a
进一步地,图12所示的电子设备还包括总线102和通信接口103,处理器100、通信接口103和存储器101通过总线102连接。Further, the electronic device shown in FIG. 12 further includes a bus 102 and a
其中,存储器101可能包含高速随机存取存储器(RAM,Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。通过至少一个通信接口103(可以是有线或者无线)实现该系统网元与至少一个其他网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等。总线102可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图12中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。Wherein, the
处理器100可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器100中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器100可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DigitalSignal Processor,简称DSP)、专用集成电路(Application Specific IntegratedCircuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器101,处理器100读取存储器101中的信息,结合其硬件完成前述实施例的方法的步骤。The
本实施例还提供一种机器可读存储介质,机器可读存储介质存储有机器可执行指令,机器可执行指令在被处理器调用和执行时,机器可执行指令促使处理器实现上述游戏中的交互控制方法。This embodiment also provides a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are invoked and executed by the processor, the machine-executable instructions prompt the processor to implement the above game. interactive control method.
本发明实施例所提供的一种游戏中的交互控制方法、装置以及电子设备,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行前面方法实施例中所述的方法,例如:An interactive control method, device and electronic device in a game provided by the embodiments of the present invention include a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the method described in the preceding method embodiments. method, for example:
响应针对位移控件的触发操作,控制受控虚拟对象移动,并控制场景画面发生变化;响应于场景画面中出现目标对象,基于受控虚拟对象的状态信息显示交互进度标识;其中,目标对象具有可交互属性,状态信息包括受控虚拟对象的位移状态,和/或,位移控件的控制状态;交互进度标识用于指示:受控虚拟对象与目标对象进行交互的概率;确定状态信息满足预设条件,以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作。In response to the trigger operation for the displacement control, the controlled virtual object is controlled to move, and the scene picture is controlled to change; in response to the target object appearing in the scene picture, the interactive progress indicator is displayed based on the state information of the controlled virtual object; wherein, the target object has Interaction attribute, the state information includes the displacement state of the controlled virtual object, and/or, the control state of the displacement control; the interaction progress indicator is used to indicate: the probability of the controlled virtual object interacting with the target object; determine that the state information satisfies the preset condition , displaying an interaction progress indicator in a first display format, and controlling the controlled virtual object to perform an interactive operation with the target object.
上述方法使玩家可以通过交互进度标识查看当前受控虚拟角色与目标角色之间进行互动的概率,从而继续控制受控虚拟角色进行移动,以使在概率较高时触发二者之间的交互操作,使得交互操作的实现更为快捷简便,提高了玩家的游戏体验。The above method enables the player to view the probability of interaction between the currently controlled virtual character and the target character through the interaction progress indicator, so as to continue to control the controlled virtual character to move, so that the interaction between the two is triggered when the probability is high , making the realization of interactive operation faster and easier, and improving the player's gaming experience.
可选的,上述基于受控虚拟对象的状态信息显示交互进度标识的步骤,包括:基于受控虚拟对象的状态信息,确定受控虚拟对象与目标对象进行交互的概率;基于概率显示交互进度标识。Optionally, the step of displaying the interaction progress indicator based on the state information of the controlled virtual object includes: determining the probability of the controlled virtual object interacting with the target object based on the state information of the controlled virtual object; displaying the interaction progress indicator based on the probability .
可选的,上述基于概率显示交互进度标识的步骤,包括:基于概率,确定交互进度标识中以第二显示格式显示的目标区域,控制目标区域以第二显示格式显示;目标区域与交互进度标识的显示区域的比值与概率相匹配。Optionally, the above-mentioned step of displaying the interaction progress indicator based on the probability includes: determining the target area displayed in the second display format in the interaction progress indicator based on the probability, and controlling the display of the target area in the second display format; the target area and the interaction progress indicator The ratios of the displayed areas of are matched to the probabilities.
可选的,上述基于概率显示交互进度标识的步骤,包括:判断概率是否大于预设的概率阈值;如果大于,在目标对象的相关区域显示交互进度标识;相关区域包括与目标对象的距离小于设定距离的区域。Optionally, the above step of displaying the interaction progress mark based on the probability includes: judging whether the probability is greater than a preset probability threshold; if greater, displaying the interaction progress mark in the relevant area of the target object; a certain distance area.
可选的,上述交互操作包括多种;第一显示格式包括多个显示区域;每个显示区域包括一个交互操作对应的标识;每个显示区域对应于预设的操控区域;以第一显示格式显示交互进度标识,控制受控虚拟对象与目标对象进行交互操作的步骤,包括:在交互进度标识中显示多个包括交互操作对应的标识显示区域;基于触发操作的作用位置与位移控件在图形用户界面的显示位置,确定触发操作对应的操控区域;将操控区域对应的显示区域中的标识对应的交互操作确定为目标交互操作;控制受控虚拟对象与目标对象进行目标交互操作。Optionally, the above-mentioned interactive operations include multiple types; the first display format includes multiple display areas; each display area includes an identification corresponding to an interactive operation; each display area corresponds to a preset manipulation area; in the first display format The step of displaying the interactive progress mark and controlling the interactive operation between the controlled virtual object and the target object includes: displaying multiple mark display areas including the corresponding interactive operation in the interactive progress mark; The display position of the interface determines the manipulation area corresponding to the trigger operation; the interactive operation corresponding to the logo in the display area corresponding to the manipulation area is determined as the target interactive operation; the controlled virtual object is controlled to perform the target interactive operation with the target object.
可选的,上述预设条件包括:状态信息指示受控虚拟对象与目标对象进行交互的概率大于目标概率阈值;确定状态信息满足预设条件的步骤,包括:基于状态信息,确定受控虚拟对象与目标对象进行交互的概率;如果概率大于目标概率阈值,确定状态信息满足预设条件。Optionally, the above preset conditions include: the state information indicates that the probability of the controlled virtual object interacting with the target object is greater than the target probability threshold; the step of determining that the state information satisfies the preset condition includes: based on the state information, determining that the controlled virtual object The probability of interacting with the target object; if the probability is greater than the target probability threshold, it is determined that the status information satisfies the preset condition.
可选的,上述状态信息包括受控虚拟对象的位移状态及位移控件的控制状态;位移状态包括受控虚拟对象与目标对象之间的第一距离参数;控制状态包括位移控件与触发操作的作用位置之间的第二距离参数;基于状态信息,确定受控虚拟对象与目标对象进行交互的概率的步骤,包括:获取受控虚拟对象与目标对象的位置信息、以及触发操作的作用位置;基于受控虚拟对象与目标对象的位置信息,确定受控虚拟对象与目标对象之间的第一距离参数:基于作用位置与位移控件在图形用户界面的显示位置,计算作用位置与位移控件之间的第二距离参数;基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率。Optionally, the above state information includes the displacement state of the controlled virtual object and the control state of the displacement control; the displacement state includes the first distance parameter between the controlled virtual object and the target object; the control state includes the effect of the displacement control and the trigger operation The second distance parameter between the positions; based on the state information, the step of determining the probability of the interaction between the controlled virtual object and the target object includes: obtaining the position information of the controlled virtual object and the target object, and the action position of the trigger operation; based on Based on the position information of the controlled virtual object and the target object, determine the first distance parameter between the controlled virtual object and the target object: based on the display position of the active position and the displacement control in the GUI, calculate the distance between the active position and the displacement control The second distance parameter; based on the first distance parameter and the second distance parameter, determine the probability of interaction between the controlled virtual object and the target object.
可选的,上述基于第一距离参数及第二距离参数,确定受控虚拟对象与目标对象进行交互的概率的步骤,包括:基于预设的第一负相关函数及第一距离参数,计算第一概率参数;第一负相关函数以距离参数为自变量,以概率参数为因变量;基于预设的第二负相关函数及第二距离参数,计算第二概率参数;第二负相关函数以距离参数为自变量,以概率参数为因变量;将第一概率参数与第二概率参数之和确定为受控虚拟对象与目标对象进行交互的概率。Optionally, the step of determining the probability of interaction between the controlled virtual object and the target object based on the first distance parameter and the second distance parameter includes: calculating the second distance parameter based on the preset first negative correlation function and the first distance parameter. A probability parameter; the first negative correlation function takes the distance parameter as an independent variable, and takes the probability parameter as a dependent variable; based on the preset second negative correlation function and the second distance parameter, calculates the second probability parameter; the second negative correlation function uses The distance parameter is an independent variable, and the probability parameter is a dependent variable; the sum of the first probability parameter and the second probability parameter is determined as the probability of interaction between the controlled virtual object and the target object.
可选的,上述目标对象对应于预设的对象类别;类别包括非玩家角色虚拟对象或物品类虚拟对象;上述方法还包括:当目标对象包括非玩家角色虚拟对象时,基于预设的第一函数参数,构造第一负相关函数及第二负相关函数;当目标对象包括物品类虚拟对象时,基于预设的第二函数参数,构造第一负相关函数及第二负相关函数。Optionally, the above-mentioned target object corresponds to a preset object category; the category includes a non-player character virtual object or an item-type virtual object; the above method further includes: when the target object includes a non-player character virtual object, based on the preset first The function parameter is used to construct the first negative correlation function and the second negative correlation function; when the target object includes the virtual object of the item type, the first negative correlation function and the second negative correlation function are constructed based on the preset second function parameter.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
另外,在本发明实施例的描述中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In addition, in the description of the embodiments of the present invention, unless otherwise specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection , or integrally connected; it may be mechanically connected or electrically connected; it may be directly connected or indirectly connected through an intermediary, and it may be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood in specific situations.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者所述技术方案的部分可以以软件产品的形式体现出来,所述计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .
在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, or in a specific orientation. construction and operation, therefore, should not be construed as limiting the invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and should not be construed as indicating or implying relative importance.
最后应说明的是:以上实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。Finally, it should be noted that: the above examples are only specific implementations of the present invention, to illustrate the technical solutions of the present invention, rather than to limit them, and the protection scope of the present invention is not limited thereto, although with reference to the foregoing examples The present invention has been described in detail, and those skilled in the art should understand that: within the technical scope disclosed by the present invention, any person skilled in the art can still modify the technical solutions described in the foregoing embodiments or can easily think of them Changes, or equivalent replacements for some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be covered by the protection scope of the present invention Inside. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210774688.3A CN115317903B (en) | 2022-07-01 | 2022-07-01 | Interaction control method and device in game and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210774688.3A CN115317903B (en) | 2022-07-01 | 2022-07-01 | Interaction control method and device in game and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115317903A true CN115317903A (en) | 2022-11-11 |
| CN115317903B CN115317903B (en) | 2025-07-18 |
Family
ID=83917305
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210774688.3A Active CN115317903B (en) | 2022-07-01 | 2022-07-01 | Interaction control method and device in game and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115317903B (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150051000A1 (en) * | 2013-08-16 | 2015-02-19 | Disney Enterprises, Inc. | Perception system |
| CN109126129A (en) * | 2018-08-31 | 2019-01-04 | 腾讯科技(深圳)有限公司 | The method, apparatus and terminal that virtual objects are picked up in virtual environment |
| CN111167124A (en) * | 2019-12-31 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Virtual prop obtaining method and device, storage medium and electronic device |
| CN114159785A (en) * | 2021-12-10 | 2022-03-11 | 网易(杭州)网络有限公司 | Virtual item discarding method and device, electronic equipment and storage medium |
| US20220080299A1 (en) * | 2020-09-11 | 2022-03-17 | Riot Games, Inc. | Rapid target selection with priority zones |
| CN114225406A (en) * | 2021-12-02 | 2022-03-25 | 腾讯科技(深圳)有限公司 | Virtual prop control method, device, computer equipment and storage medium |
-
2022
- 2022-07-01 CN CN202210774688.3A patent/CN115317903B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150051000A1 (en) * | 2013-08-16 | 2015-02-19 | Disney Enterprises, Inc. | Perception system |
| CN109126129A (en) * | 2018-08-31 | 2019-01-04 | 腾讯科技(深圳)有限公司 | The method, apparatus and terminal that virtual objects are picked up in virtual environment |
| CN111167124A (en) * | 2019-12-31 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Virtual prop obtaining method and device, storage medium and electronic device |
| US20220080299A1 (en) * | 2020-09-11 | 2022-03-17 | Riot Games, Inc. | Rapid target selection with priority zones |
| CN114225406A (en) * | 2021-12-02 | 2022-03-25 | 腾讯科技(深圳)有限公司 | Virtual prop control method, device, computer equipment and storage medium |
| CN114159785A (en) * | 2021-12-10 | 2022-03-11 | 网易(杭州)网络有限公司 | Virtual item discarding method and device, electronic equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115317903B (en) | 2025-07-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112891943B (en) | Lens processing method and device and readable storage medium | |
| CN110841291A (en) | Method and device for interacting shortcut messages in game and electronic equipment | |
| WO2024146067A1 (en) | Virtual weapon processing method and apparatus, computer device, and storage medium | |
| CN116531757A (en) | Game operation control method, device and electronic device | |
| CN111632371B (en) | Method, device and electronic device for selecting a target | |
| CN115337638A (en) | Information control display control method, device and electronic device in game | |
| CN115501603A (en) | Game interaction method, device, device and storage medium | |
| CN113908544A (en) | Information interaction method, device and electronic device | |
| CN115957503A (en) | Interactive control method and device for object movement and electronic equipment | |
| CN115317891A (en) | Game interaction method, device and electronic device | |
| CN115738270A (en) | Virtual character movement control method, device, equipment and storage medium | |
| JP2025525488A (en) | Virtual object switching method, device, storage medium, and electronic device | |
| CN115624754A (en) | Interactive control method, device and electronic equipment for skill release | |
| CN115738230A (en) | Game operation control method and device and electronic equipment | |
| CN115317903A (en) | Interactive control method, device and electronic device in game | |
| CN116474362A (en) | Control method, device and electronic device for virtual character in game | |
| CN117018611A (en) | Interactive control method and device for game and electronic equipment | |
| CN116020114A (en) | Game operation control method, device and electronic device | |
| CN116672716A (en) | Control method, device and electronic terminal of virtual object in game | |
| CN115708956A (en) | Game picture updating method and device, computer equipment and medium | |
| CN115845389A (en) | Interactive control method and device in game and electronic equipment | |
| CN115738271A (en) | Game skill control method, device, equipment and storage medium | |
| CN116392806A (en) | Information display method, device and electronic device in game | |
| CN115779402A (en) | Marking method and device in game and electronic equipment | |
| CN117717780B (en) | Virtual character control method, device, electronic device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |