-
Notifications
You must be signed in to change notification settings - Fork 42
IntelliJ
Once you have generated your mini2Dx project you're ready to import it into IntelliJ.
You need to install the following for mini2Dx development.
- Java Development Kit 7
- Android SDK (If developing for Android)
-
IntelliJ 14+
- Note: If you are on Mac OS X, you also need to install Apple Java Development Kit 6 due to an unresolved bug in IntelliJ
If developing for iOS, you'll also need the following.
- Mac OS X (iOS Development is only possible on Mac)
- The latest XCode installed (available for free on the Mac App Store)
- RoboVM for IntelliJ
- Go to
Import Project - Navigate to your project folder and select the build.gradle file
- Hit OK. In the next dialog, leave all settings as they are and hit OK again.
- Intellij IDEA will now import your project. This can take a while on the first time.
If you run into problems with missing artifacts, you need to delete your .m2 folder in the appropriate location:
- Windows: C:\Users\username.m2
- Mac OS X: /Users/username/.m2
- Linux: /home/username/.m2
If you encounter a Unsupported major.minor version error, you have an incorrect version of Java installed. Please ensure you have Java 7 installed.
If you run into "Error:org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation" check project structure ( Ctrl + Alt + Shift + S ) and add your java JDK to the Project SDK.
Desktop
- Run -> Edit Configurations...
- Click the plus (+) button and select Application.
- Set the name to Desktop.
- Set the field
Use classpath of moduleto desktop - Click on the button of the Main class field and select the DesktopLauncher class
- Set the Working directory to your android/assets/ (or your_project_path/core/assets/ folder if not developing for Android)
- Click Apply and then OK.
You have now created a run configuration for your desktop project. You can now select the configuration and run it.
Android
- A configuration for the Android project should be automatically created on project import. As such, you only have to select the configuration and run it!
iOS
- Run -> Edit Configurations...
- Click the plus (+) button and select Gradle.
- Set the Name to iOS
- Set the Gradle Project to ios
- Set the Tasks to launchIPhoneSimulator (alternatives are launchIPadSimulator and launchIOSDevicefor provisioned devices).
- Click Apply and then OK.
- You have now created a run configuration for your iOS project. You can now select the configuration and run it. The first run will take a bit longer as RoboVM has to compile the entire JDK for iOS. Subsequent runs will compile considerably faster.
It's best to release your project from the command line.
Getting Started
Graphics
Gameplay
Data
- Asset Management
- Saving and loading player data
- Converting objects to/from JSON
- Converting objects to/from XML
User Interfaces / HUDs
Structuring your code
Releasing your game