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

Block-breaking time with block hardness (vs instamine) #17

Closed
satoshinm opened this issue Apr 2, 2017 · 1 comment
Closed

Block-breaking time with block hardness (vs instamine) #17

satoshinm opened this issue Apr 2, 2017 · 1 comment

Comments

@satoshinm
Copy link
Owner

Currently blocks break instantly when right-clicked. This is fine for "creative mode", but for an engaging survival experience, blocks should vary in hardness and some take longer to mine, where you have to click and hold to complete the mining process.

Interacts with #8 Repeat rate for left/right click, hold to continuously break/build

@satoshinm
Copy link
Owner Author

satoshinm commented May 7, 2017

Depends on targeting the block being mined - continuously hit-test each mining tick, on_mine/build do these hit tests (first argument 0/1 = 'int previous'):

void on_mine() {

    int hw = hit_test(0, s->x, s->y, s->z, s->rx, s->ry, &hx, &hy, &hz);

void on_build() {

    int hw = hit_test(1, s->x, s->y, s->z, s->rx, s->ry, &hx, &hy, &hz);

Also retargeting should reset mining progress, to avoid mining wrong block quicker than it should

@satoshinm satoshinm changed the title Block-breaking time with block hardness and breaking animation (vs instamine) Block-breaking time with block hardness (vs instamine) May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant