Skip to content

Add graphics modes to external monitors.#1

Open
roberthoffman04 wants to merge 2 commits into
sashafiesta:mainfrom
roberthoffman04:main
Open

Add graphics modes to external monitors.#1
roberthoffman04 wants to merge 2 commits into
sashafiesta:mainfrom
roberthoffman04:main

Conversation

@roberthoffman04

Copy link
Copy Markdown
image
- Added support for the new graphics modes to the Advanced Monitor.
- Modified existing "monitor" peripheral to give it its own set of paintutil function to keep compatibility.
- Modified the existing `raycast.lua` program to check for an external monitor first. If it finds one, render to that instead.
- Updated `README.md` to reflect changes

Example Code:

local mon = peripheral.find("monitor")
if not mon then error("No monitor", 0) end

mon.setTextScale(0.5)
mon.setGraphicsMode(2)

local W, H = mon.getSize(2)

mon.drawPixels(0, 0, 0, W, H)

mon.drawPixels(5, 5, 16, 40, 20)

mon.paintutils.drawBox(5, 55, 60, 85, 19)

Smathel and others added 2 commits April 30, 2026 00:18
… "monitor" peripheral with subclass paintutils (original paintutils left unchanged). Modified raycast.lua to use external monitor if present, otherwise original behavior
@sashafiesta

Copy link
Copy Markdown
Owner

Hello! This looks really good, but I'm afraid I have to delay merging it for a bit.

The problem isn't the implementation, but the fact that monitors can overwhelm the network thread very quickly.
Adding support for them without first implementing some kind of network throttle would cause major issues for server owners.

I plan to implement the throttling myself, so I should be able to get this merged within the next couple of weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants