Tetris block spawning...

  • I am making a Tetris game, as of now, it doesn't have any sort of locking system. Basically, on the start of the game, a shape is spawned in, it falls to the bottom of the screen, once it hits the bottom of the screen, or (later in the game) another block, a new block should be spawned in and begin to fall. The problem is, the script that spawns in another block is:

    on collision with (another shape) or the ground:

    Create shape

    As you can probably tell, every time a slight collision is made (this is an intentionally bad Tetris game that uses physics) a new shape is spawned, causing thousands to spawn in and break the game... What should I do?

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There are a few things you can do to tidy it up. Maybe the collision box doesnt have to be all the way around the object and you can limit it to a very tiny area that matters? You can also give the block that is falling a variable that is set to distinguish it and make sure it is only picking that object for collisions and not all blocks in the level.

  • Duh! Thanks so much! I didn't even think of using a boolean...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)