Setting up your project

Sal Olivares edited this page Nov 19, 2015 · 13 revisions

Prerequisites

Note: mini2Dx will be sticking with Java 7 until Android fully supports Java 8.

mini2Dx Project Generator

mini2Dx uses Gradle as its build system. However, setting up a gradle project from scratch can be tricky. So mini2Dx uses a modified version of the LibGDX project generator to generate a basic project template for you.

First, download the project generator for your platform.

Unzip the tool and run the app. The following window will appear.

mini2Dx Project Generator

Name              <- The name of your game, e.g. 'Space Invaders'
Game Identifier   <- A unique identifier for your game. This is used by mini2Dx when publishing your game
                    (to the App Stores, Steam, etc.) and for determining where player data is stored. 
                    This is usually a reverse domain name; e.g. com.taito.spaceinvaders
Package           <- The Java package your game classes will be coded in, e.g. com.taito.spaceinvaders
Game Class        <- The name of your mini2Dx game class, e.g. SpaceInvadersGame
Destination       <- The folder to generate your project in
Android SDK       <- If making an Android game, this should be the path to your Android SDK folder
Sub-projects      <- Which platforms you want to deploy your game to
LibGDX Extensions <- The LibGDX extensions you would like to use

Warning: If you want to add platforms later, you'll have to do it manually

Fill out the form and click 'Generate' to generate your project. You are now ready to import the project into your IDE.

Project Layout

The project layout is the same as a LibGDX project.

settings.gradle            <- modules definitions
build.gradle               <- main Gradle build file, defines dependencies and plugins
gradlew                    <- script that will run Gradle on Unix systems
gradlew.bat                <- script that will run Gradle on Windows
gradle                     <- local gradle wrapper
local.properties           <- Intellij only file, defines android sdk location

core/
    build.gradle           <- Gradle build file for core project
    src/main/java          <- Source folder for all your game's code
    assets/                <- contains for your graphics, audio, etc.  Shared with other projects.

desktop/
    build.gradle           <- Gradle build file for desktop project
    src/                   <- Source folder for your desktop project, contains Desktop launcher class

android/
    build.gradle           <- Gradle build file for android project
    AndroidManifest.xml    <- Android specific config
    res/                   <- contains icons for your app and other resources
    src/                   <- Source folder for your Android project, contains Android launcher class

ios/
    build.gradle           <- Gradle build file for the ios project
    src/                   <- Source folder for your iOS project, contains iOS launcher class
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.