Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Allegro 5 & C++ / Android: is possible, how to....

This thread is locked; no one can reply to it. rss feed Print
Allegro 5 & C++ / Android: is possible, how to....
Gabriel Campos
Member #12,034
June 2010
avatar

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
Major Reynaldo
May 2007
avatar

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
Member #12,034
June 2010
avatar

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
Second in Command
February 2005
avatar

They all watch too much MSNBC... they get ideas.

ks
Member #1,086
March 2001

Aikei_c
Member #14,871
January 2013
avatar

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++?

Evert
Member #794
November 2000
avatar

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.

Aikei_c
Member #14,871
January 2013
avatar

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
Member #12,034
June 2010
avatar

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

dejaime
Member #12,984
June 2011
avatar

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 developer.android.com website advises against it; as in here: http://developer.android.com/tools/sdk/ndk/index.html

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
Member #476
June 2000
avatar

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.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Go to: