Sdl 1.3 for iphone

Hi.

I’m just being curious: Having open source alternatives for developing games
for iPhone, Why would you think people would prefer sdl instead cocos2d?
(just naming one very popular api).
What benefits are for developers in choosing SDL1.3 in favor of any other
api?

Cheers!–
David

Easy, while using SDL you might be able to target other devices besides
iPhone.

Not to forget that you get a very mature library, that is used by many game
studios.–
Paulo

On Thu, Jan 13, 2011 at 1:19 PM, David Roguin wrote:

Hi.

I’m just being curious: Having open source alternatives for developing
games for iPhone, Why would you think people would prefer sdl instead
cocos2d? (just naming one very popular api).
What benefits are for developers in choosing SDL1.3 in favor of any other
api?

Cheers!

David


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Easy, while using SDL you might be able to target other devices besides
iPhone.

Let’s say i just want to target iPhone and Android, no PC, linux nor mac.
There’s no really a big advantage there.

Not to forget that you get a very mature library, that is used by many game
studios.

I guess others api are also very mature. Also they have animation and
particle support.–
David

You still get portability as advantage.

cocos2d is Objective-C, there is no Objective-C support for Android.–
Paulo

On Thu, Jan 13, 2011 at 3:10 PM, David Roguin wrote:

Easy, while using SDL you might be able to target other devices besides

iPhone.

Let’s say i just want to target iPhone and Android, no PC, linux nor mac.
There’s no really a big advantage there.

Not to forget that you get a very mature library, that is used by many
game studios.

I guess others api are also very mature. Also they have animation and
particle support.


David


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

cocos2d is Objective-C, there is no Objective-C support for Android.

You can use cocos-x, a port for C++

David

Which I am not able to find anywhere, while SDL is the first result Google
returns.

Still not sure how it would be supported in Android, specially for the
versions lower than 2.3.On Thu, Jan 13, 2011 at 3:32 PM, David Roguin wrote:

cocos2d is Objective-C, there is no Objective-C support for Android.

You can use cocos-x, a port for C++


David


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Which I am not able to find anywhere, while SDL is the first result Google
returns.

Still not sure how it would be supported in Android, specially for the
versions lower than 2.3.

It’s not easy to find: https://github.com/cocos2d/cocos2d-x
I guess the same way sdl does, binding from Java (but I’m only guessing)

Apart from this, I believe that SDL 1.3 is gonna need a few more features
before the commercial license is appealing to devs.

What do you think?, being really honest and putting aside the fact that
everyone here (including me) loves SDL.On Thu, Jan 13, 2011 at 4:04 PM, Paulo Pinto wrote:


David

SDL really only has no appeals to already experienced iPhone developers. If you’re an experienced iPhone developer, and you have no intentions to port to other platforms, then don’t use SDL.

To C/C++ developers who have never done any Objective-C programming but want to make iOS apps; however, SDL is probably the most fully-featured way to do so that will be familiar to them. This will save them a bunch of effort and countless hours of development time.

To C/C++ developers who want to support as many platforms as possible, including iOS as one of those; there really is no other choice (well RTsoft, the creators of ClanLib, have Photon SDK… but it fails hard by comparison).

SDL is not the one-solution-fits-all for application development needs, by any means.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

This is a fair assessment, IMHO.On Sat, Jan 15, 2011 at 4:06 PM, Nathaniel J Fries wrote:

SDL really only has no appeals to already experienced iPhone developers.
If you’re an experienced iPhone developer, and you have no intentions to
port to other platforms, then don’t use SDL.

To C/C++ developers who have never done any Objective-C programming but
want to make iOS apps; however, SDL is probably the most fully-featured way
to do so that will be familiar to them. This will save them a bunch of
effort and countless hours of development time.

To C/C++ developers who want to support as many platforms as possible,
including iOS as one of those; there really is no other choice (well RTsoft,
the creators of ClanLib, have Photon SDK… but it fails hard by
comparison).

SDL is not the one-solution-fits-all for application development needs, by
any means.


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

imho sdl on iphone has the great advantage that just by compiling the
application with the library provides already a working framework with
only some limited number of changes to the sources.
On the other hand sdl has the shortcomings that offers very little
customization in the objective-c world and you need to heavily modify
it to suit your needs.
Overall i think sld on iphone has been a great asset on for the
library but i do feel it still needs some updates.

Sam, wasn’t there a major update that would have created a
uiviewcontroller instead of a uiview for sdl contents?
On an unrelated note, just for the sake of completeness, do you think
you could add #define SDL_JOYSTICK_DISABLED 0 to the
SDL_config_iphoneos.h?

also, i’ll repost my bugreports [ with patches that just await to be
applied :slight_smile: ]
http://bugzilla.libsdl.org/show_bug.cgi?id=996
http://bugzilla.libsdl.org/show_bug.cgi?id=1025
http://bugzilla.libsdl.org/show_bug.cgi?id=1026
http://bugzilla.libsdl.org/show_bug.cgi?id=1027

bye
VittorioOn Sun, Jan 16, 2011 at 2:10 AM, Sam Lantinga wrote:

This is a fair assessment, IMHO.

On Sat, Jan 15, 2011 at 4:06 PM, Nathaniel J Fries wrote:

SDL really only has no appeals to already experienced iPhone developers.
If you’re an experienced iPhone developer, and you have no intentions to
port to other platforms, then don’t use SDL.

To C/C++ developers who have never done any Objective-C programming but
want to make iOS apps; however, SDL is probably the most fully-featured way
to do so that will be familiar to them. This will save them a bunch of
effort and countless hours of development time.

To C/C++ developers who want to support as many platforms as possible,
including iOS as one of those; there really is no other choice (well RTsoft,
the creators of ClanLib, have Photon SDK… but it fails hard by
comparison).

SDL is not the one-solution-fits-all for application development needs, by
any means.


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


? ? -Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

[quote=“Vittorio G.”]imho sdl
Sam, wasn’t there a major update that would have created a
uiviewcontroller instead of a uiview for sdl contents?
/quote]

Not really needed.

Here’s a couple interesting methods I wrote.

This first one SwapViews, get the windows stack, gets the top most view which in this case is the sdl created view
and moves it to the bottom of the windows stack.

-(void) swapViews {
UIWindow *windows = [[UIApplication sharedApplication] keyWindow];
NSLog(@"the app has %d views ",[windows.subviews count]);
//toggle_pause();
UIView *view = [window.subviews objectAtIndex:0];
[view removeFromSuperview];
[windows addSubview:view];
}

So here we have two views, one of which has the subview created by sdl
we want to swap between the two views with a flip translation animation of duration 1.

first firstView is an sdl open gl view
secondView is a view created by the ios api with a uitableview controller on it and a few other controls

-(void) swapViewsWithTransition {
UIWindow *windows = [[UIApplication sharedApplication] keyWindow];
UIView *firstView = [window.subviews objectAtIndex:0];
UIView *secondView = [window.subviews objectAtIndex:1];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:([secondView superview] ? UIViewAnimationTransitionFlipFromRight : UIViewAnimationTransitionFlipFromLeft) forView:firstView cache:YES];
[firstView removeFromSuperview];
[windows addSubview:firstView];
[UIView commitAnimations];

}

and of course there is no reason you can’t do something along these lines.

SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
[data->uiwindow addSubview:localNavigationController.view];

this could easily be a splitviewcontroller , a tabviewcontroller etc.

michelle -
i was wondering if you had a simple example of an SDL project setup using a UIViewController.
i am doing an application port to iPad and can get nothing to display on this thing. i fear i am setting up the iPad part incorrectly (i.e i have no view controller at the moment).
if it’s better to contact you off-line via email i would be glad to do that as well.

thanks…

pete

michelle -
sorry - should be more specific and give more details.

as a test, i was trying to wedge the happy.c SDL demo application into a newly created empty View-Based Application.
iow, get the app to start and see the faces flying around… so far… no luck. i’m not sure i’ve put the code in the right place.
i’m pretty new to iPhone dev… so i’d appreciate any help i could get!

if you want to contact me over email, i’m at :

iampeteandrews AT gmail dotcom.

thanks!

pete