Friday, April 18, 2008

Multiplayer fixed

Zaphod tried to run in several equally decisive directions simultaneously. "Right!" he said. "Er ... we've got to get manual control of this ship."

"Can you fly her?" asked Ford pleasantly.

"No, can you?"

"No."

"Trillian, can you?"

"No."

"Fine," said Zaphod, relaxing. "We'll do it together."


Sorry, users, since some minor modifications to Jangaron for the "mini" version, multiplayer was broken! Both player views were rendered, but only one could be controlled, independent of key assignment.
The reason was a stupid bug: In the switch statement for key control, I wrote
case keyMap.slower: [...]; break;
otherwise: return true;
What I meant was:
case keyMap.slower: ...; break;
default: return true;
But unfortunately, the erroneous otherwise was interpreted as a label (a JavaScript language construct I never use!), so no error was raised, but return true was never executed! This led to the first player swallowing all key presses.
Of course I fixed the problem as soon as I noticed it. Since it was only a minor patch, I did not increase the version number.
You should know that Jangaron is a hobby project. There is no quality assurance, just some basic testing, and there are not yet any real "releases". This is why I need you! If anything does not work or looks awful or is unusable, or if you have any other feed-back, let me know!
So now, please go ahead and play Jangaron with two or more users! Believe me, it's much more fun than against programs.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.