A gradle plugin to replace RoboVm for libgdx? - java

I had been using RoboVM on libgdx. I recently updated everything I had been using and had to face the fact that RoboVM is winding down.
To be honest, I was a beginner when I started LibGDX and never needed to pay attention to backend stuff. I got started with couple youtube tutorials and was I fine until recently.
For that reason I am trying to understand what is going on, and looking for a way around. I had come across with BugVM and the list on the following link: http://www.badlogicgames.com/wordpress/?p=3925
However BugVM is not decently documented yet, and I am having trouble understanding how to use any items on the list given in the link.
Could you briefly explain how do I integrate any item on the given list, or could you just push me in the right direction so that I could start learning by myself? Or could you suggest me a simple RoboVM like plugin which would work on IOS, Android and Desktop as RoboVM did? My intention is to create an application that will work on Android, IOS and Desktop (I was simply running DesktopLauncher before to test my code. Now I get "RoboVM has not been licensed for this machine." and looking for a long term solution).
At this point I am completely lost and I am eager to learn. I just need some guidance as I am trying to learn it all completely by myself for now. Any help/suggestion/explanation is very much appreciated, and I am pretty sure your response will be useful to other beginners in the future as well.

First of all the so called solution in your link have been changed since then:
http://www.badlogicgames.com/wordpress/?p=3934
I recommend download the latest gdx-setup.jar for libGDX 1.9.3 or later:
https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle
Create a new libGDX project with ios and ios-moe subprojects enabled and then look how those 2 ios backend are implemented.
After that eihter copy your old project code into a fresh setup libgdx project or rebuild the basic setup within you old code.

Related

Admob Ads with Python Subset For Android (PGS4A)

I'd like to have advertisements in an android App I've written and built using PGS4A. I've done my research and all, but there doesn't seem to be any online resources that explains how to do that just yet. I haven't much knowledge on Java either, which is clearly why I've written that in Python. Has anyone found a way to achieve that? If not, how difficult would it be to convert the project files into an Android Studio (or even an Eclipse) project? (so then one can just implement the ads following the Java Admob documentation found everywhere)
Thank you in advance.
To access Java already implemented version you can use pyjnius. I tried to use it for something else and I didn't succeed. Well, I yielded pretty quickly because it wasn't necessary for my project.
Otherwise, I am afraid, you will have to implement it yourself from scratch.
I never heard about a finished solution for your problem.
If you succeeded to use PGU, it wouldn't be so hard.
If not, well, I wish you luck, and put your solution online for others.
There is an Eclipse plug-in for Python. I think that Android studio does not support PGS4A. Never needed it. Console is the queen.

Using android palette class in desktop java application

Android developers have created a great class to isolate colors from an image
https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v7/palette/src/android/support/v7/graphics/Palette.java
However I could really use this in a desktop application. I tried ripping the class from the library (as recommended to me , during a Devox java conference by one of the android devs) but he probably didn't realize I would have to drag half of the android library with me then eg: Bitmap, Color
Does anyone know of a tool that might be able to strip the classes I need retroactivly from the library, or give me a better way to solve my original problem, a java class that will give me the dominant colors of an image together with their inverse and adjoining colors ? I can't write it from scratch cause we just don't have the budget/time to do that :(
I stumbled upon your question and I also found this lightweight library on github that is a port of one of the javascript libraries that Chris Banes references in the blog post mentioned above.
It's pretty good at extracting the primary color for images quickly. I would still love it if someone had a way to extract something like what android calls the "vibrant" color. Ideally I would love a way to mimic exactly what happens in the android library so i could have a seamless experience between my android, desktop, and ios experiences. I still haven't found that one yet.
Another Java port - https://github.com/trickl/palette. I wrote this one myself (I was unaware of the existence of other ports at the time). It's a pretty direct port and includes a bunch of the original tests.
There is this Palette ported library. You can use it in your Gradle based java project by adding jcenter() to your repositories and the next dependency into your build.gradle file.
dependencies {
...
compile "com.loyalsound:iris:1.1"
}

Do you know if it's possible to compile a libgdx in Android (in an Android phone) without compiling it in native JAVA?

I'm trying to begin programming with libgdx (in Windows XP with Eclipse for JAVA - Android) but, as every begining, nothing is clear and every doubt is a big problem.
I have found some tutorials about how to begin to programming with libgdx, but every tutorial found says the same: you must create a PC project for compile the native JAVA code and then create another project for Android who needs the PC project.
It's possible to do it in a easier way (all in only one Android project)? If it's possible, how? It would be really slower? I run my Android projects in my device (a Motorola G) and it seems pretty fast.
All (kind) responses will be appreciated. Thank you.
Are you using the project generator? http://code.google.com/p/libgdx/wiki/ProjectSetupNew
You could use that and simply ignore the non-android projects it creates ,even delete the other ones you don't plan to use (not the main java one though) and run it via an android emulator/device.
You will probably still have to keep the main java project, libgdx is geared towards people that want to compile to multiple devices.
It's been over year since i've used libgdx and i don't recall this being one of the issues i had with it.
The easiest way I find is to actually just put a main method class in your libgdx project. I have a wrapper project for android that invokes my libgdx project but if you look at the example in superjumper source in github you can see they just put a main method class within their libgdx project.
The android project then just delegates to this project.
Consider though, if you do run it directly from a project, you'll need to code in keyboard cursor keys which is pretty easy, you can follow the superjumper example here line 138.

Using OpenGl wrappers for java in xcode

I've been using opengl with c++ for quite some time now, and I'm hoping to expand to the android/mac-app market by learning to use opengl with java. I'd like to be able to do this in xcode because it packages the app so neatly, but I'm mostly new to xcode and it's quite foreign to me. I've been trying to figure out how to get it to work with jogl, to no success - and I have no idea where to go! The internet is completely void of help.
Does anyone have thoughts or suggestions?
Xcode is very painful for developing java. I would discourage it. There are plenty of very decent java editors that offer the same sort of debugging and packaging. Xcode will not allow you to build for Android without serious modifications and hacks.
Xcode is very good for developing Objective-C which is what you should focus on if you are planning on developing for iOS/Mac.
Apple has a lot of tutorials on using OpenGL (ES) but they are all based on Obj-C.
I would suggest finding a good IDE for Java such as Eclipse. Downloading the Android SDK will get you a version of Eclipse specifically for developing for Android. Then following a java tutorial such as:
http://www.land-of-kain.de/docs/jogl/
Google also offers tutorials on OpenGL ES for Android with their api:
http://developer.android.com/guide/topics/graphics/opengl.html
In summary, my experience in trying to get Xcode to play nice with Java will result in frustration. Learning eclipse is very valuable as it is actually quite a ubiquitous editor.

Developing Android outside of the SDK

It seems as if every Android application I really want to make is impossible to make with the current SDK. It doesn't give me access to certain things I would like to work with. This is an example of one of these things.
I know it is possible since I've seen apps in the market that do things that the SDK cannot do. My basic question is can someone point me in the direction of how to create such an application. I've searched around, but all of the links I've found are for developing with the SDK. A simple link to a tutorial that can show me how to access Android elements that aren't available through the SDK would be great.
Thanks.
You will not find a tutorial on it because the NDK is in flux..
What I have found is ..
One of the Eclipse CDT has blog posts on how to setup NDK projects in Eclipse.
The people who know Android Embedded C and frameworks are usually on certain IRc channel.
Plenty of code documentation..
Google search for android jni wrapper blog posts.
But keep this in mind several areas require state management as hey interact with hardware buffers in a certain way..ie audio..video..etc.

Categories

Resources