Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks fail to drop through #2

Open
kozross opened this issue Aug 15, 2015 · 1 comment
Open

Blocks fail to drop through #2

kozross opened this issue Aug 15, 2015 · 1 comment

Comments

@kozross
Copy link

kozross commented Aug 15, 2015

I just played this game, and after one connect, the replacement blocks failed to drop through, causing a 'queue' of blocks to form above the top part of the block section, and an empty space to remain inside the grid.. I wanted to screenshoot it, but the game gave me a game over before I could.

@Zolmeister
Copy link
Owner

Yes, I have seen this before.
It has to do with the way the 'bounce' physics is implemented, and I've tried fixing it a few times.
This section: https://github.com/Zolmeister/Zop/blob/master/src/components/game/index.js#L194

The problem is that the block slows down too much on the bounce and loses all speed, causing it's velocity to get stuck at 0 (I think).

The code (written for js1k) is pretty hard to reason about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants