DEV Blog: Fast Prototyping courtesy of the Unity Asset Store

a wheel
The humble wheel

Ah, the humble wheel. Look at it, in all it’s wheel-y glory. It’s quite a thing of beauty. Someone a very long time ago made it, in a flawless fashion, and it hasn’t been reinvented since.

Speaking of, I have another prototype I’m developing. It’s quite straightforward in it’s nature: download it on your phone, and exercise to walk a virtual pet. Simple. For now, I’ve named it Dog Walker. So you’ll understand that I have made absolutely nothing special for this, and relied almost exclusively on existing unity assets and packages to make a prototype as quickly and painlessly as possible.

I’ve done this for a multitude of reasons, but it resulted from thinking about what I wanted to create, what I needed to do to get there.

What do I want to create?

As stated above, a little phone app that motivates you to exercise via a virtual pet is the goal. That’s not too revolutionary. I’ve done something of the sort before, with Pokemon and various other mediums (see my Fitbit, iPhone, and web apps). This time I wanted to familiarise myself with Unity, and distance myself from piggybacking on my love of catchable pocket monsters.

I’ve thought about the features and created a prioritisation chart à la the MoSCoW method. The MoSCoW has helped me sort out what this app has to do in order to function, and other things that would just enhance that experience. Ultimately, anything outside the essential can be worked on later.

Dog Walker must

  • Be deploy-able to both iOS and Andriod mobile devices
  • Use the device’s built-in functions to access a user’s steps
  • Use the steps to walk virtual pets
  • Be able to be played without an internet connection
  • Be able to track a walk even with the app off

Dog Walker could

  • Have multiple dogs for the user to unlock and walk
  • Have a levelling system to see how much a dog has been walked
  • Have an energy system to stop the dog from being constantly walked
  • Have an affection system to show the dogs friendship level with the user

Dog Walker should

  • Be able to gather steps from other user devices (for example fitbit devices or garmin devices)

Dog Walker won’t (at this time)

  • Have any online capabilities
  • Allow step races – where the user competes with either AI or other users for the most steps within a certain amount of time

What do I need to achieve this?

Now, looking at what I’ve defined above, this doesn’t seem like a difficult thing to implement (though I may be getting ahead of myself). What I mean is that there isn’t a need for collision detection, no perfectly timed button inputs, and no player/enemy/boss logic. A lot of normal game logic doesn’t apply here.

All that has to be done, is to take a users steps, and then do something with those steps. Yes, it’s going to need to work on multiple devices. Yes, it’s going to have to persist data even when it’s off, but at the core it’s just about the steps.

So, to build a functioning prototype that actually gets a users steps is probably going to be the hardest part. It’s going to require some code native to deployment devices (to actually return real values). For now, I can create a prototype that works in every other aspect, and then just plug in the relevant code when the time comes. To do this, I’ve relied on two separate items from the asset store: DoozyUI and EasySave.

Doozy UI
DoozyUI for Unity

Easy Save
Easy Save for Unity

DoozyUI is a UI management system, which helped with transitioning to and from each Canvas with relative ease.

EasySave allowed for easy serialization of object classes to allow for the necessary data persistence.

Overall both were fairly easy to use, and with the Black Friday sales on the marketplace, it was a no brainer. I probably could have spent some time researching and implementing my own UI and save management systems, but I’m sure these assets do it better.

It’s a question I always revisit when trying to develop: Is it worthwhile investing in an existing asset for what I am trying to achieve? In this case, the existing assets won over.

Combining these two assets resulted in a pretty rapid prototype. I did have to mess around with a few things, but since the saving and canvas transitioning is pretty basic (thanks in no small party to EasySave and DoozyUI), there was minimal fuss.

Selecting a dog in Dog Walker

Walking a dog in Dog Walker

The above gifs show two particular workflows from the app, with little Pokemon dogs in lieu of actual assets.

The first one shows the how to select your “main dog” (i.e. the one to walk). From the main screen, the little dog icon will take you to the dog selection screen. From there, you can swipe across dogs and select one to walk. This will update the main screen with that dog, which you can return to via the back button.

The second one is the walk workflow. The current step calculation is just a constant number, but this shows the walk confirmation, walk in progress, and walk complete screens. If you were to shut down the app on the walk in progress screen, loading it back up with send you back there (with time labels updating correctly). It also incorporates the energy, level, and friendship elements from the “Should have” of my MoSCoW list.

Honestly, the time it has taken to create this blog post is probably on par with the prototyping time. The use of DoozyUI and EasySave has sped up the process and incredible amount, which now lets me focus on some other parts of the app that need their due diligence. Now UI Design and Step implementation can be tackled with minimal interference!

Until then!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s