My favorites | Sign in
Logo
             
Code license: MIT License
Labels: tetris, game, clone, flash
People details
Project owners:
  exeQtor
Project contributors:
brian.mattern

Everything should be made as simple as possible, but no simpler.
Albert Einstein

Introduction

There must be a gazillion Tetris clones out there... Why another one?. Because I couldn't find a clone like this with a liberal open source license and programmed with code legibility in mind. There are other projects like this but many have GPL licenses that make troublesome their use in commercial projects or console development.

Objectives

This clone must be simple to understand and because that, easy to tweak (if you want to use it for your own projects). Changing rendering and input layers must be a breeze and even the core gameplay functions should be easy to port to another platforms or languages. Ultimately, it must serve as an educational reference for novice game programmers. The good thing about Tetris is that it has a very well known gameplay mechanic and it is relatively simple to implement but challenging enough for not being trivial.

Features

The core logic is programmed in simple ANSI C. The core gameplay logic is separated from the layers in charge of presenting the game to the player. Those layers would be responsible for drawing sprites on screen, handling input devices, returning timer values, or even playing sounds and music, so the game must be platform agnostic. The trunk implementation uses the awesome cross-platform SDL library for graphics and input.

This is the list of expected features I'm aiming:

  1. A simple Tetris experience. The user must easily recognize the game and spent some time with it.
  2. Full separation between the core gameplay implementation and the graphic, input, sound, or font libraries that could be used by the game.
  3. No global neither static variables in the core game implementation (because global things are bad things).
  4. Good code standards and formatting (because code is poetry).

The ambition of this little project is to become the default implementation whenever you need a simple clone and don't want to rewrite your own from zero.

Limitations

Because the trunk for this project must be simple (and I'm lazy) some limitations are imposed:

  1. No Wall Kick
  2. No Game Menu Screens
  3. No Effects
  4. No Sound

Branches are encouraged to implement the missing parts or even create gameplay variations.

Branches

This is the list of currently implemented and possible future branches:

  1. Flash AS3. You can test it here.
  2. Playground. This version nicely supports localization:
  1. J2ME
  2. Canvas
  3. Qt
  4. IPhone
  5. PIC

Maintainers

References

The gameplay mechanics reference can be found here: http://tetris.wikia.com/wiki/Gameplay_overview
The original Tetris that can be found here: http://vadim.oversigma.com/Tetris.htm










Hosted by Google Code