Disclosure of Invention
The invention aims to solve the technical problem that aiming at the defects of the prior art, the virtual reality game platform based on the carousel equipment and the control method thereof are provided to solve the problem that the game effect is influenced because the prior VR game and the special game equipment cannot be deeply combined and lack of consistency.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a carousel-based virtual reality gaming platform, comprising: the game system comprises the rotary Trojan horse equipment, a first sensor used for detecting the rotation angle of a center column of the rotary Trojan horse equipment, at least one second sensor used for detecting the rising height of the rotary Trojan horse, a server and at least one virtual reality equipment used for displaying a game picture, wherein the server is used for receiving the rotation angle sent by the first sensor and the rising height sent by the second sensor and controlling the virtual reality equipment to display the corresponding game picture according to the rotation angle and the rising height.
The virtual reality game platform based on the carousel, wherein, first sensor set up in on the center pillar of carousel, first sensor adopts rotary encoder.
The virtual reality game platform based on the carousel, wherein, the second sensor sets up on the bearing of the seat below of carousel, the second sensor adopts tensile encoder.
The virtual reality game platform based on the Trojan horse is characterized in that the Trojan horse equipment is connected with the server through a shielded cable, and transmits a start/stop signal to the server through the shielded cable.
A method of controlling a virtual reality gaming platform based on a carousel, comprising:
when the Trojan horse equipment is started, the first sensors detect the rotation angle in real time, and the plurality of second sensors detect the lifting height of the Trojan horse corresponding to the first sensors in real time;
the first sensor sends the detected rotation angle to a server, and the plurality of second sensors send detected detection information to the server, wherein the detection information comprises a lifting height and an equipment identifier;
and the server determines the Trojan horse corresponding to each rising height according to the equipment identification in each piece of detection information, and controls the virtual reality equipment corresponding to each Trojan horse to display a corresponding game picture according to the rotation angle and the rising height corresponding to each Trojan horse.
The method for controlling a virtual reality game platform based on a Trojan horse, wherein the server determines the Trojan horse corresponding to each rising height according to the device identifier in each detection information, and controls the virtual reality device corresponding to each Trojan horse to display a corresponding game picture according to the rotation angle and the rising height corresponding to each Trojan horse specifically includes:
the server receives the rotation angle and the detection information, and determines the Trojan horse corresponding to each rising height according to the equipment identification in each detection information;
searching a corresponding game picture according to the rotation angle and each lifting height;
and respectively sending the searched game pictures to the virtual reality equipment corresponding to each Trojan horse so that the virtual reality equipment plays the corresponding game pictures.
The method for controlling the virtual reality game platform based on the carousel specifically comprises the following steps of:
determining a corresponding video frame set according to the rotation angle;
and searching video frames corresponding to the ascending heights in the video frame set, and respectively sending the video frames to corresponding virtual reality equipment so that the virtual reality equipment plays game pictures corresponding to the video frames.
The method for controlling a virtual reality game platform based on a Trojan horse, wherein the server determines the Trojan horse corresponding to each ascending height according to the device identifier in each detection information, and further comprises the following steps of controlling the virtual reality device corresponding to each Trojan horse to display a corresponding game picture according to the rotation angle and the ascending height corresponding to each Trojan horse:
and the server monitors a stop signal sent by the Trojan horse rotating equipment and controls the virtual reality equipment to play a preset default game picture when monitoring.
The method for controlling the virtual reality game platform based on the Trojan horse comprises the following steps that after the Trojan horse equipment is started, the first sensors detect the rotating angle in real time, and before the second sensors detect the rising height of the corresponding Trojan horse in real time, the method further comprises the following steps:
the Trojan horse rotating equipment sends a starting signal to a server;
and when the server receives the starting signal, the server controls the first sensor and the plurality of second sensors to be started, and controls the virtual reality equipment to play a preset default game picture.
Has the advantages that: compared with the prior art, the virtual reality game platform based on the Trojan horse and the control method thereof are provided by the invention, the virtual reality game platform comprises the Trojan horse equipment, a first sensor used for detecting the rotation angle of a center pillar of the Trojan horse equipment, at least one second sensor used for detecting the ascending height of the Trojan horse, a server and at least one virtual reality equipment used for displaying a game picture, wherein the server is used for receiving the rotation angle sent by the first sensor and the ascending height sent by the second sensor and controlling the virtual reality equipment to display the corresponding game picture according to the rotation angle and the ascending height. According to the invention, the server controls the virtual reality equipment corresponding to each Trojan horse to display the corresponding game picture according to the rotation angle and the rising height by detecting the rotation angle of the center pillar of the Trojan horse equipment and the rising height of each Trojan horse, so that the deep combination of a VR game and special game equipment is realized, the VR game picture is adapted to the movement of the Trojan horse, and the immersive game effect is enhanced.
Detailed Description
The invention provides a virtual reality game platform based on a carousel device and a control method thereof, and in order to make the purpose, technical scheme and effect of the invention clearer and clearer, the invention is further described in detail below by referring to the attached drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the present invention, suffixes such as "module", "part", or "unit" used to indicate elements are used only for facilitating the description of the present invention, and have no specific meaning in themselves. Thus, modules, components, or units may be used mixedly.
The invention will be further explained by the description of the embodiments with reference to the drawings.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a virtual reality game platform according to a preferred embodiment of the present invention. The virtual reality game platform comprises a Trojan horse device 100, a first sensor 200 for detecting the rotation angle of a center post of the Trojan horse device 100, a plurality of second sensors 300 for detecting the rising height of each Trojan horse in the Trojan horse device 100, a server 400 and a plurality of virtual reality devices, wherein the number of the second sensors 300 and the number of the virtual reality devices 500 are the same as the number of the Trojan horses; the server 400 is configured to control the virtual reality device 500 corresponding to each carousel to display a corresponding game picture according to the rotation angle sent by the first sensor 200 and the ascending heights sent by the plurality of second sensors 300; the virtual reality device 500 is configured to display the received game screen. In the embodiment, the first sensor 200 is arranged on the center pillar, the second sensor 300 is arranged for each Trojan horse, and each rotating angle and the rising height are detected, so that the subsequent server 400 can determine the game picture corresponding to each Trojan horse according to the detected rotating angle and the rising height, and control the virtual reality device 500 to display the determined game picture, and the VR game picture is adapted to the motion of the Trojan horse, so that the VR game is deeply combined with the special game device, and the immersive game effect is enhanced.
In the present embodiment, as shown in fig. 2, the carousel 100 comprises a chassis 104, a center post 103, a umbrella disc 101, and several carousels 102. The center pillar 103 is provided at the center of the base plate 104, and supports the umbrella plate 101 thereon. The central post 103 is driven by the motor to rotate, so as to drive the chassis 104 and the umbrella disc 101 to rotate. The plurality of hobbyhorse 102 are arranged on the chassis 104 and driven by the chassis 104 to rotate around the center post 103. In the present embodiment, the first sensor 200 is disposed on the center posts 103, and since the center posts 103 rotate synchronously with the turrets 102, the rotation angles of the turrets 102 can be obtained by detecting the rotation angles of the center posts 103. Further, as shown in fig. 3, since each of the hobbyhorse 102 corresponds to a driving shaft and moves up and down relative to the chassis 104 by the driving shaft, a second sensor 300 is installed on a bearing below the seat of the hobbyhorse 102, so that the rising height of each of the hobbyhorses 102 is detected by the second sensor 300. In practical applications, the first sensor 200 may be a rotary encoder, and the second sensor 300 may be a pull-cord encoder. When the platform is powered on, the stay cord encoder generates an I/O signal according to the process of the up-down lifting of the seat, and the signal is sent to a program of the VR helmet through the singlechip and the router to calibrate the current height information of the character.
In the present embodiment, the carousel device 100 is connected to the server 400 via a shielded cable (e.g., model KVVR-4 × 1 mm), and when the activation button of the carousel device 100 is pressed, i.e., the carousel device 100 is activated, the carousel device 100 transmits an activation signal to the server 400 via the shielded cable; similarly, when the carousel apparatus 100 stops operating, a stop signal is transmitted to the server 400. In this way, the server 400 can control the virtual reality device 500 according to the start/stop signal. In practical applications, the server 400 may be embedded in the virtual reality device 500, so that each virtual reality device 500 has an independent data processing function; the server 400 may also be an independent device, so that one server 400 may control a plurality of virtual reality devices 500 at the same time, so that the virtual reality devices 500 display game pictures corresponding to the video frames sent by the server 400.
Based on the virtual reality game platform, the invention further provides a control method of the virtual reality game platform based on the carousel device, and as shown in fig. 4, the control method includes:
s10, when the Trojan horse equipment is started, the first sensors 200 detect the rotation angle in real time, and the second sensors 300 detect the rising height of the corresponding Trojan horse in real time;
specifically, when the carousel device is turned on, the center pillars 103 of the carousel device start to rotate, and each carousel simultaneously moves up and down, at which time the first sensor 200 and the plurality of second sensors 300 start to detect the rotation angle of the center pillars 103 and the distance that each carousel moves up and down. In this embodiment, since the server is communicatively connected to the first sensor 200 and the plurality of second sensors 300, and the server is connected to the carousel device through the shielded cable, the first sensor 200 and the second sensor 300 are activated or deactivated by receiving a control signal from the server. Therefore, before the first sensor 200 detects the rotation angle of the king post 103 in real time after the time when the carousel device is turned on, and the plurality of second sensors 300 detects the rising height of the corresponding carousel in real time, the method further includes:
s01, the Trojan horse rotating equipment sends a starting signal to a server;
and S02, when the server receives the starting signal, the server controls the first sensor and the plurality of second sensors to be started, and controls the virtual reality device 500 to play a preset default game picture.
Specifically, a switch button is arranged on the carousel device, and when the switch button is pressed, the carousel device transmits a start signal to the server. Correspondingly, the server is provided with a master control program to receive whether to start the game program of the virtual reality device, and the master control program mainly judges whether to start the game program through a logic system developed by C + + and plays the roles of receiving a positioning end signal and sending a signal for starting or stopping the virtual reality. And when the server receives the starting signal, the server controls the first sensor and the plurality of second sensors to be started, and sends a starting instruction to the virtual reality equipment. And the virtual reality receives the starting instruction to start up, displays a prestored default picture on a display screen and prompts that the game is ready to start.
S20, the first sensor sends the detected rotation angle to a server, and the second sensors send detected detection information to the server, wherein the detection information comprises a lifting height and equipment identification;
in particular, the device identification is used to identify the respective elevation height, which may be the device identification of the respective second sensor. Correspondingly, the corresponding relation among the second sensors, the trojans and the virtual reality equipment is preset in the server, namely, each trojan and the corresponding second sensor thereof are stored in association with the equipment identifier of the virtual reality equipment. For example, carousel 1-second sensor a-virtual reality device a. In this way, the device identifications of the second sensors carried by the respective elevation heights can determine the corresponding trojan horses and virtual reality devices.
And S30, the server determines the Trojan horse corresponding to each ascending height according to the equipment identifier in each piece of detection information, and controls the virtual reality equipment corresponding to each Trojan horse to display a corresponding game picture according to the rotating angle and the ascending height corresponding to each Trojan horse.
Specifically, the server receives the rotation angle sent by the first sensor and the rising heights sent by the plurality of second sensors, determines a game picture corresponding to the carousel according to a group of rotation angles and rising heights, and then sends the game picture to the virtual reality device.
For example, the step of controlling, by the server, the virtual reality device corresponding to each carousel to display the corresponding game screen according to the received rotation angle and the received elevation height may specifically include:
s31, the server receives the rotation angle and the detection information, and determines the Trojan horse corresponding to each rising height according to the equipment identification in each detection information;
s32, searching a corresponding game picture according to the rotation angle and each lifting height;
and S33, respectively sending the searched game pictures to the virtual reality equipment corresponding to each Trojan horse, so that the virtual reality equipment plays the corresponding game pictures.
Specifically, in step S31, when the server receives the ascending heights sent by the second sensors, the server obtains the device identifier carried by each ascending height, and determines the carousel and the virtual reality device corresponding to the device identifier according to the device identifier. In step S21, the game screen corresponding to the rotation angle and the elevation height is determined according to the rotation angle and the elevation height, and the specific process includes:
s321, determining a corresponding video frame set according to the rotation angle;
and S322, searching the video frames corresponding to the ascending heights in the video frame set, and respectively sending the video frames to the corresponding virtual reality equipment, so that the virtual reality equipment plays the game pictures corresponding to the video frames.
In the step S321, the preset video frame set refers to a preset video frame set, and in this embodiment, the corresponding relationship between the preset video frame set and the rotation angle is preset in the server. That is, one rotation angle corresponds to one video frame set, for example, when the trojan is rotated to 2 °, the corresponding second video frame set corresponds to the N-th video frame set. And then determining the video frames corresponding to the ascending heights in the searched preset video frame set according to the ascending heights. Since the carousel and the virtual reality device corresponding to each elevation height have already been determined in S321, the searched video frames are respectively sent to the virtual reality devices corresponding thereto for playing. In this way, the process of determining the corresponding game picture according to the rotation angle and the rising height of each Trojan horse is completed, so that a user can feel a synchronous VR game picture when the user rotates the Trojan horse equipment, and the immersive game effect is improved.
Furthermore, corresponding audio data can be configured for the plurality of game screens, wherein the audio data at least comprises data such as adaptive background music, voice-over, conversation and the like. Therefore, corresponding sound effects can be output in the playing process of each game picture, and the immersive game experience of the user is enhanced.
S40, the server monitors a stop signal sent by the Trojan horse rotating equipment and controls the virtual reality equipment to play a preset default game picture when the stop signal is monitored.
Specifically, when the Trojan horse equipment stops running, the Trojan horse equipment sends a stop signal to the server through the shielded cable, and after the server receives the stop signal, the server controls the virtual reality equipment to end playing of the game picture and switches to the default game picture, so that the user can be prompted to end the game.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.