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.

  • 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?

  • Pingback: I never liked geometry ANYWAY. « seriously()

  • 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

  • Pingback: Bastet, The Bastard of all the Tetrises « Eug’s Weblog()

  • Missing standard tetris detail

    You should show the next piece at least.
    Any tetris would be much harder without forward knowlegde πŸ™‚

    • 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.

  • Highiller

    One of the greatest worst games ever – loved it!

  • 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 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!

      • 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.

  • 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 πŸ˜‰

    • RobotCaleb

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

  • 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! πŸ™‚

  • 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)…

    • bitch

      you smart ass wanker

  • Pingback: Tetris-variaatiot, osa I | PilipaliNet()

  • Pingback: Bastet/Bastard Tetris. « Andrew’s Blog()

  • bitch

    fuckin bastards

    • jon

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

  • bitch

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

    • jbgy

      18 lines gg

  • 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.

    • 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.

    • RobotCaleb

      Thanks, Krezos. Glad I could make your day. πŸ™‚

  • 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. πŸ™‚

  • 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.

  • Pingback: Mr. Topp and the Big Bad Blog » The morning coffee and douchebag solidarity()

  • 8 Lines, fools!

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

  • Pingback: 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 :

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

  • desdes

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

    • innomen

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

      • RobotCaleb

        What does that mean? Cascade what?

      • 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

        Ahh, I understand. That kind of totally changes the game from being Tetris,
        though. πŸ™‚

  • Pingback: .log : лыТи в гамакС()

  • 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.

  • Pingback: Too good not to share « Econstudentlog()

  • 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.

    • 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”.

      • 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.

      • 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. πŸ™‚

      • 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.

      • 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.

  • Pingback: Friday Links (23-Apr-10) -- a Nadder!()