dynadungeons icon indicating copy to clipboard operation
dynadungeons copied to clipboard

Review (and maybe revamp) the bomb logic

Open akien-mga opened this issue 8 years ago • 1 comments

The current bomb logic was written without much experience about how to do this stuff correctly, and I'm pretty sure my code could be improved a lot.

The main idea would be to reduce the complexity of the current algorithm, potentially also improving the way the flame animations are displayed. The simpler it gets, the better for us when we start implementing online multiplayer.

I don't have a precise idea about what needs to be done, but I'd like fresh eyes on the code to help me see what could be worked on.

The main logic is started from the trigger_explosion() code [1], which chains several helper functions to find all bombs that should be chained by the explosion of the initial bomb, and then display the animation accordingly.

[1] https://github.com/akien-mga/dynadungeons/blob/master/scripts/bomb.gd#L233-L255

akien-mga avatar Sep 09 '15 09:09 akien-mga