Allegro 5 & C++ / Android: is possible, how to....
Gabriel Campos

I readed that the allegro 5.1 have support for android devices, so my question is...
Is possible to program in allegro to android devices? Is necessary to use java or i can achieve with c++ (i'm very good with c++, but not too much with java). And least, how to make this? Someone have a good tutorial? I looked on google, but no response. Thanx all.

Edgar Reynaldo

Java is very similar to C++. In Java, everything is in classes. You use access specifiers on every function or else they default to public.

As for how much Java android requires I don't know.

Gabriel Campos

The problem is not java... i know a little but can learn more. What i want to know is, if its possible to program with allegro to android, and how to start....
Of course i prefer to programming in C++, but if is not possible to use that language, i can use java, no problem...

in resume, i want i starter...
to simplify:

1 - is possible to use allegro 5 as API to make android games?
2 - can i use C++ language to do this? or need to be in java?
3 - how to start? some ideas?

Arthur Kalliokoski

I still can't find the answer here to the question whether it is necessary to use java. Can android program be entirely in c++?


The answer depends a bit on how literal you want to be.

As far as I know, no, you cannot develop on Android without using Java at some stage. However, if you're using Allegro, then Allegro handles all the communication with Java for you and you just write your program in C/C++ and link it with Allegro, not unlike what you'd do on a normal PC.


Thanks, that is what I would expect. I was thinking about looking into android port in the future and wondered if I have to use java.

Gabriel Campos

Still dont get it how to make it work. ???


I think you'll need to use the Android Native Development Kit (aka Android NDK) to use C++. You'll not need java anywhere and your application will run really faster.

But even the official website advises against it; as in here:

I simply use java for Android, I found it pretty easy to learn after I had a good grasp with C++.

I must say I have never used allegro for android devices.

Thomas Fjellstrom

You do need the ndk to build allegro, but there is a slim layer of java needed, most of which is in allegro, but there's a tiny bit needed in your app but you can base it on the code used in the android example.

The bennifit to using allegro is the ease of porting and multi platform support. Rewriting your game in java is a bit of a pain, and may be slower.

Thread #613378. Printed from