[Game Development] Realization of Tetris

0. Preface

To sort it out, the entry-level work of game development, Tetris. This includes the Tetris processing (console/with interface) implemented in c, and the subsequent version made with unity. There are too many codes in the project, so they are all placed in the link and can be downloaded directly. Just put it on Baidu Cloud, and it won't pollute the code base (scratching your head). The link to the project is below.

链接:https://pan.baidu.com/s/1mZrtCNzQRse4s8ONUyjM-Q 
提取码:wsad

1. Project content

insert image description here

When I first learned c language in college in 2017, I saw someone find a snake-eating code, and then I started playing in the command box after compiling. At that time, I was very envious, and I really wanted to make some fun games, and then I started to try to make the classic game of Tetris.

(1) Tetris_1_Black
finally wrote the first version crookedly, the version that runs directly on the console .
Tetris_1_Black

(2) Tetris_2_Color
but it is black and white, can it have some color ?
Tetris_2_Color

(3) The Tetris_3_Save
process is so long, can you save it?
Tetris_3_Save


(4) Some colors of Tetris_4_setting do not like, set the color and so on?
Tetris_4_setting

(5) Tetris_5_optimze
seems to be a bit buggy, please fix it and optimize the interface , at least it looks decent.
Tetris_5_optimze


(6) Let Tetris_6_ML have some music special effects , so that it can feel a little bit better. Is it only in Chinese? Why don’t you deal with English and pretend it?Tetris_6_ML

(7) Tetris_7_new
But this is all in the command box, do something with an interface, at least an interface that can be clicked ? After searching, tinkering, and finally using a C language library to make the interface. At this time, it has come to an end for the time being, and it is already the limit of what I can do, and all the things I know are integrated in it.
insert image description here

(8) Tetris_unity
waited until the 18th year of his sophomore year to know Unity . Then I started to use Unity to try again. This time I used C#, which is also the mobile version. Although I also found a lot of inappropriate prompts and unreasonable operations when sorting out, unfortunately, there are a lot of things to do recently, and there are too many things that were done many years ago, and I don’t want to change them, so it’s over.
insert image description here
insert image description here

2. end

Pay more attention to the code specification.

Guess you like

Origin blog.csdn.net/Blue_carrot_/article/details/129965895