initials logo
previous: Design

Project Setup

Finally, setting up the project! Let's get coding.


Because I'm making this game to learn and experiment, not to make money, I'm doing it publicly. The Github repository for my project is here. Feel free to pick it up and build or inspect it if you'd like.

Empty Project Setup

  1. Clone the empty github repository into a new directory
  2. Set up .gitignore file to avoid checking in compiled files and other miscellany
  3. Create new empty project in Unity [File > New Project...]

Creating Menu Screen

The first thing I needed was a scene for a main menu. I emulated the technique used in the Space Shooter tutorial for creating my background and buttons, but this was an awkward way to create a menu screen. Instead, I believe that the best way to create a pure menu screen is by using the GUI scripting API. This lets you locate things more directly and intuitively by referencing pixels on the actual screen rather than positioning objects in the world where the game will take place.

Building for iOS

    screenshot of build settings dialog
  1. File > Build Settings...
  2. Select the iOS platform, then hit "switch platform"
  3. "Add Current" scene with button below list at top of the dialog
  4. Hit "Player Settings..." and note the controls which appear in the inspector panel. These will let you select icons and splash screens for all platforms and devices
  5. Expand "Other Settings" and set the bundle identifier to something unique:
    screenshot of where to set bundle identifier
  6. Select "Build" in build settings dialog
  7. Build into a directory which is listed in the .gitignore folder
  8. Open up the project in XCode, build it, deploy to mobile device (in my case, iPod touch 3rd generation)

Icons and Splash Screens

The current state of affairs is that we must make App Icons and splash screens in a host of different sizes. I used this handy template to make it easier to export an icon in all the sizes I need; but actually only wound up using the largest one and dragging it to all of the different sizes in the inspector panel.

screenshot indicating where to drag textures to icons

You can see here that the icon is a little odd, a planet. I was originally planning on using a theme of "golf in space," and calling the game "space golf" or something similar; but a quick web search revealed that, unsurprisingly, "space golf" already exists and may well be trademarked. It's not that hard to think of a distinct name and theme, so I abandoned space as a setting and promised to revisit it once I had the mechanics working well.

Setup Complete

After doing these basic steps, I had a project which compiled, showed a menu screen, had an icon, and no real warnings in either the Unity editor or XCode. Next it was time to make it do something.

previous: Design