I'm familiar with client/topic and sending data from within the worlds embedded browser. I'm also familiar with sending data to world/topic as a stream from an external application.
I was hoping for an easy solution that lets the user click a button on a webpage in Firefox which then sends some kind of "byond://" message to the client or server.
Is this possible? I'm a little rusty so I may have forgotten the obvious.
ts
ID:156861
Jul 12 2010, 9:14 am
|
|
Jul 12 2010, 9:33 am
|
|
I think you can using Dantom's CGI, but im not sure about that library myself...gives me headaches
|
The raw format that Byond expects has been posted a few times by various people. One of which I know was a post using PHP in a web page to send a message to a Byond world, I think the post might have been made by Crispy though I don't remember for sure.
If you can find one of those posts using the forum search, that will answer your question. Or you could just create an application to dump the data for you. Here's one example, using Java. import java.net.*; I think that should do it. You could compile that in Java, run it, then from a Byond game export to "localhost:12345" (assuming both applications are on the same computer, obviously) and look at the data. This way you could figure out how the wheel works once again if you can't find any of those old posts I mentioned. |
In response to Loduwijk
|
|
I've played around with this before and actually have a working implementation using a managed C# app. It works ok but I don't think its a great client side solution. It requires an install of a framework and the untrusted application. Not to mention the inconsistent behavior when streaming the data. I find that BYOND doesn't get the data over half the time.
I can't figure out why it is so inconsistent either. Any ideas on how to improve that without sending an acknowledgment back? ts |
In response to Loduwijk
|
|
I think I may have solved the inconsistency problem. Looks as though I need to slow down the rate of byte writes. By adding sleeps between each write, the data is 10 for 10 so far. I haven't tried to reduce this initial "sleep" test yet. I may find that I really only need one sleep but at a specific location. Working on that now.
bw.Write((byte)0); ts |
In response to Tsfreaks
|
|
Looks like the key sleep is needed toward the end and it seems to be working well with a 1/100th millisecond sleep.
... ts |