Quote: "would I have to re-write it all on the appkit"
Yes, however...
Quote: "could it be easily converted to it"
Fairly easily converted on a coding level since the structure and core are the same
basically. The functions/commands/keywords are a little different since AppGameKit is geared towards multiple platforms. I grabbed this example off of CodeBase and just formatted the type...endtype for readability but apart from that, it's intact:
Credits to Marl
` This code was downloaded from The Game Creators
` It is reproduced here with full permission
` http://www.thegamecreators.com
type displayType
width
height
aspect#
orient
vMin
vMax
vWidth
vHeight
vWidthVis
vHeightVis
isLandscape
textSize
zoom#
maxZoom#
minZoom#
fps
endtype
global myDisplay as displayType
preferredFPS = 30
// Typical Frame Rate for Android Phones
preferredMinRes = 320
// Android baseline resolution ( T-Mobile G1 @ 320 x 480 )
initDisplay ( preferredMinRes , preferredFPS )
// *** For demonstration of Zoom, can be removed ***
// Test Routine - Initialisation
addVirtualJoystick ( 1 , myDisplay.vWidth - 64 , myDisplay.vHeight - 64 , 64 )
// Sprite to Show Change to Screen Size
mySprite = CreateSprite ( 0 )
setSpriteSize ( mySprite , 50 , 50 )
setSpritePosition ( mySprite , 50 , 50 )
setSpriteColor ( mySprite , 255 , 200 , 160 , 255 )
// End of Test Routine
// *************************************************
do
// *** For demonstration of Zoom, can be removed ***
// Test Routine - Loop Portion
if getVirtualJoystickY ( 1 ) <> 0
myDisplay.zoom# = myDisplay.zoom# - getVirtualJoystickY ( 1 ) / 8.0
setViewZoom ( myDisplay.zoom# )
endif
// End of Test Routine
// *************************************************
if GetRawKeyState ( 27 ) = 1 then exit
checkOrientation( 0 )
// App Code Goes Here
// Optional Function to Show Variable Contents
showMyDisplayData ( )
sync ( )
loop
function showMyDisplayData()
print ( "myDisplay")
print ( " .width...... : " + str ( myDisplay.width ) )
print ( " .height..... : " + str ( myDisplay.height ) )
print ( " .aspect#.... : " + str ( myDisplay.aspect# ) )
print ( " .orient..... : " + str ( myDisplay.orient ) )
print ( " .vMin....... : " + str ( myDisplay.vMin ) )
print ( " .vMax....... : " + str ( myDisplay.vMax ) )
print ( " .vWidth..... : " + str ( myDisplay.vWidth ) )
print ( " .vHeight.... : " + str ( myDisplay.vHeight ) )
print ( " .isLandscape : " + str ( myDisplay.isLandscape ) )
print ( " .textSize... : " + str ( myDisplay.textSize ) )
print ( " .zoom#...... : " + str ( myDisplay.zoom# ) )
print ( " .maxZoom#... : " + str ( myDisplay.maxZoom# ) )
print ( " .minZoom#... : " + str ( myDisplay.minZoom# ) )
print ( " .vWidthVis.. : " + str ( myDisplay.vWidthVis ) )
print ( " .vHeightVis. : " + str ( myDisplay.vHeightVis ) )
print ( " .fps........ : " + str ( myDisplay.fps ) )
print ( " " )
print ( "Screen fps... : " + str ( screenfps ( ) ) )
endfunction
function initDisplay ( thisVMin , thisFPS )
myDisplay.fps = thisFPS
myDisplay.vMin = thisVMin
myDisplay.maxZoom# = 3.0
myDisplay.minZoom# = 0.3
myDisplay.width = getDeviceWidth ( )
myDisplay.height = getDeviceHeight ( )
myDisplay.aspect# = getDisplayAspect ( )
if myDisplay.width > myDisplay.height
myDisplay.isLandscape = 1
myDisplay.vMax = myDisplay.vMin * myDisplay.aspect#
else
myDisplay.isLandscape = 0
myDisplay.vMax = myDisplay.vMin / myDisplay.aspect#
endif
myDisplay.textSize = myDisplay.vMin / 20
setPrintColor ( 255 , 255 , 255 , 200 )
SetSyncRate ( myDisplay.fps , 0 )
SetOrientationAllowed ( 1 , 1 , 1 , 1 )
checkOrientation( 1 )
endfunction
function checkOrientation( thisForce )
myDisplay.orient = getOrientation ( )
// Fiddle to get around windows always returning orientation as 1 - even in landscape
if GetDeviceName( ) = "windows"
thisLandscape = myDisplay.isLandscape
else
thisLandscape = ( myDisplay.orient -1 ) / 2
endif
if thisLandscape <> myDisplay.isLandscape or thisForce
myDisplay.isLandscape = thisLandscape
if myDisplay.isLandscape
myDisplay.VHeight = myDisplay.vMin
myDisplay.VWidth = myDisplay.vMax
else
myDisplay.VHeight = myDisplay.vMax
myDisplay.VWidth = myDisplay.vMin
endif
setVirtualResolution ( myDisplay.VWidth , myDisplay.VHeight )
setPrintSize ( myDisplay.textSize )
endif
myDisplay.zoom# = GetViewZoom ( )
if myDisplay.zoom# < myDisplay.minZoom#
myDisplay.zoom# = myDisplay.minZoom#
setViewZoom( myDisplay.zoom# )
endif
if myDisplay.zoom# > myDisplay.maxZoom#
myDisplay.zoom# = myDisplay.maxZoom#
setViewZoom( myDisplay.zoom# )
endif
myDisplay.vWidthVis = myDisplay.vWidth / myDisplay.zoom#
myDisplay.vHeightVis = myDisplay.vHeight / myDisplay.zoom#
endfunction
remstart
displayType
width width of device screen on startup
height height of device screen on startup
aspect# aspect of device screen on startup
orient current orientation - from getOrientation ( ) each frame
vMin Virtual Resolution short side - irrespective of orientation
vMax Virtual Resolution long side - irrespective of orientation
vWidth Virtual Resolution width - based on orientation
vHeight Virtual Resolution height - based on orientation
isLandscape true if device is currently in landscape
textSize text size - initially set to 1/20th of vMin
zoom# display zoom - from GetViewZoom ( ) each frame
vWidthVis Virtual resolution width visible allowing for Zoom
vHeightVis Virtual resolution height visible allowing for Zoom
maxZoom# maximum zoom allowed
minZoom# minimum zoom allowed
fps preferred fps
remend
As you can see, it's mostly like DBPro but for certain function names. The conversion would be dead-easy. Best thing to do is download the trial version of DBPro and AppGameKit and try it for yourself. Write a basic bouncing square or something and then see how easily it translates.