non evil Lock delay - how to do that?

Thread in 'Discussion' started by herc, 2 Dec 2006.

  1. i'm currently adding lock-delay to my tetris clone.

    can you tell me how to do that best without that "breaking tetris"?

    i mean - how long should that lock delay last? 300 ms ?

    i start lock delay countdown immideatly after tile touchdown. and i do not prolong lock delay after a keypress.

    but there is a problem with lock-delay: it might slow down gameplay. what to do about it?

    my ideas:

    * if the player presses down-arrow again, lockdelay is set to zero and tile is dropped and new tile is spawned.

    * another method would be: stop lockdelay after key release. so IF the gamer wants to adjust tile-position, he must keep holding down the DOWN-Arrowkey and press left/right to move the tile. the problem with that could be that it is more difficult or impossible to slide a piece into some hole that is over ground...

    * press another key to stop lockdelay - what about rotate or space ?

    what do you think any suggestions / ideas?
  2. tepples

    tepples Lockjaw developer

    For one thing, you'll need to consider how wall kicks and floor kicks work. If a tetromino can be floor kicked repeatedly, this may break the game.

    Tetris The Grand Master (TGM) seems to use 500 ms; later games in the TGM series reduce this at higher levels. Tetris DS uses just over 500 ms (I just checked).

    Is this with or without smooth falling animation?

    Do you reset it whenever the tetromino lands ("step reset" behavior), or do you reset it only when a tetromino enters the playfield, such that multiple landings of the same tetromino consume the same lock delay ("entry reset")?

    Time requirements. In TGM series, the player has to get (approximately) 150 lines within a certain time, or the game ends. Or give the player n rows of garbage after a given

    That's called lock delay cancel. The TGM series has this, and so does Tetris DS.

    This is "lock on release" or "spring loaded lock". As far as I know, only Lockjaw has this as an option.

    Tetris DS and possibly several other games allow the player to press the "hard drop" key to cancel lock delay of a landed tetromino.
  3. oh my.. [​IMG] i just have some sort of wall-kick at the moment, floor kick isnt implemented yet - but i will do. i learned of the existence of all these SRS and so on just at the moment i arrived here. i'm a poor PC only gamer/coder, never played on any console, neither owned a gameboy. (still eager to own a nintendo DS, but sadly cannot play gameboy roms.. would love to play quirk on it... isnt there a way to do that? some sort of adapter?)

    so i see. then i think i will use 500 mseconds and lower that delay time linearly depending on the current level. how far would you go down in level 9? down to 100 ms or even 50 ?

    lock delay starts after piece cannot move any further smoothly. (there might still be a small gap, depending on smooth falling sped, but that gap is independently closed by snapping the piece into the integer position)
    so when should lockdelay start? without smooth anim or after smooth anim finished?

    ok i see. i did not reset lock delay, but i think thats a positive thing to reset so one might slip of a missplaced piece from a cliff!

    i very much like the spring loaded lock method, but i think its to difficult for beginners. so i think i will implement that "lock delay cancel".

    thanks alot for helping!
  4. tepples

    tepples Lockjaw developer

    Game Boy Game Paks do not play on Nintendo DS, but their ROM images do run in the Goomba emulator.

    Depends on how you're defining "level". The fastest part of Death (the "hard type" mode in that video that you've seen) goes down to 250 ms.

    Lock delay should start as soon as the (smooth animating) tetromino lands.

    You could make it an option. See Lockjaw for a Tetris clone with a ridiculous number of options.
  5. that goomba emu sounds quite cool. but if i find some cheap gameboy advance sp in ebay, i will buy that. because it seems quite complicated to get that stuff into a supercard or such and fire up emu and play..

    and - who knows - maybe these flash rewritable cards are finally more expensive than a used GBA-SP ?? (anyone here wants to sell me one GBASP?)

    sure, i will make it an option. but for now i have found another cool method:

    press space | left mouse button once: firm drop;

    press space again / double click: instant drop!

    i like that, works quite well. and on key leftALT is instant drop - so one may vary gameplay. jippi - my clone is slowly getting in shape [​IMG] thx again, tepples!

Share This Page