| All posts |
  • Plane9 Design

    published on 4/7/2008 7:32 PM

    For the overall design of the system I have gone with a modular approach. Everything is based on the principle of keeping it simple and modular.

    For example the engine is a part of its own. If you start the editor it will communicate with the engine though xml. Currently this is only internally in the process but the engine is running in a thread of its own just to let the preview window run at full speed and not be bothered by what's happening in the editor gui window. Since they communicate using simple xml it would be possible to put the editor on one machine and the screensaver on another. So you could administer someones screensaver that ran on a computer on the other side of the world. Not that I know why you would want to but that's another question. A more realistic scenario would be to administer it while running as a winamp plugin for big screen shows and the like. Furthermore it would also be possible to build visualizer system. That is actual hardware with sliders and such that control the visualizer. At least the possibility exists to add this in the future. Without this modular design it would be a lot of work to add this. Now it would probably just take a day or two. Furthermore it simplifies the code since there is a very clear separation between what goes into the the editor and what goes into the engine. So no mixing in gui code in the engine just because it's easier for some specific problem. The end result will be a more manageable system in the future.

    On a lower level the system is built up using ports and nodes. The nodes form a hierarchy with the screen render at the top. Then each node has one or multiple input and output ports. The output ports connects to the input ports in another node to form a connection. This will allow the node with the input to get its data from the other node. The data can be in a variety of forms and depends on the port type. The port types are colored differently in the editor to help in getting a quick overview of what each port takes in and gives out. Port types range from bools, int (/enums), floats, vectors, mesh and strings to effects.