bbarker / BlockSmith

BlockSmith is currently an experiment in the ways of MineCraft-like voxel games.
Mozilla Public License 2.0
0 stars 1 forks source link

Make blocks outside of initial chunk "editable" #9

Open bbarker opened 8 years ago

bbarker commented 8 years ago

Currently cannot select them due to hardcoding of '16' in GameState#calculateSelectedBlock. When outside of the initial chunk, placement of blocks also seems to be off-by-one; likely related to #8.

bbarker commented 7 years ago

In this issue branch, they appear to be editable now in general, but:

Not all faces of a placed block appear to create collision outside of origin chunk - in fact, they are different

bbarker commented 7 years ago

Have now addressed some of the collision issues in b743a5ada01d501729b76e4bf26b5194279b2cad due to unnecessary >0, <=16 checks, but more subtle issues remain. Need to compare position of placed block and detected block collision to debug, starting in (-1,0) chunk.

bbarker commented 7 years ago

Modified list (note: not testing the bottom (-y face) in this list):

bbarker commented 7 years ago

It appears we may need Math.round instead of toInt for negative chunks; limited use in 995704c6654a19de8e64123b171cbe0eae012503 seems to confirm this, need to investigate more.

Update: the rounding fixes have largely helped but not all is perfect in 0947544c67ec4e66d1c26397131a49397e3bc6ab, need to get some rendering issues for non-origin chunks resolved to make debugging collision detection easier.

bbarker commented 7 years ago

Merged progress so far to master in 9ec1b76a53fb9ee00d711f80bdad467e00d62ddc.

There are a number of rendering issues, including this one, that would be easier if controls were improved (#3).