I was bored at work, so I made a Tetris clone

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
DaedalusYoung
Party member
Posts: 407
Joined: Sun Jul 14, 2013 8:04 pm

I was bored at work, so I made a Tetris clone

Post by DaedalusYoung »

Tested only in 800x600.

Written on a touch device, so the buttons at the bottom right can be activated by touch. I've expanded it on a desktop computer, to include mouse and keyboard functionality.

Left key moves blocks left, right key moves blocks right, down key moves block down (1 line only), and [,] and [.] keys rotate blocks counterclockwise and clockwise.
Screen Shot 2021-07-22 at 11.06.13.png
Screen Shot 2021-07-22 at 11.06.13.png (33.58 KiB) Viewed 7352 times
You get slightly higher score points for placing a block close to the bottom of the screen than near the top, and you get higher rewards for clearing multiple lines at once (up to 100 points for 4 lines).

Level goes up after every 25 blocks, and speed increases for every level as well (until level 7, at which blocks fall 1 line every 0.1 seconds)
Attachments
main.lua
(12.53 KiB) Downloaded 214 times
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: I was bored at work, so I made a Tetris clone

Post by milon »

Nice! :)

Also, you made that on a phone/tablet during your downtime at work? *takes hat off* Impressed!! I can't imagine trying to code on a touchscreen.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
DaedalusYoung
Party member
Posts: 407
Joined: Sun Jul 14, 2013 8:04 pm

Re: I was bored at work, so I made a Tetris clone

Post by DaedalusYoung »

Thanks! Yes, on an old Windows tablet (HP Stream 7), with on screen keyboard. I've ordered a Bluetooth keyboard to make it easier, but this was done all on the tablet screen. We have a lot of downtime lately and they don't mind it if we do our own things in that time. We also sometimes play badminton :D
Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests