The Tetris Clone CGTetris

Environment: VC6 SP2

The Tetris Clone CGTetris

This game was born by a wish of my wife, an ultimate Tetris fan, to
play a "nice" Tetris on the PC. Many clones of Tetris in the net
were all not good enough (not nice :-),  boring or simply unplayable
…). Buying such a (comparatively trivial) game was not an option.
So I developed a new clone of this great game.

Sound & Music

CGTetris makes a difference between sound and music. Sounds
are implemented by using wavetable files (*.wav), while music is
implemented by using MIDI files (*.mid) (You can see these files
only in the sourcecode distribution. In the game distribution they are built into the game.)
You need a soundcard to hear both, sounds and music.
Furthermore you need an installation of DirectX (at least version 3). Sounds are played via DirectSound. The advantages of
DirectSound over the win32 API function PlaySound(), are its lower latency and the ability to mix sounds on the fly.
CGTetris does not install DirectX, because it is already installed on many hosts. If you don’t have it right now, you might
download it from microsofts home page.

Multilinguality

In the current version (1.1) CGTetris is able to "speak" 3 languages. The default language is the one of the internet: English.
The game is able to detect which is the current users default language. You only need a proper language DLL to make the
game speak the right language.
 

Language

Needed Language DLL

English

none (default)

German

German.lng

French (since version 1.1)

French.lng (done by Yann_STEPHAN@hp.com)

Russian (since version 1.2)

Russian.lng (done by Taras Zakovyrin)

Chinese (big5) (since version 1.2)

Chinese.lng (done by JauMing Tseng)

list of currently available languages

The sources of the language DLLs are inside the source distribution. The DLLs are inside the setup procedure.

If you are interested in creating a language DLL for others than the supported languages, please let me know.

Building the game

Since the first publication of this game, I’ve got a lot of messages from people asking me, why the sources won’t compile.
Well, you need service pack 3 for the developer studio (VC++ 5). This SP contains some bug-fixes the compiler has with
STL and templates.

Changes in version 1.1

  • added french DLL (thanks to Yann_STEPHAN@hp.com)
  • some minor modifications in handling language DLLs

Changes in version 1.2

  • added russian and chineses language DLLs
  • F1 .. F12 at the "game page" can be used to preselect a level (1 .. 12 respectively)
  • You can now place your own MIDI files in the directory where the game lies. In the options dialog they will be listed
    with their name (without path and extension).

  • You can now play all the musics in a sequence, instead of playing one again and again. This includes the builtin musics
    and the external musics.

Download

Now for the interesting part: the download. If you want to build the game by yourself (MS-VC++ 6 project), you might
select the source code distribution (a ZIP file). Otherwise you can download the game’s setup procedure. For all you
cautious net surfers: The game is checked against bugs and viruses as good as one can check such things. The setup routine
does not modify your system directories. An uninstall procedure will be installed, too. The installation routine was built with
the publicly available setup toolkit GkSetup 1.60 (it took me just 5 minutes to build it!)

CGTetris is free software. You can redistribute it as long as it is not sold for profit without the authors written consent. The
software does not include any warranty. Any damage (of what kind ever) resulting from the use of this software, rests
entirely to the user.

Installable Game

Source Project

CGTetris-1.2.exe 760 KB

CGTetris-1.2-src.zip 710 KB

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read