Register    Login    Forum    Search    FAQ

 Page 61 of 64 [ 631 posts ] Go to page Previous  1 ... 58, 59, 60, 61, 62, 63, 64  Next

#### Noob learns to code in 3 months

 Print view Previous topic | Next topic

#### Noob learns to code in 3 months

Author Message
 Post subject: Re: Noob learns to code in 3 months  Posted: October 1st, 2017, 3:30 pm
 Site Admin

Joined: December 31st, 2011, 4:53 pm
Posts: 3493
Location: Japan
Good stuff man. Geometry problems like this are good shit to learn to get more fluid in this math stuff.
in the above, you could have just factored out z to get z((-B1/B2)*C1+C2) and then divided both sides by ((-B1/B2)*C1+C2).

I'm thinking about (not sure yet but maybe) doing something similar to your pokemon / McCree assignment to introduce inheritance for the first time (and later dynamic dispatch). Might be simpler than trying to demo it in some existing graphical game code from earlier tutorials.

_________________
Chili

 Post subject: Re: Noob learns to code in 3 months  Posted: October 1st, 2017, 4:03 pm

Joined: January 19th, 2017, 10:28 pm
Posts: 497
Location: Idiot from northern Europe
^ yeah but I was confused about the results since they didn't match the results of the equation I was looking up online, but it turned out his result was incorrect

Do pokemon imo Was an interesting one and everyone likes the old pokemon games

_________________
I just like to thumb my nose at millionaires.
If I was rolled I'd bust them heads up.

 Post subject: Re: Noob learns to code in 3 months  Posted: October 2nd, 2017, 11:54 am

Joined: January 19th, 2017, 10:28 pm
Posts: 497
Location: Idiot from northern Europe
yay seems to work!

Code:
CLine CPlane::IntersectionLine(const CPlane & rhs)
{
CVector3D dir = Normal.CrossProduct(rhs.Normal);

const float d1 = Normal.x * PointInPlane.x + Normal.y * PointInPlane.y + Normal.z * PointInPlane.z;
const float d2 = rhs.Normal.x * rhs.PointInPlane.x + rhs.Normal.y * rhs.PointInPlane.y + rhs.Normal.z * rhs.PointInPlane.z;

float x, y, z;
if (dir.x != 0.0f)
{
x = 0.0f;
z = ((rhs.Normal.y / Normal.y) * d1 - d2) / ((-rhs.Normal.y / Normal.y) * Normal.z + rhs.Normal.z);
y = ((-Normal.z * z) - d1) / Normal.y;
}
else if (dir.y != 0.0f)
{
y = 0.0f;
z = ((rhs.Normal.x / Normal.x) * d1 - d2) / ((-rhs.Normal.x / Normal.x) * Normal.z + rhs.Normal.z);
x = ((-Normal.z * z) - d1) / Normal.x;
}
else
{
z = 0.0f;
y = ((rhs.Normal.x / Normal.x) * d1 - d2) / ((-rhs.Normal.x / Normal.x) * Normal.y + rhs.Normal.y);
x = ((-Normal.y * y) - d1) / Normal.x;
}

CVector3D pos1(x, y, z);
CVector3D pos2 = pos1 + dir;
return CLine(pos1, pos2);
}

_________________
I just like to thumb my nose at millionaires.
If I was rolled I'd bust them heads up.

 Post subject: Re: Noob learns to code in 3 months  Posted: October 2nd, 2017, 4:23 pm

Joined: January 19th, 2017, 10:28 pm
Posts: 497
Location: Idiot from northern Europe
I feel stupid now when I read this

Code:
const float d1 = Normal.x * PointInPlane.x + Normal.y * PointInPlane.y + Normal.z * PointInPlane.z;
const float d2 = rhs.Normal.x * rhs.PointInPlane.x + rhs.Normal.y * rhs.PointInPlane.y + rhs.Normal.z * rhs.PointInPlane.z;

Because I've already made a function for dot product so tomorrow in school I'll change it to
Code:
d1 = Normal.DotProduct(PointInPlane);

_________________
I just like to thumb my nose at millionaires.
If I was rolled I'd bust them heads up.

 Post subject: Re: Noob learns to code in 3 months  Posted: October 6th, 2017, 11:21 am

Joined: January 19th, 2017, 10:28 pm
Posts: 497
Location: Idiot from northern Europe
Made a list of books to read on my spare time.

- Game programming patterns (reading this atm)
- Effective modern c++
- Game programming gems (a bunch of these)
- Programmaing AI by example
- Artificial intelligence for games
- Real time collision detection
- Game engine architecture
- Data structures and algorithms

If there's any muse read books I should include here or any on the list I could skip, let me know

_________________
I just like to thumb my nose at millionaires.
If I was rolled I'd bust them heads up.

 Post subject: Re: Noob learns to code in 3 months  Posted: October 6th, 2017, 1:17 pm
 Site Admin

Joined: December 31st, 2011, 4:53 pm
Posts: 3493
Location: Japan
effective modern c++ looks good to me, i might wanna peek it sometime myself.

_________________
Chili

 Post subject: Re: Noob learns to code in 3 months  Posted: October 6th, 2017, 1:36 pm

Joined: January 19th, 2017, 10:28 pm
Posts: 497
Location: Idiot from northern Europe
chili wrote:
effective modern c++ looks good to me, i might wanna peek it sometime myself.

Yeah that'll be the next thing I read after game programming patterns.

My teacher also gave me some links with stuff to read/video to watch about DOD since we'll be moving away from OOP eventually.

_________________
I just like to thumb my nose at millionaires.
If I was rolled I'd bust them heads up.

 Post subject: Re: Noob learns to code in 3 months  Posted: October 6th, 2017, 3:41 pm
 Site Admin

Joined: December 31st, 2011, 4:53 pm
Posts: 3493
Location: Japan
Moving away from OOP.

_________________
Chili

 Post subject: Re: Noob learns to code in 3 months  Posted: October 6th, 2017, 5:07 pm

Joined: January 19th, 2017, 10:28 pm
Posts: 497
Location: Idiot from northern Europe
^

Next course starts on monday and we'll still be doing OOP for that one. After that we have game projects so I'm guessing we wont start data oriented design until after christmas.
Will be interesting to learn something new imo.

Read some about DOD but don't quite get it yet. I'm assuming it's used a fair amount in the game industry if we're going to learn it

_________________
I just like to thumb my nose at millionaires.
If I was rolled I'd bust them heads up.

 Post subject: Re: Noob learns to code in 3 months  Posted: October 6th, 2017, 5:20 pm
 Site Admin

Joined: December 31st, 2011, 4:53 pm
Posts: 3493
Location: Japan
DOD is interesting, and can be useful, though I'm not sold on full-JBlow style DOD.

At any rate I think it will be a good thing to study and get ideas from.

_________________
Chili

Display posts from previous:  Sort by

 Page 61 of 64 [ 631 posts ] Go to page Previous  1 ... 58, 59, 60, 61, 62, 63, 64  Next

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for: