|
-
Nov 10th, 2000, 10:41 PM
#1
Thread Starter
Member
I am working on a program to do lightsaber effects. The algorithm can print it on a black background. I can add the color values using Get/SetPixel, but it does some weird things. Download the file here. You will need to right click and choose save file as. Just open it, click on a color button, and click the Get/Set Pixel button. Then click Ok! in the new window. You can see what I mean. Anyone know how to fix it? I know this program is disorganized. It is a test, so I can get the core to work before I implement most of the features.
-
Nov 11th, 2000, 04:58 PM
#2
Thread Starter
Member
-
Nov 11th, 2000, 11:35 PM
#3
Addicted Member
I havent checked your source but are you weighting the colors? EG,
Code:
DispPixelColor = (BGColor * 0.2)+(FGColor * 0.8)
Otherwise, you'll get some funny results
Brian
Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
Internet: HTML 4, CSS, JavaScript
Visit AltInt.com!
-
Nov 12th, 2000, 09:23 AM
#4
Thread Starter
Member
I'm not. It averages the colors:
disp=(color1+color2)/2
-
Nov 12th, 2000, 02:18 PM
#5
Thread Starter
Member
Wait! Id adds the colors, as the saber is rendered on a clack background. However, assuming res is the result pixel color, I do have:
Code:
if res>RGB(255, 255, 255) then res=RGB(255,255,255)
So it should work.
-
Nov 12th, 2000, 02:44 PM
#6
Addicted Member
It should work then. Maybe you don't have enough colors available on your local system?
Brian
Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
Internet: HTML 4, CSS, JavaScript
Visit AltInt.com!
-
Nov 12th, 2000, 03:21 PM
#7
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|