Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Search the Community

Showing results for tags 'graphics'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Fediverse ID


Location


Interests

Found 2 results

  1. I created a reddit browser for OC. Here is a video: [LINK] It uses my image encoding alghoritm that makes images draw rather fast on OC. (The actual image encoding is done on a remote server, because doing it in game would be too slow.) Source code for both server and client To get it working in game, download libfif.lua and redditViewer.lua onto a OpenOS installation and just run redditViewer.
  2. By calling hres.set(x, y, state) you can set a pixel at that x, y position to either be the foreground, or the background color. The x and y positions are the exact pixel location you'd like. This allows for a theoretical maximum resolution of 320 by 200. This is achieved by using the Unicode braille characters. To get the current "hres" resolution you take the screens current x resolution and multiply by 2, and you take the screens current y resolution and multiply by 4. There may be bugs, and things may behave oddly if you try to "turn off" a pixel that was not "on" in the first place. local gpu = require("component").gpu local unicode = require("unicode") hres = {} function hres.set(x, y, state) local x = math.floor(x) local y = math.floor(y) local scrx = math.ceil(x/2) local scry = math.ceil(y/4) local maxx, maxy = gpu.getResolution() if scrx > maxx or scry > maxy or scrx < 1 or scry < 1 then return end local prechar = gpu.get(scrx, scry) _, prechar = utf8.codes(prechar)(prechar) local offset = 0x2800 local offsetx = (x-((math.floor(x/2))*2)) if offsetx == 0 then offsetx = 2 end local offsety = y-(math.floor(y/4)*4) if offsetx == 1 then if offsety == 0 then brs = 7 else brs = offsety end else if offsety == 0 then brs = 8 else brs = offsety+3 end end local offsetdec = 2^(brs-1) if prechar < offset or prechar > 0x28FF then prechar = offset end if state then gpu.set(scrx, scry, unicode.char(prechar+offsetdec)) else gpu.set(scrx, scry, unicode.char(prechar-offsetdec)) end end
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.