XRD WEEK 1 & 2
Repository link: https://github.com/composer404/XRD-Projects
XRD Week 1 & 2
We spent our first two weeks of the XRD course learning about Markerbase AR
and Vuforia Engine technology. The whole thing seemed very interesting at the first glance, so we quickly got down to work. We started with preparing the
repository. Since the Vuforia package weighs quite a lot, we decided that
the best solution would be to add its path to the gitignore file and install
the package locally by each member of the group. It also allowed us to
individually configure the license.
We had many ideas and concepts for our project, but in the end we decided to create a ping pong-like game with two markers; the board and
the player's paddle. After creating the appropriate pictures, we uploaded them to the
Vuforia's database, which we imported into the unity. Of course, during the entire process, the targets were changed several
times so that the whole thing was well detectable. After adding the markers, we applied the elements of our game to the scene with
textures, and the whole thing looks like this:
After the scene was prepared, the most time-consuming and demanding process
began. We started with adding a script responsible for the movement of the
virtual opponent's racket. Then it was time for the controller responsible for
the movement of the ball. Since the physical elements are much smaller than
the standard size of objects in Unity, we had to reduce the "Unity Bounce
Threshold" so that the ball bounces off the walls correctly when added force.
Additionally, in order for the ball to move only in the plane of the board, we
set the "World Center" as the board target image. In order to move the user
paddle, we decided that the best solution would be to read the value of only
one marker axis and leave the others constant. Such action prevents from experiencing the unwanted
movement of the paddle or the sudden loss of the target. A trigger-based scoring
mechanism and an invisible net have been added to prevent the ball from
escaping outside the board area.
Although half of our group did not attend the GMD course, we tried our best to pass on the knowledge and experience gained in the previous semester, as well as to learn a bit more during the process of making the following project. Furthermore, in the scripts, the structure was based on controllers and managers, so that everything was readable and easy to expand.
Additional UI elements that we decided to implement are the main menu, where we are able to adjust the speed of movement and the volume. At the end of the game there is a screen that appears when you lose / win, the points counter and the button that starts the game. A mechanism has also been added to the button, which allows it to pop up only when both markers have been correctly read. Otherwise, the information about the missing items appears on the screen. Music and sound effects have also been added to the game to improve the gameplay. The entirety is made up as it is shown below:
Additional UI elements that we decided to implement are the main menu, where we are able to adjust the speed of movement and the volume. At the end of the game there is a screen that appears when you lose / win, the points counter and the button that starts the game. A mechanism has also been added to the button, which allows it to pop up only when both markers have been correctly read. Otherwise, the information about the missing items appears on the screen. Music and sound effects have also been added to the game to improve the gameplay. The entirety is made up as it is shown below:
Links:
https://www.youtube.com/watch?v=yWCHaTwVblk - Volume Slider
https://www.youtube.com/watch?v=fESM_UIg1rA - Control, Roll Ball
https://www.youtube.com/watch?v=zc8ac_qUXQY&t=3s - Menu
Author: Przemyslaw Kozik
Comments
Post a Comment