Inspiration

I thought "To the Moon and Hacks" was a really good name, and so I wanted to think of a space related idea as well. I had previously seen videos like this one but I thought an interactive 3d version would be really cool.

Controls I used in the Video:

  • Pinch/Pull to zoom in/out
  • Tap on left side to go to next planet left
  • Tap on right side to go to next planet right

What it does

ScaleOfTheUniverse models celestial bodies with to-scale sizes (although distances are minimized for viewing feasibility). Tap on the left and right sides of the screen to switch between bodies, and pinch to zoom. The app also shows basic information about each body on the left-hand side (radius, mass, distance, etc.).

Please note that the order of the objects are not accurate, and are displayed from largest (left) to smallest (right) to assist in understanding of scale.

How I built it

I used Xcode and Swift to develop my app, and used the SceneKit AR capabilities to render the models.

Challenges I ran into

Xcode is a big program. It took me 4 hours just to download the thing, because I didn't have space on my drive to just get it from the App Store. I had to get the .xip file from the Apple website, and then I still didn't have enough space to open the xip file. I eventually had to expand the file on an external drive and the transfer it back on to my computer. What a hassle!!

Oh boy. I'm not gonna say I don't like Swift, but I don't like Swift. I have barely any experience using the language (same goes for Xcode), and my experience has not been a good one. I ran into countless issues with the different types, mutability, scope, and structure that confounded me a ridiculous amount. I got very frustrated when my arrays were in different orders each run of the app. Somehow I managed to work through all of this.

Accomplishments that I'm proud of

In every hackathon I've done, I get to that one point of the project where I feel like nothing is working and it's not worth it to keep trying. For some reason, that point in this hackathon hit me harder than usual, and I almost quit. However, I gathered my mental fortitude and kept working through my problems, and I'm actually really proud of how it turned out.

What I learned

Basically all of Swift. (No, just kidding). I learned a lot about SceneKit and how it renders nodes, and how to move things around in 3d space. I ran into so many issues that I might say I learned the most at this hackathon compared to others, seeing as prior to this weekend, I knew very little (if anything) about Swift and Xcode

What's next for ScaleOfTheUniverse

I had big plans for this project in my head, but I feel like I never really got there. If anything, I plan to add more bodies, and to add some really large (and small) ones so the user can experience the overwhelming size of the universe. I would also like to add more information about each body, but this ends up being very tedious, though it shouldn't be too hard (and I'm lazy).

Built With

Share this project:

Updates