2427 posts
Location
UK
Posted 24 February 2015 - 09:53 PM
Title says it all but to reiterate and elaborate:
Excluding downloading and uploading scripts to and from pastebin/github/turtle scripts/etc. (unless they are uniquely cool).
What is the strangest or most interesting thing you have used (or perhaps abused) the HTTP API in?
As and example, here is a turtle controlled by a mobile phone. [media]
https://www.youtube.com/watch?v=SN7QDJqXJ6Q[/media] (I did not make this)
376 posts
Location
[string "FindMe"]:23143: bad argument #1 to 'returnPos' (vector expected, got nil)
Posted 24 February 2015 - 10:57 PM
Draining random facts from a website and spamming server chat with them at a 5 second interval.
2427 posts
Location
UK
Posted 24 February 2015 - 11:19 PM
Draining random facts from a website and spamming server chat with them at a 5 second interval.
Never thought of that… not sure of the practical uses but sounds cool!
1522 posts
Location
The Netherlands
Posted 24 February 2015 - 11:23 PM
I once had a very idea of a Github Viewer through its API, however I never got started at it. Thats because I first wanted to write a proper buffer which would let me easily make popups and such, which I tried to tackle but never completed because I simply lost interested in the latter project. Once I have time in about May and I have no project going, I might start working on that with a fresh look on it. I of course must remember this by then, which I frankly dont expect.
Feel free to take this idea and implement it in a cool program!
1029 posts
Location
Missouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension
Posted 24 February 2015 - 11:27 PM
Once I get around to it, I plan to make Game-engine's multiplayer use the http API.
2427 posts
Location
UK
Posted 24 February 2015 - 11:33 PM
I once had a very idea of a Github Viewer through its API, however I never got started at it. Thats because I first wanted to write a proper buffer which would let me easily make popups and such, which I tried to tackle but never completed because I simply lost interested in the latter project. Once I have time in about May and I have no project going, I might start working on that with a fresh look on it. I of course must remember this by then, which I frankly dont expect.
Feel free to take this idea and implement it in a cool program!
You could use the window API for your popup buffer. I know how difficult it is to keep large projects rolling, especially if they get you to try out new stuff. Here's a tip, automating turtles is hard (shameless plug:
https://github.com/lupus590/Hive).
Edit added this:
Once I get around to it, I plan to make Game-engine's multiplayer use the http API.
Cross server in-game game? or do you mean to use the rednet API? I'm interested into why a game will need to use HTTP for anything other than updates.
Edited on 24 February 2015 - 10:38 PM
1029 posts
Location
Missouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension
Posted 25 February 2015 - 12:00 AM
You could use the window API for your popup buffer.
use the window API
window API
I cannot
stand the Window API. It's a laggy, inefficient API that has been lagging ComputerCraft down ever since its implementation.
APIs like
http://www.computerc...irect-ctrlkeys/ make the Window API look like a hand turkey compared to the Mona Lisa. And it was made in 2012! 4 years ago, and still running strong.
I have even created an application here: (shameless self-promotion:
http://www.computerc...evel-coroutine/) that kills multishell and the window API entirely, and runs the normal shell.
Cross server in-game game? or do you mean to use the rednet API? I'm interested into why a game will need to use HTTP for anything other than updates.
http, after all, is a port and a protocol. You can use it for whatever you wish.
Obviously an TVS(top view shooter :P/>) game is probably
not going to go well over an "improperly" protocol, and with CC's slow HTTP access. It would be more for an building game, or something that can operate fine on a slow connection
Edited on 24 February 2015 - 11:03 PM
2427 posts
Location
UK
Posted 25 February 2015 - 12:08 PM
-snip-
I've never used the window api so i wouldn't know. The links seam interesting though.
Edited on 25 February 2015 - 11:13 AM
113 posts
Location
This page
Posted 25 February 2015 - 06:34 PM
I have been wanting to use the HTTP api more, but so far the only script I have that uses it in any way special is an api that gets the current unix time and converts it to the date and time.
2427 posts
Location
UK
Posted 25 February 2015 - 07:09 PM
I have been wanting to use the HTTP api more, but so far the only script I have that uses it in any way special is an api that gets the current unix time and converts it to the date and time.
Interesting, what kind of program would need to have unix time?
113 posts
Location
This page
Posted 25 February 2015 - 07:27 PM
I have been wanting to use the HTTP api more, but so far the only script I have that uses it in any way special is an api that gets the current unix time and converts it to the date and time.
Interesting, what kind of program would need to have unix time?
Well I have 2 programs right now, 1 is a gui and it has a log of when users use commands or edit files and it saves that log with the current time, another one is a ME system monitor, it tracks how many items have been added and removed by updating every so often, and its logs also have the real world date and time
as an example, here is a log from a me system on my old server
Spoiler
Log Time:11/24/2014 6:57:56 P.M.
>Added:17 PamHarvestCraft:artichokeItem (13275:0)
>Added:13 String (287:0)
>Added:17 PamHarvestCraft:tomatoItem (15456:0)
>Added:3 PamHarvestCraft:cucumberItem (15632:0)
>Added:1 Sand (12:0)
>Added:3 PamHarvestCraft:blueberryItem (15807:0)
>Added:3 PamHarvestCraft:eggplantItem (15976:0)
>Added:1 Cobblestone (4:0)
>Added:5 Spider Eye (375:0)
>Added:4 Rotten Flesh (367:0)
>Added:3 PamHarvestCraft:bellpepperItem (15732:0)
>Removed:6 Oak Wood Planks (5:0)
>Added:17 PamHarvestCraft:cornItem (15532:0)
>Added:1 Zombie Head (397:2)
>Added:6 PamHarvestCraft:grapeItem (15607:0)
>Added:17 PamHarvestCraft:rhubarbItem (13283:0)
>Added:8 PamHarvestCraft:blackberryItem (15897:0)
>Added:111 Potato (392:0)
>Added:7 PamHarvestCraft:raspberryItem (15907:0)
>Added:37 Sugar Canes (338:0)
>Added:1 Trapdoor (96:0)
Log Time:11/24/2014 7:17:56 P.M.
>Added:4 Aluminum Ore (590:7)
>Added:17 PamHarvestCraft:artichokeItem (13275:0)
>Added:1 Seeds (295:0)
>Added:3 String (287:0)
>Added:2 Lead Ore (925:3)
>Added:17 PamHarvestCraft:tomatoItem (15456:0)
>Added:15 Iron Ore (15:0)
>Added:5 PamHarvestCraft:cucumberItem (15632:0)
>Added:1 Sand (12:0)
>Added:303 Dirt (3:0)
>Added:4 PamHarvestCraft:blueberryItem (15807:0)
>Added:4 PamHarvestCraft:eggplantItem (15976:0)
>Added:3010 Cobblestone (4:0)
>Added:3 Rotten Flesh (367:0)
>Added:25 Coal (263:0)
>Added:4 PamHarvestCraft:bellpepperItem (15732:0)
>Added:7 Ruby (9281:37)
>Added:14 Copper Ore (590:5)
>Added:17 PamHarvestCraft:cornItem (15532:0)
>Added:5 PamHarvestCraft:grapeItem (15607:0)
>Added:21 Flint (318:0)
>Added:8 Sapphire (9281:38)
>Added:174 Gravel (13:0)
>Added:2 AppEng.Materials.QuartzCrystal (5758:6)
>Added:13 Tin Ore (925:1)
>Added:17 PamHarvestCraft:rhubarbItem (13283:0)
>Added:2 Flower (37:0)
>Added:9 PamHarvestCraft:blackberryItem (15897:0)
>Added:94 Potato (392:0)
>Added:19 tile.brOre.0 (1750:0)
>Added:25 Tin Ore (590:6)
>Added:8 PamHarvestCraft:raspberryItem (15907:0)
>Added:3 Emerald (388:0)
>Added:1 Gunpowder (289:0)
>Added:2 Silver Ore (925:2)
>Added:1 Mycelium (110:0)
Edited on 25 February 2015 - 06:35 PM
2427 posts
Location
UK
Posted 25 February 2015 - 07:52 PM
-snip-
now that i think of it, real time would be more useful for logs, will have to keep that in mind when i need to record things