Creating Custom Blox with Blox (Compound Custom Blox)


#1

Can Blox itself be used to create complex custom blocks? Or is it necessary to program all custom blocks in C# “outside” of Blox?

I’ve only just begun looking at Blox, and it looks as though it has a lot of promise. I haven’t seen anything yet about whether it is possible to create custom blocks using Blox itself. In other words, building up more complex (and accessible and reusable) blocks out of simpler blocks, to the point of building entire systems by eventually just snapping together a few custom subsystem blocks. Ideally the hope is that one could keep assembling simple component blocks into larger compound blocks until there was just one master ‘RunGame’ block. Complex blocks should be able to be drilled-down into so inner workings can be seen from its component blocks (which could further be drilled-down into to expose the blocks it is made up of, etc.).

I think some of the main advantages of visual programming tools lie in reducing the complexity of gluing code together by simplifying the amount of syntactic hoops that must be jumped through to produce executable code, and also aiding in program comprehension by displaying the structure and execution of an application from multiple levels of complexity (hence the ability to drill down into blocks). The weakness of a lot of other visual programming tools is that they produce a lot of “flat” diagrams with wire connections running all over the place for any usage of real complexity, making it literally spaghetti code and hard to follow.

I saw in another post that sales for Blox have slowed somewhat. If it has the ability to build upon itself using itself, I would think more developers should consider using it as in the long run it would reduce the complexity of developing applications in Unity. The fact that it can output applications in C# is another great feature.


(Leslie Young) #2

All Blocks are generated from class members or can be created yourself (via code).

You can simulate function calls via the Event trigger. If you have some common logic which can be reused by different Events then that logic can be added to a Custom Event (rename it to something unique). Now use the Flow > Trigger Event Block to call that event when needed. You can even send some values to the event being triggered (just like function parameters).