Hi,
I'm considering using sparrow but I'd like to focus my attention to the iPad. Any plan to support that resolution ?
thanks,
guido
Hi,
I'm considering using sparrow but I'd like to focus my attention to the iPad. Any plan to support that resolution ?
thanks,
guido
Hi Guido!
We have not yet tested it, but Sparrow should work just fine with the iPad!
All Sparrow content is rendered into the "SPView"-class, which is just a subclass of Cocoa's "UIView". You can scale that view to any size.
Even better: the size of the game and the size of the SPView must not be the same. Have a look at the initializer of the SPStage-class:
- (id)initWithWidth:(float)width height:(float)height;
The width and height define the extents of your game. Let's say you use 1024x768 for width and height. If you move something to the position (x=1024, y=768), it will be in the bottom right corner -- no matter how big the SPView is!
That means, if you want a game to work on both devices:
On both devices, the game will render full screen -- without further changes! (You might want to change textures, though. Automatically switching those will be part of a future Sparrow update.)
I hope that helps!
Best regards,
Daniel
Hi Guido!
We have not yet tested it, but Sparrow should work just fine with the iPad!
All Sparrow content is rendered into the "SPView"-class, which is just a subclass of Cocoa's "UIView". You can scale that view to any size.
Even better: the size of the game and the size of the SPView do not have to be the same. Have a look at the initializer of the SPStage-class:
- (id)initWithWidth:(float)width height:(float)height;
The width and height define the extents of your game. Let's say you use 1024x768 for width and height. If you move something to the position (x=1024, y=768), it will be in the bottom right corner -- no matter how big the SPView is!
That means, if you want a game to work on both devices:
On both devices, the game will render full screen -- without further changes! (You might want to change textures, though. Automatically switching those will be part of a future Sparrow update.)
I hope that helps!
Best regards,
Daniel
I just tried a quick upgrade of the demo app. It works fine on the iPad simulator.
Basically, I search and replaced 320 and 480 with 768 and 1024. Then I right-clicked on the target "Demo" and chose the "Upgrade Current Target for iPad" item. Then I chose "Universal".
Finally I switched the Active SDK to "IPhone Simulator 3.2"
Thanks a lot for sharing that!
where do you switch the width and height of the screen ?
in the appdelegate of in another class ?
At 2 places:
The size you provide in the application delegate ([[Game alloc] initWithWidth:1024 height:768]) is the size of the internal coordinate system of Sparrow. You don't necessarily have to change it, but it makes sense to do so.
The other place is "MainWindow.xib". That has to be a 1024x768 iPad window, and the view object (the only object that is part of the window) has to fill the whole window. This view object is the place where all Sparrow content is rendered into.
I hope that helps!
Daniel
On both devices, the game will render full screen -- without further changes! (You might want to change textures, though. Automatically switching those will be part of a future Sparrow update.)
I hope that helps!
Best regards,
Daniel
?
If your post means to remind me that I wanted to add that feature in a future Sparrow update, then I recommend you read the following blog post:
http://forum.sparrow-framework.org/topic/ios-42-ipad-strange-behavior?#post-2345
That describes the best way to create a universal application for iPhone SD/HD + iPad.
I hope that helps!
Best regards,
Daniel
The other place is "MainWindow.xib". That has to be a 1024x768 iPad window, and the view object (the only object that is part of the window) has to fill the whole window. This view object is the place where all Sparrow content is rendered into.
That has to be a 1024x768 iPad window, and the view object (the only object that is part of the window) has to fill the whole window. This view object is the place where all Sparrow content is rendered into.
Thanks
--------------------------------------------
iPad2 casesiPad 2 caseipad2 speaker
The other place is "MainWindow.xib". That has to be a 1024x768 iPad window, and the view object (the only object that is part of the window) has to fill the whole window. This view object is the place where all Sparrow content is rendered into.
-------------------------------------
ipad 2 caseipad 2 coversipad 2 accessory
You must log in to post.