13

I've never programmed a game, but have about a dozen years programming interfaces. After playing a few games on my Android phone, I'm stuck wondering what language is used to program games like Angry Birds, and how such graphical manipulation can happen. Native languages or some cross-platform code?

Thank you!

5 Answers 5

10

I'm not sure but considering that quite a few .lua files are inside the angry bird app folder, I'd say they used LUA at some aspects. But from what I've heard, LUA isn't a primary language, just something to script with. That said, I'm not a obj-c programmer either, so take my word with a grain of salt.

Follow up link https://web.archive.org/web/20120502071633/http://blog.anscamobile.com/2010/04/lua-the-lingua-franca-of-iphone-games/

3
5

Android apps are coded in Java with the android development kit, iphone games are coded in objective c

Android dev kit is available here http://developer.android.com/index.html

iphone (iOS) development kit available here (Caution requires a mac) http://developer.apple.com/devcenter/ios/index.action

As the two languages are both based on the C syntax there's a lot of cross compatibility between the basic parts of your code however the interactions with the phone are both done through the respective sdk's so you're gonna have to make changes to account for that. Also worth bearing in mind is that objective c on the iphone isn't garbage collected so you'll need to worry about memory management!

5
  • Java isn't at all C-based, other than some aspects of the syntax. Dec 13, 2010 at 16:00
  • I was referring to the syntax, sorry if that wasn't clear
    – Robb
    Dec 13, 2010 at 16:02
  • I already program Android apps, perhaps I should have said that. I wasn't sure if it was straight Java or something else. Thank you for the clear answer though. Dec 13, 2010 at 16:07
  • 5
    -1: On both platforms, native developpement is possible and sometimes the only solution to make some specificly complex/resource-hungry games fit in the hardware.
    – Klaim
    Aug 22, 2011 at 22:11
  • @Robb Objective C if using the iOS SDK, does use garbage collection so you don't have to worry about free'ing memory....
    – t0mm13b
    Dec 24, 2012 at 13:59
5

AngryBirds (and some other games) are using C/++ code and the NDK. Sources: What language was used to program the 'Angry Birds' app?, http://www.gamasutra.com/view/feature/6481/postmortem_vector_units_riptide_.php

1
  • 6
    That's lame linking back to the same topic as a source. Jan 20, 2015 at 17:56
1

Has to be C for the core at least. If I was them I would write the core in C and wrap java around it for android (I think you can do that) and objective c for the iPhone (I know you can do that).

3
  • 3
    Why does it have to be C for the core?
    – aioobe
    Dec 13, 2010 at 15:57
  • 1
    C is cross platform meaning you can compile it for both android (if I understand correctly, I am not an android programmer) and iPhone. I revised my answer.
    – Jason Webb
    Dec 13, 2010 at 15:59
  • for android answer is YES - you can make a core in C language and wrap it with JNI to be able to use it from Java (Android sdk).
    – Mark
    Feb 6, 2013 at 10:29
1

I always assumed that these developers program core functionality in c/c++ and then use native development kits to link the two. For example I know in android development you can use the NDK to wrap java around c/c++

http://developer.android.com/sdk/ndk/index.html

Ironically Java isn't the "build once, run every everywhere" language in this case :p

Not the answer you're looking for? Browse other questions tagged or ask your own question.