We're building a game in starling, and we want it to be multiplataform, but we found some problems with resolutions,
we have designed the game for iPad, and we want it to run in samsung galaxy tab 10.1 and iPhone,
The problem we have in SGT 10.1 is that we want to center the content and add an extra background to fix the black tires in the sides, and in iPhone 4, the content is bigger that the screen...
do you know a way to solve it?
Thanks
Here is a link that explains how to develop for multiple resolutions in starling:
http://wiki.starling-framework.org/manual/multi-resolution_development
If your assets were created from vector graphics, and don't want to stretch the result bitmap. or you don't want to include several texture atlases.
There's an open source library that should do the trick: https://github.com/XTDStudios/DMT
This library renders the vector assets according to what you give it, and cache it on the device.
online tutorial: http://goo.gl/6NhQk
Related
So we're using Adobe Air to develop iPad games from Flash for an educational kiosk that we're building. The issue is that some of the games are in portrait mode, and some of them look best in landscape mode. To account for this, we've ordered a swiveling kiosk that users can turn to either orientation depending on the game. All of the games are opened from a central app that we've developed as a "launcher" for them, so they're opened from within that other app instead of from the iOS home screen.
I'm using the "Aspect Ratio" command when publishing the game and setting to portrait or landscape depending on which game it is. I'm also setting the "Auto-Orientation" to false (though I've tried it on true as well and had similar issues). However, the two landscape games are showing up incorrectly as you can see in the image below. How can I force those games to show up properly on the iPad?
Keep auto orientation = false. Create your 'portrait' games on a portrait-oriented stage. Now create your 'landscape' games on that same portrait-oriented stage. Make them at their proper scale, so that they run off the stage. You can use a temporary landscape-stage-sized rectangle, on the lowest layer, to represent a proper landscape-oriented stage that you can compose on top of. When your game is all laid out select all layers and rotate the whole magilla 90-degrees. Presto! You just rotate the Pad to play the landscape games.
You may have to switch 'width' and 'height' references in your code for those games, and also 'x' and 'y' references. If you have many of those some simple matrix math will help with the transposition.
I am making a game in flash IDE using adobe air, want to make it landscape full screen, my stage size is 560x320 but it has unused screen on the sides. Can anyone guide me what is the small thing I am missing, rest full game is completed.
Thanks
Don't forget to add in the default image in particular for the iPhone5 you need:
Default-568h#2x.png
This makes sure your stage is the full area of the screen and not windowed. You can see all the sizes here:
http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d129907d2886-8000.html#WS901d38e593cd1bac58d08f9112e26606ea8-8000
Your aspect ratio is not like iPhone (16:10) so if you match your width then graphics will go out of screen vertically. You will have to continue your graphics design on blank area to keep the design continuity.
Still try using,
stage.displayState = StageDisplayState.FULL_SCREEN;
For more info see
stage.displayState
I got pictures in the isolated storage and i want to display them as well as the WINDOWS PHONE APP does.
I would like to reproduce the same effect that the Windows phone app does when you open the camera roll and you scroll through the images..
I find it particularly difficult because of the image orientation (horizontal and the vertical ones). I fit the vertical ones, but as soon as there are an horizontal picture any fit procedure fails!
Example?
thank you
Take a look at the MediaViewer class in the Silverlight Basic Lens sample. http://code.msdn.microsoft.com/wpapps/Basic-Lens-sample-359fda1b
In documentation stated that it is enough to keep the only WXGA splashscreen file and it will be scaled by windows Phone OS automatically.
To display a splash screen for all resolutions, use a single image
file named SplashScreenImage.jpg that is 768 × 1280. The phone
automatically scales the image to the correct size.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206974(v=vs.105).aspx#BKMK_Splashscreens
But when I'm using the only file no scaling occurs. I still could see black line on the top of the phone during app start.
Sample here:
https://dl.dropboxusercontent.com/u/19503836/SplashSample.zip
Thanks for any suggestions
You'll notice that it says "scale" and not stretch - which is exactly what's happening. Windows Phone 8 supports 3 resolutions (so far)...
480x800 (15:9)
720x1280 (16:9)
768x1280 (15:9)
You'll notice that the aspect ratio of #1 and #3 are the same, but #2 is different - and that's the problem.
For an image to fit all resolutions it would have to be stretched, which would look very bad so Windows Phone 8 doesn't do that. Instead, it scales the image to fit the screen but a black/white bar appears at the top of screen for #2.
The only way to avoid the black/white bar at the top of the screen is to create 3 separate splash screen and specify them in the WP8 manifest file.
Note: Making your app work and look correct at multiple resolutions is what every app developer should do. All the major platforms (iOS, Android, Windows 8, etc) support multiple screen sizes and/or resolutions so creating multiple icons sizes, splash screen sizes, background images, and other assets is part of the jobs.
I don't think a "splashscreen.jpg" is a good choice in wp8 any longer, even the templates of sdk doesn't have one.
The reason is if the firts page of your app is massive and your have a splashScreen, you may find your screen blink when starting.
So I would add a blank page and set it as the first page. Also you can add your "Splashscreen" Image here.
I am a bit confused with how the project dimensions I set up in Flash Develop will affect my AIR Application's appearance on Retina and non-Retina iPad displays, and how to work with Bitmaps under these circumstances.
When I run in Flash Player on PC to debug the 2048x1536 is off of my monitor it's so big. I've heard that the stage will scale with the size of the screen, and is just a reference coordinate system, but I don't understand how Bitmaps would work in these conditions... Are the Bitmaps scaled automatically all too? Does it matter whether I set my project dimensions to 2048x1546?
My hesitance to get started with this is that I will be using some spritesheets via Starling and I am confused with how to treat their dimensions in these circumstances.
Plz set me straight if you have knowledge and a minute. Appreciated.
You don't have to use 2048x1536. You can just use 1024x768 for your project dimensions. Make sure that stage.scaleMode = StageScaleMode.SHOW_ALL; but that's the default if I'm not mistaken.
Retina iPads will just show it doubled, so everything gets scaled up to 2048x1536. That means your bitmaps won't look as sharp as they can be, but vector graphics DO look sharp because Flash uses the extra resolution on a retina screen.
You could write some code to use higher-resolution bitmaps if you're on a retina display but I don't actually know of a good way of detecting retina resolution other than checking the screen dimensions. Or you could use high-resolution bitmaps that will be scaled down on non-retina screens (make sure to allow smoothing).
Also, I don't have experience with Starling myself so that may behave differently. Hope this helps a bit anyway.