Inspiration
I LOVE collecting souvenirs when I travel. They serve as a charming reminder of the time I had while I was away. They are an extension of my memories. Mugs are my souvenir of choice, but I get equally excited about buying t-shirts and hats as well. The only issue (as my cabinets can attest to) is that collecting these objects can take up a lot of space. On my last few trips, I’ve had to forego buying a new mug simply because I knew I didn’t have a place to store it once I arrived home. I wanted to create a way to collect new souvenirs that not only saved me space but also allowed me to share my journey with friends and family.
What it does
Ultimate Tourist tracks the city that you are currently in and creates a souvenir hat for that location. As you visit new places, you’ll add new hats to the collection as well as be able to view and wear hats from previous destinations. It also allows you to send a digital postcard with the name of your location, as well as check out stats of all the places you’ve been.
As a bonus, certain cities within each of the 50 states as well as over 10 countries are designed with colors based on the state/country flag (or team).
How I built it
Persistent Storage and Dynamic text were crucial in getting this lens to work. I utilized the dynamic text that grabs the city of the user. I was then able to apply that to a text texture on the material of the hat. Using persistent storage, I could track and store the current city as well as pull up all of the previous cities visited. This allowed me to dynamically add hats (and some instances their colors) to the collection for users to choose from as they visit new cities. Each previous city enables a button with a small version of the hat that lets users easily swap between them. When a button is pressed, it updates the hat that the user is wearing with a different city and color scheme. The main menu allows users to switch between the hat collection, digital postcard, and stats.
Along with that, I also track the time it’s been since someone has visited a certain location. I didn’t want the number of times visited to go up every time the lens was opened, so it checks to see if it's been at least 24 hours since the last visit before registering it as a new one.
Challenges I ran into
Being able to only obtain the city name from the user was a bit of a hindrance. My initial goal was for all of the hats to change color based on the state/country. However, seeing that it is extremely difficult to pinpoint each city in a state, let alone a country, I had to just select a few of the larger or more popular cities within each state. I did the same for a few countries including Mexico, South Africa, India, Italy, and China. Along with that, the same city name can show up in multiple states. Springfield is a great example of that. So, I wasn’t able to find a way to differentiate between cities in different states with the same name. That affects not only the accuracy of the stats but also the hat color depending on the state.
Accomplishments that I’m proud of
I was really proud to get the dynamic hat collection working. Since you bring souvenirs home, I was really adamant about letting the user be able to access hats from previous places whenever they wanted. I also really wanted to be able to see mini previews of the hats. That took some time, but I was so happy I got that working. It looks a lot better than simple button text or numbers.
What I learned
This is the first time using persistent storage for something complex, and I feel like I have a better handle on how to use it. I also learned a little more about working with materials and getting the colors and blend modes right.
What's next for Ultimate Tourist
I want to continue to add additional cities and countries so that more people can access the specific styles for each location. I would also like to add additional types of souvenirs like t-shirts and stickers. And who knows…maybe some mugs. 🙂
Built With
- javascript
- lensstudio

Log in or sign up for Devpost to join the conversation.