20
Marc LeBlanc October 2006 Video Game Programming

Marc LeBlanc October 2006 Video Game Programming

Embed Size (px)

Citation preview

Page 1: Marc LeBlanc October 2006 Video Game Programming

Marc LeBlanc

October 2006

Video Game Programming

Page 2: Marc LeBlanc October 2006 Video Game Programming

About Me

Started programming in 1980 (age 11) Making games ever since Working in game industry since 1992 Master’s in Computer Science

Page 3: Marc LeBlanc October 2006 Video Game Programming

Mind Control Software

San Rafael, CA 24 People:

5 Programmers 6 Artists 4 Game Designers 1 Musician/Sound Designer 2 Producers 3 Quality Assurance (Testers) 3 Miscellaneous

Page 4: Marc LeBlanc October 2006 Video Game Programming

Our Games

Page 5: Marc LeBlanc October 2006 Video Game Programming

Other Games I Worked On

Page 6: Marc LeBlanc October 2006 Video Game Programming

What I Do

Title: Chief Technology Officer Oversee all programming Hire programmers Write code Game design Help run the business

Page 7: Marc LeBlanc October 2006 Video Game Programming

Time for Game Demo

The Game: Arrrrrr! Not Yet Released

Page 8: Marc LeBlanc October 2006 Video Game Programming

Discussion

How were the two versions different? How does frame rate affect fun?

Page 9: Marc LeBlanc October 2006 Video Game Programming

Here’s the Point:

Good programming is the difference between “fun” and “not fun”

Page 10: Marc LeBlanc October 2006 Video Game Programming

A Simple Example

bool IsTargetInRange(float x, float y, float r)

{

// What goes here?

}

(0,0)

(x,y)

r

Page 11: Marc LeBlanc October 2006 Video Game Programming

A Simple Example

bool IsTargetInRange(float x, float y, float r)

{

float distance = sqrt( x*x + y*y );

if (distance <= r)

return true;

else

return false;

}(0,0)

(x,y)

r

Page 12: Marc LeBlanc October 2006 Video Game Programming

More Succinctly…

bool IsTargetInRange(float x, float y, float r)

{

float distance = sqrt( x*x + y*y );

return distance <= r;

}

(0,0)

(x,y)

r

Page 13: Marc LeBlanc October 2006 Video Game Programming

However…

bool IsTargetInRange(float x, float y, float r)

{

float distance = sqrt( x*x + y*y );

return distance <= r;

}

This is too slow. sqrt( ) is a very slow function. How can we get rid of it?

(0,0)

(x,y)

r

Page 14: Marc LeBlanc October 2006 Video Game Programming

The Optimization

bool IsTargetInRange(float x, float y, float r)

{

float distanceSquared = x*x + y*y;

return distanceSquared <= r*r;

}

This is what game programmers do.

(0,0)

(x,y)

r

Page 15: Marc LeBlanc October 2006 Video Game Programming

Skills Game Programmers Need

Lots of Math! Geometry Trig Calculus Linear Algebra Discrete Math Probability

Page 16: Marc LeBlanc October 2006 Video Game Programming

Skills Game Programmers Need

Lots of Computer Science! Software Methodology Algorithms Computer Architecture Compilers Graphics

Page 17: Marc LeBlanc October 2006 Video Game Programming

Skills Game Programmers Need

Life Experiences Imagination Communication Passion Sense of Fun

Page 18: Marc LeBlanc October 2006 Video Game Programming

Want to Be a Game Programmer?

Page 19: Marc LeBlanc October 2006 Video Game Programming

Want to Be a Game Programmer?

Go To College!

Page 20: Marc LeBlanc October 2006 Video Game Programming

Any Questions?

Some Links: www.mind-control.com www.8kindsoffun.com