Bastet – Bastard Tetris (updated)

Have you ever thought Tetris(R) was evil because it wouldn’t send you that straight “I” brick you needed in order to clear four rows at the same time? Well Tetris(R) probably isn’t evil, but Bastet certainly is. >:-) Bastet stands for “bastard tetris”, and is a simple ncurses-based Tetris(R) clone for Linux. Unlike normal Tetris(R), however, Bastet does not choose your next brick at random. Instead, Bastet uses a special algorithm designed to choose the worst brick possible. As you can imagine, playing Bastet can be a very frustrating experience! — http://fph.altervista.org/prog/bastet.shtml

That is the description of Federico Poloni‘s Tetris clone, Bastet. I first played Bastet over a telnet session to some person’s machine. In November of 2007 I started work porting it from its C code implementation to ActionScript 3.

I ported it for fun and because I didn’t have a Linux system handy on which to play Bastet. This version should not be viewed as a full game, as it isn’t. The controls will suck, it will give you several of the same piece in a row, it may not work at all and it definitely won’t be fun. :)

I have recovered the source code and made some changes to it. The controls should work a little bit better and it now tells you your score. Also, the debug text is removed.

Here is the result (instructions and more info are below):

Instructions are simple. Arrow keys left and right to move your tetronimo left and right. Up and Space to rotate your tetronimo. Down to move the tetronimo down. Pressing R will restart the game. As I said, simple. Standard Tetris fare.

The catch, though, is that the game looks at your playing field and determines which piece you will probably want most and then … denies it to you. Score keeping is not implemented. The text you see at the top is some of the debug data used for the current piece choice.

It is still under construction, so there may be some issues. I seem to have misplaced the source in the year-plus since I worked on this. I have recovered the source. If you find any glaring problems, I can be reached through my contact page. I don’t promise to fix them, though.

  • http://sytrus.deviantart.com Sytrus

    OMG. I fucking hate this. Or, it hates me.

    Seriously though. I don't think I've ever been so frustrated playing a webgame. : )

  • S53

    Oh my good god.

    Srsly. The same shape 11 times? Really? REALLY?

  • http://spiffyxd.wordpress.com/2009/01/30/i-never-liked-geometry-anyway/ I never liked geometry ANYWAY. « seriously

    [...] if I needed to get my ass kicked by Tetris even more, Bastet (short for, what else, Bastard Tetris) comes along and pisses me off within [...]

  • John

    Lol very challenging game. I like it but the controls are crappy. They are way too sensitive and sometimes I mess up simply because this game can't accurately maneuver the pieces in the way that I want.

  • RobotCaleb

    John, thanks for the comment. I know that the controls are horrible. :( Sorry for that.
    I lost the source that I compiled against so it's not easy for me to make changes. I spent several hours last night cleaning up a decompiler dump of my original swf. Maybe I'll be able to make some changes to it now that I've got it compiling again.

  • hinam11

    prizee site – good games free prizes
    http://en.prizee.com/?refer=Hinam11

  • http://ehlee.wordpress.com/2009/02/01/bastet-the-bastard-of-all-the-tetrises/ Bastet, The Bastard of all the Tetrises « Eug’s Weblog

    [...] Source [Bastet] [...]

  • Missing standard tetris detail

    You should show the next piece at least.
    Any tetris would be much harder without forward knowlegde :-)

  • Highiller

    One of the greatest worst games ever – loved it!

  • http://newgrounds.com Mindchamber

    not really impressed, you cover the next piece, which takes away the players chance to counter the computers attempt to thwart your progress. Also if this is bastard tetris why is it Ive only seen 6 pieces. Where is that long defining piece ?

  • RobotCaleb

    The next piece isn't known until you've placed the piece you currently have.
    In other words, I can't show you the next piece because I don't know the next piece until I give you the next piece.

  • RobotCaleb

    The I piece rarely shows up, as it is usually the piece least likely to cause problems for you. The algorithm places every piece in every location (dropping straight down) and then picks the one that gained you the smallest score. Or, rather, giving you the piece that didn't score the largest score. :)

  • Bob Kelso

    FUCK YOU YOU FUCKING DEVIL THING.

  • RobotCaleb

    :)
    Thanks.

  • sigs

    1) the block falling thing broke at some point, blocks only fell when down arrow pushed.
    2) game ended abruptly, possibly the new block couldn't fit; should include a Game Over screen maybe?
    3) where's the “you won't get this one” from the original bastet? (:

  • RobotCaleb

    Thanks sigs. I did see that first bug once when I was testing it. I was never able to reproduce it, though.

    Yes, the game automatically restarts when you can't fit the given block. I'll try to get a chance to look into making that better.

    As for your number three, well, it's just not there. :)

  • Chromz

    This is excellent, found a glitch though. I think I had 650 or so points when the blocks stopped falling. They would appear and then just stay still at the top of the screen until I decided to move them downwards manually.

    Good work, though, this game really makes you think

  • RobotCaleb

    Thanks for the info. If you find you're able to reproduce that consistently, I'd be very interested in knowing how. I saw it once while developing, but wasn't able to figure out how to repro it.

    Glad you liked it!

  • cloudraven

    Hahahahahaha this was really funny. Indeed I managed to make the straight bar my least desired peace, and I got 9 in a row… (I needed a square) and of course… the next piece I got after that was a square… so hilarious.
    Anyway… it is well known that you have to lose soon if you only receive s blocks, mostly if they are the same type… it may be good to reduce the likeliness of getting only s blocks… so to allow people to play longer… and keep them frustrated longer as well ;)

  • Anonymous

    I found no joy in this joy. I don't think I'll play it again.

  • Chris

    I am really against downloading this. I would rather play it in flash.

  • RobotCaleb

    You, sir, are in luck, then. You can play it in flash on this very page! :)

  • RobotCaleb

    I think you can do better than you expect with just S or Z blocks.

  • Eric the Unhinged

    *wibble*

  • laurien

    woo hoo 9 lines!

  • RobotCaleb

    Awesome! I think that's better than I can do.

  • Liz

    Best is 7 so far, so irritated!

  • Archer

    29 rows!
    Of course the afformentioned glitch (sigs, chromz) helps a bit :-)
    The blocks keep falling after completing 11 rows (which is not that hard), resume briefly after the 20th, only to stop again after the next one.

    Playing this is much less frustrating than completing a single row in Tetoris (which I've done in 20 minutes)…

  • http://dhost.info/pilipalinet/?p=231 Tetris-variaatiot, osa I | PilipaliNet

    [...] http://blahg.res0l.net/2009/01/bastet-bastard-tetris/ Suurinta turhautumista itselleni on pelissä aiheuttanut aina se, ettei i-kirjaimen muotoista tolppa-palaa saa koskaan, kun sitä eniten tarvitsisi. Ylläolevan linkin takaa löytyvä peli pistää asteen paremmaksi ja lupaa antaa joka ainoa kerta huonoimman mahdollisen palikan. Tagged and categorized as: Hauskat | TrackBack URI [...]

  • http://andrewpvisser.wordpress.com/2009/04/14/bastetbastard-tetris/ Bastet/Bastard Tetris. « Andrew’s Blog

    [...] Jump to Comments This has to be one of the hardest versions of Tetris [...]

  • bitch

    fuckin bastards

  • bitch

    u bunch of fuckin horrible dick heads, eat shit, then choke on it and die choking, u fucking assholes

  • bitch

    you smart ass wanker

  • neoalley

    After I cleared about 17 lines, the pieces stopped coming down. They just floated. I had to push the down button in order for them to come down. Error??

  • Dave S

    ohmygoodness…
    12+ lines is NOT possible >.<

    lol i love how u cant say the next piece because it has to determine the worst possible outcome =P

  • Andrew

    I love Bastet… but this version isnt…bastard enough.

    seriously… playing bastet on my computer, the most lines i've ever gotten was 3… on here, I seem to get useful blocks all the time… i even managed to get about 700 points! :)

    I also noticed the bug where the next piece wouldn't fall unless you press the 'down' arrowkey

    All in all though, a pretty good clone!

  • RobotCaleb

    It's the same code, for the most part. The next piece constraints (difficulty, if you will) were loosened a little bit to make it a tad more fun, though. :)

    Thanks for the comment.

  • http://l0ser.net Caleb

    It’s mostly the same code. The piece choice factor (difficulty, if you will) was loosened up a bit to make it a tad more fun. :)

    Thanks for the comment.

  • rofko

    This is fantastic. Congratulations. I think I have sussed the hole in the algorhythm. I just got 11, but I'll try at 'work' again tomorrow. Well done again.

  • RobotCaleb

    Fantastic. Thanks for playing, rofko. :)

  • Anonymous

    That was possibly the most enjoyable game of Tetris ever!

    I’m no videogame masochist but something about knowing the very code of Bastet hates me makes it less about placing blocks and more like some kind of ritual duel to the death.

    Also I got 11 lines. Couldn’t get any more, no matter how hard I tried. Bastard indeed.

  • jbgy

    18 lines gg

  • jbgy

    18 lines gg

  • jbgy

    18 lines gg

    sorry for anonymous posts had trouble signing up :-)

  • RobotCaleb

    Nicely done. That's better than I can do. :)

  • Kuratsu

    I was really impressed, the first time i tried it was fairly challenging. However I found that doing the opposite of what the game expects you to be using a piece for generates a piece that you need more often. I used this strategy to accumulate over 40 lines easily after game 5. Thanks for the challenge =)

  • RobotCaleb

    Wow, that's awesome. Well done Kuratsu. I think that's the best score I've
    seen. :)

  • http://www.facebook.com/profile.php?id=1329780505 facebook-1329780505

    Wasn't too bad at first. Then it just kept giving me the same piece over and over (and half the time it wasn't too bad; the other half was annoying).

  • onlyobsessed

    I also made the game break. I was at 550 points, had just laid a block to clear a row near the top (probably 4-6 lines down). Don't know if that will help you or not.

  • http://mrtopp.com/2009/11/04/the-morning-coffee-and-douchebag-solidarity/ Mr. Topp and the Big Bad Blog » The morning coffee and douchebag solidarity

    [...] as designed by bastards, will now give you the worst possible piece each [...]

  • http://twitter.com/Jakebob Jake Heneghan

    8 Lines, fools!

    I've played these sort of tetris games too often.

  • http://realurl.org/twitted.php?id=6097388075 Twitted by commuter_dirge

    [...] This post was Twitted by commuter_dirge [...]

  • cnidae

    Just got the floating glitch. Got a straight piece for 4 lines. (Seriously, Tetris is seldom so kind.) Put me to 13 lines and 850 score.

  • alek214

    i like this. its a good challeng.their should be a version where its a 100% chance you get the worst possible shape

  • sigs

    it's actually easier that way. You can make a 2×2 hole and keep getting the I pieces ever since.

  • ibrokeit

    http://img.waffleimages.com/ea9827e9e8047755fd0… broke your shit.JPG

    At about 12 lines the blocks stopped falling, and at 17 lines they stopped coming all togeth.

  • ibrokeit

    http://img.waffleimages.com/ea9827e9e8047755fd0… broke your shit.JPG

    At like 12 lines the blocks stopped falling and at 17 lines they stopped coming all together :

  • http://www.RADMoose.com RAD Moose

    Nice.. surprised that I could pull off a “Tetris” tho… then again my score consisted of just 4 lines too

  • RobotCaleb

    Thanks, Krezos. Glad I could make your day. :)

  • desdes

    doesn't take a genius to figure that 12 z blocks leave you no options.

  • http://infornography.kpoxa.org/personal/s/log/2009/12/08/%d0%bb%d1%8b%d0%b6%d0%b8-%d0%b2-%d0%b3%d0%b0%d0%bc%d0%b0%d0%ba%d0%b5/ .log : лыжи в гамаке

    [...] нем же: Bastet stands for “bastard tetris”, and is a simple ncurses-based Tetris(R) clone for [...]

  • jkenny23

    Besides a ridiculous abundance of that gray piece, I don't find this much different than my attempts at real Tetris.

  • jkenny23

    Besides a ridiculous abundance of that gray piece, I don't find this much different than my attempts at real Tetris.

  • Safibn

    So I was about to comment, and I thought I would contribute aswell.

    my comment: What cruel and unusual spirit would possess someone to even consider this game as a possibility?

    I must say, though, that I was entertained, and am now lacking a few brain cells due to headbangs.

    Whre's the tetris music?

    as for the glitch, it happened to me too! It might have something to do with building a long tower, because for me it only happened at the later stages of the game, when I was already doomed. However, maybe the high tower is a side effect of getting 600 points. I am not sure of the amount of points though…Come to think of it, it would be nice to have a “previous score” indicator, showing you ylast game's score, before the game restarts.

    Thanks for the time VERY well wasted

  • RobotCaleb

    Thanks for your input and thoughts. I'm glad you didn't find it to be a
    total waste of your time. I doubt that I'll revisit the source anytime soon,
    however.

  • http://econstudentlog.wordpress.com/2010/04/08/too-good-not-to-share/ Too good not to share « Econstudentlog

    [...] Here’s a neat link to the engineers reading along (related to the latest xkcd-cartoon). [...]

  • Satyrday_Night_Fever

    Seriously, this is a great Tetris practice tool. It really gets you out of usual patterns of block placement and makes you think more creatively.

    A “Bastard” meter would be a great setting for a full Tetris game. At one end it would be very sympathetic and almost always give you the best pieces, in the middle it would be completely random, and at the other end it would be something like what is shown here.

  • Satyrday_Night_Fever

    Seriously, this is a great Tetris practice tool. It really gets you out of usual patterns of block placement and makes you think more creatively.

    A “Bastard” meter would be a great setting for a full Tetris game. At one end it would be very sympathetic and almost always give you the best pieces, in the middle it would be completely random, and at the other end it would be something like what is shown here.

  • innomen

    Why not just make it always give you S and 5? That's what it ends up doing anyway. This would be cool if it was forced to evenly distribute pieces, then it might be challenging and not just a stupid cheat.

    For the uninitiated traditional tetris piece order isn't perfectly random, it's more like a playlist on shuffle forced to play each song at least once per cycle. It could still give you the worst possible piece of what's remaining, but it doesn't it just gives you whatever piece you don't need over and over, you might as well make the controls random. Would be just as fair and just as boring. Or maybe you could just make it game over at random.

  • innomen

    Exactly. Now if it allowed cascade, that could be interesting.

  • RobotCaleb

    If it always gives you those pieces, perhaps you might try changing your
    tactics? I will definitely agree that it does tend to give those pieces, but
    it shouldn't always give them to you. Mix it up a bit. There are some
    strategies that work quite well for defeating the “AI”.

  • RobotCaleb

    What does that mean? Cascade what?

  • innomen

    Dude, there's no “tactic” that will make use of 50 S pieces in a row. Unless you perhaps allow cascade. Which I will explain in response to your other comment.

  • innomen

    From the Wiki: “Cascade Tetris: The player must try to clear lines that cause Cascades. Cascades occur when a cleared line cause other Blocks to fall and clear another line. “Go for a Cascade”.”

    It's basically gravity. No more floating bricks. Partial bricks fall if nothing is supporting them.

  • RobotCaleb

    Not to great benefit, no. But that's not quite what I meant. It is certainly possible to play in such a fashion that it doesn't devolve into a stream of S pieces.

    However, this contraption isn't necessarily meant to be winnable. The fact that is causes frustration is kind of a tacit nod toward its name. :)

  • RobotCaleb

    Ahh, I understand. That kind of totally changes the game from being Tetris,
    though. :)

  • innomen

    But its not being a bastard its being a cheater. The implication is that it's simply stomping you but it's not, its broken, on purpose.

    And sure I can make it not give me S pieces but only at the cost of any future advancement, that's why the best people can do is like 15 lines.

    The theoretical maximum is probably like 35 or something absurd like that.

    There is no doubt that originally it was quickly discovered that truly random piece selection would result in unwinable situations, you've simply written a process that seeks those outcomes instead of avoids them.

    It's like a race game with a wall 4 miles down the track that you can't pass through but your opponents can.

    I think it needs the potential to be winnable to be “bastard” as opposed to broken. But of course that's a semantics issue.

    And yes Cascade is a completely different game, but its more logical and intuitive, plus it allows and encourages you to plan ahead. I've always felt that cascade was a wonderful improvement. I like sticky tetris and hotline as well.

    I wish someone would continue the development of LOCKJAW (tetris simulator) so I could mix and match these features.

  • http://anadder.com/friday-links-23-apr-10 Friday Links (23-Apr-10) — a Nadder!

    [...] have to play this version of Tetris: it bastardly works out which pieces you need least and gives them to [...]

  • lexar

    21 lines

    You can sort of trick the game if you leave holes of 2 wide with guaranteed at least 1 line, you can make a lot of lines, and with the off-chance of a not entirely horrible piece it's even easier.

  • lexar

    21 lines.

    Tactic I used was mostly keeping openings of 2 wide, so even the worst piece would at least give 1 line. With the off-chance of having a halfway decent piece every so often, I could survive for a while.

    Also don't be afraid of leaving a hole every here and there, it sort of tricks the pc to think that some blocks are the worst. Worst thing to do is to start stacking too much.

  • http://twitter.com/codahighland Adam Higerd

    Sure there is. Just start lining them up from left to right. You'll clear the line in the middle and then subsequently you'll start getting doubles as you fill in the gaps. You'll have one useless line at the bottom that alternates block-hole-block-hole, but nothing but S blocks is certainly not all that bad.

  • innomen

    Can you show me a screen shot of what you mean because I can't picture it.

    I could see a precise alternating distribution of s pieces maybe leading to a situation like you are describing but not random and certainly not with the occasional line, t, or square.

  • http://twitter.com/TheTjalian Tim Leach
  • RobotCaleb

    Outstanding. :)

  • http://twitter.com/davidptm56 David Mateos

    This is from the linux bastet: 6400 points, 45 lines
    http://open.spotify.com/track/6zL8VkVrlBgvehvpJ…

  • calfboy

    i have beaten the game, it just stopped giving me new pieces.
    here is the proof: http://i21.photobucket.com/albums/b282/Calfboy/…

  • calfboy

    i have beaten the game, it just stopped giving me new pieces.
    here is the proof: http://i21.photobucket.com/albums/b282/Calfboy/…

  • http://pulse.yahoo.com/_HMWZ6GGHET7WLMFFMLIFX5JEWQ jon

    I achieved line # 38 is there an end to the game or atlest a leader board?

  • http://pulse.yahoo.com/_6X2I7FQCIG5ZZINPFHN5J5UFFA abcc

    That doesn't prove it – so far as I can tell, it just shows that you achieved approximately what Lexar achieved. I suggest that you tell us your strategy – after all, the only possible way to completely win a game like Tetris is to come up with a strategy that guarantees that you will never lose.

  • http://www.nextlevel-conference.org/2011/02/0095-metagames-spiele-ubers-spielen/ 0095 /// Metagames: Spiele übers Spielen – Next Level Conference

    [...] Ein Beispiel ist eine Version von Tetris, die immer den am wenigstens passenden Block schickt: Bastet – Bastard Tetris. Dazu passt das Flash-Spiel Tetris HD, das auf dem Bild zu sehen [...]

  • http://seite360.de/2011/02/05/links-furs-wochenende-19/ Links fürs Wochenende

    [...] des Gewaltdiskurses und natürlich die obligatorischen selbstreferenziellen Metagames… Von Basted über Super PSTW Action RPG bis hin zu Wario Ware ist alles dabei. [...]

  • http://pulse.yahoo.com/_HGBBAOUUQKPGMUQHHWYHGMX4DE Tynkywinky

    72 lines EASY MAN TOO EASY !!!!

  • http://blog.dukeoglue.com/2011/04/25/bastard-tetris-and-heaven/ Not About The Punchline » Bastard Tetris and Heaven

    [...] sometimes feels evil? How it sometimes feels like you never get sent the piece you want? Well, Bastard Tetris does that on purpose. It’s designed to choose the worst brick possible. See how frustrating [...]

  • http://blogs.adobe.com/jnack/2011/05/video-unspeakably-masterful-tetris-playing.html John Nack on Adobe : Video: Unspeakably masterful Tetris playing

    [...] more tangential: I love that someone has created “Bastard Tetris,” a game specifically designed to make you feel bad by choosing the worst possible block at [...]

  • http://www.facebook.com/people/Jonah-Svanberg/624451104 Jonah Svanberg

    Watch out when you hit 90 lines the drop speed increases dramastic.

  • Anonymous

    You hit 90 lines! Outstanding.

blog comments powered by Disqus