Here's an effort I've made as an example of what can be done in AppGameKit without graphics:
rem
rem Destruction Example
rem by Steven Holding
rem
rem Landscape App
SetDisplayAspect( 4.0/3.0 )
setPrintColor(0,0,0,255)
rem define UDTs
type buildingType
spr as integer
endtype
global numB as integer
numB = 50
dim building[numB] as buildingType
dim sky[10] as integer
type bitType
building as integer
spr as integer
phy as integer
endtype
dim bit[numB*100] as bitType
type explType
state as integer
spr as integer
vx as float
vy as float
endtype
dim explosion[10000] as explType
rem create a sky
create_sky(173,216,230,255,255,255)
rem create a random city
create_city(numB)
rem set physics
setPhysicsWallLeft(0)
setPhysicsWallRight(0)
setPhysicsWallTop(0)
`setPhysicsDebugOn()
`#####################
rem A baxslash Did It!
rem main loop
do
rem print instructions
Print("Click to DESTROY!")
rem check for interaction
if getPointerPressed()=1
px# = getPointerX()
py# = getPointerY()
hit = getSpriteHit(px#,py#)
if hit>0
if is_building(hit)>0
d = getSpriteDepth(hit)
deleteSprite(hit)
phy_building(hit,d)
endif
endif
create_explosion(px#,py#)
endif
rem update explosions
update_explosions()
Sync()
loop
rem main loop
`#####################
rem turn building into physics objects
function phy_building(building,d)
for b=1 to numB*100
spr = bit[b].spr
if spr > 0
bld = bit[b].building
if bld = building
setSpritePhysicsOn(spr,2)
setSpriteVisible(spr,1)
setSpriteDepth(spr,d)
bit[b].phy = 1
endif
endif
next
endfunction
rem add explosion forces to the physics components
function create_explosion(x#,y#)
for b=1 to numB*100
spr = bit[b].spr
if spr > 0
phy = bit[b].phy
if phy = 1
dx# = getSpriteX(spr) - x#
dy# = getSpriteY(spr) - y#
d# = sqrt((dx#*dx#) + (dy#*dy#))
if d#<5.0
fx# = dx#/(5 - d#)
fy# = dy#/(5 - d#)
setSpritePhysicsVelocity(spr,fx#*50,fy#*50)
endif
endif
endif
next
spawn_explosion_sprites(x#,y#)
endfunction
rem create a visual explosion
function spawn_explosion_sprites(x#,y#)
for s=1 to 20
e = findFreeExpl()
if e>0
spr = createSprite(0)
s# = random(100,300)*.1
setSpriteSize(spr,s#,s#)
setSpriteOffset(spr,s#*0.5,s#*0.5)
setSpritePositionByOffset(spr,x#,y#)
setSpriteDepth(spr,1)
setSpriteAngle(spr,random(0,359))
c = random(180,255)
setSpriteColor(spr,c,c,128,255)
explosion[e].spr = spr
explosion[e].state = 1
endif
e = findFreeExpl()
if e>0
spr = createSprite(0)
s# = random(100,300)*.01
setSpriteSize(spr,s#,s#)
setSpriteOffset(spr,s#*0.5,s#*0.5)
setSpritePositionByOffset(spr,x#,y#)
setSpriteDepth(spr,0)
setSpriteAngle(spr,random(0,359))
c = random(0,50)
setSpriteColor(spr,c,c,0,255)
explosion[e].spr = spr
explosion[e].state = 2
explosion[e].vx = random(-100,100)*.01
explosion[e].vy = random(-100,100)*.01
endif
next
endfunction
rem update visual explosions
function update_explosions()
for e=1 to 10000
spr = explosion[e].spr
if spr>0
state = explosion[e].state
select state
case 1
rem centre of explosion
a# = getSpriteColorAlpha(spr)
a# = a# - 5
if a#<0
deleteSprite(spr)
explosion[e].spr = 0
else
setSpriteColorAlpha(spr,a#)
s# = getSpriteWidth(spr)
setSpriteSize(spr,s#*0.98,s#*0.98)
setSpriteAngle(spr,getSpriteAngle(spr)+1)
endif
endcase
case 2
rem moving parts
a# = getSpriteColorAlpha(spr)
a# = a# - 2
if a#<0
deleteSprite(spr)
explosion[e].spr = 0
else
setSpriteColorAlpha(spr,a#)
s# = getSpriteWidth(spr)
setSpriteSize(spr,s#*0.98,s#*0.98)
setSpriteAngle(spr,getSpriteAngle(spr)+3)
setSpritePosition(spr,getSpriteX(spr)+explosion[e].vx,getSpriteY(spr)+explosion[e].vy)
endif
endcase
endselect
endif
next
endfunction
rem find free explosion slot
function findFreeExpl()
for e=1 to 10000
if explosion[e].spr=0
exit
endif
next
if e>10000 then e=-1
endfunction e
rem check if sprite is a building sprite
function is_building(spr)
for b=1 to numB
if building[b].spr = spr
exit
endif
next
if b>numB then b=-1
endfunction b
rem create a 'gradient' sky
function create_sky(r1,g1,b1,r2,g2,b2)
for y = 1 to 10
spr = createSprite(0)
setSpriteSize(spr,100,10)
setSpriteColor(spr,r1 + (r2 - r1) * 0.1 * (y - 1), g1 + (g2 - g1) * 0.1 * (y - 1), b1 + (b2 - b1) * 0.1 * (y - 1), 255)
setSpritePosition(spr,0,(y-1)*10)
setSpriteDepth(spr,1000)
next
endfunction
rem create a set of sprites to represent a city
function create_city(num)
for b=1 to num
rem create bounding sprites
w#=random(1,10)
h#=w# * random(1,8)
spr = createSprite(0)
setSpriteSize(spr,w#,h#)
setSpritePosition(spr,random(-w#,100),100-h#)
d# = w# * h#
f# = (800.0 - d#) / 800.0
rd = f#*87
gn = f#*108
bl = f#*115
setSpriteColor(spr,rd,gn,bl,255)
setSpriteDepth(spr,200 - d#)
rem save data
building[b].spr = spr
rem create the 'bits' that will become loose
sx# = getSpriteX(spr)
sy# = getSpriteY(spr)
for x=1 to 4
for y = 1 to 8
bt = findFreeBit()
if bt>0
s = createSprite(0)
bw# = w#*0.25
bh# = h#*0.125
setSpriteSize(s,bw#,bh#)
setSpritePosition(s,sx#+(x-1)*bw#,sy#+(y-1)*bh#)
setSpriteColor(s,rd,gn,bl,255)
setSpriteShape(s,2)
setSpriteDepth(s,200)
setSpriteVisible(s,0)
bit[bt].spr = s
bit[bt].building = spr
endif
next
next
next
endfunction
rem find a free component slot
function findFreeBit()
maxb = numB*800
for b = 1 to maxb
if bit[b].spr=0
exit
endif
next
if b>maxb then b=-1
endfunction b
Compiled version attached!
EDIT: This was made in about three to four hours. You all have nearly two months left!