Advanced Techniques VIII - Universal Program
In previous tutorials we looked at how to build a random events program. The idea being to build one such program and then run it using a Run Program Contraption in any room that you want to use it, perhaps using a Thought to set the likelyhood of an event happening. Very nice. You'll be wanting to use that in several different rooms, quite possibly most of your rooms, if not all of them.
As you program more and more, you'll start finding more and more gadgets like this that you'd like to use everywhere. Often they'll be too small to bother putting an extra Run Program in every room in your Place. Do it the simple way. The first time that you find yourself wanting to run the same program from everywhere, build a Universal Program.
The idea of a Universal Program (UP) is very straight forward. Simply have one program, tucked away in a room/page which casual visitors can't access, called Universal Program. Then in every room in your house put a Run Program pointing to this. Now in your UP put another Run Program contraption pointing to the particular gadget that you want to run, in this case the Random Event gadget. Now the next time that you want a gadget which runs in every room, then you only need to slip a Run Program in here - job done. Much better than going through putting Run Programs in every room each time. Also, when you build a new room, then you just have to put in one new Run Program pointing to the Universal Program instead of one for each gadget. Much easier, not least in not having to remember what gadgets need to be run.
Once you have your UP, you'll start seeing lots of things that you can do. Especially small things that it wouldn't be worth trying to do if you didn't have it there. The Supergrem program for example. The friend checker program in the previous tutorial for another. You may not use this in every room, but if you use it in enough, then it's easier to run the program from the UP. Then you can just use the information when you need it.
Sub-universal programs.
The idea of universal programs can be generalised. Suppose that you have a big place. One that includes parts both inside and outside. Suppose futher that you want one set of random events inside and a different set outside. How can you deal with this? Instead of just one big UP, you have two smaller Subuniversal Programs.1) One for inside and one for outside. Instead of each room having a Run Program pointing to the Universal Program, it has one pointing to its appropriate Subuniversal program. If there are several gadgets that you want run in both areas, then you can have a (true) UP, and then run it from each of the SPs rather than having it run from each room individually.
Return to previous tutorial.
Advanced Tutorial Contents Page.
Return to Places Overview