CN109718538B - Method and device for frame selection of virtual object in game, electronic equipment and storage medium - Google Patents

Method and device for frame selection of virtual object in game, electronic equipment and storage medium Download PDF

Info

Publication number
CN109718538B
CN109718538B CN201910088236.8A CN201910088236A CN109718538B CN 109718538 B CN109718538 B CN 109718538B CN 201910088236 A CN201910088236 A CN 201910088236A CN 109718538 B CN109718538 B CN 109718538B
Authority
CN
China
Prior art keywords
touch
touch operation
area
scene
frame selection
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.)
Active
Application number
CN201910088236.8A
Other languages
Chinese (zh)
Other versions
CN109718538A (en
Inventor
张泽权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910088236.8A priority Critical patent/CN109718538B/en
Publication of CN109718538A publication Critical patent/CN109718538A/en
Application granted granted Critical
Publication of CN109718538B publication Critical patent/CN109718538B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention provides a method and a device for framing a virtual object in a game, electronic equipment and a storage medium, wherein the method comprises the following steps: detecting a first touch operation of a first touch medium acting on the graphical user interface and a second touch operation of a second touch medium acting on the graphical user interface; determining a frame selection area in the game scene according to the first touch operation and the second touch operation; and selecting the virtual object meeting preset conditions according to the frame selection area. According to the embodiment of the invention, the touch screen frame selection in the game is realized, the accuracy of the touch screen frame selection is improved, and the misoperation in the game is avoided.

Description

Method and device for frame selection of virtual object in game, electronic equipment and storage medium
Technical Field
The present invention relates to the field of network games, and in particular, to a method and an apparatus for framing a virtual object in a game, an electronic device, and a storage medium.
Background
In the network game, a plurality of virtual objects need to be controlled under certain scenes, and if a plurality of skill attack objects need to be simultaneously selected, the plurality of virtual objects need to be simultaneously selected.
In the PC end game, a game player can adopt a mouse to long press and drag for frame selection, but the method is difficult to apply to the game of a mobile end, and in the game of the mobile end, a selection frame can be pulled out only in a double-click mode, and the screen of the mobile end is small, so that misoperation is easily caused, and the frame selection is not accurate enough.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide a method and apparatus for frame selection of a virtual object in a game, an electronic device, and a storage medium, which overcome or at least partially solve the above problems, including:
a method for framing virtual objects in a game by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal to obtain a graphical user interface, the graphical user interface including at least a portion of a game scene and including at least one virtual object, the method comprising:
detecting a first touch operation of a first touch medium acting on the touch display and a second touch operation of a second touch medium acting on the touch display;
determining a frame selection area in the game scene according to the first touch operation and the second touch operation;
and selecting the virtual object meeting preset conditions according to the frame selection area.
Optionally, when a first touch point of the first touch operation and a second touch point of the second touch operation are located in a first preset area of the touch display, determining a frame selection area in the game scene according to the first touch operation and the second touch operation includes:
acquiring a first position of a first touch point of the first touch operation in the touch display and a second position of a second touch point of the second touch operation in the touch display;
and determining a frame selection area in the game scene according to the first position and the second position.
Optionally, the determining a frame selection area in the game scene according to the first touch operation and the second touch operation includes:
updating the first position according to the operation track of the first touch operation;
updating the second position according to the operation track of the second touch operation;
and updating the frame selection area according to the updated first position and the updated second position.
Optionally, determining a frame selection area in the game scene according to the first position and the second position includes:
determining a first scene position corresponding to the first touch point in a game scene according to the first position;
determining a second scene position corresponding to the second touch point in a game scene according to the second position;
and determining a frame selection area in the game scene according to the first scene position and the second scene position.
Optionally, when a first touch point of the first touch operation moves to a second preset area of the touch display, the determining a frame selection area in the game scene according to the first touch operation and the second touch operation includes:
determining a second scene position in a game scene according to the second position, wherein the second scene position is a position corresponding to the second position in the game scene when a first touch point of the first touch operation moves to a second preset area of the graphical user interface;
moving a game scene in the graphical user interface according to the first touch operation;
acquiring a first position of a first touch point of the first touch operation on the touch display;
determining a first scene position in the moved game scene according to the first position;
and determining a frame selection area in the game scene according to the first scene position and the second scene position.
Optionally, the method further comprises:
zooming the game scene to cause all of the selected virtual objects to be displayed within the graphical user interface.
Optionally, selecting the virtual object meeting a preset condition according to the frame selection area includes:
judging an overlapping area of any virtual object and the frame selection area;
and when the overlapping area meets a preset condition, selecting the virtual object.
Optionally, when the overlap area satisfies a preset condition, selecting the virtual object includes:
and when the area of the overlapping area is within a first preset range, selecting the virtual object.
Optionally, the method further comprises:
when a first switching condition is triggered, selecting the virtual object of which the area of the overlapping area is within a second preset range; wherein the second predetermined range comprises the first predetermined range;
wherein the first switching condition comprises any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is larger than the ordinate of the updated second position, and the ordinate of the first position before updating is smaller than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
Optionally, when the overlap area satisfies a preset condition, selecting the virtual object includes: and when the area of the overlapping area is within a third preset range, selecting the virtual object.
Optionally, the method further comprises:
when a second switching condition is triggered, selecting the virtual object of which the area of the overlapping area is within a fourth preset range; wherein the third preset range comprises the fourth preset range;
wherein the second switching condition comprises any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is larger than the ordinate of the updated second position, and the ordinate of the first position before updating is smaller than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
An apparatus for framing virtual objects in a game by executing a software application on a processor of a mobile terminal and rendering the software application on a touch-sensitive display of the mobile terminal to obtain a graphical user interface including at least a portion of a game scene and including at least one virtual object, the apparatus comprising:
the touch operation detection module is used for detecting a first touch operation of a first touch medium acting on the graphical user interface and a second touch operation of a second touch medium acting on the graphical user interface;
a frame selection area determination module, configured to determine a frame selection area in the game scene according to the first touch operation and the second touch operation;
and the virtual object selection module is used for selecting the virtual object meeting the preset conditions according to the frame selection area.
An electronic device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, the computer program when executed by the processor implementing the steps of the method of framing virtual objects in a game as described above.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of a method for framing virtual objects in a game as described above.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the touch screen frame selection in the game is realized by detecting the first touch operation of the first touch medium acting on the graphical user interface and the second touch operation of the second touch medium acting on the graphical user interface, then determining a frame selection area in the game scene according to the first touch operation and the second touch operation, and further selecting the virtual object meeting the preset condition according to the frame selection area, so that the touch screen frame selection in the game is realized, the accuracy of the touch screen frame selection is improved, and the misoperation in the game is avoided.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating steps of a method for framing a virtual object in a game according to an embodiment of the present invention;
FIG. 2a is a schematic diagram of a graphical user interface provided by an embodiment of the present invention;
FIG. 2b is a schematic diagram of another graphical user interface provided by an embodiment of the present invention;
FIG. 2c is a schematic diagram of another graphical user interface provided by an embodiment of the present invention;
FIG. 2d is a schematic diagram of another graphical user interface provided by an embodiment of the present invention;
FIG. 2e is a schematic diagram of another graphical user interface provided by an embodiment of the present invention;
FIG. 2f is a schematic diagram of another graphical user interface provided by an embodiment of the present invention;
FIG. 2g is a schematic diagram of another graphical user interface provided by an embodiment of the present invention;
FIG. 2h is a schematic diagram of another graphical user interface provided by an embodiment of the present invention;
fig. 3 is a block diagram illustrating a configuration of a device for framing a virtual object in a game according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart illustrating steps of a method for framing a virtual object in a game according to an embodiment of the present invention is shown, where a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, and the graphical user interface may include at least a part of a game scene and at least one virtual object, and specifically may include the following steps:
the virtual object may include a virtual game Character controlled by an enemy player in the game, or may include a Non-player Character (NPC) preset by a game developer in a specific game scene.
Step 101, detecting a first touch operation of a first touch medium acting on a touch display and a second touch operation of a second touch medium acting on the touch display;
as an example, the touch media may include fingers, a stylus, etc., e.g., the first touch media may be the index finger of the right hand and the second touch media may be the index finger of the left hand.
In a specific implementation, a game player may perform a first touch operation by using a first operation medium, and may perform a second touch operation by using a second touch medium.
Step 102, determining a frame selection area in the game scene according to the first touch operation and the second touch operation;
as an example, the frame selection area may be a quadrilateral, as shown in fig. 2a, or a circle, as shown in fig. 2b, which is not limited by the present invention.
After the touch operation is detected, touch points corresponding to the first touch operation and the second touch operation can be determined in a game scene, and then a frame selection area corresponding to the touch points can be determined.
Specifically, the touch display may have a first preset area and a second preset area, the first preset area may be a non-edge area, and the second preset area may be an edge area, for example, an area formed by four edges of the touch display facing inward by 1cm is an edge area, and the others are non-edge areas.
In an embodiment, when the first touch point of the first touch operation and the second touch point of the second touch operation are located in a first predetermined area of the touch display, step 102 may include the following sub-steps:
substep 11, obtaining a first position of a first touch point of the first touch operation in the touch display and a second position of a second touch point of the second touch operation in the touch display;
when the touch operation is performed in the first preset area, a first position of the first touch point in the touch display can be directly obtained, and a second position of the second touch point in the touch display can be obtained.
And a substep 12 of determining a frame selection area in the game scene according to the first position and the second position.
After the position information is determined, scene positions of the first position and the second position mapped in the game scene can be determined, and then the frame selection area can be determined in the game scene.
In an embodiment of the present invention, the substep 12 may comprise the substeps of:
updating the first position according to the operation track of the first touch operation; updating the second position according to the operation track of the second touch operation; and updating the frame selection area according to the updated first position and the updated second position.
In a specific implementation, the touch operation may be a sliding operation, and the first position and the second position may be updated by an operation trajectory of the sliding operation, and the frame selection area may be updated by using the updated first position and the updated second position.
In an embodiment of the present invention, the substep 12 may comprise the substeps of:
determining a first scene position corresponding to the first touch point in a game scene according to the first position; determining a second scene position corresponding to the second touch point in a game scene according to the second position; and determining a frame selection area in the game scene according to the first scene position and the second scene position.
Since the first position and the second position may be position information of a touch point on the touch display by the touch operation, a first scene position and a second scene position mapped by the first position and the second position may be determined in the game scene, respectively, and then a frame selection area formed by the first scene position and the second scene position may be determined in the game scene.
For example, when the frame area is a quadrangle, the first scene position and the second scene position may be used as two end points on a diagonal line of the quadrangle, and when the frame area is a circle, the first scene position and the second scene position may be used as two end points of a diameter of the circle.
In another embodiment, when the first touch point of the first touch operation moves to a second predetermined area of the touch display, step 102 may include the following sub-steps:
determining a second scene position in a game scene according to the second position; moving a game scene in the graphical user interface according to the first touch operation; acquiring a first position of a first touch point of the first touch operation on the touch display; determining a first scene position in the moved game scene according to the first position; and determining a frame selection area in the game scene according to the first scene position and the second scene position.
The second scene position may be a position of the second position in the game scene when the first touch point of the first touch operation moves to a second preset area of the graphical user interface.
Since the second touch point is not located in the second preset area, similar to the above in the first preset area, the second scene position mapped by the second position may be determined in the game scene according to the second position.
Since the first touch point is located in the second preset area, the game scene in the graphical user interface may be moved to the direction corresponding to the first touch operation, for example, before moving as shown in fig. 2c, and after moving as shown in fig. 2 d.
After the game scene is moved, a first scene position can be determined in the moved game scene according to a first position of the first touch point on the touch display, and further, a frame selection area formed by the first scene position and the second scene position can be determined.
In an embodiment of the present invention, the method may further include the steps of:
zooming the game scene to cause all of the selected virtual objects to be displayed within the graphical user interface.
In a specific implementation, the game scene may be zoomed, and further, all the selected virtual objects may be gradually displayed in the graphical user interface, for example, before zooming in fig. 2e, or after zooming in fig. 2 f.
And 103, selecting the virtual object meeting preset conditions according to the frame selection area.
After the selection area is determined, a virtual object of a preset condition may be selected.
In an embodiment of the present invention, step 103 may include the following sub-steps:
judging an overlapping area of any virtual object and the frame selection area; and when the overlapping area meets a preset condition, selecting the virtual object.
Since the frame selection area has a certain range, an overlapping area of the virtual object and the frame selection area, that is, a portion of the virtual object included in the frame selection area, may be determined, and when the overlapping area satisfies a preset condition, the virtual object may be selected.
In one embodiment, when the overlap region satisfies a preset condition, the step of selecting the virtual object may include the sub-steps of:
and when the area of the overlapping area is within a first preset range, selecting the virtual object.
In a specific implementation, the area of the overlapping region may be calculated, and when the area is within a first preset range, such as 80% -100% of the total area of the virtual object, the virtual object is selected.
For example, in fig. 2g, the overlapping area of the object C is 100% of the total area thereof, i.e., completely contained in the frame selection region, the overlapping area of the object B is less than 80%, i.e., only partially contained in the frame selection region, the overlapping area of the object a is 0, i.e., not contained in the selection frame, and then the object C may be selected.
In an embodiment of the present invention, the method may further include the following sub-steps:
and when a first switching condition is triggered, selecting the virtual object of which the area of the overlapping region is within a second preset range.
The second predetermined range may include the first predetermined range, for example, the first predetermined range is 80% to 100% of the total area of the virtual object, and the second predetermined range is 20% to 100% of the total area of the virtual object.
Before triggering the first switching condition, a virtual object having an overlapping area within a first preset range may be selected, and after triggering the first switching condition, a virtual object having an overlapping area within a second preset range may be selected.
For example, in fig. 2h, the overlapping area of the object C is 100% of the total area, i.e., completely contained in the frame selection area, the overlapping area of the object B is less than 80%, i.e., only partially contained in the frame selection area, and the overlapping area of the object a is 0, i.e., not contained in the selection frame, then the object C and the object B can be selected.
Wherein the first switching condition may include any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is larger than the ordinate of the updated second position, and the ordinate of the first position before updating is smaller than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
In another embodiment, when the overlap region satisfies a preset condition, the step of selecting the virtual object may include the sub-steps of:
and when the area of the overlapping area is within a third preset range, selecting the virtual object.
In a specific implementation, the area of the overlapping region may be calculated, and when the area is within a first preset range, for example, 10% to 100% of the total area of the virtual object, the virtual object is selected.
In an embodiment of the present invention, the method may further include the steps of:
when a second switching condition is triggered, selecting the virtual object of which the area of the overlapping area is within a fourth preset range;
the third preset range may include a fourth preset range, for example, the third preset range is 10% to 100% of the total area of the virtual object, and the fourth preset range is 90% to 100% of the total area of the virtual object.
Wherein the second switching condition may include any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is larger than the ordinate of the updated second position, and the ordinate of the first position before updating is smaller than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
In the embodiment of the invention, the touch screen frame selection in the game is realized by detecting the first touch operation of the first touch medium acting on the graphical user interface and the second touch operation of the second touch medium acting on the graphical user interface, then determining a frame selection area in the game scene according to the first touch operation and the second touch operation, and further selecting the virtual object meeting the preset condition according to the frame selection area, so that the touch screen frame selection in the game is realized, the accuracy of the touch screen frame selection is improved, and the misoperation in the game is avoided.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a schematic structural diagram of a device for framing virtual objects in a game according to an embodiment of the present invention is shown, where a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, where the graphical user interface includes at least a part of a game scene and includes at least one virtual object, and the device includes:
a touch operation detection module 301, configured to detect a first touch operation performed by a first touch medium on the graphical user interface, and a second touch operation performed by a second touch medium on the graphical user interface;
a frame selection area determining module 302, configured to determine a frame selection area in the game scene according to the first touch operation and the second touch operation;
a virtual object selecting module 303, configured to select, according to the frame selection area, the virtual object that meets a preset condition.
In an embodiment of the present invention, when the first touch point of the first touch operation and the second touch point of the second touch operation are located in a first preset area of the touch display, the frame selection area determining module 302 includes:
the position acquisition sub-module is used for acquiring a first position of a first touch point of the first touch operation in the touch display and a second position of a second touch point of the second touch operation in the touch display;
and the position frame selection sub-module is used for determining a frame selection area in the game scene according to the first position and the second position.
In an embodiment of the present invention, the frame selection area determining module 302 includes:
the first position updating submodule is used for updating the first position according to the operation track of the first touch operation;
the second position updating submodule is used for updating the second position according to the operation track of the second touch operation;
and the frame selection area updating submodule is used for updating the frame selection area according to the updated first position and the updated second position.
In an embodiment of the present invention, the frame selection area determining module 302 includes:
the first scene position determining submodule is used for determining a first scene position corresponding to the first touch point in a game scene according to the first position;
the second scene position determining submodule is used for determining a second scene position corresponding to the second touch point in a game scene according to the second position;
and the scene position frame selection sub-module is used for determining a frame selection area in the game scene according to the first scene position and the second scene position.
In an embodiment of the invention, when the first touch point of the first touch operation moves to the second preset area of the touch display, the frame selection area determining module 302 includes:
a second mobile scene position determining submodule, configured to determine a second scene position in a game scene according to the second position, where the second scene position is a position in the game scene where a first touch point of the first touch operation moves to a second preset area of the graphical user interface, and the second position corresponds to the second preset area;
the game scene moving submodule is used for moving the game scene in the graphical user interface according to the first touch operation;
the first mobile position acquisition submodule is used for acquiring a first position of a first touch point of the first touch operation on the touch display;
the first mobile scene position determining submodule is used for determining a first scene position in the moved game scene according to the first position;
and the mobile frame selection area determining submodule is used for determining a frame selection area in the game scene according to the first scene position and the second scene position.
In an embodiment of the present invention, the apparatus further includes:
and the game scene zooming module is used for zooming the game scene so as to display all the selected virtual objects in the graphical user interface.
In an embodiment of the present invention, the virtual object selecting module 303 includes:
an overlapping area judgment submodule for judging an overlapping area between any of the virtual objects and the frame selection area;
and the overlap selection submodule is used for selecting the virtual object when the overlap area meets a preset condition.
In an embodiment of the present invention, the overlap selection sub-module includes:
and the first preset range selection unit is used for selecting the virtual object when the area of the overlapping area is within a first preset range.
In an embodiment of the present invention, the apparatus further includes:
the second preset range selection unit is used for selecting the virtual object of which the area of the overlapping area is within a second preset range when a first switching condition is triggered; wherein the second predetermined range comprises the first predetermined range;
wherein the first switching condition comprises any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is larger than the ordinate of the updated second position, and the ordinate of the first position before updating is smaller than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
In an embodiment of the present invention, the overlap selection sub-module includes:
and the third preset range selecting unit is used for selecting the virtual object when the area of the overlapping area is within a third preset range.
In an embodiment of the present invention, the apparatus further includes:
a fourth preset range selecting unit, configured to select the virtual object whose area of the overlapping area is within a fourth preset range when a second switching condition is triggered; wherein the third preset range comprises the fourth preset range;
wherein the second switching condition comprises any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is larger than the ordinate of the updated second position, and the ordinate of the first position before updating is smaller than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for framing a virtual object in a game as described above.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for framing virtual objects in the game.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or terminal equipment comprising the element.
The method and apparatus for framing virtual objects in a game, the electronic device, and the storage medium provided by the present invention are introduced in detail, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (13)

1. A method for framing virtual objects in a game, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, the graphical user interface including at least a part of a game scene and including at least one virtual object, the method comprising:
detecting a first touch operation of a first touch medium acting on the touch display and a second touch operation of a second touch medium acting on the touch display;
determining a frame selection area in the game scene according to the first touch operation and the second touch operation;
selecting the virtual object meeting preset conditions according to the frame selection area;
wherein the determining a frame selection area in the game scene according to the first touch operation and the second touch operation comprises:
when a second touch point of the second touch operation is located in a first preset area of the touch display, when a first touch point of the first touch operation moves from the first preset area to a second preset area of the touch display, determining a second scene position in a game scene according to a second position of the second touch point of the second touch operation in the touch display, wherein the second scene position is a position corresponding to the second position in the game scene when the first touch point of the first touch operation moves to the second preset area;
moving a game scene in the graphical user interface according to the first touch operation;
acquiring a first position of a first touch point of the first touch operation on the touch display;
determining a first scene position in the moved game scene according to the first position;
and determining a frame selection area in the game scene according to the first scene position and the second scene position.
2. The method of claim 1, wherein when a first touch point of the first touch operation and a second touch point of the second touch operation are located in a first preset area of the touch display, the determining a frame selection area in the game scene according to the first touch operation and the second touch operation comprises:
acquiring a first position of a first touch point of the first touch operation in the touch display and a second position of a second touch point of the second touch operation in the touch display;
and determining a frame selection area in the game scene according to the first position and the second position.
3. The method of claim 2, wherein determining a frame selection area in the game scene according to the first touch operation and the second touch operation comprises:
updating the first position according to the operation track of the first touch operation;
updating the second position according to the operation track of the second touch operation;
and updating the frame selection area according to the updated first position and the updated second position.
4. The method of any one of claims 2 or 3, wherein determining a frame selection area in the game scene based on the first location and the second location comprises:
determining a first scene position corresponding to the first touch point in a game scene according to the first position;
determining a second scene position corresponding to the second touch point in a game scene according to the second position;
and determining a frame selection area in the game scene according to the first scene position and the second scene position.
5. The method of claim 4, further comprising:
zooming the game scene to cause all of the selected virtual objects to be displayed within the graphical user interface.
6. The method according to claim 3, wherein selecting the virtual object satisfying a preset condition according to the frame selection area comprises:
judging an overlapping area of any virtual object and the frame selection area;
and when the overlapping area meets a preset condition, selecting the virtual object.
7. The method according to claim 6, wherein the selecting the virtual object when the overlapping area satisfies a preset condition comprises:
and when the area of the overlapping area is within a first preset range, selecting the virtual object.
8. The method of claim 7, further comprising:
when a first switching condition is triggered, selecting the virtual object of which the area of the overlapping area is within a second preset range; wherein the second predetermined range comprises the first predetermined range;
wherein the first switching condition comprises any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is greater than the ordinate of the updated second position, and the ordinate of the first position before updating is less than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
9. The method according to claim 6, wherein the selecting the virtual object when the overlapping area satisfies a preset condition comprises: and when the area of the overlapping area is within a third preset range, selecting the virtual object.
10. The method of claim 9, further comprising:
when a second switching condition is triggered, selecting the virtual object of which the area of the overlapping area is within a fourth preset range; wherein the third preset range comprises the fourth preset range;
wherein the second switching condition comprises any one of:
the abscissa of the updated first position is larger than the abscissa of the updated second position, and the abscissa of the first position before updating is smaller than the abscissa of the second position before updating;
the abscissa of the updated first position is smaller than the abscissa of the updated second position, and the abscissa of the first position before updating is larger than the abscissa of the second position before updating;
the ordinate of the updated first position is larger than the ordinate of the updated second position, and the ordinate of the first position before updating is smaller than the ordinate of the second position before updating;
the ordinate of the updated first position is smaller than the ordinate of the updated second position, and the ordinate of the first position before updating is larger than the ordinate of the second position before updating.
11. An apparatus for framing virtual objects in a game, wherein a graphical user interface is obtained by executing a software application on a processor of a mobile terminal and rendering the software application on a touch display of the mobile terminal, the graphical user interface including at least a portion of a game scene and including at least one virtual object, the apparatus comprising:
the touch operation detection module is used for detecting a first touch operation of a first touch medium acting on the graphical user interface and a second touch operation of a second touch medium acting on the graphical user interface;
a frame selection area determination module, configured to determine a frame selection area in the game scene according to the first touch operation and the second touch operation;
the virtual object selection module is used for selecting the virtual object meeting preset conditions according to the frame selection area;
the frame selection area determination module comprises:
a second moving scene position determining submodule, configured to determine a second scene position in a game scene according to a second position of a second touch point of the second touch operation in the touch display when the second touch point of the second touch operation is located in a first preset area of the touch display and the first touch point of the first touch operation moves from the first preset area to a second preset area of the touch display, where the second scene position is a position corresponding to the second position in the game scene when the first touch point of the first touch operation moves to the second preset area;
the game scene moving submodule is used for moving the game scene in the graphical user interface according to the first touch operation;
the first mobile position acquisition submodule is used for acquiring a first position of a first touch point of the first touch operation on the touch display;
the first mobile scene position determining submodule is used for determining a first scene position in the moved game scene according to the first position;
and the mobile frame selection area determining submodule is used for determining a frame selection area in the game scene according to the first scene position and the second scene position.
12. An electronic device comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program when executed by the processor implementing the steps of the method of framing virtual objects in a game as claimed in any one of claims 1 to 10.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for framing virtual objects in a game according to any one of claims 1 to 10.
CN201910088236.8A 2019-01-29 2019-01-29 Method and device for frame selection of virtual object in game, electronic equipment and storage medium Active CN109718538B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910088236.8A CN109718538B (en) 2019-01-29 2019-01-29 Method and device for frame selection of virtual object in game, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910088236.8A CN109718538B (en) 2019-01-29 2019-01-29 Method and device for frame selection of virtual object in game, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109718538A CN109718538A (en) 2019-05-07
CN109718538B true CN109718538B (en) 2022-05-17

Family

ID=66301346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910088236.8A Active CN109718538B (en) 2019-01-29 2019-01-29 Method and device for frame selection of virtual object in game, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109718538B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951348B (en) * 2019-05-14 2024-05-07 阿里巴巴集团控股有限公司 Method and device for determining frame selection area and electronic equipment
CN110215687B (en) * 2019-07-04 2023-03-24 网易(杭州)网络有限公司 Game object selection method and device
CN110215688A (en) * 2019-07-04 2019-09-10 网易(杭州)网络有限公司 The selection control method and device of game object
CN116459506A (en) * 2019-07-04 2023-07-21 网易(杭州)网络有限公司 Game object selection method and device
CN110975278A (en) * 2019-12-18 2020-04-10 网易(杭州)网络有限公司 Method and device for simulating touch sense in game, electronic equipment and storage medium
CN113457117B (en) * 2021-07-08 2024-02-06 网易(杭州)网络有限公司 Virtual unit selection method and device in game, storage medium and electronic equipment
CN113900570B (en) * 2021-10-08 2023-06-30 网易(杭州)网络有限公司 Game control method, device, equipment and storage medium
CN114442898B (en) * 2022-01-29 2023-08-22 网易(杭州)网络有限公司 Information processing method, device, electronic equipment and readable medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929524B (en) * 2012-09-20 2016-05-04 东莞宇龙通信科技有限公司 A kind of choosing method of content of pages and device
CN103853476B (en) * 2012-12-04 2017-06-27 联想(北京)有限公司 The method and electronic equipment of a kind of information processing
CN105323368B (en) * 2014-12-10 2018-08-17 维沃移动通信有限公司 Batch selection method and its mobile terminal
CN107291344A (en) * 2016-03-31 2017-10-24 中兴通讯股份有限公司 A kind of method of content selection, device and terminal device
CN107066167A (en) * 2016-09-27 2017-08-18 华为技术有限公司 A kind of regional selection method, device and graphic user interface
CN108920069B (en) * 2018-06-13 2020-10-23 网易(杭州)网络有限公司 Touch operation method and device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN109718538A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN109718538B (en) Method and device for frame selection of virtual object in game, electronic equipment and storage medium
CN108355354B (en) Information processing method, device, terminal and storage medium
RU2701988C2 (en) Parametric inertia and application programming interfaces
CN105117156B (en) A kind of information processing method and electronic equipment
JP6214547B2 (en) Measuring the rendering time of a web page
CN106970735B (en) Information processing method and electronic equipment
JP6141262B2 (en) Removal and correction of target ambiguity
CN109107153B (en) Method and device for releasing game skill, electronic equipment and storage medium
CN109597563B (en) Interface editing method and device, electronic equipment and storage medium
CN110624241A (en) Information processing method and device, electronic equipment and storage medium
CN109432775B (en) Split screen display method and device of game map
CN107678652B (en) Operation control method and device for target object
CN105607851A (en) Scene control method and device for touch terminal
CN111309214A (en) Video interface setting method and device, electronic equipment and storage medium
CN105843547A (en) Page sliding method and device
CN106621331B (en) A kind of game object performance objective switching method and apparatus
CN107626105B (en) Game picture display method and device, storage medium and electronic equipment
CN110427231B (en) Property throwing method and device, electronic equipment and storage medium
CN110795015A (en) Operation prompting method, device, equipment and storage medium
CN109814867B (en) Virtual model building method and system
US10254940B2 (en) Modifying device content to facilitate user interaction
CN111265849B (en) Interaction method and device for virtual cards
CN109002293B (en) UI element display method and device, electronic equipment and storage medium
WO2022247196A1 (en) Game positioning method and apparatus, and mobile terminal
CN110665231B (en) Combat control method and device in game

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