CN113450400A - Variable object-based collision detection method, game interaction method and live broadcast system - Google Patents
Variable object-based collision detection method, game interaction method and live broadcast system Download PDFInfo
- Publication number
- CN113450400A CN113450400A CN202110718219.5A CN202110718219A CN113450400A CN 113450400 A CN113450400 A CN 113450400A CN 202110718219 A CN202110718219 A CN 202110718219A CN 113450400 A CN113450400 A CN 113450400A
- Authority
- CN
- China
- Prior art keywords
- virtual object
- game
- virtual
- live broadcast
- coordinate value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- 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/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
- A63F13/42—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
- A63F13/426—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle involving on-screen location information, e.g. screen coordinates of an area at which the player is aiming with a light gun
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4781—Games
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Geometry (AREA)
- Information Transfer Between Computers (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention relates to the technical field of live broadcast, in particular to a collision detection method based on a variable object, a game interaction method and a live broadcast system, wherein the collision detection method comprises the following steps: acquiring a first virtual object and a second virtual object in a game interface; acquiring a first radius value of a first virtual object and a second radius value of a second virtual object in real time; acquiring the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value; if the distance is smaller than the sum of the first radius value and the second radius value, judging that the first virtual object and the second virtual object collide; when the size of the first virtual object or the second virtual object changes dynamically, the corresponding first radius value or the second radius value is calculated and updated in real time. The invention can better detect the collision based on the variable object.
Description
Technical Field
The invention relates to the technical field of live broadcast, in particular to a collision detection method based on a variable object, a game interaction method and a live broadcast system.
Background
With the development of internet technology and the application development of intelligent devices, live broadcast platforms have diversified live broadcast contents, such as online entertainment or live game broadcast.
In the current live broadcast technology, interaction is performed between a main broadcast and a main broadcast or between the main broadcast and audiences through various games, so that the live broadcast interest is increased. For example, the anchor or viewer may bump or avoid a bump by controlling a virtual object in the live interface to obtain points, and so on.
However, the current method for detecting whether a collision occurs between virtual objects is not changed, and when the object is changed, the method in the prior art is difficult to solve.
Disclosure of Invention
The invention provides a variable object-based collision detection method, a game interaction method and a live broadcast system, which can overcome some or some defects in the prior art.
According to the invention, the collision detection method based on the variable object comprises the following steps:
acquiring a first virtual object and a second virtual object in a game interface; acquiring a first radius value of a first virtual object and a second radius value of a second virtual object in real time; acquiring the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value; and if the distance is smaller than the sum of the first radius value and the second radius value, judging that the first virtual object and the second virtual object collide.
When the size of the first virtual object or the second virtual object changes dynamically, the corresponding first radius value or the second radius value can be calculated and updated in real time; the method of calculating the radius value is as follows:
1) after a coordinate system is selected, 8 directions of 0-degree angle, 45-degree angle, 90-degree angle, 135-degree angle, 180-degree angle, 225-degree angle, 270-degree angle and 315-degree angle are respectively selected, and effective lengths of objects in all directions are calculated and are R1 and R2 … … R8 respectively;
2) calculating a final radius value R using the formula R ═ (R1+ R2+ … … + R8)/8;
preferably, the step of acquiring the first virtual object and the second virtual object in the game interface comprises:
acquiring a plurality of first virtual objects from a game interface, forming the plurality of first virtual objects into a first set, acquiring a plurality of second virtual objects from the game interface, and forming the plurality of second virtual objects into a second set;
the step of obtaining the first coordinate value of the center point of the first virtual object and the second coordinate value of the center point of the second virtual object comprises the following steps:
and traversing the first set to respectively obtain a first coordinate value of the center point of each first virtual object in the first set, and traversing the second set to respectively obtain a second coordinate value of the center point of each second virtual object in the second set.
Preferably, the step of acquiring the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value includes:
acquiring the distance between a first virtual object and a first second virtual object according to a first coordinate value of the first virtual object in the first set and a second coordinate value of the first second virtual object in the second set;
repeating the steps until the distance between the first virtual object in the first set and the last second virtual object in the second set is obtained;
and the like until the distance between the last first virtual object in the first set and the last second virtual object in the second set is acquired.
The invention also provides a game interaction method based on the variable object, which is used for a live broadcast system, wherein the live broadcast system comprises a main broadcast end and a server, and the game interaction method comprises the following steps:
the anchor end sends a game live broadcast request to the server;
the server generates broadcast information according to the game live broadcast request and sends the broadcast information to the anchor terminal;
the anchor end starts the live game according to the playing information and renders the first virtual object and the second virtual object to a game interface according to a preset rule;
the anchor end judges whether the first virtual object and the second virtual object collide according to the variable object-based collision detection method;
and if the first virtual object collides with the second virtual object, the anchor terminal eliminates the first virtual object and the second virtual object from the game interface.
The invention also provides a game interaction method based on the variable object, which is used for the anchor terminal, and the game interaction method comprises the following steps:
sending a game live broadcast request to a server so that the server generates broadcast information according to the game live broadcast request;
starting live game broadcasting according to the broadcasting information, and rendering the first virtual object and the second virtual object to a game interface according to a preset rule;
determining whether the first virtual object and the second virtual object have collided according to the variable object-based collision detection method described above;
and if the first virtual object collides with the second virtual object, eliminating the first virtual object and the second virtual object from the game interface.
The invention also provides a live broadcast system, which comprises a main broadcast end and a server, wherein the main broadcast end sends a game live broadcast request to the server; the server generates broadcast information according to the game live broadcast request and sends the broadcast information to the anchor terminal; the anchor end starts the live game according to the playing information and renders the first virtual object and the second virtual object to a game interface according to a preset rule; the anchor end judges whether the first virtual object and the second virtual object collide according to the variable object-based collision detection method; and if the first virtual object collides with the second virtual object, the anchor terminal eliminates the first virtual object and the second virtual object from the game interface.
The method can acquire the first virtual object and the second virtual object in the game interface; acquiring a first radius value of a first virtual object and a second radius value of a second virtual object in real time; acquiring the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value; if the distance is smaller than the sum of the first radius value and the second radius value, judging that the first virtual object and the second virtual object collide; when the size of the first virtual object or the second virtual object changes dynamically, the corresponding first radius value or second radius value can be calculated and updated in real time, so that the collision detection method based on the variable object is realized, and the detection capability is stronger.
Drawings
Fig. 1 is a flowchart of a variable object-based collision detection method in embodiment 1.
Detailed Description
For a further understanding of the invention, reference should be made to the following detailed description taken in conjunction with the accompanying drawings and examples. It is to be understood that the examples are illustrative of the invention and not limiting.
Example 1
As shown in fig. 1, the present embodiment provides a variable object-based collision detection method, which includes:
acquiring a first virtual object and a second virtual object in a game interface; acquiring a first radius value of a first virtual object and a second radius value of a second virtual object in real time; acquiring the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value; and if the distance is smaller than the sum of the first radius value and the second radius value, judging that the first virtual object and the second virtual object collide.
When the size of the first virtual object or the second virtual object changes dynamically, the corresponding first radius value or the second radius value can be calculated and updated in real time; the method of calculating the radius value is as follows:
1) after a coordinate system is selected, 8 directions of 0-degree angle, 45-degree angle, 90-degree angle, 135-degree angle, 180-degree angle, 225-degree angle, 270-degree angle and 315-degree angle are respectively selected, and effective lengths of objects in all directions are calculated and are R1 and R2 … … R8 respectively;
2) calculating a final radius value R using the formula R ═ (R1+ R2+ … … + R8)/8;
the step of acquiring the first virtual object and the second virtual object in the game interface comprises the following steps:
acquiring a plurality of first virtual objects from a game interface, forming the plurality of first virtual objects into a first set, acquiring a plurality of second virtual objects from the game interface, and forming the plurality of second virtual objects into a second set;
the step of obtaining the first coordinate value of the center point of the first virtual object and the second coordinate value of the center point of the second virtual object comprises the following steps:
and traversing the first set to respectively obtain a first coordinate value of the center point of each first virtual object in the first set, and traversing the second set to respectively obtain a second coordinate value of the center point of each second virtual object in the second set.
The step of obtaining the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value comprises:
acquiring the distance between a first virtual object and a first second virtual object according to a first coordinate value of the first virtual object in the first set and a second coordinate value of the first second virtual object in the second set;
repeating the steps until the distance between the first virtual object in the first set and the last second virtual object in the second set is obtained;
and the like until the distance between the last first virtual object in the first set and the last second virtual object in the second set is acquired.
The embodiment also provides a game interaction method based on the variable object, which is used for a live broadcast system, wherein the live broadcast system comprises a main broadcast end and a server, and the game interaction method comprises the following steps:
the anchor end sends a game live broadcast request to the server;
the server generates broadcast information according to the game live broadcast request and sends the broadcast information to the anchor terminal;
the anchor end starts the live game according to the playing information and renders the first virtual object and the second virtual object to a game interface according to a preset rule;
the anchor end judges whether the first virtual object and the second virtual object collide according to the variable object-based collision detection method;
and if the first virtual object collides with the second virtual object, the anchor terminal eliminates the first virtual object and the second virtual object from the game interface.
The embodiment also provides a game interaction method based on the variable object, which is used for the anchor terminal, and the game interaction method comprises the following steps:
sending a game live broadcast request to a server so that the server generates broadcast information according to the game live broadcast request;
starting live game broadcasting according to the broadcasting information, and rendering the first virtual object and the second virtual object to a game interface according to a preset rule;
determining whether the first virtual object and the second virtual object have collided according to the variable object-based collision detection method described above;
and if the first virtual object collides with the second virtual object, eliminating the first virtual object and the second virtual object from the game interface.
The embodiment also provides a live broadcast system, which comprises a main broadcast end and a server, wherein the main broadcast end sends a game live broadcast request to the server; the server generates broadcast information according to the game live broadcast request and sends the broadcast information to the anchor terminal; the anchor end starts the live game according to the playing information and renders the first virtual object and the second virtual object to a game interface according to a preset rule; the anchor end judges whether the first virtual object and the second virtual object collide according to the variable object-based collision detection method; and if the first virtual object collides with the second virtual object, the anchor terminal eliminates the first virtual object and the second virtual object from the game interface.
The embodiment can acquire a first virtual object and a second virtual object in the game interface; acquiring a first radius value of a first virtual object and a second radius value of a second virtual object in real time; acquiring the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value; if the distance is smaller than the sum of the first radius value and the second radius value, judging that the first virtual object and the second virtual object collide; when the size of the first virtual object or the second virtual object is dynamically changed, the corresponding first radius value or the second radius value can be calculated and updated in real time, so that the collision detection method based on the variable object is realized, the detection capability is stronger, the game interaction is more convenient, and the live broadcast system is more advanced.
The present invention and its embodiments have been described above schematically, without limitation, and what is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Therefore, if the person skilled in the art receives the teaching, without departing from the spirit of the invention, the person skilled in the art shall not inventively design the similar structural modes and embodiments to the technical solution, but shall fall within the scope of the invention.
Claims (6)
1. A variable object based collision detection method, characterized by: the method comprises the following steps:
acquiring a first virtual object and a second virtual object in a game interface; acquiring a first radius value of a first virtual object and a second radius value of a second virtual object in real time; acquiring the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value; if the distance is smaller than the sum of the first radius value and the second radius value, judging that the first virtual object and the second virtual object collide;
when the size of the first virtual object or the second virtual object changes dynamically, the corresponding first radius value or the second radius value can be calculated and updated in real time; the method of calculating the radius value is as follows:
1) after a coordinate system is selected, 8 directions of 0-degree angle, 45-degree angle, 90-degree angle, 135-degree angle, 180-degree angle, 225-degree angle, 270-degree angle and 315-degree angle are respectively selected, and effective lengths of objects in all directions are calculated and are R1 and R2 … … R8 respectively;
2) the final radius value R is calculated using the formula R ═ (R1+ R2+ … … + R8)/8.
2. The variable object-based collision detection method according to claim 1, characterized in that: the step of acquiring the first virtual object and the second virtual object in the game interface comprises the following steps:
acquiring a plurality of first virtual objects from a game interface, forming the plurality of first virtual objects into a first set, acquiring a plurality of second virtual objects from the game interface, and forming the plurality of second virtual objects into a second set;
the step of obtaining the first coordinate value of the center point of the first virtual object and the second coordinate value of the center point of the second virtual object comprises the following steps:
and traversing the first set to respectively obtain a first coordinate value of the center point of each first virtual object in the first set, and traversing the second set to respectively obtain a second coordinate value of the center point of each second virtual object in the second set.
3. The variable object-based collision detection method according to claim 2, characterized in that: the step of obtaining the distance between the first virtual object and the second virtual object according to the first coordinate value and the second coordinate value comprises:
acquiring the distance between a first virtual object and a first second virtual object according to a first coordinate value of the first virtual object in the first set and a second coordinate value of the first second virtual object in the second set;
repeating the steps until the distance between the first virtual object in the first set and the last second virtual object in the second set is obtained;
and the like until the distance between the last first virtual object in the first set and the last second virtual object in the second set is acquired.
4. A game interaction method based on variable objects is characterized in that: the method is used for a live broadcast system, the live broadcast system comprises a main broadcast terminal and a server, and the game interaction method comprises the following steps:
the anchor end sends a game live broadcast request to the server;
the server generates broadcast information according to the game live broadcast request and sends the broadcast information to the anchor terminal;
the anchor end starts the live game according to the playing information and renders the first virtual object and the second virtual object to a game interface according to a preset rule;
the anchor end judges whether the first virtual object and the second virtual object collide according to any one of the variable object-based collision detection methods as claimed in claims 1-3;
and if the first virtual object collides with the second virtual object, the anchor terminal eliminates the first virtual object and the second virtual object from the game interface.
5. A game interaction method based on variable objects is characterized in that: for the anchor terminal, the game interaction method comprises the following steps:
sending a game live broadcast request to a server so that the server generates broadcast information according to the game live broadcast request;
starting live game broadcasting according to the broadcasting information, and rendering the first virtual object and the second virtual object to a game interface according to a preset rule;
determining whether the first virtual object and the second virtual object have collided according to any of the variable object based collision detection methods as claimed in claims 1-3;
and if the first virtual object collides with the second virtual object, eliminating the first virtual object and the second virtual object from the game interface.
6. A live broadcast system, characterized by: the live broadcast system comprises a main broadcast end and a server, wherein the main broadcast end sends a game live broadcast request to the server; the server generates broadcast information according to the game live broadcast request and sends the broadcast information to the anchor terminal; the anchor end starts the live game according to the playing information and renders the first virtual object and the second virtual object to a game interface according to a preset rule; the anchor end judges whether the first virtual object and the second virtual object collide according to any one of the variable object-based collision detection methods as claimed in claims 1-3; and if the first virtual object collides with the second virtual object, the anchor terminal eliminates the first virtual object and the second virtual object from the game interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110718219.5A CN113450400A (en) | 2021-06-28 | 2021-06-28 | Variable object-based collision detection method, game interaction method and live broadcast system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110718219.5A CN113450400A (en) | 2021-06-28 | 2021-06-28 | Variable object-based collision detection method, game interaction method and live broadcast system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113450400A true CN113450400A (en) | 2021-09-28 |
Family
ID=77813165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110718219.5A Pending CN113450400A (en) | 2021-06-28 | 2021-06-28 | Variable object-based collision detection method, game interaction method and live broadcast system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113450400A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105139386A (en) * | 2015-08-12 | 2015-12-09 | 南京航空航天大学 | Image processing method for quickly and automatically detecting soldered dot unsatisfied products of electric connectors |
US20190251657A1 (en) * | 2015-11-30 | 2019-08-15 | Tencent Technology (Shenzhen) Company Limited | Method for detecting collision between cylindrical collider and convex body in real-time virtual scenario, terminal, and storage medium |
CN110180182A (en) * | 2019-04-28 | 2019-08-30 | 腾讯科技(深圳)有限公司 | Collision checking method, device, storage medium and electronic device |
CN110505493A (en) * | 2019-09-04 | 2019-11-26 | 广州华多网络科技有限公司 | Collision checking method, game interaction method and live broadcast system based on game |
CN110582005A (en) * | 2019-09-04 | 2019-12-17 | 广州华多网络科技有限公司 | interaction method, live broadcast system, electronic equipment and device with storage function |
CN111464825A (en) * | 2020-04-09 | 2020-07-28 | 腾讯科技(深圳)有限公司 | Live broadcast method based on geographic information and related device |
-
2021
- 2021-06-28 CN CN202110718219.5A patent/CN113450400A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105139386A (en) * | 2015-08-12 | 2015-12-09 | 南京航空航天大学 | Image processing method for quickly and automatically detecting soldered dot unsatisfied products of electric connectors |
US20190251657A1 (en) * | 2015-11-30 | 2019-08-15 | Tencent Technology (Shenzhen) Company Limited | Method for detecting collision between cylindrical collider and convex body in real-time virtual scenario, terminal, and storage medium |
CN110180182A (en) * | 2019-04-28 | 2019-08-30 | 腾讯科技(深圳)有限公司 | Collision checking method, device, storage medium and electronic device |
CN110505493A (en) * | 2019-09-04 | 2019-11-26 | 广州华多网络科技有限公司 | Collision checking method, game interaction method and live broadcast system based on game |
CN110582005A (en) * | 2019-09-04 | 2019-12-17 | 广州华多网络科技有限公司 | interaction method, live broadcast system, electronic equipment and device with storage function |
CN111464825A (en) * | 2020-04-09 | 2020-07-28 | 腾讯科技(深圳)有限公司 | Live broadcast method based on geographic information and related device |
Non-Patent Citations (1)
Title |
---|
DANIEL G. ALIAGA: "Virtual and Real Object Collisions in a Merged Environment", 《VIRTUAL REALITY SOFTWARE AND TECHNOLOGY》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8131514B2 (en) | Methods, devices and programs for transmitting roof and building structure of a 3D representation of a building roof based on said structure | |
CN107837530B (en) | Game synchronization method, device and equipment | |
CN108900920A (en) | A kind of live streaming processing method, device, equipment and storage medium | |
US20180061364A1 (en) | Variable refresh rate video capture and playback | |
CN108415936A (en) | A kind of trajectory playback method and device of electronic map | |
CN108268225A (en) | It throws screen method and throws screen device | |
CN106060052A (en) | Three-dimensional navigation method for network game of mobile terminal | |
CN110574370A (en) | Method and apparatus for processing omnidirectional image | |
CN111144498A (en) | Image identification method and device | |
CN113450400A (en) | Variable object-based collision detection method, game interaction method and live broadcast system | |
CN114205669B (en) | Free view video playing method and device and electronic equipment | |
US11388205B2 (en) | Systems and methods for establishing a shared augmented reality session | |
CN111126975A (en) | Electronic red packet processing method and device, electronic equipment and readable storage medium | |
CN112019937B (en) | Online answer live broadcasting method and device, server and storage medium | |
CN106075910A (en) | The three-dimension navigation system of mobile terminal network game | |
CN116128886A (en) | Point cloud data segmentation method and device, electronic equipment and storage medium | |
KR101045989B1 (en) | System for realizing online/offline pervasive game | |
CN113613050B (en) | Video synchronous playing method and device, electronic equipment and storage medium | |
CN112306361B (en) | Terminal screen projection method, device and system based on gesture pairing | |
CN110891200B (en) | Bullet screen based interaction method, device, equipment and storage medium | |
CN114470786A (en) | Frame synchronization data processing method and device, readable medium and electronic equipment | |
CN111475026B (en) | Spatial positioning method based on mobile terminal application augmented virtual reality technology | |
CN109621405B (en) | Cross-platform interaction method and device, computer equipment and storage medium | |
JP2004298373A (en) | Network game server, control method, program and storage medium | |
CN111193935A (en) | Broadcast display method and device for live broadcast room, electronic equipment 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210928 |
|
RJ01 | Rejection of invention patent application after publication |