Delta Engine
»
Support
»
Platforms
»
How to build for iOS/Android/WP7
Joined: 8/24/2011(UTC) Posts: 2
|
Hi al,
I'm looking at the private beta now and one thing that I would really like to test is the cross-platform features of the engine. How can I make one of the test application build for iOS, Android or WP7?
Cheers, Maurice
|
|
|
|
Joined: 8/22/2011(UTC) Posts: 61 Location: Switzerland
Was thanked: 4 time(s) in 4 post(s)
|
In the beta only windows games are possible. You have to wait for the release at the end of the september I think
|
|
|
|
Joined: 8/21/2011(UTC) Posts: 7 Location: Aachen
|
No, the release is mid 2012. The Public beta starts at the end of september.
|
|
|
|
Joined: 8/21/2011(UTC) Posts: 61
Thanks: 1 times Was thanked: 1 time(s) in 1 post(s)
|
I think that we still can't build for other platform in the current beta version. We should at least wait for next version which has more available tools. Edited by user Wednesday, August 24, 2011 6:29:17 PM(UTC)
| Reason: Not specified
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
Originally Posted by: Dominik  In the beta only windows games are possible. You have to wait for the release at the end of the september I think Exactly. Version v0.9.0 is the first were we allow this. If you already working on some game and need some early testing, contact us and we might be able to help, but 30. September is not so far away, is it? ^^
|
|
|
|
Joined: 8/21/2011(UTC) Posts: 8
Thanks: 2 times
|
How to write code for different devices or for different resolutions?
#ifdef macross or something like this if (System.Device.GetOSType() == IOS) ... else if(System.Device.GetOSType() == ANDROID) ...
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
You can use #if IPHONE (or use your own defines for each device if you want to) or Application.Information.IsMobileDevice or Application.Information.MachineName (or any of the other properties available). For the resolution you should use Application.Window.ViewportPixelWidth and .ViewportPixelHeight and you can also check Application.Information.DefaultResolution. But none of this matters because if you look at any of the games, any of the engine code, we never use this functionality (neither ifdefs nor platform checks in code). All we use is the Screen class, which works in quadratic space (between 0.0 and 1.0), there is no need to write resolution dependent code and if you want to do that you can still use the Screen class as it provides conversions between pixel space and quadratic space. For details see: http://deltaengine.net/Wiki.ScreenSpaceThis will all make more sense when we release the UI Editor and some more games with advanced UI. You are obviously free to use pixel space code in your game, you just have to convert it to quadratic space for most engine draw methods and then your game will only work on the pixel space resolutions you write for.
|
|
|
|
Joined: 12/14/2011(UTC) Posts: 18
Thanks: 6 times
|
There is something I would like to know (there is no Scene Editor or anything like it available to indie developers right now, isn't it?): How does the scaling work? Is it automatically scaled to the screen size, so at least one of the dimensions (the bigger one) is fitted to screen size? E.g. on an iPhone 3G this would mean the height (complete; values from 0 to 1 in the Screen Space example) is scaled to 480px, while on the left and right side things are cropped, while an iPhone 4G the height would be scaled to 960px (with the same stuff being cropped). At the same time, on a Motorola Droid the height would be scaled to its 854px, with more stuff being cropped due to it's different aspect ratio. (I hope the excellent picture claryfies it :-) ) In this case all the necessary graphics/buttons etc. would have to be ~ in the middle of the screen right? Edited by user Saturday, December 17, 2011 11:57:20 AM(UTC)
| Reason: Not specified maritn attached the following image(s):  ScreenRatios.png (19kb) downloaded 30 time(s).You cannot view/download attachments. Try to login or register.
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
Hi Martin, There is a wiki page about this topic: http://deltaengine.net/Wiki.ScreenSpaceYes, what you are saying is true, but it would not be good game design to put your game elements anywhere in the 0-1 quadratic space. It is a better idea to use a safe region (we usually use 0.25-0.75) that will always work. If your game is landscape mode only it can be much bigger. Instead what usually happens in game code is using alignments. Then stuff still works automatically fine in any resolution. We suggest using the Scene and UI classes for that, but doing it yourself in rendering is not hard (there are many examples in the unit test). If that solution is not flexible enough you can check for the target platform (see SystemInformation class) or provide different code paths for different aspect ratios or resolutions if you like. I highly recommend not using #if IPHONE, etc. code (it will work, but it is not very flexible and we try to keep all game code clean of any defines). Hope that helps!
|
|
|
|
Joined: 12/14/2011(UTC) Posts: 18
Thanks: 6 times
|
Thanks for the answer, it did help!
Yeah I read that wiki entry, but I was not completely sure if I got it right. And yes, putting that stickman where it is in the picture would not be a good design, I just wanted to underline the possible cropping with differing aspect ratios. :)
|
|
|
|
Delta Engine
»
Support
»
Platforms
»
How to build for iOS/Android/WP7
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.