A Technical Deep Dive Into Step Tracking

A technical deep dive into how we collect steps on Android and iOS.
Everything in Stepcraft is fueled by steps. You need steps to level up, to craft, to explore, to fight, and to do everything else. We've been exploring the technical ways to track steps that both feel smooth and are as accurate as possible. In this blog post, we'll share a bit of the technical details behind how we've implemented step tracking on Android and iOS.
How We Want Step Tracking to Work
Throughout our exploration of step tracking, we've been keeping a few key goals in mind:
- We want to track steps as accurately as possible.
- We want to show your steps as real-time as possible.
- We want you to be able to use different methods of tracking steps, even at the same time.
Accuracy
We want to make sure that we don't miss any steps that you took. Even if you don't open the game for a while, you should still be able to progress.
Real-time
While you're in the game, we want to show your steps as real-time as possible. This allows you to make decisions based on your steps, and to see your progress as you're making it.
Flexibility
We want you to be able to use different methods of tracking steps, even at the same time. We've already received a lot of feedback from our community, many of you use your smartwatch, ring or other smart devices to track your steps. This is something we want to support. Supporting all the smart devices out there will likely not be part of the Alpha launch, but it's definitely on the roadmap after that.
The Technical Approach
To achieve our goals of tracking steps accurately, in real-time, and from different sources, we now use a hybrid step tracking approach on both Android and iOS:
- When you open the app, we fetch the latest recorded step count from the phone. For Android, we use the Fitness Recording API. For iOS, we get this information from Core Motion. In practice, we've found this information is at most a few minutes old.
- While the app is open, we track the steps you're taking in real-time based on your phone's motion. For Android, we use the hardware sensors on the phone, which allows us to show every step as it happens. For iOS, we use Core Motion, which gives us updates every few steps.
This combination allows us to award you steps immediately as you open the game, and then continue to track your steps as you're in the game.
What's Next
We are still in the early phases of testing this approach. So far, we have spent a good few thousand steps testing and verifying, and are quite happy with the results. Our hybrid approach gives us the best of both worlds: immediate step credit when you open the game, and real-time tracking while you're playing.
Bringing support for smart devices is an important milestone for us. We think that with the current setup, we can swap out the source of recorded step count information without having to make any major changes to the game. For Android we are planning to switch to Health Connect, and for iOS we are planning to get this data from HealthKit. That said, introducing this support will likely not be part of the Alpha launch.
If after reading this you have any questions or thoughts, or if you're just excited to try out the game, we would love for you to join our Discord. If you want to be among the first to try out the Alpha version, head to our Patreon!
Ready to turn your walks into adventures? Sign up for Stepcraft's Closed Alpha today and transform your daily movement into epic fantasy quests. Your character is waiting, and the world is ready to be explored.