Author Topic: Decoupling, Bugs, and event improvements  (Read 883 times)


  • Newbie
  • *
  • Posts: 16
    • View Profile
Decoupling, Bugs, and event improvements
« on: December 06, 2018, 04:04:04 AM »
This is basically a bullet list of things I noticed that should be decoupled more than they currently are, whether to facilitate pure decoupling of the components, and things like networking.

BUGVoxelSetDynamicmissing the render type filter check that VoxelGetDynamic does, wrap that long 6 conditional check in a function on the voxel so it reads better and is easily callable by the user
NEWVoxelGetDynamicmaybe a selectable enum on a voxel definition that controls what happens to a block when it goes dynamic(destroy, delete, etc) and/or a OnBeforeVoxelSetDynamic(with similar ignore parameters like mentioned below, and a OnVoxelSetDynamic
CHANGEHitVoxelFastshould not access input. instead perhaps pass an enumerated hit type that can be passed through to the OnVoxelClick
CHANGEOnVoxelBeforeDestroyedshould allow a return value or out parameter to abort the destruction process(and perhaps leave the block at 1 hitpoint. This is so that there is a mechanism on a networking client to interrupt the destruction of  a voxel and send a message to the server, which would then complete the destroy of that voxel and propagate that value back down to the client. This should probably also include pulling out the contents of the if (destroyed) block in DamageVoxelFast to a DestroyVoxelFast function that can be called on the server side without going through the hit functions.
NEWOnVoxelBeforeDamagedshould allow a return value or out parameter to abort the damage process, to facilitate features like permission based editing validation
CHANGEVoxelPlayEnvironmentshould not have player knowledge. this is unfriendly to multiplayer, and even split screen style mp. in the situations that currently look up that object, like the sky/cloud stuff, perhaps set up a simpler standalone component that can be attached to a player that facilitates the sky/cloud stuff around it. this would be a good candidate option to associate with the voxel 'observers' suggested here,3365.0.html
« Last Edit: December 13, 2018, 02:21:59 PM by JSwigart »