XRD Week 4

XRD Week 4

Since last week we spent mainly learning and building the core of our project, this week was devoted to improving existing functions, fixing bugs and adding elements that will diversify the gameplay.
The problem we spent most of our time on was the game reset. During the game, there may be situations in which the board changes its position. This is because ARCore can reposition the selected trackable so that it adapts well to the real world. In this situation, there was a problem with re-spawning the ball and pins, because their starting position is not always appropriate after changing the position of the entire lane.
Ball respawn error
Initially, we focused our thoughts on ARAnchorManager and ARAnchors. Thanks to this, we found out what the assumption of this concept is and that it is not the best solution to our problem. ARAnchor causes quite a heavy load and listening to their changes did not allow us to dynamically change the starting position of elements. In the end, after many attempts, the solution turned out to be very simple. Since both the ball and bowling pins are children of our main prefab, it was enough to use the local position to define their starting position.

In addition, thanks to the possibilities offered by ARPlaneManager, after placing the board with the game, all trackables found are deactivated, which leaves only the board on the stage. At this point, ARPlaneManager is also turned off, so that no unnecessary trackable are created during the game.During the development process, we also discovered the possibility of using the simulator during testing. It was quite helpful, especially in terms of saving time and debugging, unfortunately because the world and the recognition of the environment in the simulator are perfect, it did not give us tangible results. In the end, the whole thing had to be tested using the phone anyway.
                                                          Test with simulator
After making sure that the process related to placing the board in the real world works and does not cause any problems, we moved to adding functions and elements that will complete the project. We have added a point counter based on the collision of the bowling pins with the ground, music, the start screen and the option of choosing a ball depending on the player's preferences. Overall, working on this project turned out to be a bit more demanding than the last one based on Vuforia. During the development, we spent a lot of time reviewing the documentation and checking possible solutions based on ARCore techniques. The final product met our expectations and covered all the requirements that we set before its creation. There is a result:



Links:

https://www.youtube.com/watch?v=WYcxUWXpqi8 - Rolling a ball

https://www.youtube.com/watch?v=3Ort82-A7RA&t=96s - AR bowling example

https://www.youtube.com/watch?v=Eu24gIbPXoY - bowling game inspiration

Author: Przemyslaw Kozik

Comments

Popular posts from this blog

XRD Week 11

XRD Week 10

Personal Reflections - Oliwer Szefer 293139