Chapter 10. Exporting Our Games to the Platforms

Welcome! In this chapter, we are going to move away from making games. I know, I know, I enjoyed myself too and we made some great stuff! But you see, LibGDX is so much more than what we were using it for till this point. In this chapter, we are going to look at the crossplatform features LibGDX has. In fact, this is probably what encouraged you to use LibGDX in the first place. Imagine, writing your game once and then being able to export it to Android, iOS, HTML, Desktop, and others. Well, this is what this chapter is going to be all about. The following are the topics that we will cover in this chapter:

  • Using all the platforms
  • Looking closer – Android
  • Looking closer – iOS
  • Looking closer – HTML

Using all the platforms

Hopefully by now, you are well on your way to being able to make your own games. We have been through all the main areas of LibGDX that you will likely use, and we also showed you other things LibGDX can do that you can take further with you.

But now, you are ready! Ready to take your game to the world. Except, you didn't come here to just make a game for desktop. You came here because you wanted your game to run on Android, iOS, and maybe even a browser version.

Am I correct in thinking that?

Of course I am!

To start off with, we are going to revisit our friendly setup tool that we have used throughout this book. But this time, we are going to have all the boxes ticked for subprojects! That's right, all the boxes! Let's take a look at the following steps:

  1. So, let's launch the setup tool once again. You should be getting quite good at filling in the first part by now.
  2. Make sure your Sub Projects pane looks like this:
    Using all the platforms
  3. Then, untick all the extensions, as we won't be doing anything fancy here.
  4. Finally, click on Generate and import your project into your favorite IDE!

If you want to read more on how to utilize multiple environments, I suggest you to go through the LibGDX wiki for more information. Particularly, visit https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.172.132