tetr.js development thread

Thread in 'Research & Development' started by simonlc, 17 Mar 2013.

  1. Hey guys, I've just released an alpha of my Tetris clone called tetr.js. This game is in very early stage of development, thus not all features are functional. However the first release has a fully playable Sprint (40 lines) and Marathon (150 lines) mode. I will be updating this thread with all the latest developments as I add them.

    If you have any feedback, you can post in this thread, or if you have a github account you can post it here.

    Feedback can be:
    • Bugs
    • Feature requests
    • Changes
    • Your thoughts and opinions

    You can try it in your browser here!

    Current mechanics and features
    • Tetris Guideline compliant
      • Colors
      • Random generator, first bag never spawns Z, S, or O piece first.
      • SRS
      • Gameover by lock out or block out
      • Hold
      • Piece preview
    • Configurable controls
    • Game statistics like PPM, Time, etc.
    • Configurable gravity
    • 60 FPS
    • Fast code and draw method
    Planned future mechanics and features
    • Preload DAS preservation during countdown
    • DAS and DAS delay settings
    • Responsive and mobile design
    • More game modes, and trainer
    • Replays
    Changes since last release:
    • None
    Last edited: 24 Mar 2013
  2. Pretty cool, but you could pick the interest of TC even more if you implement ARS :)
  3. ARS? Why would that attract TC's attention?
  4. Muf


    Because we're a circle jerk of TGM nerds, obviously. :p
  5. Ah. Well I originally wanted to make a TGM clone since there's obviously more TTC games out there. I just don't know enough about the game, I've never even played it, so I didn't feel comfortable making a game that others would play.
  6. Give it a try on Nullpomino (it's the "Grade Mania" modes combined with the "Classic" rules) ! It's a demanding, strict type of game but it's a HUGELY rewarding Tetris. And it's far more interesting in singleplayer than anything TTC has made so far.

    Using some clusmy and elitist analgies, one can say that TGM is more haute cuisine than SRS' fast food, more katana than heavy machine gun, more jazzy than rock'n'roll, more IWC than Swatch, and.... I got carried away :p

    Anyway: up should be hard/sonic drop instead of rotate.
  7. I'll give it a try then.

    The default controls are that way because that's how most noobs would play it. There will be custom controls coming soon.
  8. Apparently I deleted the first post or something? lol
  9. Edo

    Edo a.k.a. FSY

    Until a new member has made a certain number of posts (I forget what the exact threshold is, but I think it's around half a dozen), every post they make that contains a link--regardless of whether it's a new post or an edited old post--will get caught in the spam filter and need to be manually validated by a moderator.
  10. Ok thanks Edo.

    Updated the game, you're now able to customize controls, and I've fixed a line clearing bug. I'm currently working on another bug causing some rotations to also shift and some pieces not kicking randomly. I have no idea where either of these are coming from so if anyone gets into this situation please let me know how it happened.

    UPDATE: Fixed the rotate bug. All known bugs are fixed now.

    After this I'll be working on configurable DAS settings.
    Last edited: 24 Mar 2013
  11. Edo

    Edo a.k.a. FSY

    Regarding rotation systems, SRS is the strong preference of a small but vocal minority; ARS is the strong preference of perhaps an even smaller vocal minority. The overwhelming majority of players won't notice the difference between one rotation system and the next, as long as things behave in a logical manner. Why not design your own rotation system? You're not making an official game, so you're not bound by the horribly restricitive Tetris Guideline -- you're free to innovate!

    Why not research a few games and see what rotation systems they used, and try to figure out why. For example, the ingenious system used in The New Tetris for N64 was designed to facilitate the building of squares: watch how the pieces snap into place in this video and you might see what I mean: http://www.youtube.com/watch?v=nkX0IOVM_2w
    The DTET rotation system is also substantially different from both SRS and ARS, and was designed to allow a multitude of frankly quite crazy wallkicks (there are some examples of what's possible here: http://web.archive.org/web/20071222033121/http://dtet.web.infoseek.co.jp/dtet/tech.htm). Another interesting rotation system is the one used in the game Tetris X, which allowed players to choose which way they wanted a piece to wallkick, simply by holding a button. There are many other wild and wonderful rotation systems out there, but sadly we'll likely never again see any of them in an official Tetris game.

    I'd be really interested to see if you can come up with something radically different from what's out there currently, yet still practical. If you have any questions about rotation systems, (or any other game mechanics), feel free to ask and I'll do my best to answer what's not already answered on the wiki.

    Also, before I forget, I had a quick play of your game in its current state, and noticed that you've got the classic top row bug which you might want to look into:
  12. Thanks for the reply, I never knew there was so many rotation systems. I chose SRS because yes, it was the most popular, and it just feels right and is intuitive. An idea that popped in my head is a rotation system that allows you to be faster in a sprint game mode, and generally use less key presses. I've also seen the SRS-X rotation system which seems ridiculous, but I really like it.

    Thanks for the bug report, but I have no idea what the top row bug is. I have to say though, I'm very interested it finding out considering it's "classic".
    EDIT: Kitaru just explained it to me. Shouldn't be a hard fix.
    Last edited: 5 Apr 2013
  13. Well I decided to push this release out now, even though there's a few things missing. Please let me know how these new features are for you.

    What's new?

    • The settings menu, click or hold the arrows to change options.
    • DAS and ARR settings, let me know if you want a wider range for these.
    • Dark theme, though the look of both is still early WIP.
    • Gravity setting, decided to just go with the full x/64G and 0-20G.
    • Lock Delay setting.
    • Auto sizing, and also you can pick a fixed size if it'll fit in your screen. I might expand on this and allow more customization.
    • Option to use flat colored blocks. Settings to remove the 'grid' lines might come in the future.
    • Setting to turn off the ghost or use a colored ghost.
    • Line counter on the left.

    Apart from that there's a few bug fixes, and improvements to the controls menu.

    What's not in yet:
    • Sound and volume do nothing.
    • Neither does hide cursor.
    • Instant updating of features, sometimes it needs a little kick like a page refresh or browser resize. This will probably be fixed soon.
    • Local high scores are coming next, pretty much the same style as nullpo unless there is some requests.
    • Lots of improvements that I want to make that really wont be noticable to anyone.
    • Better menu system, with a scroll bar for small screens.
    • Better overall design and look.
    • Resetting settings and controls to default.
    • Ability to pause, and automatic pause when the page isn't visible. Pausing was in the old version but it didn't pause the timers.

    There's lots of future options, like adding sounds (I need sounds first), adding custom block skins, and things like that. I made some color functions that I'm really not happy with for controlling things like the falling piece brightness and colored ghost piece, but the function is really bad and called literally 3 times for every single block you see. Only the falling piece is drawn at 60fps, but even that bothers me. I'm likely going to ditch those and think of something else. I'm thinking of adding even more functions and just caching the colors at the start of the game, but even then I'm not sold. I'm also really starting to hate the look of the design. The menus never really got any design, and even though I like the minimalism of everything it's just not giving me the right mood. I think I'm going to take time to work on that next more than anything, and probably mess around with playing sounds in JS. The state of sound in JS is pretty messy, so it's going to take some work to just get a system for playing sounds well across all browsers. There's also the Web Audio API that is only supported by some browsers but I'm itching to play with it.

    TL;DR: I'm going to work on the design and improve some features that I quickly implemented and am not happy with their state.

    EDIT: Just added configurable soft drop speed.
    Last edited: 8 Apr 2013

Share This Page