@Dvader,
I notice you set up variables for virtual resolution, but don't use these in the resolution code.
Including these variables, I managed to streamline it a bit;
// Set Preferred resolution height(landscape)
virtual_height# = 768
// obtain the device width and height
device_width# = GetDeviceWidth( )
device_height# = GetDeviceHeight( )
if device_width# > device_height#
// Device is reporting as landscape
virtual_width# = virtual_height# * ( device_width# / device_height# )
sprite_scaling# = device_height# / virtual_height#
else
// Device is reporting as portrait (swap dev h/w)
virtual_width# = virtual_height# * ( device_height# / device_width# )
sprite_scaling# = device_width# / height#
endif
SetVirtualResolution ( virtual_width# , virtual_height# )
setorientationallowed(0,0,1,0)
setresolutionmode(1)
setsyncrate(0,1)
Now virtual_width# & virtual_height# contain the virtual resolution - in your version they contained the physical resolution at this point.
But I suspect the problem is more to do with the positioning of the sprites.
Quote: "I then position my objects, text etc by altering the original pixel position to a percentage of the virtual resolution."
This is the area I would look at, especially how the scaling is calculated, it's easy to get this part wrong.
As with your version, my edit only uses the height value (768) in the scaling calculations and the sprite maths should too.
I have included a variable
sprite_scaling# to help with this.