Minigolf AR

Minigolf in your pocket, anywhere, anytime!

LOGO

Introduction

Do you enjoy minigolf? Have you ever wondered what it is like, to go further beyond reality?! Now you can! In the innovative smash hit MinigolfAR, immersive AR minigolf merges seemlessly with fantastical obstacles that push your skill and creativity to the limit.

The Game

MinigolfAR is a minigolf game in AR. The game consists of over 10 courses each with a unique mechanic. There are both normal obstacles commonly seen in minigolf courses, like a windmill and a loop, but also obstacles that would be impossible in real life. Those obstacles include portals, areas where the size of the ball changes and boostpads that accelerate the ball in a certain direction. There are even portals that change the size of the ball.

Minigolf is commonly played together. With the pandemic that is not recommended, but with this game there exists multiplayer where all participants can be in different locations and play against each other. For those who want to play around with the possibilities of the game, there is also a level editor, where you can create your own levels.

Demo Video


Download

We always provide the latest build of our project at the following link: Latest build

About the Project

This is a project in Advanced Graphics and Interaction at KTH, 2020. Built with ❤ by:

Making of MinigolfAR Video


Goal and Motivation

Our motivations were quite simple: we wanted to make a fun, casual game that would encourage people to play outside, while still being pandemic-friendly in that you maintain social distance. For this reason, the game supports networked multiplayer, allowing you to play with and socialize with your friends outside, even at a distance.

Graphics and Interaction Technologies

For this project we used Unity, AR Core, Blender, Github. Unity was chosen since it is powerful yet easy to learn for a beginner. AR Core since it is integrated in unity and allowed for quick prototyping of AR. Blender was used since we had previous knowledge in it.

Individual Contributions

Viktor Meyer

Gameplay, Multiplayer, Course Editor, UX / UI, Scrum Master

Hannes Runelöv

AR, Interaction, Gameplay, Physics, Modular Course Parts, Course Design, Shaders

Anton le Clercq

Interaction, Dynamic loading, Gameplay, Course Design, Shaders, Particle effects

Robin Dahlqvist

UX, Modeling, Editor, Shaders

Kristoffer Almroth

Interaction, Gameplay, Course Design, Shaders, Particle effects

Challenges and Obstacles

AR

The initial obstacle was of course getting AR to work. Surprisingly, and fortunately, this proved to be quite simple. Unity already does AR for free with AR Foundation. All we needed to do was to slap some AR components to the scene and to the camera, and the latter would simply start tracking automagically when run on an AR Core-compatible device.

AR Interaction

This was a much more major obstacle, and one of the core challenges in the course. First and foremost, we needed to implement some means for the player to place a minigolf course in the real world.

AR Foundation automagically attempts to detect flat surfaces, but does not filter out erroneous surfaces. We also needed an intuitive interface to display and select a surface. Our first solution was to display the course itself together with a cluster of ‘X’ marks on top of the highest detected surface, and then let the player tap when the marks aligned with the real floor or ground, placing the course. This worked adequately, but it was tedious waiting for the ‘X’ marks to align with the ground, especially in low light.

We then found that AR Foundation eventually discards erroneous planes, but augments correct planes together into a huge, continuous plane. We also found a way to apply a texture to the plane itself. So we ended up simply displaying the plane with the largest surface area, and then let the player tap as usual when it’s aligned with the ground.

Course Modeling

Another major obstacle. Modeling a minigolf course is hard. Modeling the borders such that they have equal thickness and are aligned with the felt everywhere is even harder. UV mapping the course such that the textures don’t get distorted or have seams is so tedious that we would likely need all the time in the course (KTH course, of course) to make just one or a couple of courses. And modifying a course modeled in a traditional way like that would require re-aligning the borders and re-mapping the UV’s. So we needed a way to quickly make courses with consistent borders and well-aligned textures, and to quickly be able to modify them.

To that end, we made a script that used linear algebra and some trigonometry to automatically extrude borders from a base felt mesh, and for the texture we used a shader with world-aligned UV coordinates, which makes the texture seamless and uniform everywhere, not requiring tedious, manual UV mapping. Furthermore, instead of making whole courses, the script manages modular parts of a course, such as straights, slopes, loops, etc. and connects them seamlessly, which means we can reuse course parts. It also opens up for an in-game course editor, which we ended up making as well.

component

Mammoth Mini Golf AR

This was one of the first related games we found and took inspiration from.

Link: https://apps.apple.com/us/app/mammoth-mini-golf-ar/id1267751860

Golf with Your Friends

This is one of the largest golf games out there. It is not in AR, but it has some core minigolf gameplay and mechanics. It was often a go-to reference when in the need of ideas and inspiration for the core gameplay.

Link: https://store.steampowered.com/app/431240/Golf_With_Your_Friends/

Interesting Papers

Designing and implementing interactive and realistic augmented reality experiences

This first paper of interest goes through how virtual objects can be better integrated into the augmented reality in a realistic manner. Techniques for collision between virtual objects and real objects are discussed, as well as occlusion and virtual objects casting shadows on real objects.

Link: https://dl.acm.org/doi/abs/10.1007/s10209-017-0584-2

Real-time adaptable and coherent rendering for outdoor augmented reality

The second paper of interest is about realistic lightning for virtual objects in outdoor scenarios. A common method is to approximate the sun with a virtual light source that illuminates all virtual objects. This approximation results in a visual difference between the real and virtual objects. The paper has developed a technique to minimize this difference and thus increase the immersion. It also works for weather changes.

Link: https://www.researchgate.net/publication/328726901_Real-time_adaptable_and_coherent_rendering_for_outdoor_augmented_reality

Lessons Learned

Obviously, we have learned a lot about developing for augmented reality. Even if we look past the opportunities and issues in visualization and input that arise from the AR itself - such as novel input methods and their complications - the target platform of AR on phones influences how you develop in general. Design, visuals, and physics that work perfectly well on a computer can be inefficient or problematic when running in an AR environment on a phone.

Another thing we have learned is that you have to make it five steps more simple for the user than we think. Even the most simple, clear, and obvious instructions can be failed if the user tries hard enough, so each simplification made is valuable. Due to this, we have worked continually to minimize what a user has to do to play, with the ideal obviously being only input for the game itself.