Page 2 of 10

Re: I Don't Watch 3D Fund, But....

Posted: December 9th, 2017, 4:04 pm
by goldengamesTM
Well, I Was testing the same code as chili and it did not work, and I don't think that's why.
I could be wrong, so I'll give it a try.

Re: I Don't Watch 3D Fund, But....

Posted: December 9th, 2017, 6:57 pm
by albinopapa
Ok, I might see the problem, slope ( m ) and intercept ( b ) should be float, not int which also means dx and dy should be float so you don't lose the fraction part of the division result. Don't just cast the result, you need to make dx and dy floats.

Code: Select all

void DrawLine(int x1, int y1, int x2, int y2, Color c)
{
     float dx = static_cast<float>( x2 - x1 );
     float dy = static_cast<float>( y2 - y1 );
     float m = dy / dx;
     float b = y1 - m*x1;
     for (int x = x1; x <= x2; x++)
     {
          int y = m*x + b;
          PutPixel(x, y, c);
     }
}

Re: I Don't Watch 3D Fund, But....

Posted: December 9th, 2017, 11:04 pm
by goldengamesTM
Thanks I’ll try

Re: I Don't Watch 3D Fund, But....

Posted: December 10th, 2017, 12:41 am
by goldengamesTM
What the Heck!?!??!!? I can only draw a horizontal line!!!!!

Re: I Don't Watch 3D Fund, But....

Posted: December 11th, 2017, 3:45 pm
by DicheBach
You should just watch his videos. All of them. Five times.
1. 100% speed and take notes
2. 100% speed and use pause to follow in your own VS studio
3. 50% speed, paying attention to whatever you didn't fully get last time
4. 100% speed with your eyes closed and hand on your joystick
5. 200% speed

These are the rituals of the pure and true Chili Minion.

Re: I Don't Watch 3D Fund, But....

Posted: December 11th, 2017, 6:51 pm
by goldengamesTM
Thank You, But I Can't Watch Any Chili Vids Except Old Ones. ( No 3D Fund, Or Normal Tutorials From Beginner No.0 And On)

Re: I Don't Watch 3D Fund, But....

Posted: December 12th, 2017, 12:02 am
by cameron
I think you should reconsider watching chillis videos. However, if you don't want to do that, I recommend uploading a ziped solution for your project to get help.

P.S. I recommend being more respectful as people will be less likely to help if you swear at them when they give you a solution you don't want.

Re: I Don't Watch 3D Fund, But....

Posted: December 12th, 2017, 1:15 am
by chili
P.P.S. I recommend being more respectful to people, especially people like DicheBach. I mean, have you seen the dude's signature? That's some Robert E. Howard shit right there.

Re: I Don't Watch 3D Fund, But....

Posted: December 13th, 2017, 2:40 pm
by DicheBach
In the name of Crom and his Archangel Chili of the C++ . . .
https://www.youtube.com/watch?v=OBGOQ7SsJrw

Re: I Don't Watch 3D Fund, But....

Posted: December 14th, 2017, 6:34 am
by goldengamesTM
Ok, So I Have The Triangles, I Have The Wireframe, But Now I Need To Learn How To Fill The Triangles. I Want To Fill Them One Of 2 Ways:
1. I Want To Keep Drawing Triangles Of Slightly Smaller Dimensions Each Time
2. I Can Make Lines That Fill Up The Triangle And Get Smaller Each Time
But, There's A Problem, I Don't Know How To Detect The Edges Of The Triangle...