Writing a Tetris clone in GW-BASIC -- Tandy 1000 programming example





Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jul 8, 2010

In this tool-assisted education video I demonstrate how to create a Tetris clone in GW-BASIC, a programming language tool written by Microsoft. You see me type every line.

Twitter: https://twitter.com/RealBisqwit
Patreon: https://patreon.com/Bisqwit (alternatives at http://iki.fi/bisqwit/donate.html)
Twitch: http://twitch.tv/RealBisqwit
Homepage: http://iki.fi/bisqwit/

Microsoft GW-BASIC and Basica are the predecessors to QBasic, which was a popular programming tool shipped without extra charge with MS-DOS versions 4 through 5.
In those days, it was de-facto standard to provide a computer with a BASIC interpreter. Those days are no longer, but in my opinion, even today, BASIC remains one of the easiest platforms to start programming something visual.

In this video, I also demonstrate the multi-channel PC speaker of Tandy 1000 to play some music tunes.

The source code (and the script I used for reference when creating this video) can be found at:
You can download this video in HD (better HD than Youtube's, and A/V sync fixed) at:
http://bisqwit.iki.fi/jutut/kuvat/pro... (14 MB)

If you cannot bother typing the source code yourself, you can download a pre-prepared floppy disk image here. It comes with OpenDOS and GWBASIC preinstalled: http://bisqwit.iki.fi/jutut/kuvat/pro...

To better understand how this program works, you can read this flowgraph. http://bisqwit.iki.fi/jutut/kuvat/pro...

The syntax highlighting in the video is generated by a TSR that I launch in the beginning of the video. It scans and recolors the VRAM continually. I created that tool for the making of this video.

Note: The audio in this video is slightly badly timed. It is difficult to sync those properly in Youtube when you use nonstandard FPS. Apologies. At least I tried.

The whole video series:
-- http://youtu.be/JDnypVoQcPw -- Creating a rudimentary TETRIS clone in GW-BASIC
-- http://youtu.be/V65mtR08fH0 -- Improving the game by rewriting from scratch C++, added AI
-- http://youtu.be/-j9AG2I0f3Y -- Illustrating the AI's power with tetrominos and pentominos
-- http://youtu.be/ukXDCBewnsg -- Illustrating the AI's power with only tetrominos
-- http://youtu.be/zQZLK8r1NFs -- Illustrating the AI's power with tetrominos, pentominos and hexominos
-- http://youtu.be/7kHnnkVlBKI -- Testing the AI at tackling octominos. Not good.
-- http://youtu.be/Yw02EkQE3Cw -- Illustrating the AI's power with tetrominos on a half-width field.


When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...