ID:106997
 
Not a bug
BYOND Version:479
Operating System:Windows 7 Home Basic
Web Browser:Chrome 8.0.552.237
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
input() as command_text has a very obvious delay before it begins accepting input. I don't know if this is a just an intended feature of input() - I assume it is - since there is a delay when you use it in pretty much every other circumstance.

I'm assuming this delay is only an aesthetic thing, and not a functionality thing... if it is an aesthetic thing, I'd like it if the delay would be removed in the case of the command_text option, as there is no aesthetic gain for this. If it is a functionality thing, I am a bit confused, but okay.

Code Snippet (if applicable) to Reproduce Problem:
client
New()
..()
while(1)
var/blah = input(src) as command_text
src << "Your input (caught): [blah]"

Command(cmd)
src << "Your input (uncaught): [cmd]"


Result upon spamming:
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (uncaught): a
Your input (caught): a
Your input (caught): a


Expected Results:
It would receive all of the input.

Actual Results:
It doesn't.

Does the problem occur:
Every time? Or how often? Only when Dream Seeker is used (read below).
In other games? Yes.
In other user accounts? Yes.
On other computers? Yes.

When does the problem NOT occur?
When requesting input from a telnet client, it receives all input without a delay. (weird)
I don't fully understand what you're trying to do here, but the input() can't pop up until the signal for it gets from the server to the client, and the result of the input() won't be processed until the following tick. If your goal is to always have a command prompt open via input(), there will always be some delay in between entering a command and receiving the next input().
Okay, this is interesting...

When running a world in Dream Seeker and using input() as command_text on yourself, the delay between the input() being "active" (or whatever. when it starts actively taking input) is HUGE in comparison to a remote world asking for input.

I'd wager you can send input every .2 seconds (give or take. it might even be .1) when a remote world asks for it. When asking YOURSELF for input, it looks like you can only send input every .5 (give or take) seconds.

Anyway, I've always avoided input() as command_text because of this delay. I've written workarounds in the past, but after seeing how fast it accepted input from telnet, I figured it was something that was only affecting DS and could be "fixed." But, I understand why all of this is happening.

Thanks for your time.