How to make a full Tetris game in C/C++

preview_player
Показать описание
Video showing a live coding session on how to implement a complete Tetris game in C with level progression, scoring, and level selection.

Apologies for the audio quality.

Corrections:

The word 'Tetrino' used throughout the video should obviously be 'Tetromino'.

0:11:10: meant to say 90 degrees, not 45 degrees, obviously.

1:22:10: src_row greater than 0 should be src_row greater than or equal to 0

1:23:13: the case src_row == dst_row should be handled and no memcpy called

1:48:00: game_over_row = 0 not a good choice, should be max(0, HEIGHT - VISIBLE_HEIGHT - 1)

Source code at:
Рекомендации по теме
Комментарии
Автор

Awesome! The sound of your keyboard and your voice are so smooth. I love being able to follow your thinking process when you are talking it out. Thank you for this video!

Fireside_Collective
Автор

nice! I compilied the game for the nintendo switch and it works just fine (once you plug in a keyboard).

totaljustice
Автор

Great job! Your version of Tetris looks more minimalistic and interesting.

undofix
Автор

Please make more videos like this one, i loved it!

Lages
Автор

Hello sir... Why do you stop making coding game videos? Do more!

alexgouveia
Автор

Its Tetromino not Tetrino btw

Great demonstration!

It_Ezra
Автор

wow!!! thnak you very much, it's nice game

uchungnguyen
Автор

Where are you
Make more games live please 🙂

HussainAhmad-kheo
Автор

Great video! What color theme is that? looks really nice.

Grynhaus
Автор

Where we put colors.h file in Visual Studio?

uchungnguyen
Автор

A lot of what you're doing is not allowed in pure C. I'm finding that I'm having to do a lot of workarounds to make this pure C and not C++. For instance, you can't do structs like that in C. Also, a function call is not allowed inside of a constant expression like that. In my version, I had to put the TETROMINOS[] array inside of main.

jamesyount
Автор

Hey, I am new to programming. I am following along with you. For some reason, there is no match for the SDL_GetKeyboardState function. If you could help, I would greatly appreciate it! thanks!

igmpvgoa
Автор

I don't know how to install colors.h in visual studio.

odteknology
Автор

i can't build std library on my IDE. Now i'm using VSCode, anyone can help me for this, please ?

ngocthinh
Автор

Is there source code sir? btw thank you for help

netsurfer
Автор

Is VS necessary can't I use VSCode? I'm on linux

your_name
Автор

Hi im new in dev c++ pogramming, a highschool student. For some reason when compiling there's a message in the compiler that says "[error] SDL.h:No such file or directory".if you could help, I would greatly appreciate it. thanks...

zgg
Автор

is there any source code of this, I need this

insplant
Автор

As a beginner in game programming, this is so difficult to understand.

helios
Автор

This code does not work. Not sure what exactly you are doing when adding those SDL headers but all I are Linker errors. Probably mine are different version, no idea.
Would have been nice to have had the complete package in order to compile a build. As is this was another waste of time (did try to actually follow along for over 1 hour, while writing the code along with you) with another "how to code something" where something doesn't work but some dependencies are not properly explained...

gmr
visit shbcf.ru