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 / Displaying color bars on screen

Author
Message
DarkApple
10
Years of Service
User Offline
Joined: 22nd Jun 2014
Location:
Posted: 29th Jun 2014 17:29
I am new to DBPro, in the meantime following small tutorials.

I am trying to generate a TV-style test pattern. I've been trying to figure out the solution to this problem all morning. I've been endlessly messing around with box coordinates for hours.

The program will display "This is a TEST!" at the top center of the window. I am trying to show the color bars collectively at the center of the x,y axis. The bars collective will only be one third the size of the window.

Here's a code snippet that only includes the text "This is a TEST!":

pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 30th Jun 2014 10:45


Attachment:sample code

windowsXp

Attachments

Login to view attachments
DarkApple
10
Years of Service
User Offline
Joined: 22nd Jun 2014
Location:
Posted: 1st Jul 2014 03:51
Here, you can tell me what you think:

StaticBase
11
Years of Service
User Offline
Joined: 23rd Nov 2013
Location: Future
Posted: 2nd Jul 2014 10:18 Edited at: 2nd Jul 2014 22:47
pcRaider when your code is executed it looks like this:


Where I think Dark Apple is looking for something more like this:


I'm a newbie myself so for me this was a pleasure and a challenge. Here is the solution I've come up with:

Just copy/paste that code into a new Dark Basic project and run it by pressing F5

I'm sorry for the lack of comments in the code, I just feel like it is simple enough to walk through. However I would love to break it down on request.
StaticBase
11
Years of Service
User Offline
Joined: 23rd Nov 2013
Location: Future
Posted: 3rd Jul 2014 07:19
Hi DarkApple,

That is really cool! I just realized that the code I wrote completely misses what you intended to do.

One question: Why are you waiting 150 seconds at the beginning? That's 2 and a half minutes of just waiting, reason? Just curious.
DarkApple
10
Years of Service
User Offline
Joined: 22nd Jun 2014
Location:
Posted: 4th Jul 2014 05:29
Didn't I make it 15 seconds?

I coded the random dot pixels and flickering gray boxes to attempt to simulate the "tracking" on an old VHS tape. See my other related DBPro newbie project.

The 15 second wait is just a reference to how on a VHS, after a movie's credits, the screen goes black for a few minutes before going to static/test pattern.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Jul 2014 09:26
Quote: "Didn't I make it 15 seconds?"

Yes you did.

Login to post a reply

Server time is: 2024-11-23 13:50:12
Your offset time is: 2024-11-23 13:50:12