Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Background sync

Author
Message
KenMiller
15
Years of Service
User Offline
Joined: 16th May 2009
Location:
Posted: 16th May 2009 15:30
Hello,

Possibly an incredibly silly question, but I'm going to make it and risk the flames anyhoo
I'm waiting on the two handson volumes being delivered from amazon, so I've been learning through some tutorials online..
I've been putting this in to a crappy space invaders clone to try things out.

One thing I've noticed, is that whenever a bullet is fired, the background flashes, as though its resyncing the background. I'm gathering this is because I have 'paste image 2,0,0 actually inside the main game loop, but when I move this to just before the do, it well, refuses to show it

Any help would possibly save both my head and my desk.

Cheers,

bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 16th May 2009 15:52
can you try this? not sure if it helps thought



(\__/)
(O.o )
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination!
KenMiller
15
Years of Service
User Offline
Joined: 16th May 2009
Location:
Posted: 16th May 2009 16:04
It constantly syncs. ;/
I've found the best place to have the sync is after the For N=BulletPosY To 0 Step -1

But even then, the screen turns blue and the background disappears while the bullet is firing

Ah well, Not a biggy, I'm sure I'll work it out while working through the hands on guides once amazon sends them

Thanks,
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th May 2009 16:40
Replace that SYNC OFF with a SYNC ON in bobbel's code. You'll also need to remove that loop, and instead move the bullet one step at a time every loop of the main loop.

Something like this:


KenMiller
15
Years of Service
User Offline
Joined: 16th May 2009
Location:
Posted: 16th May 2009 18:15
Ah, that did it, and it makes sense

Thanks a lot.

Login to post a reply

Server time is: 2024-11-25 06:33:42
Your offset time is: 2024-11-25 06:33:42