Thx for the info. At the moment I have small levels.
And QuothTheRaven I have a GeForceFX, 512DDR, Athlon 1800+ and Max Payne2 along with other new games, far more complex run fine. So I guess it must be my code. When I'm standing still I have a fps of 54-60 but when I move it drops to 30, for collision I use the Nuclear Glory dll. This is the movement code, I hope you can see what I do wrong (I started out with the tutorial code):
function maintain_player()
speed as float
` Control player movement
cx#=camera angle x(0)
cy#=camera angle y(0)
keypressed=0
` if the player isn't doing a certain action like attack, or die, etc.
` then our character can walk
if ((player_status=PLAYER_IDLE) or (player_status=PLAYER_WALK))
if upkey()=1
` move player
yrotate object player,180
move object down player,0.001*18
player_status=PLAYER_WALK
keypressed=1
endif
if downkey()=1
` move player
yrotate object player,0
move object down player,0.001*18
player_status=PLAYER_WALK
keypressed=1
endif
if leftkey()=1
speed=0.1
if upkey()=1 then extra=45 : speed=0.141421356
if downkey()=1 then extra=-45 : speed=0.141421356
` move player
yrotate object player,90 + extra
move object down player,speed/100*18
` move camera
yrotate camera 0,cy#-90
move camera 0.001*18
yrotate camera 0,cy#
player_status=PLAYER_WALK
keypressed=1
endif
if rightkey()=1
speed=0.1
if upkey()=1 then extra=-45 : speed=0.141421356
if downkey()=1 then extra=45 : speed=0.141421356
` move player
yrotate object player,-90 + extra
move object down player,speed/100*18
` move camera
yrotate camera 0,cy#+90
move camera 0.001*18
yrotate camera 0,cy#
player_status=PLAYER_WALK
keypressed=1
endif
endif
` attack!!!!
if spacekey()=1
player_status=PLAYER_ATTACK
keypressed=0
endif
` block!!!!
if controlkey()=1
player_status=PLAYER_BLOCK
keypressed=0
endif
` check if the action (something else then being idle or walking)
` is over and return to a normal animation
if ((player_status>PLAYER_WALK) and (object playing(player)=0) and (player_animating=1))
player_status=PLAYER_IDLE
player_animating=0
endif
` if we are walking but we stopped, make sure our animation stops
if ((player_status=PLAYER_WALK) and (keypressed=0))
player_status=PLAYER_IDLE
player_animating=0
endif
` if we aren't doing a special action, animation, check if we need to start one
if player_animating=0 then maintain_animation()
endfunction
here are 2 screenshots:
Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community