I think the problem with AppGameKit is that they've made it so easy, that it becomes hard. Example, I want to create a sprite, and I want to create an app/program that works both on my computer and my android devices. All of the devices have of course different screen formats, but AppGameKit scales automatically, so everything should be fine?
My problem is that the appearance changes depending on which device I am using. I have written a piece of code to illustrate this (below) - the program creates a display, 1280x720 and then it creates a sprite and scales it down so that it covers 1/4 of the screen (square, top corner) I then draw a cross, for references. On my PC this shows up as I intended, the square is withit the cross, but when I broadcast the same app to my phone the square is shrinked and drawn inside the 1/4 part of the cross.
How do you guys deal with this? I am constantly running into this problem with sprites, they are scaled differently depending on which device you are working on. It's a mess. One of the prime reasons I need to get this to work is that I want to draw (DrawLine) on the screen and there is no way to draw in the background, you are basically forced to use sprites to draw background images, which is kind of backward, in my opinion. Sprites used to be used small hardware accelerated objects which you could move around the screen quickly and independently (Commodore 64 came up with this.)
So, how do you guys deal with this?
aw=1280
ah=720
// set window properties
SetWindowTitle( "scaletest" )
SetWindowSize( aw, ah, 0 )
SetVirtualResolution( aw, ah )
SetOrientationAllowed( 1, 1, 1, 1 )
SetScissor( 0,0,0,0 )
// create a sprite that is aw/2,ah/2
csquare=MakeColor(140,26,15)
ccross=MakeColor(217,211,137)
img=CreateRenderImage(aw,ah,0,0)
SetRenderToImage(img,0)
DrawBox(0,0,aw,ah,csquare,csquare,csquare,csquare,1)
SetRenderToScreen()
spr=CreateSprite(img)
SetSpriteScale(spr,0.5,0.5)
SetClearColor(20,30,38)
do
DrawLine(aw/2,0,aw/2,ah,ccross,ccross) // draw a cross for reference
DrawLine(0,ah/2,aw,ah/2,ccross,ccross)
Sync()
loop