I'm deprecating happyfuntimes. I'll keep the rendevous server running for a while longer but I think it's unfortunately time to mostly depreciate this project
i'll consider accepting PRs still if you want to fix something but otherwise just fork it if you want to keep using it
There are a few major issues on why
device orientation is no longer usable
Both Safari and Chrome have made getting device orientation require HTTPS which is something HFT can't provide at the moment. It would require $$$$$$$. If a end-user friendly solution comes up maybe I'll revisit
Browsers break stuff
Every year or so a browser changes something or breaks something. Over the course of HTF browser broke fullscreen support, audio support, touch support, orientation support, and other things. It's no fun to keep up on that
OSes break stuff
For whatever reason networking that work before stops working. HFT has to do some things to find out all the ways your phone might connect to the game and that stuff seems to break every 2 years or so
Offline Support breaks
Using HFT without internet breaks every few year and will likely eventually be unfixable. Both iOS and Android ping Apple and Google respectively when you connect to WiFi to check if you're acutally on the internet. HFT tries to send them fake data so they believe they are, otherwise they'll stop using the WiFi and switch to mobile.
How they do this changes every few years so HFT has to figure out how to change its faking. It is within Apple and Google's power to make this faking impossible and I supsect they might at sometime which is scary because if they do then there is no solution (well, short of acutally providing internet access)
More browser features require HTTPS
This is really #1 and #2 repeated but more and more browser features require HTTPS and as it says above there is no way for hft to provide HTTPS at the moment.
If you don't need device orientation and you have no need for offline mode/installation mode then HFT still works. Write your own controllers to keep up to date with the latest changes in the browsers.
I don't really have time to keep it running.
HappyFunTimes is a system for making game with 10-100+ players. Players connect using their phones. Nothing needs to be installed on there phone. They can join immediately.
The controllers are made with HTML5 so you can customize them all you want. There is a simple gamepad controller included so you can get started without making a custom controller.
Clear here to get it from the unity asset store.
Some more docs can be found here.
You can get this from the Unity Asset Store or you can download it directly here
This repo uses git lfs
. To clone install git lfs
then
git lfs clone https://github.com/greggman/hft-unity3d.git
If you want to use this repo directly you should be aware of a few requirements
These are generated from files in src/hft
using webpack.
make sure you have node.js installed and type
cd path/to/repo
npm install
This will download the required libraries and tools
cd path/to/repo
./src/build
Note I have no made build scripts for windows. Feel free to submit a PR.
The sample-ui is also in src/hft
and is also generated with webpack
Follow the instructions for hft.js
above
To run installation mode requires administrator priviledges because it needs ports 80
and 53. To achieve this on OSX we generate a separate web server program that is
only used in installation mode. This program is in hft-server
.
Install the Xamarin Platform
cd path/to/repo
./hft-server/build
Note I have no made build scripts for windows. Feel free to submit a PR.
For whatever reason I can't seem to get the output of the macOS external server
to deliver debug messages. To test that you can put a return;
at the top of
HFTManager.StartExternalServer
. Then run the external server manually something
like this
sudo ~/Library/Application\ Support/Greggman/hft-unity3d/hft-server --hft-args="{\"debug\":\"*\",\"dns\":true,\"installationMode\":true,\"controllerFilename\":\"controllers/gamepad/controller.html\"}"