Edited the example code (not sure if you saw it).
If you do what I did for the 'statics' array there it should work fine with AI and players. As long as the player's position has a 'real' value that is independent from the camera, you should be fine.
EDIT: Here, look at this. There was a little more to it than I originally thought - and you have to subtract the cam values, not add...
Rem ***** Main Source File *****
type positiontype
x as integer
y as integer
endtype
global dim statics( 100 ) as positiontype
global player as positiontype
global dim ai( 100 ) as positiontype
global camx as integer
global camy as integer
for i = 0 to 100
statics(i).x = random( 2048 )
statics(i).y = random( 2048 )
ai(i).x = random( 2048 )
ai(i).y = random( 2048 )
next i
player.x = 1024
player.y = 1024
sync on : sync rate 60
do
` Control
if upkey()=1 then dec player.y
if downkey()=1 then inc player.y
if leftkey()=1 then dec player.x
if rightkey()=1 then inc player.x
` Fix camera to player
camx=player.x-screen width()/2
camy=player.y-screen height()/2
` Render
lock backbuffer
ink 0,0
box 0,0,screen width(),screen height() ` backdrop
for i=0 to 100
ink RGB(87,128,255),0
box statics(i).x-camx,statics(i).y-camy,statics(i).x+32-camx,statics(i).y+32-camy
ink RGB(192,0,0),0
box ai(i).x-camx,ai(i).y-camy,ai(i).x+24-camx,ai(i).y+24-camy
next i
ink RGB(61,128,0),0
box player.x-camx,player.y-camy,player.x+24-camx,player.y+24-camy
unlock backbuffer
sync
loop