Jump to content




Cloud Catcher: A web interface for ComputerCraft


21 replies to this topic

#1 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 04 May 2018 - 03:38 PM

One of the more frustrating things about ComputerCraft, is when you try to run your program on a server. Your little script which ran so perfectly in your local world, is now erroring left, right and centre. And this leaves you with no alternative but to face the unending pain which is the in-game editor.

Surely there must be a better solution?

Cloud Catcher: A web interface for ComputerCraft

Posted Image

Cloud Catcher is a website which allows you to remotely interface with a computer, viewing the terminal and editing files. Simply download the client script, pass in the provide token and lo! You should be able to interact with this remote terminal just like any other computer. Well, mostly (see the fine print at the bottom).

That's not all though, enter cloud edit cloud.lua, and your should be greeted with an editor. You can then edit this file to your heart's content: press Ctrl-S to save it, and mirror your changes back to the original computer.

One other rather neat feature is the ability to share sessions. On the top left, you can see your token: click it and you'll be provided with a URL which can be shared with anybody else. Finally, the multiplayer notepad that everyone wanted.

Screenshots
Spoiler

The fine print
It's worth noting that Cloud Catcher is still in development - there are a couple of things you need to be aware of:
  • Cloud Catcher depends on CC:Tweaked. Everything is powered by websockets, so there really isn't a way around that.
  • There's currently a size limit of 15kB on files. I'm looking into adding file compression in future versions, which should alleviate this a bit, but it should still be enough for most programs. We have require now, you're allowed to split things up!
  • Browsers block some keyboard shortcuts from being processed, most notably Ctrl-T. This means it's currently impossible to terminate a program remotely.
More information
If you find a bug, have any suggestions, or just feel like helping out do check out the repository. There's a whooping big todo list on the issue tracker, which might give you an idea of what's planned for the future.

Also a big thanks to 1lann and GravityScore for their work on Mimic: Cloud Catcher's renderer is heavily based off of it.

Edited by SquidDev, 04 May 2018 - 03:39 PM.


#2 EveryOS

  • Members
  • 549 posts
  • LocationBOO!!

Posted 04 May 2018 - 04:17 PM

My computer gives me an error that it failed to load resource /favicon.ico

Failed to load resource: the server responded with a status of 404 ()




Wait, you have your own website! AMAZING!

Edited by EveryOS, 04 May 2018 - 04:19 PM.


#3 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 04 May 2018 - 04:29 PM

View PostEveryOS, on 04 May 2018 - 04:17 PM, said:

My computer gives me an error that it failed to load resource /favicon.ico
Yeah, that's not really an error per-say, just more that I'm insufficiently imaginative enough to create a logo.

View PostEveryOS, on 04 May 2018 - 04:17 PM, said:

Wait, you have your own website! AMAZING!
To be honest, setting up domain name is incredibly easy. The actual server and associated plumbing is the larger time and cost investment.

#4 Luca_S

  • Members
  • 375 posts
  • LocationGermany

Posted 04 May 2018 - 05:55 PM

Hmm when trying to download it using wget I get "Failed" and when checking with http.get it gives me Could not connect. When trying the URL in my browser it works. Any Ideas?

#5 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 04 May 2018 - 05:59 PM

View PostLuca_S, on 04 May 2018 - 05:55 PM, said:

Hmm when trying to download it using wget I get "Failed" and when checking with http.get it gives me Could not connect. When trying the URL in my browser it works. Any Ideas?
It's possible your version of Java doesn't like my https certificate: if you try with http instead, does it work? Note that the downloaded file will be garbage, but it gives me a clue of where to start looking.

#6 Luca_S

  • Members
  • 375 posts
  • LocationGermany

Posted 05 May 2018 - 05:23 AM

View PostSquidDev, on 04 May 2018 - 05:59 PM, said:

View PostLuca_S, on 04 May 2018 - 05:55 PM, said:

Hmm when trying to download it using wget I get "Failed" and when checking with http.get it gives me Could not connect. When trying the URL in my browser it works. Any Ideas?
It's possible your version of Java doesn't like my https certificate: if you try with http instead, does it work? Note that the downloaded file will be garbage, but it gives me a clue of where to start looking.
arrg, forgot about that thing with letsencrypt certificates, using http works I'm going to try a newer Java version.

#7 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 05 May 2018 - 06:57 AM

View PostLuca_S, on 05 May 2018 - 05:23 AM, said:

arrg, forgot about that thing with letsencrypt certificates, using http works I'm going to try a newer Java version.
I've updated my configuration to disable https promotion when not using a browser. It's a bit naff, but it should allow you to use http instead. Note that you'll have to replace "wss://" with "ws://" inside the file - I'll look into adding a command line flag for it.

#8 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 06 May 2018 - 01:57 PM

I've just updated the site with a couple of bugfixes and new features. This should fix issues people were seeing with files not saving, or not appearing to save. I've also added a little "notification" system, which will alert you if a file was modified by somebody else/on the original computer. It won't update your file or anything (yet), but it's a useful bit of information.

#9 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 10 May 2018 - 12:29 AM

Very good and useful idea. :)

#10 Mumbai

  • Members
  • 62 posts

Posted 14 May 2018 - 11:06 AM

whelp gg

#11 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 14 May 2018 - 03:25 PM

View PostMumbai, on 14 May 2018 - 11:06 AM, said:

whelp gg
Um, thanks. I think?

#12 LoganDark2

  • Members
  • 86 posts
  • LocationYes

Posted 16 June 2018 - 05:42 PM

View PostSquidDev, on 04 May 2018 - 03:38 PM, said:

  • Browsers block some keyboard shortcuts from being processed, most notably Ctrl-T. This means it's currently impossible to terminate a program remotely.

Maybe Windows does. I hope you've still added support for it for those smart Mac users :P

#13 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,061 posts
  • LocationTasmania (AU)

Posted 17 June 2018 - 01:26 AM

I'd be very surprised if the OS has anything to do with it. Certainly Windows doesn't stop you from using Ctrl+T in Minecraft, so why would you think that? :huh:

#14 EveryOS

  • Members
  • 549 posts
  • LocationBOO!!

Posted 17 June 2018 - 01:36 AM

CTRL+T is a chrome macro, which is why Mimic can be very annoying on chromebooks...

I tried this, nice, but I found it a bit laggy

#15 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 17 June 2018 - 06:41 AM

View PostLoganDark2, on 16 June 2018 - 05:42 PM, said:

Maybe Windows does. I hope you've still added support for it for those smart Mac users :P
Yeah, I can add support for those deranged people who thought the super key should be used to open new tabs.

View PostEveryOS, on 17 June 2018 - 01:36 AM, said:

I tried this, nice, but I found it a bit laggy
I suspect this'll depend on your internet speed and where you are in the world. The server is in France so, if you're on the other side of the pond, the latency might be a little high. That said, I've tested with people in Brazil and it wasn't that bad.

Edited by SquidDev, 17 June 2018 - 06:42 AM.


#16 LoganDark2

  • Members
  • 86 posts
  • LocationYes

Posted 17 June 2018 - 06:44 AM

View PostSquidDev, on 17 June 2018 - 06:41 AM, said:

View PostLoganDark2, on 16 June 2018 - 05:42 PM, said:

Maybe Windows does. I hope you've still added support for it for those smart Mac users :P
Yeah, I can add support for those deranged people who thought the super key should be used to open new tabs.

Well hey, blame the creators of UNIX, not me :P

I just like macOS because it's better for coding than Windows. WSL makes it a little better though. I have a dual boot set up between macOS and Windows.

#17 Lupus590

  • Members
  • 1,928 posts
  • LocationUK

Posted 17 June 2018 - 08:28 AM

View PostSquidDev, on 17 June 2018 - 06:41 AM, said:

View PostEveryOS, on 17 June 2018 - 01:36 AM, said:

I tried this, nice, but I found it a bit laggy
I suspect this'll depend on your internet speed and where you are in the world. The server is in France so, if you're on the other side of the pond, the latency might be a little high. That said, I've tested with people in Brazil and it wasn't that bad.

How easy is it people to take the web end of Cloud Catcher and deploy their own servers? Perhaps people can start self hosting?

#18 SquidDev

  • Members
  • 1,349 posts
  • LocationDoes anyone put something serious here?

Posted 17 June 2018 - 08:35 AM

View PostLupus590, on 17 June 2018 - 08:28 AM, said:

How easy is it people to take the web end of Cloud Catcher and deploy their own servers? Perhaps people can start self hosting?
It's pretty easy - just a matter of hosting the static files and running the server. If people are interested in this, I'm perfectly happy to share my various configuration files. The only thing to bear in mind is that the client always points towards my server, so you'd need to distribute an alternative download - though that's just changing a single line in the build script.

#19 Lupus590

  • Members
  • 1,928 posts
  • LocationUK

Posted 17 June 2018 - 10:26 AM

That was surprisingly easy: https://github.com/S...-catcher/pull/4 I haven't been able to test it though.

#20 EveryOS

  • Members
  • 549 posts
  • LocationBOO!!

Posted 17 June 2018 - 04:48 PM

I'm in North America, you are in France, might explain that...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users