Starting a New Game

Once you feel confident with the Untold Engine API, then you are ready to start developing your own game. You can use the repo you downloaded from our github page and start developing your game. You can also start from a clean Xcode project and develop your game there. However, you will have to integrate the engine by following the steps below.

Integrate the Untold Engine with your Xcode project

  1. Create an xcode project- Cross-Platform Game

  2. Select Objective-C and Metal

  3. After the project has been created, go to Build Phases->Link Binary with Libraries and include the framework: GameControler.framework.

  4. Copy the code in AppDelegates and GameviewController from the engine demo into your AppDelegates and GameviewController files.

  5. Delete the Shared folder that came with the default project you created.

For the next three steps, you are going to copy three folders that come with the Untold Engine Demo.

  1. Copy the UntoldEngine4D folder into your project folder. Then drag the folder into xcode (MAKE SURE TO ADD BOTH iOS/MACOS Targets)

  2. Copy the Game folder into your project folder. Then drag the folder into xcode(MAKE SURE TO ADD BOTH iOS/MACOS Targets)

  3. Copy Resources folder folder into your project folder. Then drag the folder into xcode(MAKE SURE TO ADD BOTH iOS/MACOS Targets)

Under Build Settings.

  1. Make sure Mismatched Return Type is set as a Warning only and not as an Error. 10. Objective-C Automatic Reference Counting is set to NO.

  2. Copy the code in main.m in the Untold Engine Demo into your main.m. The code will essentially set the correct working directory for the Resource folder.

  3. Rename extension of the AppDelegates.m and GameViewController.m to AppDelegates.mm and GameViewController.mm

  4. Make sure to add the #import "GameViewController.h" in the AppDeleage.mm file

Under Build Phases (for mac):

  1. Search for "imgui"

  2. In the compile sources, you should get a list of all files referencing imgui. Look for these two files: imgui_impl_metal.mm and imgui_impl_osx.mm.

  3. Set their compiler flag to the following: -fobjc-arc

If you are building for iOS, you must exclude several files from the ios Build. Go to the Build Settings in your project. Do a search for "Excluded Source File Names". And exclude the following files: U4DEditorPass.m, U4DEditorPass.h and /Imgui/

Note: In case you are having problem with the engine loading resources, then you may have to change your default working directory.

Simply click on the Active Scheme of your project, then click on Edit Scheme, then Click on Options. Under the Working Directory text field, type the following: $(PROJECT_DIR)/Resources

Finally, click Build and Run. You should see 3D characters showing up on the screen. From this point on, you can modify the files in the Game Folder.

Last updated