OpenELEC Forum
Game programming for Android - Printable Version

+- OpenELEC Forum (https://forum.openelec.tv)
+-- Forum: Generic Forum (https://forum.openelec.tv/forumdisplay.php?fid=5)
+--- Forum: MISCELLANEOUS (https://forum.openelec.tv/forumdisplay.php?fid=23)
+--- Thread: Game programming for Android (/showthread.php?tid=93235)



Game programming for Android - lorahorton - 09-06-2019

Okay, now that we have installed Android Studio let's go to the following, emissions projects. You will find it on their official website, libgdx.badlogicgames.com. Please go to the download section. And with that you download the generator guide and project. Why a generator project? libgdx is a multi-platform library, and there are versions for many platforms:

desktop, Android, in our case, and even iOS. But it is a complex platform with lots of bookstores. So there are two options: either we set this to hand or let a program do it for us. I don't think you want to do this manually because if you do it often gets boring. The Libgdx Wizard creates a template that you include in your project data, where you want to export, and it is the project you created.

From the template that is, so it's just a problem and start working. Moreover, it uses libgdx Gradle inside it's a new system that is quite recently used in the world of Android and the world of Java, because it makes it a lot easier to compile everything. , ie, when you import a project in the IDE, the IDE does not resolve compiling Android applications. Who knows the compilation is Gradle, and this project will create

It has some scripts that run with Gradle, which don't need to be installed but you can download it if you want. The script deals with compilation. The IDE used all it called Gradle and said 'hey, compile desktop applications, Android ...'. This is convenient because, Returning to the previous movie stream, if you don't want to use Android Studio and want to use an IDE like Eclipse or NetBeans, which is supported,

If you install Gradle as a plugin you can use your favorite IDE instead of another installation. In any case and open libgdx playback projects and It asked me questions so the best I could do was to respond. Here I tell the project name and I will call 'Don't Die Die' and this is the name used for packaging for the project, for the question game ... Under the package, which will be the top

Each Java code and contains the code. I use com.jumpdontdie. Android jumpdontdie but will only need two words for less so I put a com front. Here I see how I want the main class of the game, we will see how it is called. In my case, I would call MainGame. And here the destination must specify where you want to create. In my case, I will create it on the desktop in a folder named JDD.

Finally, here it is putting the Android SDK. Remember when in the video above I told you that anotáseis that directory. I hope you have scored. Must be placed here, if it is not. It is possible, especially in Windows, that the installation program has been done for you. This has been determined by an environment variable that sometimes creates Android SDK, sometimes not. But if you have not checked,

Search the path where the Android SDK is installed. If you need help, click Browse and go. Below libgdx version you are using. In this case 1.6.5. It leaves no use versions older than it so it's irrelevant. Finally in the subproject I say what the subproject will create. In my case, I will deselect both HTML and iOS, but I will not deselect. Because although the purpose is to make a game for Android,

While the game will try to not emulate desktop or mobile plug. For extensions, this is an external library that is not part of libgdx but can be used in the same project. The more you mark the more libraries that can be used, you can then be added manually if you have forgotten some. I will personally leave FreeType active and Box2D because we will use it later.

If you want to make one, placing the mouse over it will tell you what it does. At this point as long as I am going to teach something simple, I will not make hassles with external libraries. Here are the third parties, which are unofficial in case you want to use more. Finally, when everything is to your liking you give the Generate button. You can send you this notice. This is because the libgdx installation wizard is designed for a more recent version

Stock Android SDK. In the beginning you don't have to lose anything wrong so I give there for everything. This will take a little while, depending on what needs to be downloaded and stored, it will take more or less. All you can do here is keep waiting, just as you expect to reduce Android SDK. In my case as I had everything in the cache would not make me expect anything, but sometimes it makes wait 2 to 3 minutes, which is impressive.

street view