30
Game Programming

Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

  • Upload
    dangbao

  • View
    220

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Game Programming

Page 2: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Game Structure

Input

Update

Draw

dt

Page 3: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Drawing (Rendering)

Hardware Acceleration. Mainly for 3D. Lots of cores. Same Program.

Page 4: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

CPU

GPU

Page 5: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Programming

Pick a strong language.● Games need to fast.

● Lots of objects.

● Lots of files.

● Meaning Lots of organization.

Page 6: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Libraries

C# - XNA / SlimDX / OpenTKC++ - SDL, SFMLPython - PyGameJava - LWJGL

Page 7: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Free Art Tools

2D● Gimp● Paint.NET3D● BlenderSound● Audacity● BXFR

Page 8: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Example: Snake

Page 9: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Core Objects

Snake● Collection of Segments● Movement SnakeSegment● Drawing Food● Moves randomly.

Page 10: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Food

Draw

Randomize

Page 11: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeSegmentMembers

Page 12: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake MovementSnake segments update from back to front.

Page 13: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake MovementSnake segments update from back to front.

Page 14: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake MovementSnake segments update from back to front.

Page 15: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake MovementSnake segments update from back to front.

Page 16: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Direction

RightUp

Page 17: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeSegment

GrabPosition

Page 18: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeSegment

Page 19: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SpriteSheet

0 1 2 3 4 5 67 8 9 10 11 1213

Page 20: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake

Members

Page 21: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake

Page 22: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake

Page 23: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake

Page 24: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake

Page 25: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

Snake

Page 26: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeGame

Page 27: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeGame

Page 28: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeGame

Page 29: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeGame

Page 30: Game Programming Pick a strong language. Games need to fast. Lots of objects. Lots of files. Meaning Lots of organization

SnakeGame