VexTris

#1

This is the simplest-possible VexIQ robot. Just one piece! Or is it still a robot? :wink:

That was just an experiment. I have coded it ad-hoc in one night. The code is pretty … short, not really pretty. 233 lines including (rare) comments. I’ll post it later.
(Last time I wrote tetris, some 20 years ago, it was in 8086 assembly and the binary did fit in 512B)
Playability is so-so, it would need better handling of the LCD buttons at least and all the meat around the engine (scoring, levels, increasing speed), but that wasn’t the point, I just wanted to see what can be done with the platform, besides robots. I plan to challenge my 6th graders to write a simpler game than this, bomber.

0 Likes

#2

Classical one, but nice :wink:

0 Likes

#3

That’s nice. Looking forward to seeing your code!

0 Likes

#4

Yes, RobotC ;-), here comes the source (for some reason, I can’t upload it, only PNG uploads work for me…)

https://drive.google.com/file/d/0B3BlNruB8hxSZExLU2hrV1M1VUE

0 Likes

#5

This is so cool! Thanks for sharing.

0 Likes

#6

Very cool! Just tried this out, really awesome.
BTW I had to make a few tweaks to the code in the Google Drive link (one of the wait commands and one of the timer commands)

0 Likes

#7

Yet another awesome project! Would you be amicable to having our media marketing team contact you directly, so that they can showcase this project on our blog? If so, please feel free to send me an email via support@robotc.net and I will connect you with our media team directly.

Great work on a fun project!

0 Likes

#8

Epic, good work!

0 Likes

#9

So, my son came to me, that he has an improvement to the program. That I should use this *random() *function, it will be more fun to play. “D’oh, I do use random(), see here”, I said, though he was right, the game was no fun at all, the pieces were sooo predictable.

Teachable moment!

We have discussed, how a computer, a very exact instrument that always follows the same instructions and in fact only move numbers here and there, come up with random numbers. What is a PRNG and how you have to seed it (srand()), what are real sources of randomness and what kind of issues such a lack of true randomness could cause in real world, besides lack of fun.

I am leaving the actual fix to the curious readers, to not deprive them of their teachable moments.

0 Likes

#10

good work, fantastic

0 Likes