This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
distantcam's profile picture

Billboard - Display Programs On Multiple Monitors

Started by distantcam, 13 November 2013 - 02:25 AM
distantcam #1
Posted 13 November 2013 - 03:25 AM
Billboard


Billboard displays another program on multiple connected monitors. It is available on Pastebin (KxWmtFpM) and GitHub.

pastebin get KxWmtFpM billboard

Screenshots
SpoilerFirewolf:


Paint:

Commands:
  • billboard scale <number> - Sets the scale on all monitors.
  • billboard info - Prints the monitors name and dimensions. Useful when doing the setup.
  • billboard setup <settings> <arguments> - Creates a settings file. See Setup below.
  • billboard run <settings> <program> <arguments> - Runs the program using the arguments and billboard settings given.

Setup
SpoilerTo set up a billboard you need to provide the monitor ID (just the number), x offset and y offset of each monitor. Offsets are given in character coordinates (so they are affected by scale) and start in the top left corner of your billboard.

For example, lets say you have the following setup:


+-----------------------+-----------------------+
|Monitor name: monitor_0|Monitor name: monitor_1|
|Size: 27, 13           |Size 27, 13            |
|                       |                       |
|                       |                       |
|                       |                       |
|                       |                       |
+-----------------------+-----------------------+
|Monitor name: monitor_2|Monitor name: monitor_3|
|Size: 27, 13           |Size 27, 13            |
|                       |                       |
|                       |                       |
|                       |                       |
|                       |                       |
+-----------------------+-----------------------+

Then the top left coordinates for the monitors would be:
  1. monitor_0 - 0,0
  2. monitor_1 - 27,0
  3. monitor_2 - 0, 13
  4. monitor_3 - 27,13
To create a settings file for this use the following command.


billboard setup default.bill  0 0 0   1 27 0   2 0 13   3 27 13
                             |-----| |------| |------| |-------|
    monitor 0 settings ---------/       |        |         |
    monitor 1 settings -----------------/        |         |
    monitor 2 settings --------------------------/         |
    monitor 3 settings ------------------------------------/

Todo
  • Auto calibration (advanced monitors only)
  • Test Pattern
Edited on 13 November 2013 - 02:27 AM
theoriginalbit #2
Posted 13 November 2013 - 03:35 AM
Very, very nice! I'm glad that you also implemented it in such a way that it can be used as a term redirect object, esp with the addition of getSize meaning the programs such as paint were able to still place the toolbar on the bottom. :)/>

How well would the program handle a setup like this?

+-----------------------+------------+----------+
|                       |            |          |
|                       |            |          |
|                       +------------+----------+
|                       |                       |
|                       |                       |
|                       |                       |
|                       +-----------------------+
|                       |                       |
|                       |                       |
|                       |                       |
|                       |                       |
|                       |                       |
|                       |                       |
+-----------------------+-----------------------+

Also how do you plan on implementing the auto calibration, if you don't mind me asking.
distantcam #3
Posted 13 November 2013 - 03:43 AM
Handling that setup is fine. The monitors can be added to the setup in any order, so you just have to go and find the offset for each one. The info command will be useful in that case.

For auto calibration I'm planing on having a system where you can click on the position on one monitor, and the position one over on the next monitor to get them to line up. That's why it'll only work on advanced monitors. Once the calibration is done it'll automatically create a settings file for you.

I haven't tested this yet, but theoretically it should handle holes in your monitor too. So long as each monitor is connected up and the offsets are correct it should just work.
TheOddByte #4
Posted 13 November 2013 - 01:56 PM
Really nice work! +1, Is there like a max on how many monitors you can have or can you make this really really… ..really large? xP
distantcam #5
Posted 13 November 2013 - 08:14 PM
Thanks!

There's no max… theoretically. But I did try it with 18 8x6 block monitors and it crashed the server I was on, so I'd be careful. :P/>

I suspect the issue there was the monitors spanned multiple chunks.
Dave-ee Jones #6
Posted 16 November 2013 - 03:22 AM
SOOOO good! Very nice!

This would be awesome! But just one question, can the monitors be put anywhere? Do they have to be next to each other i mean.
distantcam #7
Posted 16 November 2013 - 03:38 AM
They can be put anywhere. So long as the virtual surface you define is a single 2d surface.
LDDestroier #8
Posted 18 February 2016 - 12:27 AM
I seem to be getting an error whenever I run it on Lurcraft Revamped.


term:22: attempt to call nil

My config file "/cfg" is formatted properly (I think), so I don't know what the issue is.
HPWebcamAble #9
Posted 18 February 2016 - 12:49 AM
I seem to be getting an error whenever I run it on Lurcraft Revamped.


term:22: attempt to call nil

My config file "/cfg" is formatted properly (I think), so I don't know what the issue is.

What version of ComputerCraft are you using?
Remember that this program is several years old now.

Assuming 'term' is the term API, here's line 22 (For the latest version of CC I believe):
https://github.com/alekso56/ComputercraftLua/blob/master/rom/apis/term#L22
FoxData #10
Posted 23 February 2016 - 08:39 PM
Amazing. Its a bit like nvidia surround for minecraft. I can imagine making huge video walls and then minecraft crashing.