Quote: "Ive tried with the demo code of the 2 cartoon characters, and I can get the camera following the player, the problem is it all double visioned and flickering. Ive tried placing the lines trhoughout the code but no luck yet "
Yeah, i have the same problem as him...my screen keeps flickering between one view and another...
Download this and see what i mean...
4.68MBs .zip
Flickering problem
Source is here (i basically just added the little "camera follow player" code you posted)
StartFizz()
hide mouse : color backdrop rgb( 0, 128, 255 )
LoadImages()
MakeStaticBox( 1100, 300, 512, 800, 0 )
MakePlayer( 1, 110, 200, 600, 500, 55, 100, 500 )
Players#( 1, 5 ) = 3
sync rate 60
sync on
do
sprite 1000, 0 - Screen( 1 ), 600 - Screen( 2 ), 30
if returnkey() = 1
Number = Number + 1
MakeMovingBox( 118, 118, rnd( 1000 ), 100 + rnd( 200 ), rnd( 90 ), 120, Number, 1 )
endif
UpdateFizz()
Players#( 1, 1 ) = 0
if keystate( 38 ) = 1 then Players#( 1, 1 ) = 7
if keystate( 36 ) = 1 then Players#( 1, 1 ) = -7
if keystate( 37 ) = 1 and Players#( 1, 3 ) = 0 then Players#( 1, 2 ) = 400
Screen( 1 ) = sprite x( 500 ) - ( screen width() / 2 )
Screen( 2 ) = sprite y( 500 ) - ( screen height() / 2 )
sync
loop
function LoadImages()
set image colorkey 255, 0, 128
load image "Crate.bmp", 1, 1
load image "BowlingBall.bmp", 2, 1
load image "Dude.bmp", 3, 1
load image "Floor.bmp", 30, 1
endfunction
--Peter
"We make the worst games in the universe."