Hi Guys,
Thanks for the feedback and comments, it's a great indicator as to what the community is looking for to create cross-platform apps
Just to keep up the interest, here is some code that is compiling and running now in AppGameKit Tier 1:
rem Small Game Test
LoadImage ( 1, "backdrop.png", 0 )
Sprite ( 1, 1, 0.0, 0.0 )
img=LoadImage ( "sprite.png", 0 )
iDeviceWide# = 240 : iDeviceHigh# = 360 : iAspectRatio#=(iDeviceWide#/iDeviceHigh#)
gridx#=100.0/7.0
gridy#=gridx#*iAspectRatio#
dim sprx(500) as float
dim spry(500) as float
dim sprfall(500) as integer
for s=1 to 300
Sprite ( 100+s, img, -100.0, -100.0 )
SetSpriteSize ( 100+s, gridx#, gridy# )
next s
gameloop=1
gamerestart=1
while gameloop=1
rem Reset
if gamerestart=1
gamerestart=0
gamespeed=12
rowpos=0
rowindex=1
rowqty=3
lastrowqty=3
rowdir=1
rowtimer=0
rowobjoffset=1
rowobjoffsetindex=0
gameblockfall=0
for s=1 to 500
sprfall(s)=0
next s
endif
rem Control
if gameblockfall=0
if GetTouchPressed()=0 then click=0
if GetTouchPressed()=1
if click=0
inc rowindex
tshiftpos=0
if rowindex=2
rowqty=3
else
if lastrowpos>rowpos
deduct=lastrowpos-rowpos
rowqty=rowqty-deduct
for trim=0 to deduct-1
sprfall(100+rowobjoffset+trim)=1
next trim
tshiftpos=deduct
else
if lastrowpos<rowpos
deduct=rowpos-lastrowpos
deduct=deduct-(lastrowqty-rowqty)
if deduct>0
rowqty=rowqty-deduct
for trim=0 to deduct-1
sprfall(100+rowobjoffset+((lastrowqty-1)-trim))=1
next trim
endif
endif
endif
if rowqty<=0
gameblockfall=1
rowobjoffsetindex=rowobjoffset
endif
endif
lastrowpos=rowpos+tshiftpos
lastrowqty=rowqty
rowobjoffset=rowobjoffset+3
gamespeed=gamespeed-1
rowpos=-1
rowdir=1
click=1
endif
endif
rem Logic
inc rowtimer
if rowtimer>gamespeed
if rowdir=1 then rowpos=rowpos+1
if rowdir=2 then rowpos=rowpos-1
rowtimer=0
endif
if rowpos>5 then rowdir=2
if rowpos<-1 then rowdir=1
rem Row Qty
for rq=0 to rowqty-1
sprx(100+rowobjoffset+rq)=(rowpos+rq)*gridx#
spry(100+rowobjoffset+rq)=100.0-(rowindex*gridy#)
SetSpritePosition ( 100+rowobjoffset+rq, (rowpos+rq)*gridx#, 100.0-(rowindex*gridy#) )
next rq
for rq=0 to rowobjoffset+rowqty
if sprfall(100+1+rq)=1
spry(100+1+rq)=spry(100+1+rq)+1.0
SetSpritePosition ( 100+1+rq, sprx(100+1+rq), spry(100+1+rq) )
endif
next rq
else
rem block fall to start again
if rowobjoffsetindex>0
inc rowtimer
if rowtimer>5
rowobjoffsetindex=rowobjoffsetindex-1
rowtimer=0
endif
else
inc rowtimer
if rowtimer>50
gameblockfall=0
gamerestart=1
rowtimer=0
endif
endif
for rq=rowobjoffsetindex to rowobjoffset+rowqty
spry(100+1+rq)=spry(100+1+rq)+1.0
SetSpritePosition ( 100+1+rq, sprx(100+1+rq), spry(100+1+rq) )
next rq
endif
Sync()
endwhile
end
As you can see, it's still very close to DBC/DBP but brings some of the better features from other languages such as spaceless commands, brackets on non-expression commands and commands that auto-assign index numbers such as img=LoadImage("file",flag). Still a few tweaks to make such as square brackets for the arrays, but I've been coding DBP for so long I'm going to miss by smooth brackets for array handling
We've also had time to do lots of performance tests across multiple devices and we're pleased to report the interpreter system is hideously fast, and more than capable of running your apps. To put the engine in context, the Dark Basic Classic product was an interpreter engine and some amazing games have been created with that language.
Watch out for the newsletter for more AppGameKit news! Again thanks for the feedback, it's a great help.
I drink tea, and in my spare time I write software.