dcsimg
A Flash Developer Resource Site

Results 1 to 20 of 20

Thread: Flash games on iPhone App Store

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Location
    US
    Posts
    2

    Question Flash games on iPhone App Store

    I know there's no Flash Player on iPhone, but does anybody know of something like Unity3D that will take SWF and produce a native iPhone app? If something like this existed, would you be interested in it? Obviously the resolution would be limited to 320x480 or something and things like mouse move events, mouse wheel events, etc. wouldn't work. Anyone have any thoughts?

  2. #2
    Yes we can tomsamson's Avatar
    Join Date
    Sep 2001
    Location
    Team Titan Secret Lair
    Posts
    4,666
    Regarding no flash player on iPhone Adobe seems to right now be attempting to push Flash being used in big way on cell phones/ smartphones etc again now and there´s also talk about bringing Flash Player 10 to phones next to the everlasting rumor of Adobe working on a Flash Player for iPhone.
    Semi related and interesting: http://www.adobe.com/devnet/devices/...s/htchero.html

    Looking at it from the users´perspective i´m personally not interested in having flash content played back on mobile devices in swf form by the current flashlite player, especially in the browser of the device for a while because right now flash is still a way too high ressource drainer, especially on those lower powered devices (See how the Adobe video presentation i linked to has several quite obvious cuts masking loading and intialisation times, performance doesn´t seem spectacular throughout). Let´s see how later versions of a mobile flash player run.
    Also what makes the iPhone so appealing to many indies is the App Store distribution channel which by usual way flash content publishing would be circumvented, not embraced (Sure both have different pros and cons).

    Regarding porting options for flash content Unity 3D doesn´t allow anything like taking a fla or swf and turn that into an iPhone app automagically.
    Pretty much the contrary is the case: You basically have to rewrite considerable chunks from the ground up due to various things just being done in different way in that other technology or language. Flash and unity have several things in common on language side but especially things on handling graphics and sound sides are quite different.

    Regarding porting flash content over to the iPhone in general:
    Something that allows to port flash content to iPhone (and have that be done in a way so that the content performs nicely on the device and also in a way that it can be submitted to the App Store), that would be quite interesting i think; for A LOT of people (so share any info if you have some =) ); so far there seems to be no fully working solution publicly available for everyone to use though. All attempts by different people/companies to halfway "easily"/quickly port over flash content seem to not be publicly available right now and then usually its also restricted to AS3 content and usually at least handling the graphical side a bit different.
    Last edited by tomsamson; 06-27-2009 at 02:23 AM.

  3. #3
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,227
    haXe is perhaps closest to porting Flash content onto iPhone: http://ncannasse.fr/blog/haxe_for_iphone

    You still have to rewrite the game, it does not just take swf and make it run for iPhone.

  4. #4
    Junior Member
    Join Date
    Jun 2009
    Location
    US
    Posts
    2
    Thanks for these replies. The HTC Hero video is interesting, and I think it confirms what you, tomsamson, were saying: Flash games on iPhone would have to be available in the App Store and feel like native games, and not just run in the browser. The AS2/AS3 question is an interesting one; it would be interesting to survey the SWFs on Kongregate/Addicting Games/MochiAds/etc. and get definitive numbers. I'm going to investigate this. I'll share what I find.

  5. #5
    Yes we can tomsamson's Avatar
    Join Date
    Sep 2001
    Location
    Team Titan Secret Lair
    Posts
    4,666
    I think you won´t get any definitive numbers there easily, but of course the majority of games out there are made in AS1 and 2. A good number of newer games is made in AS3 of course but i think its still a tiny percentage of the total game count out there, even among the better games.
    To me personally, it would be nice if one could with halfway painless way port AS3 flash games to iPhone and they would run well on the device and could be submitted to the App Store, even if on graphical side its also restricted to only working with Sprites and BitmapData, but it would make it SO much more interesting if one could really port all flash content (AS 1/2 things, too, also ones that use movieclips/ lots of timeline based stuff) and that would run nice on the device because that would mean one could bring over lots of existing content instead of only new content or only content written in specific way (in which case i can just as well create it with other technology).
    The haxe example Tonypa brought up is interesting from a geek perspective to me but it doesn´t really seem a lot like an option for porting any existing project over easily, more like doing a project in very specific way so it can be ported over at all.
    Last edited by tomsamson; 06-27-2009 at 04:34 AM.

  6. #6
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    709
    You told everything, I agree 100% with your 2 posts here, tom.

    @datakraken, if you want to enter the iPhone market, don't wait for the iPhone being compatible with Flash, or a way to translate AS3 into iPhone SDK. I don't think there will be an easy gate between Flash and iPhone.

  7. #7
    Yes we can tomsamson's Avatar
    Join Date
    Sep 2001
    Location
    Team Titan Secret Lair
    Posts
    4,666
    I think it would be a VERY STUPID move by Adobe to not have an export as xcode project option in a future flash ide version.
    That said, i agree with you, too Sietjp, i wouldn´t count on Adobe actually pulling it off in nice way anytime soon.
    Adobe really seems to want to push desktop/browser/ mobile/flahslite player approaches
    onto smarthphones, too what with their open screen initiative etc instead of focussing on allowing to do something more in the vein of that haxe project (compiling the code to C++ and running the graphics side handled by OpenGLES, which to me with propper flash IDE/ flex/ flash project integration would ROCK).
    Sure, if they release something really nice sometime within this or the next year unexpectedly that would still be great but i feel like they already missed the boat mostly and they seem to really have a different focus than what people wanting to port their flash content to well performing hardware accelerated native apps really are looking for.

  8. #8
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    Hey guys, it's been a really long time since I've posted here, but I was browsing today and thought I'd drop in on this thread cause it seems interesting

    I've been doing iPhone dev for almost a year now (in between flash projects), and have been working on an Objective-C graphics library which wraps opengl es in classes and functions similar to the Actionscript 3.0 framework.
    (So to show something on the screen for example you'd create a sprite class instance which has x, y, rotation, alpha values etc... and use addChild to add it to the display list... just like flash)

    It's still in development and is an internal library, but if it's something that fellow flash devs would be interested in I'd love to put it out there for everyone to use. Do you guys think this kind of thing would help flash devs get into the iPhone market... or do we just need to wait for a flash->xcode converter.

    Our second iPhone app just went on sale today.. (using this lib of course) feel free to check it out (it's called flyloop, link to the site/video in my sig)
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  9. #9
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    709
    @ozmic66, there is already an opensource library that is already doing the kind of things you describe : http://www.cocos2d-iphone.org/

    But of course if you developed your library beeing a Flash developer (which is not the case of cocos2D), I guess it will really be perfect for Flash developers. So of course it will be very helpful ^_^ if you want to release it. I think there is really a need for an iPhone library targeted to Flash devs.

    [edit] very cute game, congrats.

  10. #10
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    Well, when I started writing this engine cocos2d wasn't around, so I had to get in there and learn the ins and outs of opengl es. I've checked out cocos2d since to see if I should continue dev, and I noticed that a lot of the core code within that lib is reminiscent of my original opengl code (both ripped out of Apple's example code) but I've since improved on this core, so I think there's a few things to be missed with cocos. Also, as you said, it wasn't developed with as3 in mind. I also noticed that the quad rendering is done in a rather inefficient (yet simple) manner, and I've had some ideas to improve, which should help push a lot more polygons on the screen at once.
    Anyway, I'm glad to see there could be use for this... Perhaps I should post a global question on this board
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  11. #11
    FK founder & general loiterer Flashkit's Avatar
    Join Date
    Feb 2000
    Location
    Sydney
    Posts
    1,149
    @ozmic66; I'd love to be a part of your testing... I too have turned to the dark side and am playing a bit on iphone development... I've gone the path of Unity3d at the minute, but for a lot of the 2d stuff I want to do I would love ot be able to use flash style coding

    Cheers!
    Regards Mark Fennell - Flash Kit Founder, general loiterer
    -------------------------------
    I Hate Zombies - iPhone Game | markfennell.com

  12. #12
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    @flashkit
    Sounds good, I'll keep this forum updated.

    I have a dilemma, so let me put this question out there:
    Would you as a dev prefer to use an objective-c framework or a c++ one.

    Here are some pros/cons of each

    Objective-c
    -------------
    - A bit of a curve to learn at first (mostly cause of the weird syntax) but not too bad once you're in it.
    - Simple memory management, good chance of a few leaks.
    - Could be slower since it has a lot of run-time evaluation with functions (this isn't tested at all, so I could be wrong)
    - A clean and simple language (much like java is I'd say)

    C++
    -----
    - Syntax much more similar to Flash/Java/etc. Probably a bit easier to grasp at first
    - No memory management = a lot of potential leaks, more burden on the programmer. Although a simple ref. counting scheme similar to objective-c's could be implemented
    - c/c++ can get a bit convoluted at times

    Either way I think both could work, and both can be intermixed on the iPhone. My lib is all in objective-c, but I wanted to get a general feel for what Flash devs would prefer


    On a slightly different note:
    Checking out the haxe iphone thing, it seems like we may not need either language! But I'm not sure how this will practically work out... (plus I always prefer to code natively) Does anyone have a deeper insight into the topic?
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  13. #13
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    709
    IMO objective C is the right choice. I didn't know you can use the sdk api in C++ (can you?). All Apple examples and resources are in objective C, an iPhone developer will have to learn objective C one day or another. It's about 5 weeks to learn.

    i don't know too much about the haxe thing but it looks very experimental for now, and it doesn't aim the same thing as your framework. You want Flash developer to feel at ease with this framework, but you will not provide a diret port AS3>objective C.

    I think it's maybe a small thing, but the famework would talk immediately to Flash devs if you keep the same names like MovieClip, Sprite, DisplayObject, .rotation, .x, .y , .alpha, and so on...

  14. #14
    Senior Member Draxus's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    123
    @ozmic66

    I'd definitely be interested in your library Something like that or a direct converter would likely be the only way I'll get into messing around with the iPhone in the near future. I don't think I'll be tackling Unity for awhile.

    Edit: I'd vote for C++, but only because I am somewhat familiar with it and enjoyed using it.
    Last edited by Draxus; 06-29-2009 at 08:01 PM. Reason: c++

  15. #15
    FK founder & general loiterer Flashkit's Avatar
    Join Date
    Feb 2000
    Location
    Sydney
    Posts
    1,149
    @ozmic - Ive been using C++ in unity running visual studio as the dev environment, its really quite nice, its very familar to actionscript and I found it easy to pick up.

    Objective c scares the bejesus out of me, it seems so verbose, and odd, but the flipside is its going to be faster and more compatible.

    I tended the unity path on the offchance I made a sweet fun game then it could be immediately ported to other platforms, the same theory also applies if the game bombs on the iphone I can redeem myself with a browser version

    Id learn ob-c though if it came with a familiar sort of framework for sprites and stuff like you are talking about.

    I await with baited breath.....
    Regards Mark Fennell - Flash Kit Founder, general loiterer
    -------------------------------
    I Hate Zombies - iPhone Game | markfennell.com

  16. #16
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    Great, thanks for that guys.

    @mark I don't know if there's a performance difference since both can actually be intermixed and are probably compiled to the same thing. I know that function calls in objective-c are interpreted at run-time, but I don't really think that creates a noticeable change in performance.

    I do have to say though that my personal preference is objective-c.
    Mainly because it's a pretty straight forward language (although it doesn't seem like it at first).

    Edit: For example, I'm sure most flash devs aren't used to working with pointers, which have to be grasped to effectively use c++. Objective c on the other hand takes Java/AS's approach in which every nonpremitive variable has to be a pointer (ie when setting obja=objb, objb isn't copied into a, only a reference is passed). So even though calling methods looks weird in obj c, it's structure is oddly similar to java's

    Also objc has a lot of high-level data structures and helper classes that are similar to AS/Java which would be very useful for those using the library. Of course, a c++ library can be intermixed with objective-c code/data structures, but sometimes mixing can make things confusing.

    So in any case, I'll run some performance tests and see where things lead.

    Edit 2: I also wanted to mention that simply converting code over to objc is hardly enough on a (relatively to desktops) limited device. There's a lot of changes that need to be taken into account when working with assets like compressing images in pvr format, using image atlases (putting a lot of images into one large texture so render calls can be optimized), and carefully monitoring memory usage (only allowed about 24 mb ram for everything). So there's a lot of iphone specific things that don't tranlate too well (or automatically), which is pretty essential because resources are so scarce.

    Edit 3: So yea, now I've pretty much made up my mind that using the as3 framework (with automatic conversion) just won't cut it since there are so many case-specific things. Only a native framework can provide solutions for iPhone specific cases while keeping true to the as3 names and conventions
    Last edited by ozmic66; 06-29-2009 at 11:53 PM. Reason: Added an example
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  17. #17
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    If you already read my previous post, I made some edits with some of my thoughts on the haxe route. Also objective-c is seeming like more and more of a logical choice
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  18. #18
    Member
    Join Date
    Jun 2007
    Posts
    31
    Quote Originally Posted by ozmic66 View Post
    @flashkit

    On a slightly different note:
    Checking out the haxe iphone thing, it seems like we may not need either language! But I'm not sure how this will practically work out... (plus I always prefer to code natively) Does anyone have a deeper insight into the topic?
    Hi,
    To use haxe and the iPhone, you will need to learn haxe, and have a few ideas about putting an xcode project together.
    Haxe is very similar to as3 - certainly much closer than either c++ or ObjectiveC. Have a look at gm2d.com for a taste of what a haxe game code might look like. The idea is that you write in haxe (using essentially the flash API) and then compile the code to swf or iPhone (or mac, windows or linux). ie, One code base for all systems.
    Compiling the haxe code gives you an iphoneos library that you link against the provided stub libraries to produce an executable.

    If you are looking to make your own system, you can make it for c/c++ or ObjectiveC. You will need to write some ObjectiveC to interface to the iPhone, but users of your library will not - they can just link against your library however you want them to.

    A big difference between as3/haxe and c++/ObjectiveC is memory management. as3 & haxe use garbage collection, while the others (can) use reference counting. Reference counting can be a bit tricky (and slow) - especially where event handlers are concerned, since it is easy to create circular references. I guess you will need some kind of "weak reference" system. Alternatively you could use a garbage collecting library. I tried Boehm GC, but that seemed a little slow in the iPhone (very good on other systems, so maybe it is just not optimised), so I ended up rolling my own. Or else you could push the compexity of memory management back onto the users of your library. This would end up with the fastest code, but it would make porting as3 code harder.

    There are currently 2 main problems with the haxe for iphone. 1. It is not complete yet, and 2. It uses SDL, which is LGPL license, and since you can't dynamically link on the iPhone this means that technically you need to provide your haxe-created library file (not the source code) so that others may re-link it if they so desire.
    I am working towards finishing point 1, and eventually, I will replace SDL with something that has a nicer license for real developers (although, as it stands, it is not too bad, since the library is very similar to the exe in many ways).

    Chookmaster (aka Huge).

  19. #19
    Now tell me whos watchin...... samvillian's Avatar
    Join Date
    Feb 2007
    Location
    Where do you live?
    Posts
    539
    the same huge as this:



    ?


    If so welcome....
    If the only tool you have is a hammer, you tend to see every problem as a nail.

    Xbox 360 Modding Controller PS3 Mod Paint Spray LED Case

  20. #20
    Member
    Join Date
    Jun 2007
    Posts
    31
    Thanks, yes, that would be me. The moniker Chookmaster is from about 20 years ago, "huge" was already taken.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center