Installation

Raco edited this page Apr 3, 2018 · 27 revisions

5 minute video that demonstrates the process.

For those who like to read:

In order to make use of BDX to create 3D games and applications, you'll need to pick up some prerequisites, and install them:

Prerequisites

Blender - Blender is the 3D modeler, animator, and content creation application that the BDX add-on runs "in", so to speak. Grab the latest version for your operating system and install it where you so desire. If you use a version older than 2.72, it might not work, so be aware of the version number before you use BDX.

JDK - The JDK, or Java Development Kit, is what's used to compile and run your application. On the linked download page, the left-hand button is to the JDK, while the right-hand button installs both the JDK and the NetBeans IDE. If you plan on using NetBeans as the IDE in which you create your Java code, then you might want to grab the NetBeans IDE version of the download. Of course, you can install it later if you change your mind (be sure to get the right JDK for your platform - x86 is for 32-bit systems; x64 is for 64-bit).

To confirm that the JDK has been properly installed and is working correctly, open a terminal (or command prompt, if on Windows) and type javac --version. You should get back the version of the java compiler. Anything else (like an error message) means that your system can't find the JDK. Ensure that the JDK is in your path environment variable.

For Linux, you may make use of alternative means to more easily install and setup the JDK, such as installing OpenJDK using your package manager / software center, or using the WebUpd8 PPA for Debian-based distributions.

Android Development

Note that JDK8 doesn't appear to be compatible with Android development at the moment, so if you want to deploy on Android, you might need to go with an earlier version (like JDK7) (and the WebUpd8 PPA for Ubuntu users).

In order to use Gdx.input for Android devices (Vibrator, Accelerometer, Gyroscope and Compass) see tutorial on Mobile Sensors.

Alternative JDKs

Note that different JDKs can function in slightly different ways, which might mean slightly different, unusual behavior in very rare edge cases. In other words, if something doesn't seem to be working right fundamentally, try a different version, or a different JDK.

BDX Download and Installation

BDX is packaged as a Blender add-on, which can be installed as any other Blender add-on. Download the bdx.zip file (that's the add-on) from the latest release, and then:

  1. Start Blender.

  2. Open the User Preferences dialog from the File menu.

  3. Select the "Install from file..." option from the bottom of the dialog.

  4. Navigate to the bdx.zip file you downloaded, and select it.

  5. After this, click on the "Testing" section of the "Supported Level" heading on the left. You should see the add-on if you scroll down to the "Import-Export" section; you can also just search for it using the search field at the top-left.

  6. Click the check-box to enable the add-on, and you're done! If installed correctly, you should be able to see the BDX add-on on the Render tab of the Properties panel (where you set the rendering resolution and shading and stuff). It will have its own section named - unbelievably - BDX.

You might also want to click "Save User Settings" at the bottom-left if you don't want to do this every time you open Blender (you probably don't).

Updating BDX

Should a new BDX release come out, follow the procedure outlined on the home page of this Wiki.

BDX Project Creation

At this point, you should be able to see the BDX panel in the Render Properties. You use that panel to create a new BDX project, by providing the required information:

  1. Project Name. This is the name of the project that you're going to create.

  2. Java Package. This will be the package, or namespace, of the project that you'll be creating. The naming convention for package names is as follows:

    You form a unique package name by first having (or belonging to an organization that has) an Internet domain name, such as sun.com. You then reverse this name, component by component, to obtain, in this example, com.sun, and use this as a prefix for your package names, using a convention developed within your organization to further administer package names.

    But that is, of course, just a convention - it's not like you won't be able to create a game if you don't have a website yet. However, it's worth noting that this package name is important to remember as it is what the source files of your game will need to belong to. So, for example, in your Sacky.java file, you'll have "package com.your_user_name.game_name" at the top. Instead of "com.your_user_name.game_name", though, it'll be the Java Package.

  3. Base Path. This is the path to your BDX projects folder. Basically, this is the folder in which your project folder will be created. So, if you want to have, say, "C:/My Projects/BDX Test Game", then the Base Path should be "C:/My Projects/". You can type this out, or click the Folder icon to browse to the folder. If you do choose the folder icon to select the path, note that while it shouldn't be necessary, you probably want to disable relative paths (on the left-hand side of the folder selection dialog).

  4. Directory. This is the directory that will house everything to do with your BDX project. In the above example, if you wanted "C:/My Projects/BDX Test Game" to be where your test game is stored, then the Directory should be "BDX Test Game". And so, you can see the overall path consists of Base Path + Directory.

  5. Android SDK. This should point to the Android SDK folder if you want to try out Android development. Note that you can't currently alter any of these values after creating your project, so be aware of that. If you don't want to do any Android development, you can omit this field.

  6. Create BDX Project. After filling out the properties as desired and clicking the "Create BDX Project" button, BDX will do a few things. It will create the folders for the project, and will also download and install dependencies for actually creating and running the project (Gradle and LibGDX, for instance). This process will take awhile as there is quite a bit to download, so be aware of that. This process, though, is only for the initial run of the dependency download and project launching. It shouldn't take nearly as long for subsequent project creations and subsequent launches of BDX. If you want to see the progress of the dependency download, you can watch the command prompt as Blender will print out the progress of the downloading process. To show the command prompt:

For Windows: Select "Toggle System Console" from the Window menu at the top of Blender's window. For Linux / Mac: Start Blender (or .blender from within the Blender.app "file", for Mac, if I recall) from a command prompt.

When the whole process is finished, you'll have a new project folder, named as you specified. In Blender, you should see a basic test scene with a white rectangle character on a square "garden" of blocks. The BDX add-on will now only display an "Export and Run" button. Pressing that (or the P key, by default) will export, compile, and run the game. If everything works, then you should see the same scene running in-game in a new window. Congratulations! From here, you would do well to check out the General Overview, if you haven't already, to get some more information.

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.