Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm looking for a 2D graphics engine that would allow me to release to Windows, Mac and the iPhone, much the way Unity does for 3D.

Is there a good engine that does this and is specific to 2D?

share|improve this question

closed as not constructive by Tetrad May 24 '12 at 18:15

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
If you're feeling adventurous, you can always check out one of the open sourced 2D games, such as Aquaria, Gish and the rest of the Humble Indie Bundle. –  Syzygy Jul 26 '10 at 8:30
5  
You forgot linux, no love for those guys? –  Derek Jan 22 '12 at 18:28

15 Answers 15

up vote 34 down vote accepted

There's always the old standby, SDL. It's fairly low level, but that simplicity is what allows it to be ported to bajillions of platforms (including windows, linux, mac, nintendo DS, wii, etc etc). There is an iPhone port, which I haven't used, but seems mature enough.

share|improve this answer
    
+1 for SDL. Very good for cross platforming. –  Spidey Jul 14 '10 at 20:19
    
It doesn't appear that they have a version 1.3 "stable" yet which is the version you will want for iphone support. You will probably need to grab the 1.3 version from their HG repo and build it yourself. –  Casey Jul 14 '10 at 21:44

There really isn't any reason you can't use Unity3D to create "2D" games. You can use textured quads and an orthographic camera, and you have yourself a 2D game. There are even some unique solutions like using a skeletal animation system and putting sprites on top of different joints, or using a really tight perspective camera to get cheap parallaxing.

There are even middleware providers for Unity to provide better sprite management solutions. Like sprite manager 2.

share|improve this answer
2  
I have in fact been doing this. I find that the 3D aspect of unity though tends to get in the way insofar as user interface is concerned. Also I always end up making a dummy scene that has nothing but a camera with my root script attached. I'll check out the link you mentioned though! –  Kevin Laity Jul 14 '10 at 19:29

SFML is a nice modern, Object-Oriented, cross platform graphics engine. It is hardware accelerated (based on OpenGL), and has bindings for

  • C++
  • C
  • .Net (C#, VB.Net, C++/CLI, ...)
  • Python
  • D
  • Ruby
  • Ocaml
share|improve this answer
4  
+1 for SFML. It's great, but the only issue is the lack of an iphone port. –  The Communist Duck Aug 27 '10 at 8:16

SDL, Allegro, OpenGL
SDL and Allegro are not only graphic libs, but whole game development libs.
One down side of SDL is that it takes over your main() and redefines it, making it hard to combine it with other libraries. (QT in my experience)
Another bad thing is that SDL only allows one window (this is stable version 1.2, the development version 1.3 does, but it's not fully supported or documented yet)
I can name SDL's weak points because I know it best and worked with it, but despite that, it's very powerful, many emulators, including a port of Mame and ScummVM, as well as games use it.
OpenGL, despite its popular 3D use, is a graphical library, and as such, also allows 2D graphics through surfaces pixel-level manipulation, and makes extensive use of hardware acceleration both in 3D and 2D.

share|improve this answer
    
I use to create games in Allegro all the time. Loved it. –  Tone Jul 16 '10 at 2:48
    
Qt doesn't take over main though, even with an event loop in QCoreApplication. You can call qApp->processEvents in any loop you want and Qt will be happy. –  Mircea Chirea Jul 23 '10 at 8:59
1  
Does SDL have to take over your main loop though? I thought you could avoid that by not including SDLmain.h and being careful to do the things yourself... –  Ricket Aug 5 '10 at 22:48
2  
SDL does not take over your main game loop. You typically create your own, and inside of that call SDL_PollEvent to get any events SDL is aware of (keyboard input, mouse movement, etc). –  dcarrigg Aug 27 '10 at 4:46

You can look at Troll2D

Box2D is used for many platforms. Including the iPhone. But you'd have to find a way to display those objects. Since Box2D handles only 2D physics simulation.

share|improve this answer
    
Olafur - I'd say Troll2D was your answer so you should start with that. Box2d should be the afterthought. –  Iain Jul 14 '10 at 21:15

LÖVE is a 2D engine that allows easy and fast development of games in the Lua language.

It runs on Mac (PPC and Intel), Windows and Linux (32 and 64bit) and games are easily distributed as one-file-runs-on-all-platforms ".love" files.

They are basically a zipped version of your game with the zip extension renamed to love.

Unfortunately, there is no iPhone port (so far).

share|improve this answer

Cocos2D originated under Mac/Windows in Python and is available in an Objective-C flavor under the iPhone. It's popular in 2D iPhone game development. Ray Wenderlich has some great Cocos2D tutorials for the iPhone.

Because they moved from Python to Objective-C, I suspect you're not going to be able to cross-compile between all platforms anymore from the same code base.

share|improve this answer
    
Correct, there are many cocos2d ports but all use their own language. Objective-C for iPhone, Java for Android, Javascript for Web, Python for the original PC version, and C++ for the new Windows port which may or may not support Windows Mobile (it's unclear about that). Other than name and design philosophy they are not interchangeable in any way. –  LearnCocos2D Aug 7 '10 at 13:43
    
I think Cocos2d-x now is pretty stable and cross platform, with a single language of implementation: C++ (includes iPhone too). –  legends2k Mar 2 '12 at 12:10

If you're not worried about iPhone there's always Flash packaged as AIR - you lose iPhone but you gain Linux and web deployment. You can then choose game/physics/rendering engines that suit your project, eg. FlashPunk, Flixel, Box2d.

share|improve this answer
    
You also gain Android phone support (newer ones at least), and probably Palm/Blackberry/Windows Mobile support as well in the future. –  davr Jul 15 '10 at 19:26
    
iOS is now supported while Linux is not. –  Danik May 24 '12 at 17:37

You could try the Angel Engine. It's based on C++, OpenGL, Box2D, and it uses Python for scripting. It's mostly for prototyping, but the recent versions seem to focus on making full games.

share|improve this answer

torque2D supports PC and mac out of the box. The iTorque2D supports deployment to the iphone. Its also possible to get console deployment.

share|improve this answer

getMoai

Moai SDK is a framework that can run* on these platforms. It is open source so check out their github repo.

Moai can also be published to Google Chrome and Android.

*I don't think publishing is to mac or windows (i.e. to a .app or .exe) is available at the moment but can be added.

share|improve this answer

PlayN supports HTML5, Android, iOS, Flash and desktop Java.

You write your code in Java and it handles converting your Java code to JavaScript (via GWT) for HTML, to ARM assembly (via IKVM to go from Java bytecode to CLR bytecode, then MonoTouch to compile CLR bytecode to a native iOS app), to ActionScript via a custom GWT backend that generates ActionScript instead of JavaScript, and to Android and desktop Java with no conversions.

share|improve this answer

Haxe + NME supports HTML5, Flash, Android, iOS, Blackberry, Windows, Mac, Linux, WebOS. It supports 2D graphics (bitmap sprites, vector drawing, plus effects like drop shadow and blur).

share|improve this answer

I've been hearing a lot about MonoTouch lately for people doing iPhone and iPod touch development. The Framework is on top of Mono, which is already cross platform compatible.

share|improve this answer
    
Too bad this violates the iTunes store agreement, since you're writing in something that's not C/C++/ObjC, and using a translation layer. You might get approved still, but they could pull you in the future. Personally I wouldn't risk it. –  davr Jul 15 '10 at 19:26
    
@davr monotouch doesn't violate the terms of the agreement as of > 1 year ago. –  dodgy_coder Apr 5 '12 at 4:02
    
@dodgy_coder Yeah I remember when Apple finally took out those retarded rules (which were aimed solely at harming Adobe I believe). My original comment was true at the time I posted it though :) –  davr Apr 27 '12 at 16:45

Unity3d is best 2d game development tools and engine. alternatively monogame. html5 and flash is not appropriate for this topic. already flash is dead.

share|improve this answer

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