Hi all,
I'm having major major issues with compatibility of my simple game on multiple devices, which I'll be honest is completely reducing my faith in releasing anything more complex to nil, so hopefully some or all of these issues will ring true to someone else.
First off, the 3D planes are causing me a NIGHTMARE. Does anyone know, are 3D planes affected by setvirtualresolution? They don't appear to be from what I've seen, nor does some of the spacing. All my graphics are designed to be 1280*720, or 16:9, but I have one device at that aspect and one that is native to 1024*800, a more square screen. To begin with, all the sprites were the wrong size on this tablet, scrunched up sideways. On a smaller phone with yet another aspect ratio, they were even worse. But the size values of the 3d D planes seem to be WAY out, much more than the sprites. The sky is 3 simple planes, scrolled sideways. As one goes past a lower limit, it is moved to the end of the other two to create a constant scrolling effect. This works perfectly, but on one device they meet the water perfectly, and on another they have a huge gap, and another still they overlap by almost a third.
I got around most of these problems thus: I now open with
if getdevicename()<>"windows"
setvirtualresolution(getdevicewidth(),getdeviceheight())
else
setvirtualresolution(1280,720)
endif
SetOrientationAllowed(0,0,1,1)
xscale#=getdevicewidth()/1280.0
yscale#=getdeviceheight()/720.0
Now the xscale# and yscale# hold the multiplied ratio's that are needed to size and space eberything correctly. So on a device that supports 1280*720, a sprite of that exact size still shows that size as the multiplier is 1.0, however on my tablet with a width of 1024 the ratio is 0.8. So sizing the sprite to 1280*xscale# makes it perfectly fit 1024. I've applied this to the 3d planes as well, and on both my devices it works well, and all sprites are perfect, however on another devices the 3d planes have become oddly narrow. This is hard to describe, but they are still together seamlessly, but now almost all 3 can fit on the screen at once, as though the 3d aspect ratio has gone all to pot. Are 3d objects subject to the virtual resolution does anyone know?
Secondly, and worse still, is that two different models of Humwai phones, both android 4.1 or greater and brand new, display nothing at all. The game starts, the music plays, the advert displays...but nothing on screen. Knowing where the buttons are, I can even start a game and hear it playing, my dying, and then it end....but still no picture, 3d planes or simple sprites. Has anyone else had this problem with Humwai devices? I suspect it may be because they are not reporting a devicewidth and height and therefor the ratio's are setting to zero but I've no idea how to get around this?
I don't suppose anyone else tried the game and found odd display properties?