-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add variable block hardness. Closes GH-17 #101
Conversation
This basically works, but a visual block breaking progress indicator is necessary to let the player know there is progress being made and the game is not merely lagging (#100 Lag when mining/building many blocks repeatedly?) To indicate the progress, should display an ever-increasing texture over the block textures. This only needs a textured quad, similar to text rendering. Or more to plant rendering? gen_plant_buffer() calls gen_faces(10, 4), two quads crosshatched: (not billboards, tutorial: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/billboards/) gen_player_buffer() uses gen_faces(10, 6). 6 faces = cube, 4 for two quads, each side. The block-breaking indicator would only need 1 face. |
Previously, it would never hit, say, plants you can walk through.
Merging what I have for now, separated out the block breaking animation into #106 |
Note, 62b4f94 broke variable hardness since hit_test_face() returns a boolean (1 or 0), not the block type id! (todo: stdbool? good idea?). Changed to use _face() since wanted to draw the block break animation on the face, but GH-106 isn't implemented yet, and it breaks variable hardness, therefore reverted in #108 d502b94 as I found while implementing the block info text, it was always returning 1 not w. |
#17 Block-breaking time with block hardness and breaking animation (vs instamine)