FPS風ですが・・・
こんなのでどうでしょうか??
#include "hgimg3.as"
#include "user32.as"
scr_x = 640
scr_y = 480
v = 3.0
ShowCursor 0
screen 0,scr_x,scr_y
title "終了はエスケープキーです。"
hgini
addbox model_box,1,1
repeat 100
regobj obj_box,model_box
y = double(rnd(20)+rnd(2)*30)+1.0
setscale obj_box,rnd(10)+5,y,rnd(10)+5
setpos obj_box,rnd(300)-150,-y/2.0,rnd(300)-150
loop
setpos HGOBJ_CAMERA,0,-5.0,0
cam_ay = 0.0
setdir HGOBJ_LIGHT,100,100,100
repeat
hgdraw
stick key,2|8
if key&128:hgbye:end//終了処理
addang HGOBJ_CAMERA,,-double(ginfo(0)-(ginfo(4)+scr_x/2))/300.0;/200.0
if key&2{
getang HGOBJ_CAMERA,dummy,cam_ay,dummy
addpos HGOBJ_CAMERA,-v*sin(cam_ay),0,-v*cos(cam_ay)
}
if key&8{
getang HGOBJ_CAMERA,dummy,cam_ay,dummy
addpos HGOBJ_CAMERA,v*sin(cam_ay),0,v*cos(cam_ay)
}
mouse ginfo(4)+scr_x/2,ginfo(5)+scr_y/2
hgsync 18
loop
FPS大好きです^^
がんばってください。