The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SDL::Tutorial::Tetris -- Let's Make Tetris

CATEGORY

Tutorials

The Overall view

All games are a while loop. So we will have something like this.

The Game Loop

 package Tetris;

 sub run_game_fun_times
 {
  while(1)
  {
   #game logic here
  }
 }      

You need more code you say? Ok well, a game does two things more.

The Game Logic

Input Events

A game essentially move objects (boxes, monsters so on) in time.

Time

In SDL time is measured in ticks.

User Input
Draw Everything

--Kartik