Prototype Initial Launch


What went right in the development?

The UI transitions were easy just by using .SetActive(true) or .SetActive(false) based on where you're headed.

The formula to calculate the results was relatively easy.

The female and male buttons were easy. It controls the slider. You can also select female or male with the slider itself, or click the female/male button.

What went wrong?

A lot.

The app and the only calculator took a day to complete. Not a 3-hour day, 4-hour day, or even 10-hour day. I've spent nearly 16 hours on this very simple calculator. I blame Google. I know a lot of c-sharp coding, but there was one main thing that was very hard to figure out and Google didn't provide many answers.

DateTime. This was not an easy concept to learn. Getting the current date and putting the user's date of birth into a DateTime to use for a calculation was hard to figure out.

I decided to use date of birth instead of simply asking user for their "age" because it apparently is more accurate to use 41.27 years of age, instead of 41 years, for example. I had to figure out the calculation also, which was a little easier once I understood how to use .TotalDays.

I also had to figure out how to parse from string to float, which I've learned in the past, but had forgotten how. I thought (float)myString would work, apparently it threw an exception.

I'm still trying to figure out validation. If you miss a field or don't select your date of birth, an exception is thrown and the form is not submitted. I tried displaying a message, but the form has to bypass the exception somehow. It won't submit in order to throw the message if something is missing. I'll figure it out. Any ideas? Leave a comment!

However, it appears to work and is accurate. Please test out the calculator and compare with a BMR calculator you can find online. It may be off by a few kcals because I use exact age rather than a whole number. Hopefully my calculator is the only "exact" one out there lol - I doubt it though!

Leave a comment

Log in with itch.io to leave a comment.