As I go about building a game in my text-based game engine I am keeping my eyes open for pain points. One has quickly manifested. I tried to work with it but it really needs to be fixed.
The trouble is with the Logic Blocks. I have logic grouped into LogiSets and the entire set must evaluate to true or its parent will not fire. There is rudamentary OR capability, but working with logic is a pain. It works fine for single or basic checks, but quickly breaks down when even moderately complex checks need to be made.
So I broke down and updated the Logic blocks to allow an eval multiline element. In the eval logic can be defined more like simplified code:
attribute@torch:lit!=true
or
location@torch!={room}
In that example the first line checks the torch's attributes, checking that the lit attribute is not true. If that check is true or - The last line checks the torch's location to see if the torch is not in the current room.
Logic lines can can also be linked by 'and'. In time I will expand on this to make it more powerful, but it is a definite improvement over defining logic elements and using properties to define the logic, and clunkier 'linking'.
No comments:
Post a Comment