[FUN] Tetris - Addiction redefined

Discussion in 'WIP and Development Status' started by Streammz, May 18, 2011.

Thread Status:
Not open for further replies.
  1. Currently I am making Tetris for minecraft, and this is basicly an list of my progress, todo etc

    What's planned:

    Generating area's where you play
    Selected blocks and non-selected blocks
    Moving selected blocks to the left/right
    Rotating selected blocks
    Moving selected blocks instantly down
    Moving selected blocks 1 down over time
    Detecting the lines and give points based on that
    Going levels up making the game more difficult over time
    More blocks
    Config file <-- The final thing planned before first release

    Additional plans which can be changed:
    Teleporting players to their best view on start
    Keeping players on their spot if they try to leave the arena
    Make game blocks unbreakable

    Current visual effects
    - Startup counter
    - Death screen
    - Planned next blocks being drawn

    ne0nx3r0 likes this.
  2. Offline


    I think you might wanna use the scheduler instead of making your own thread.
  3. So how would i work that out?
    I was thinking of:

    public GameTick() {

    //start an timer

    the timer would do that method again, so it goes infinitly

    Yeah, i think that would be the best
  4. Offline


    public class TetrisRunnable implements Runnable {
        public void run(){
            //Stuff to do each time it's run
    In plugin class :
    getServer().getScheduler().scheludeSyncRepeatingTask(this, new TetrisRunnable(), <delay before starting>, <delay between each run>);
    The delays are in ticks I'm pretty sure not ms.
  5. i like ticks ^^
    i was always thinking why there wasn't a event onServerTick(ServerTickEvent event) or something similair
    but that explains ^^
  6. Offline


    Very cool idea, also very complex to do right. Good luck, I hope it turns out great!
  7. The only thing that bothers me atm is rotating the selections.
    Too tired for that now, so i'll start on that tomorrow.

    I thought i succeeded, but it seems it didn't rotate 90 degrees, but diagonally across. Thats why i thought i succeeded with that long block (4 long thing)

    Okay, the plugin is ready for a beta release :D


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 16, 2016
  8. Offline


    @Streammz - couldn't you use shift-left/right clicks for moving blocks left/right? Rather than having to look all the time.
    Walker Crouse likes this.
  9. Of course, I can also do it with player_move event to just use WASD, but I rather use this for simplicity sake
  10. Offline


    It's just that when you're looking, you can't see what you're doing. What I mean is - check if player is sneaking (shift is being used). If sneaking while left clicking, move tetronimo left. If sneaking while right clicking, move tetronimo right. This eliminates unnecessary looking around.
  11. I can additionally add this, though.
    But i'll keep the up/down button as the only buttons

    edit: one problem though, playerInteract only triggers left-click-air when the animation is finished

    edit2: and somehow right-click-air doesn't work, i'm sure the code is right
  12. Offline


    You should also make it check for left-click-block/right-click-block.
  13. Code:
                if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK) {
                    if (event.getPlayer().isSneaking()) {
                if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
                    if (event.getPlayer().isSneaking()) {
  14. Offline


    I can't wait until the release!
  15. Consider 0.4 the release, I'm currently not planning on adding new stuff (just keeping it up-to-date)
    Altho, I still have an part of 0.5 standing here, ready for release.. I'll get to that ASAP

    Just saw that this is the devolpent treat, the plugin is already released ;)
Thread Status:
Not open for further replies.

Share This Page