Installing AndEngine

  ... tutorials on how to use AndEngine.

Installing AndEngine

Postby bos » Wed Feb 29, 2012 9:54 pm

Hi all.

I still have no luck installing AndEngine despite all tutorials. The reason is that I have no clue of where the library is anymore, or which to pick.

Original tutorials (and website) says to copy the tree from Google code-pages. Later on the project was moved to Github. Then there's GLES1 and GLES2. Then there's extensions, all residing in a code trunk on their own, really messy and confusing to install.

So, why not updating some pointers? I mean, http://www.andengine.org/ still points at http://code.google.com/p/andengine/, http://wiki.andengine.org/AndEngine was updated in October 2011, gles2/use-andengine-as-a-android-library-project-not-as-a-jar-t6142.html says to use Library Project and not a Jar, no java-doc, no nothing for me as an utter novice as where to start.

tutorials/updated-getting-started-with-andengine-t4858.html contains video tutorials by RealMayo which are of little use to me as I am deaf, and they also contain "if you update from GLES1 to GLES2 [...]". I'm not even sure what GLES is, and why there would be two different libraries?

Please note: This is not a rant, just asking for a piece of advice since I'm still completely confused how to get everything setup. I've added all kinds of code trunks, both from mercurial and github, got the library part compile okay but I can't run any examples since the extensions fail hard. No idea why, but probably because I'm so confused.

Can anyone please scratch all outdated installation tutorials and create a new, fresh, one?

I'd love helping with anything on this library, but alas - for the moment, I know nothing and therefore I cannot provide contributions myself.
bos
 
Posts: 44
Joined: Fri Jan 13, 2012 4:15 am

Re: Installing AndEngine

Postby bos » Wed Feb 29, 2012 10:41 pm

After taking a breath I think my confusion can be boiled down to this: why are there no prebuilt, working, jars for us non library-developers to use straight out of the box not having to worrying anything about trunks, build paths / source-links and every headache that comes with it?
bos
 
Posts: 44
Joined: Fri Jan 13, 2012 4:15 am

Re: Installing AndEngine

Postby RealMayo » Thu Mar 01, 2012 12:15 am

Hi bos,
I fully respect that fact that you are deaf and I have to say that my GLES2 tutorial can be followed successfully with the sound turned off (and it helps to read all of my responses to comments on the YouTube page of the video). Please tell me what problems you are having and I'd be glad to help :)

Some answers to your questions:
1) GLES1 (which uses OpenGL ES 1) is the old version of AndEngine which Nicolas (the inventor of AndEngine) no longer supports
2) GLES2 (which uses OpenGL ES 2) is the new version of AndEngine which Nicolas currently supports. By the way, this version is not compatible with the emulator in Eclipse, so you will have to debug by using an Android phone connected to your PC via USB.
3) There are no JAR files because Nicolas wants AndEngine to be used as Library Projects.

Nicolas created/maintains AndEngine in his own spare time and does not make any money in doing so. We are not paying customers, so we have no right to demand anything from Nicolas. We need to adapt to the way that Nicolas operates and be appreciative of what he has done for us, for free.

Again, please tell me what problems you are having and I'd be glad to help.

Thanks
User avatar
RealMayo
 
Posts: 1682
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

Re: Installing AndEngine

Postby bos » Fri Mar 02, 2012 11:44 pm

Hi, thanks for the reply!

Confusion #1: I'd like to simulate everything in Eclipse instead of debugging on a phone, meaning I will have to use GLES1. But if that's no longer supported by mr. Gramlich, and GLES2 is not possible to simulate - I'm not sure what to do. That's a really tough decision, both options seems like bad ones?

Confusion #2: I've peeked your videotutorials and you're right - I can follow them without sound. Thanks. However, in there you clone the repo from code.google, while I read in some other thread that the github repo is the one to use. I have no clue which one to use. Or why. Why is the andengine source project scattered to a lot of places? Which one should I clone?

Also, I'm not sure how to use a "Library source". I've tried right click the project in Eclipse, select Build Path and peeked around, but I find only Add Jar, Add external Jar, etc, nothing about "Library Source". So, what's Library Source?
bos
 
Posts: 44
Joined: Fri Jan 13, 2012 4:15 am

Re: Installing AndEngine

Postby bos » Sat Mar 03, 2012 12:14 am

Now, somehow I managed to clone the git-repo and built AngEngine for Android 4.0.3 (which was pre-selected). announces/andengine-gles2-pre-release-on-december-23rd-t6097.html says GLES2 needs Android >= 2.2, but if I pick a build-target anything other than Android 4.0.3 the build fails. My phone has Android 2.2.1. If I cannot build for that then GLES2 is pretty useless for me :(

The errors I get when compiling for 2.2 are that some variables cannot be resolved:

HONEYCOMB, GINGERBREAD, HONEYCOMB_MR2, ICE_CREAM_SANDWICH (in a lot of files), SCREEN_ORIENTATION_SENSOR_LANDSCAPE, SCREEN_ORIENTATION_SENSOR_PORTRAIT (BaseGameActivity.java).
bos
 
Posts: 44
Joined: Fri Jan 13, 2012 4:15 am

Re: Installing AndEngine

Postby RealMayo » Sat Mar 03, 2012 12:19 am

The errors you are getting with your GLES2 installation are because you didn't install all of the API components of the Android SDK.

Further notes...
Yes you will need to use GLES1 if you want to use the Emulator.

Github is only used for GLES2.
Code.google.com should still work for GLES1 as described in my video.

Library Projects are the way that GLES2 is setup.
Link Source (not "Library Source") is the way that GLES1 is setup, as long as you are using the correct version of Eclipse. I have been told however that Library Project setup should ALSO work with GLES1, but I've never tried it that way.

So I guess what I'm saying is, if you follow either my GLES1 or GLES2 tutorials, everything should still work as described in those videos. Before you begin, just make sure that you've properly installed the Android SDK and all of its API components, also install the ADT Plugin, the JAVA SDK, and "Eclipse IDE for Java Developers" (Indigo).
User avatar
RealMayo
 
Posts: 1682
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

Re: Installing AndEngine

Postby bos » Sat Mar 03, 2012 1:16 am

ADT/SDK already updated to latest version. Using Eclipse Helios (not Indigo).

Got a bit further now. Cloned all repos, made AngEngine's and others red cross disappear. Final problems is the examples got a red exclamation mark on it. Right-clicking and properties and Android tells me everything is fine under "libraries". Can't find any error.

Got one red cross, on TexturePackerExtension TexturePackParser.java, line 156:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                         try {
  2.                                 return new BitmapTexture(this.mTextureManager, BitmapTextureFormat.fromPixelFormat(pixelFormat), textureOptions) {
  3.                                         @Override
  4.                                         protected InputStream onGetInputStream() throws IOException {
  5.                                                 return TexturePackParser.this.onGetInputStream(file);
  6.                                         }
  7.                                 };
  8.                         } catch (final IOException e) {
  9.                                 throw new TexturePackParseException(e);
  10.                         }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


The error is: "The constructor BitmapTexture(...) is undefined".

---

I've been coding Android apps for over a year now, never seen any plugin/lib having as much hassle as this one, and the weird thing is; I can't even understand what the problems are! I got all source from repos, and I find it hard to belive someone checked in buggy / non-working code.

Oh well.

I bought the AndEngine-book (Rick Rogers) last week, but it seems I'll have to wait a couple of more weeks before I can try out all the examples in it.
bos
 
Posts: 44
Joined: Fri Jan 13, 2012 4:15 am

Re: Installing AndEngine

Postby bos » Sat Mar 03, 2012 1:29 am

I restarted Eclipse just for the sake of testing. Now there are four red crosses in Package Explorer. I picked the one in SVG extension, MathUtils.java. First line got a cross, hovering the mouse says "java.lang.Object cannot be resolved".

Alright.
bos
 
Posts: 44
Joined: Fri Jan 13, 2012 4:15 am

Re: Installing AndEngine

Postby RealMayo » Sat Mar 03, 2012 1:32 am

The problem is that Nicolas keeps updating the Extensions, but forgets to update the Examples.
Quickest solution is to temporarily delete the specific examples that don't work and then in the near future check back for any updates to the examples.
User avatar
RealMayo
 
Posts: 1682
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

Re: Installing AndEngine

Postby bos » Sat Mar 03, 2012 2:14 am

> The problem is that Nicolas keeps updating the Extensions, but forgets to update the Examples.

I'm imaging me coding a game, accidentally pull the repos to get the updates, one of them containing a minor error like this and BOOM, game's unable to compile and deadline for release is due in 9 minutes. I guess there's some nice git-magic you can use to rollback to an earlier branch, but non-repo guys like me wouldn't have a faintest clue of how to do it.

Anyway, enough ranting about this. I gave up on GLES2 now after 4 hours struggling, fetched GLES1 on code.google and got it working in 10 minutes. Bonus: I found a bug in the TicketTextExample.java and fixed it in less than 10 seconds.

Finally. :)

I'm not gonna touch any updates again. Ever.
bos
 
Posts: 44
Joined: Fri Jan 13, 2012 4:15 am


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 21 guests