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

MoonlightOwl

Members
  • Content Count

    34
  • Joined

  • Last visited

  • Days Won

    18

MoonlightOwl last won the day on February 6

MoonlightOwl had the most liked content!

6 Followers

About MoonlightOwl

  • Rank
    Junior Member

Contact Methods

  • Minecraft
    Totoro
  • GitHub
    MoonlightOwl

Recent Profile Visitors

1452 profile views
  1. What is STEM? Did you ever want to have a linked card, but without this pair-to-pair limitations? Well, you have internet card. And that is already half of the solution. The other half is to use Stem. Stem is a message transmitter for your OpenComputers devices with internet cards. Using a small OpenOS library you can use Stem to send and receive messages. Unlike the standard `modem` component, Stem-messaging uses not addresses, but `channels`. You can send messages to any channels, and you can subscribe to any number of channels to listen for messages from them. Installation The best way is to use HPM: hpm install stem If you do not have HPM, install it like this: pastebin run vf6upeAN If you do not want to use HPM repository, you can just use wget: wget https://gitlab.com/UnicornFreedom/stem/raw/master/stem.lua Example of a program using STEM local event = require('event') -- use STEM client library local stem = require('stem') -- open a connection to a STEM server -- the `stem.fomalhaut.me` is a default one local server = stem.connect('stem.fomalhaut.me') -- subscribe for messages from the channel with ID 'my-channel-id' server:subscribe('my-channel-id') -- then listen for events in a loop... while true do local name, channel_id, message = event.pull('stem_message') if name ~= nil then print(channel_id, message) end end -- ...or register an event listener event.listen('stem_message', function(_, _, channel_id, message) print(channel_id, message) end) -- you can also send message to the channel -- (you do not need to be subscribed to this channel, to send a message) server:send('my-channel-id', 'hello there') -- unsubscribe from channel server:unsubscribe('my-channel-id') -- completely close the connection to the STEM server server:disconnect() That is all. But there is more. Web client If you open the link to Stem server in your browser: https://stem.fomalhaut.me/ You will see some statistics and the web client. Enter your channel ID into the form, and you can send messages to your robot in real time, right from your phone, without even starting Minecraft. The web client is limited with UTF-8 encoding, though. (Using OpenOS you can send literally anything, as long as the message fits in 64kb of data.) Security Questions The channels by default do not have any special security measures applied. They do not have any authentication mechanisms, the do not have any encryption. Anyone who knows the ID of a channel can send a message to it and can listen for responses. But. The length of ID is 256 bytes. And that can be any bytes - from 0 to 255. That means, that you have 256^256 possible combinations for your ID. And that is a giant number. If you need to secure your channel - just use something long and incomprehensible as your ID. As an additional measure you can use end-to-end encryption, or anything else - this is up to you. Default STEM server uses HTTPS, and does not store any information - message in, message out. Self-hosted STEM solution For those of you who are strong in spirit and computer knowledge - there is a self-hosted option. You can build Stem server from sources and run it on your machine. This is also pretty easy. Additional instructions can be found on GitLab. Useful links GitLab repository: https://gitlab.com/UnicornFreedom/stem Protocol description: https://gitlab.com/UnicornFreedom/stem/wikis/protocol Default server: https://stem.fomalhaut.me/ HPM package: https://hel.fomalhaut.me/#packages/stem If I forgot something - feel free to ask here, or in IRC (my nickname is Totoro there). Also the project contains at least one "Easter egg" feature, that can offer some interesting options if you know HTML/CSS/JS. The Stem protocol is open - you can modify it, you can create your own clients in any programming language, etc.
  2. Really handy and neat looking tool. Took it for one of my projects (with the license included, of course).
  3. Hello Doggle. The projector need to be connected to the computer (where the editor is running) with a cable. The cable can be connected to the computer from any side, and to the projector only from the bottom side. You can check a list of components available for the computer by entering an OpenOS command: components If the resulting output will contain any string with a word `hologram` in it - there you are. Unfortunately, this editor models are not compatible with the 3D printer. To create 3D models for the printer with some comfort you can use some external voxel tools like this, and then convert a *.vox file to the printer compatible format, for example with this JS converter.
  4. I don't think this is very practical way to hunt players Because robots are pretty slow compared to players, and can turn only on right angles, and strike only in front of itself, and can easily be trapped by blocks or even be broken and picked up by the `target` player.
  5. Use buttons[name].rect or buttons[name]["rect"] In your current edition Lua thinks `rect` is local variable, which obviously equals `nil`. And `buttons[name][nil]` is nil too.
  6. You can use GPU component to get current screen resolution and use gpu.set() to center text on the screen. For example: local com = require('component') local gpu = com.gpu local width, height = gpu.getResolution() local text = "Some info to be centered" gpu.set(width / 2 - #text / 2, height / 2, text)
  7. I agree with Gorzoid. gpu.bind will do it. You can get screen address from `touch` event every time someone clicks the button somewhere, then bind to that screen and render animations etc.
  8. Yeah, quite reasonable feature, i think. I will add it to the next version sometime soon. =)
  9. I tracked down these bugs and fixed them. Also refactored source codes a bit (particularly textbox widget) Try the new version, please: Hologram Editor 0.7.1-en Hologram Viewer 0.7.1-en
  10. Wow. That's a nice bunch of bugs I'll look at the code and try to fix them this evening. Thank you for the screens!
  11. 0.7 version includes a few improvements, but yeah, it pretty much does the same. =) How do you specify the path to you model? `show` util is purely console, and basically it can be used like this: show yourfile You can try to use full path (/home/yourmodel) or relative (./yourmodel). Also it is worth mentioning, that in last version (0.7.0) saved hologram files have a new (effectively compressed) format `*.3dx`. Pay attention to file extension, when spelling file name. UPD. I have updated the first post, and added new editor version (0.7.0) with English localization (translation is pretty raw, if you see any errors, feel free to write me about them =)). Hologram Editor 0.7.0 (English) Hologram Viewer 0.7.0 (English)
  12. MoonlightOwl

    Holograms

    This is my old attempt to create holographic map. Like in sci-fi movies. Debug card (or AMI block from Immibis's Peripherals) scanned the map, and collected the data. A grid of projectors under the floor was responsible for rendering. The color of any map point depends on it altitude. Thank you!
  13. Have you imported the `event` library (local event = require('event'))? Source code on Pastebin may be helpful, yep =) UPD. And you seem to override the `event` variable in the line: event, p2, x, y, p5, input = event.pull(..)
  14. Amazing! Must be the most epic image lib for OC =)
×
×
  • Create New...

Important Information

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