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 / Blinking Words In Game Opening Screen

Author
Message
ftrules
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location:
Posted: 8th Sep 2003 01:22
I'm in the middle of writing a side shooter to teach myself the basics and in my opening screen I have in green letters the words SPACE SHOOTER(original,no?) with "stars"(white dots) going by in the background and the sprite I'm using for the main character going sideways.I'm just telling you this in case it makes a difference with my problem.My problem is that under the sprite moving sideways is the words "Press S to Start". But the words are flashing like in those arcade games where it says "2 more credits". This is the code I'm using for this
This code is in a loop that goes until you press S.The code's easy to understand.It adds 1 to X every time the loop plays and when X is 2 it Prints the message and when X2 is 2 it erases it.My problem is that it blinks too fast.I tried playing around with the sync rate and it doesn't help.I also tried changing the values of X and X2 that it prints/erases the message at but that didn't work either.Can someone please tell me what I'm doing wrong!?
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 8th Sep 2003 01:38 Edited at: 8th Sep 2003 01:42
That code is a little inefficient, no offence. I think it's better if I just rewrite it.

Put this somewhere outside the loop:
blinkrate = 200

When you want the text to appear:


Just change blinkrate.

You don't need to print " " because you are using sync.

"All programmers are playwrites and all computers are lousy actors" -Anon
[img]Visit my site![/img]
ftrules
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location:
Posted: 12th Sep 2003 23:06
It Works!!!!
Thanks!!!

Login to post a reply

Server time is: 2024-11-25 06:39:30
Your offset time is: 2024-11-25 06:39:30