Timothy Myotte ―
Designer & Software Engineer
Golf Simulator ―
Desktop/Web
Practice, Play, Perform
with Precision.

Golf Simulator

TLDR: Golf simulation software built for my Pennstate Capstone project. Completed without using external libraries (except SFML for 2D primitives), it includes custom physics and 3D rendering engines built from scratch. Ported to JavaScript, you can check out a live web demo here.

My Role:
Software Engineer (Solo Project)

Stack: c++ SFML Visual Studio Microsoft C++ testing framework

Design tools: Balsamiq draw.io



Project Overview


Mission Statement

In the modern age of golf, numbers and data play a more important role in athletic performance than ever before. Our mission is to create a user-friendly golf simulation software designed for instructors, fitters, and golf enthusiasts. We aim to provide a practical and engaging platform for practicing, receiving instruction, and fine-tuning equipment through simulated shots.



Initial Research

With existing launch monitors and simulation systems in mind I went to research what is already on the market and what each product offered. I researched numerous options available on the market including their costs, specifications and reviews. I then compiled the most relevant information into cards.

*My project only involved the software component, but for academic research purposes I treated it as a full product.

Target Users

My ideal target users fall into three categories:

Serious Golfer

Background:
❖Any gender, 20-50 years old.
❖Has been playing golf for over 10 years and considers it a serious hobby.
❖Enjoys playing on real golf courses but uses the simulator for practice during off-season or when unable to go to a golf course.

Goals:
❖Improve swing mechanics and overall golf skills.
❖Analyze and track performance metrics such as swing speed, ball spin, and accuracy.
❖Experience realistic gameplay to maintain the feel of real golf courses.

Needs:
❖Advanced analytics and data visualization tools.
❖High-fidelity graphics for an immersive experience.
❖Customizable simulation settings to replicate real-world conditions.

Golf Fitter

Background:
❖Any gender, 30-65 years old.
❖Professional golf club fitter with experience in customizing clubs for golfers.
❖Works in a golf retail store or operates an independent fitting service.

Goals:
❖Use the simulator to assess golfers' performance and gather data for club fitting.
❖Customize club specifications, such as shaft length, grip size, and clubhead type, based on the golfer's swing data.
❖Provide a personalized and optimal set of clubs for each individual client.

Needs:
❖Accurate and detailed performance metrics from the simulator.
❖Integration with club fitting software to analyze data and recommend adjustments.
❖Ability to simulate various club configurations and demonstrate their impact on the player's performance.

Golf Coach/Instructor


Background:
❖Any gender, 30-65 years old.
❖Professional golf instructor or coach.
❖Uses the simulator as a training tool for students of various skill levels.

Goals:
❖Analyze and provide feedback on students' swings and techniques.
❖Customize simulation settings for specific training drills.
❖Monitor and track the progress of multiple students.

Needs:
❖Comprehensive analysis tools for in-depth swing analysis.
❖Multiple user profiles to easily switch between students.
❖Integration with teaching curriculum and training programs.

Personas

With the user profiles and interview information I constructed personas and journey maps.

Requirement Specification

With the initial research and personas well defined, we are ready to specify the requirements for the software component of our product.

Simulation Realism and Accuracy:
1. The system shall simulate a golf shot using realistic physics with an accuracy within a five-meter error of an on-course equivalent shot.
2. The system shall include a feedback loop mechanism for continuous improvement of simulation accuracy based on user feedback.

Interactive Environment:
3. The system shall plot the simulation in a three-dimensional, interactive environment with a minimum frame rate of 30 frames per second.
4. Users shall have the ability to record and playback their shots for analysis and improvement.

Equipment and Conditions Customization:
5. The system shall allow users to select common golf equipment.
6. The system shall allow users to customize golf equipment, including club specifications.
7. Users shall be able to customize climate conditions and swing conditions.

Unit Conversion:
8. The system shall convert between common golf units, including yards and meters.

Environmental Interaction:
9. The system shall include a height-mapped environment for the simulation to interact with, with a minimum requirement of a flat plane.

Stability and Performance:
10. The system shall be stable for a minimum of nine hours of continuous usage without freezing or crashing.
11. The simulation calculation time shall never exceed 0.5 seconds.

User Interface:
12. The user interface shall conform to accessibility standards.
13. The system shall provide a comprehensive user manual and installation guide.

Compatibility and Scalability:
14. The system shall be compatible with major operating systems (e.g., Windows, macOS) and support a range of input devices (e.g., controllers, motion sensors).
15. The software shall be scalable to accommodate different environments and user levels.

Security and Privacy:
16. The system shall adhere to industry standards for data security and user privacy, especially concerning user accounts and personal data.

Regulatory Compliance and Localization:
17. The software shall comply with relevant regulations and accessibility standards in the target market.
18. The system shall support localization for different languages and measurement units.

Upgradability and Support:
19. The system shall support easy software updates, incorporating new features and improvements.
20. The software vendor shall provide ongoing support and maintenance with defined response times for issue resolution and updates.

Testing and Documentation:
21. The software development process shall include unit testing, integration testing, and user acceptance testing.
22. Comprehensive documentation, including user manuals and troubleshooting resources, shall be provided.


Ideation

With the requirements well defined, I have an idea of what we need the system and UI to look like. To help flesh out the product, we begin with some basic, high level technical and design ideation. This includes a basic wireframe:

... and a domain model in UML notation:




Development & Testing

Development begins with the creation of a sprint backlog based on requirements.

The log was translated into a KANBAN board on Jira. Development was then conducted in an AGILE cycle of coding, testing and re-assessing to update the board during each sprint.

I began with a proof of concept, building a basic projectile physics engine. Then started incorporating additional factors such as air resistance, wind, altitude, temperature and magnus effect (from spin).

The output was plotted to console and graphed numerous different scenarios using excel to visualize them.


X
Y
Z

Once I had acceptable results with the physics engine, I began working on my custom 3D rendering engine to display the data in-app. I researched and constructed basic perspective projection equations to convert from 3D simulation space (x,y,z) to 2D screen space (x,y) pixels. I used SFML to draw the triangle primitives, lines and text. Due to clipping and back-face culling limitations, in confined the camera to a plane that would give them optimal viewing.

Putting it all together from there was simple. The shot simulation already generates a 3D coordinate for each 10th of a seconds, I merely have to project the coordinates to 2D and connect the dots. The wireframe for the ground is generated by a 3-dimensional nested loop that creates the vertices of our triangle primitives. Then we just re-calculate our rotation/projection and update the frame as needed.


Testing was integrated into the project using Visual Studio's built-in c++ testing suite. During each sprint I would create the relevant unit and acceptance tests to monitor progress. Running the full test suite would insure successful integration of new functions and components.

Finally, the UI was integrated into the window to allow the user full control over the parameters and ability to update them in real time. For the purposes of this project I worked under the assumption that software combined with hardware components to update shot data, however that was beyond the scope of this one semester project. For demonstration purposes I also ported the engine to JavaScript after completion.

Final Product & Reflection

The finished product, while limited in scope due to academic time constraints, was successfully developed and has multiple advantages over other simulators:



Superior Climate Simulation:
Ability to control wind speed, wind direction, temperature, and altitude. Each with a realistic impact on the simulation.

Direct Input:
Input shot data manually to test a shot under different conditions.

Customizable club data:
Edit custom club data including loft, optimal smash factor, spin rating and much more. Allowing the user to account for any type of equipment.


Final Thoughts

I would consider the project to be well planned, managed, and generally successful. Most importantly, all acceptance test for our requirement specifications were passed. However, it wasn't without hiccups along the way and there is always room for improvement. The main difficulty of the project was the time constraint of performing UX design and a software development cycle within one semester, and obviously certain concessions needed to be made to make the timeframe feasible. For example, my highest priority was getting accurate ballflight trajectories and distances; this meant the concession of a fully developed ball-turf interaction to predict rollout more accurately. The 3D engine also lacks advanced clipping and optimization techniques. Overall, I believe that I made the correct concessions to produce the best product I could within the given constraints.