Hello Solar2D world!
I ran a search in the forum.
“Defining multiple target devices in build.settings”
And, I was a bit surprised that nothing jumped out at me.
I can begin to imagine (and understand) why a developer must choose a target device right out of the gate.
Perhaps the app/game is defined ‘specifically’ for a single device,
and is not intended to be ran on anything other than that single targeted device.
Also, I can imagine why a developer can NOT expect the app/game
to run on EVERY device out there;
nor all devices that Solar2D can target, all in one build;
.apk and .ipa files aside.
With all that said, my initial understanding of Solar2D’s ability,
is that it can target multiple devices (cross-platform deployment) using one ‘code base’.
And I do know that Solar2D does indeed do that.
However, I personally have not been able to find a build.settings file where, for instance,
it at least defines target builds for the ‘three most popular aspect ratios’ available.
2:3 – Though this is my content area Aspect Ratio
3:4
16:9
I’m sure it is right under my nose, as many things have been when searching for answers;
or that I have indeed read but it just hadn’t clicked yet;
and, for some reason is always just out of reach of my efforts to find them,
if not simply understand them.
I definitely don’t put that at the fault of this forum or online documentation.
And I do my best not to be lazy and post another redundant “Johnny-Come-Lately” inquiry;
Pestering those that have seen it all too many times and responded, graciously, countless times before.
And perhaps my understanding of targeting multiple devices is completely nil.
Happily, I have read both of the following, several times of course!:
Project Configuration
Project Build Settings
And though it seems to ‘set the stage’ as to how to target multiple devices,
to my newbie-eye, those online docs alone, leave me a bit wanting.
In short, I was just wanting to peak under the hood of a build.settings file
that at least targets the three common aspect ratios mentioned.
Also, while we are at it, perhaps, target three of each,
ie. in both Android and Apple devices.
Android
A phone or two?
A tablet or two?
-- build.settings
settings =
{
android =
{
-- Nothing I have seen targets multiple Android devices
},
}
Apple
A phone or two?
An iPad or two?
-- build.settings
settings =
{
iphone =
{
-- Nothing I have seen targets multiple Apple devices
},
}
For better or for worse, I have chosen to target the Amazon Fire breed of devices.
Though, I am not setting my content area to any specific Fire Tablet aspect ratio
or a literal (1 to 1 mapping) ie. point-to-pixel correspondence for a specific Fire device screen size.
Of course, I have gone through the graphical motions of creating a background.png
that covers even the longest of aspect ratios that I have come across, namely, 21:9;
and, that looks acceptable on the devices within those Stubby and Lengthy screens,
at least as seen in the Solard2D simulator.
To that end, I have (so far) found a background of 1866pts x 900pts that covers it all!
Meaning, (again, as viewed in the Solar2D simulator)
there are NO black bars on any virtual device available.
To be sure, I am still not 100 percent sure about this choice of ‘over-sized’ background.
1866pts x 900pts
And I am still working on those details.
But, if I am wanting to (in the future at least) to try and target many devices,
I may as well cover this ‘l o n g’ device issue right out of the gate.
Even though, I intend my game to run on a ‘stubby’ Tablet, though, preferably, not exclusively.
I am far from needing to build to (cross-platform) or multiple devices at this time,
and again, plan on focusing my attention on my personal Amazon Fire for debug/test/builds.
But I figure I may as well pull that veil of ignorance aside,
and at least see what I have ahead of me.
That is, aside from recoding my 10 year old prototype-game all over again.
I trust it won’t take me as long this time.
In short, I don’t want to build just for Amazon Fire,
though, if that’s all that were available to me, I would still do it,
and would not complain.
I guess I am just still ignorant of my target device options, and how-to’s.
Anyone care to share a build.settings file
that I can see and intimidate myself, by acknowledging my current lack of understanding
when it comes to this issue?
Preferably one that targets cross-platform
and perhaps a phone and tablet from each Android and Apple?
Or, is this issue covered in the Android and Apple specific online documentation
that I am basically clueless to?
If so, oops! Sucks to be me.
Regardless, can I still ‘cheat’ off of your example, (so to speak)
even though I don’t plan on (nay, refuse to) copy and paste it blindly in my build.settings,
as it may not suit my particular goals?
Thanks again
Johnny Come Lately
AKA Gilby
![]()
