diff --git a/docs/api-versions.md b/docs/api-versions.md index 92155679..78ebdd5e 100644 --- a/docs/api-versions.md +++ b/docs/api-versions.md @@ -348,3 +348,5 @@ the correct version portrait but as of iOS 8.3 Safari doesn't support orientation. So the message that used to come up would be confusing as the user orients their phone. + + diff --git a/docs/changelist.html b/docs/changelist.html index 9db674d9..080bdcd4 100644 --- a/docs/changelist.html +++ b/docs/changelist.html @@ -68,6 +68,37 @@
0.0.36
+added --instructions
which puts a scrolling banner on top of each
+game that says something like "connect to HappyFunTimes wifi, on iOS
+just wait, on Android use Chrome and go to "h.com""
added --langs
to specify which languages games should use.
For controllers, if you support multiple languages you should probaby
+use navigator.language
but for the games since they are running on
+my computer I needed a way to choose.
added --wifi-name
, --wifi-pass
This is to specify the name and password in the connect messages. See --instructions
Hacked in more name support
+gameclient now gets name and sends it automatically when controller starts. +On the one hand it feels "impure" to do it this way. On the other pragmatism wins.
+0.0.35
+Fixed a bug where if the page did not have the focus the controller +would not get redirected to the game.
+I think that was in there for the app. The idea being if the app +is in the background it shouldn't join the game. Unfortunately it +also made it so typing in a URL often didn't work because when the +URL bar has the focus the page itself does not.
+0.0.34
Made Unity version pay attention to needNewHFT
flag.
hft start
--instructions
Displays a scrolling message on the screen telling users how to connect to the game
+--langs
Chooses which languages to display instructions. Example --langs=en,ja
--wifi-name
Specifies the WiFi name for the connect message.
+--wifi-pass
Specifies the WiFi password for the connect message.
--check-for-app
Controllers don't normally try to launch the native mobile app. This check takes 3 seconds. Use this switch to add that check so if the user has the app installed it will switch to diff --git a/docs/commands.md b/docs/commands.md index 4b1bf4b0..f3336293 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -116,6 +116,22 @@ a game to start. If multiple games are running users are given a list to choose If you're running in an [installation](network.md) where there's only 1 game you can have controller go directly to the game with this option. +`--instructions` + +Displays a scrolling message on the screen telling users how to connect to the game + +`--langs` + +Chooses which languages to display instructions. Example `--langs=en,ja` + +`--wifi-name` + +Specifies the WiFi name for the connect message. + +`--wifi-pass` + +Specifies the WiFi password for the connect message. + `--check-for-app` Controllers don't normally try to launch the native mobile app. This check takes 3 seconds. diff --git a/docs/network.html b/docs/network.html index 9c024fe1..ae8b883a 100644 --- a/docs/network.html +++ b/docs/network.html @@ -109,8 +109,8 @@
NOTE!!!: Your computer has a different MAC address for WiFi vs Wired networking. The MAC address you need to look up is the MAC address for the way you'll connect the happyfuntimes machine to the router!
-If can connect the happyfuntimes computer to the router with an ethernet cable that should -be your first choice because you don't have to worry about interference.
+If you can connect the happyfuntimes computer to the router with an ethernet cable that should +be your first choice because you don't have to worry about WiFi interference.
If you're connecting the happyfuntimes comptuer to the router via WiFi then you need to look up your computer's WiFi MAC address.
Be sure to look up the correct MAC address
diff --git a/docs/network.md b/docs/network.md index 485a9415..9bfb0663 100644 --- a/docs/network.md +++ b/docs/network.md @@ -60,8 +60,8 @@ NOTE!!!: Your computer has a different MAC address for WiFi vs Wired networking. you need to look up is the MAC address for the way you'll connect the happyfuntimes machine to the router!** -If can connect the happyfuntimes computer to the router with an ethernet cable that should -be your first choice because you don't have to worry about interference. +If you can connect the happyfuntimes computer to the router with an ethernet cable that should +be your first choice because you don't have to worry about WiFi interference. If you're connecting the happyfuntimes comptuer to the router via WiFi then you need to look up your computer's WiFi MAC address. diff --git a/docs/unity/gamepad.html b/docs/unity/gamepad.html index 127d6eb8..3b416a05 100644 --- a/docs/unity/gamepad.html +++ b/docs/unity/gamepad.html @@ -196,21 +196,23 @@float hueAdjust = (((colorNdx & 0x01) << 5) |
((colorNdx & 0x02) << 3) |
((colorNdx & 0x04) << 1) |
((colorNdx & 0x08) >> 1) |
((colorNdx & 0x10) >> 3) |
((colorNdx & 0x20) >> 5)) / 64.0f;
-
These 2 lines make every other set of 8 players be 50% darker -and every other set of 4 players be 50% less saturated.
-float valueAdjust = (colorNdx & 0x08) != 0 ? -0.5f : 0.0f;
-float satAdjust = (colorNdx & 0x04) != 0 ? -0.5f : 0.0f;
+
These 2 lines make every other set of 32 players be 50% darker +and every other set of 16 players be 50% less saturated.
+float satAdjust = (colorNdx & 0x10) != 0 ? -0.5f : 0.0f;
+float valueAdjust = (colorNdx & 0x20) != 0 ? -0.5f : 0.0f;
Hopefully that comes up with good colors.
-The rest seems pretty straight forward
+The rest seems pretty straight forward. The one HappyFunTimes line
+is m_gamepad.Color = playerColor
. Setting m_gamepad.Color
will
+tell the controller to change to a matching color.
// get the hsva for the baseColor
-Vector4 hsva = ColorUtils.ColorToHSVA(baseColor);
+Vector4 hsva = HFTColorUtils.ColorToHSVA(baseColor);
// adjust that base color by the amount we picked
hsva.x += hueAdjust;
@@ -218,12 +220,14 @@ SetColor
hsva.z += valueAdjust;
// now get the adjusted color.
-Color playerColor = ColorUtils.HSVAToColor(hsva);
+Color playerColor = HFTColorUtils.HSVAToColor(hsva);
+
+// Tell the gamepad to change color
+m_gamepad.Color = playerColor];
// Create a 1 pixel texture for the OnGUI code to draw the label
Color[] pix = new Color[1];
pix[0] = playerColor;
-m_gamepad.Color = pix[0]; // Tell the gamepad to change color
Texture2D tex = new Texture2D(1, 1);
tex.SetPixels(pix);
tex.Apply();
diff --git a/docs/unity/gamepad.md b/docs/unity/gamepad.md
index 9ea29114..b9957506 100644
--- a/docs/unity/gamepad.md
+++ b/docs/unity/gamepad.md
@@ -165,7 +165,7 @@ Based on the player number which we use as `colorNdx` we pick a player color. Th
that is different from other players. To do that we reverse the least significant
6 bits which means instead of counting 0, 1, 2, 3, 4, 5, 6, 7, 8 we end up counting
0, 32, 16, 48, 8, 40, 24, 56, ... 6 bits means we have a range of 0 to 63 so dividing
-by 64 gives as an amount to adjust the hue.
+by 64 gives us an amount from 0.0 to 1.0 to adjust the hue around the color wheel.
float hueAdjust = (((colorNdx & 0x01) << 5) |
((colorNdx & 0x02) << 3) |
@@ -174,18 +174,20 @@ by 64 gives as an amount to adjust the hue.
((colorNdx & 0x10) >> 3) |
((colorNdx & 0x20) >> 5)) / 64.0f;
-These 2 lines make every other set of 8 players be 50% darker
-and every other set of 4 players be 50% less saturated.
+These 2 lines make every other set of 32 players be 50% darker
+and every other set of 16 players be 50% less saturated.
- float valueAdjust = (colorNdx & 0x08) != 0 ? -0.5f : 0.0f;
- float satAdjust = (colorNdx & 0x04) != 0 ? -0.5f : 0.0f;
+ float satAdjust = (colorNdx & 0x10) != 0 ? -0.5f : 0.0f;
+ float valueAdjust = (colorNdx & 0x20) != 0 ? -0.5f : 0.0f;
Hopefully that comes up with good colors.
-The rest seems pretty straight forward
+The rest seems pretty straight forward. The one HappyFunTimes line
+is `m_gamepad.Color = playerColor`. Setting `m_gamepad.Color` will
+tell the controller to change to a matching color.
// get the hsva for the baseColor
- Vector4 hsva = ColorUtils.ColorToHSVA(baseColor);
+ Vector4 hsva = HFTColorUtils.ColorToHSVA(baseColor);
// adjust that base color by the amount we picked
hsva.x += hueAdjust;
@@ -193,12 +195,14 @@ The rest seems pretty straight forward
hsva.z += valueAdjust;
// now get the adjusted color.
- Color playerColor = ColorUtils.HSVAToColor(hsva);
+ Color playerColor = HFTColorUtils.HSVAToColor(hsva);
+
+ // Tell the gamepad to change color
+ m_gamepad.Color = playerColor];
// Create a 1 pixel texture for the OnGUI code to draw the label
Color[] pix = new Color[1];
pix[0] = playerColor;
- m_gamepad.Color = pix[0]; // Tell the gamepad to change color
Texture2D tex = new Texture2D(1, 1);
tex.SetPixels(pix);
tex.Apply();