Jump to content

Coding style issues with the iron hulk


_zwb
  • DLC VERSION - IMPORTANT!: Hamlet Pending

The iron hulk's behaviours are determined by a periodic task, instead of using behaviour trees in its brain file. The cool down for its attacks are not recorded using the timer component, but variables that are updated in the aforementioned periodic task.

All robot parts share the same stategraph, an if statement is used in every TimeEvent to determine which part the robot is. This is rather inefficient and makes the file a lot less readable. A better way to implement this is like the shadow chess pieces' stategraph inheritance made back in 2016, which you didn't reuse in 2019 for some reason. 

The iron hulk and its parts use the same functions to ignite objects and do area attack, but these functions are defined in multiple files multiple times, instead of  a utility file like the pugalisk.

The algorithm for finding proper drop locations for the robot parts is extremely inefficient. Like seriously, going through every single tile to see whether it is a suitable place? Isn't it cheaper to just go through each node in topology, pick out the ones on the same island, and then pick a random offset from the node centre?

There are also a lot of debug print called, why are they still here in the release version?


Steps to Reproduce

The above.




User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...