Giter Club home page Giter Club logo

joustmania's Introduction

Magfest 2017 JoustMania at Magfest 2017!

Joustmania Logo

What is JoustMania????

  • JoustMania is a collection of PlayStation Move enabled party games based off of the "Jostling" mechanic introduced in Johann Sebastian Joust
  • JoustMania includes FFA, Teams, Werewolves, Zombies, Commander modes, and lots of other goodies!
  • The system is also designed to be easy to set up at conventions and is made to run itself with a large group of people. In convention mode, every game is started once everyone is ready, and announces the rules aloud for new players to learn.

Cool Stuffs!

  • Now on Windows & Steam!
  • 18+ Player support
  • Super easy setup
  • Runs in Headless mode, no screen required
  • Audio is output directly through the headphone jack, no audio device/usb plugin is necessary.
  • Optional web interface, view status and change game settings with your phone
  • Custom music support, play with your own music
  • Convention mode, no manual instructions needed, the game plays itself and switches between game modes

Hardware

I am currently selling fully set up Joustmania devices (pi5 - 4gb model, case, bluetooth dongle, sd card, audio-connector) for $180 with included shipping domestically. If you would like to inquire about purchasing a fully setup Joustmania device, please reach out to [email protected]

If you would like to build your own device you will need the following:

Optional and recommended:

Note on Hardware: The internal bluetooth is shorter range and has a slightly higher latency The class 1 adapters allow bluetooth connections up to 300+ feet and allow for the gameplay to be smooth, each adapter can connect to 6 to 7 controllers. I've tested this build with four adapters and 18 controllers successfully.

Optional:

This will allow you to charge 9 controllers at once through the pi

Installation

  1. Download and Install Raspbian on the micro SD card, this build was tested on the pi 4 and 5, with the latest version of the raspberry pi OS, 32 or 64 bit. If you would like to try installing on Debian there are some extra instructions here that could help.
  2. Connect the bluetooth adapters, (usb audio connector for the pi 5), and speakers
  3. Turn on the pi, open a Terminal and run these commands, the pi will reboot on a successful install
  4. If something goes wrong during installation, try running setup.sh again.
git clone https://github.com/adangert/JoustMania.git
cd JoustMania
sudo ./setup.sh --disable_internal_bt

If you would not like to turn off the internal bluetooth (this is not recommended) leave off --disable_internal_bt

You can now disconnect the hdmi cable and run JoustMania in headless mode. JoustMania will automatically boot up on restart, menu music should start playing once the pi boots up. Note audio will only play out of HDMI when plugged into a monitor, and only out of the audio jack when unpluged from a monitor.

Update Joust Mania

Joustmania will auto update when started and connected to the internet. Sometimes there is a large update, it will say so, then you can press the start and select buttons on a controller to start this update, wait until the pi reboots. If you have the AP enabled, you may need to disable it first to gain access to the internet.

Pairing controllers

  • In order to pair controllers permanently, plug them into the Raspberry Pi via USB
  • Once plugged in, the controller should turn white indicating that it has been paired correctly
  • Press the PlayStation sync button (the circular one in the middle) to wirelessly connect paired controllers to the Pi

If pairing is not working for some reason, or you would like to resync all controllers run the following

cd JoustMania
sudo ./reset_bluetooth_connections.sh

If controllers seem to pair to only one Bluetooth adapter, it is likely that they share the same Mac address, refer to this issue: #172

With some bluetooth adapters and ps4 controllers, pushing the playstation sync button after plugging it into the pi may be necessary for it to pair correctly.

How to select a game mode

  • In order to change between games, on any controller press the select button (located on the left side of a controller)
  • In order to remove a controller from play, hold the playstation button to turn off the controller.

How to start a game

  • When a player presses the trigger button their controller will turn white
  • Once all controllers are white the game will begin!

Admin Mode: Joustmania settings

You can become an Admin by pressing all four front buttons on any controller, this will allow you to modify the games settings from the four front buttons on the controller, After a game is played the Admin mode will be reset

  • (Cross) Add or remove a game from Convention mode, your controller will be green if the game is added and Red if it is not, Custom Teams mode can not be added to the Convention mode
  • (Circle) Change sensitivity of the game. There are three settings, slow, medium, and fast, you will hear a corresponding sound for each
  • (Square) toggle the playback of instructions for each game
  • (Triangle) show battery level on all controllers (full charge is Green, 80% is Turquoise, 60% is Blue, 40% is Yellow, under 40% is Red)
  • The middle button can also be used to rotate through different options, then the start and select buttons can be used to increase and decrease that amount, currently this will allow you to change the amount of teams for random team mode, and whether force start works with every controller or only players who pushed the trigger button.
  • Holding down the trigger button for two seconds in admin mode will force start the game.

For further settings such as turning off audio (play_audio) or changing the colors of controllers please edit the joustsettings.yaml file in the Joustmania folder.

Web Interface

Joustmania can also be controlled via a web browser on your laptop or smartphone. If your Pi is on a network, use the IP address of your Pi (for example, http://192.168.1.xxx/). Alternatively, you can turn your Pi in to an access point and connect your device directly to it. To enable this, run the command

sudo ./enable_ap.sh

Note that this disables normal Wi-Fi on the Pi, the ethernet connection should still work however. The default SSID is "JOUSTMANIA" and the default password is "joustmania"; both (and other) settings may be adjusted in the apfiles/hostapd.conf file before running enable_ap.sh.

To connect to the game, go to http://joust.mania in your web browser, you may have to disable LTE on mobile. To disable the access point and restore Wi-Fi, run the command

sudo ./disable_ap.sh

Custom Music

  • JoustMania comes with a couple of pre-installed default songs.
  • Play your own music, by copying it into the respective folders: /audio/(Joust, Zombie, Commander)/music/
  • Supports Mp3, Wav, Ogg, flac and others Here,
  • All music and audio can be disabled by changing play_audio = False in joustsettings.yaml, this will also disable tempo sensitivity changes for each game mode
  • two different menu voices can be selected, either aaron or ivy, you can change this via the menu_voice setting in joustsettings.yaml

Game Rules and Variants

  • Keep your controller still while trying to jostle others.
  • If your controller is jostled, then you are out of the game!
  • The music is tied to the gameplay, the faster the music the faster you can move
  • Minimum and recommended player count is listed next to every game mode
  • Extended rules can be found on the Wiki

Joust Free-for-All (2+ players)

  • This is the first mode that JoustMania boots to
  • The most basic version of Joust; be the last one standing!

Joust Teams (Minimum 3+ players, 4+ players recommended)

  • This game is the same as Joust Free-for-All however at the beginning players select their team color with the big button in the middle of their controller
  • There are six teams to select from

Joust Random Teams (3+ players)

  • Same as Joust Teams, however the teams are randomly assigned at start of play
  • There are 2-4 teams in this mode, depending on number of players

Traitors (Minimum 6+ players, 9+ players recommended)

  • Two or three teams face off against one another, however there is a traitor on every team
  • Traitors are on an additional secret team
  • If you controller vibrates during the start countdown, you are a traitor!

Werewolves (Minimum 3+ players, 6+ players recommended)

  • Hidden werewolves are selected at the beginning of the game.
  • When the countdown starts the werewolf will feel a vibration, letting that player know they are a werewolf
  • After a short period of time, werewolves will be revealed
  • Werewolves win only if they are the last remaining

Zombies (Minimum 4+ players, 10+ players recommended)

  • Two players start out as zombies, and try to infect the humans
  • Humans can shoot random zombies with bullets
  • Bullets are randomly assigned as loot from killing zombies
  • Humans try to survive for a couple of minutes, otherwise zombies win!

Commander (Minimum 4+ players, 6+ players recommended)

  • Players are split into two teams
  • One commander is chosen for each side, if this commander dies, the other team wins
  • Commanders can activate special abilities that helps their team win

Swapper (Minimum 3+ players, 4+ players recommended)

  • Players start on two teams
  • When you die, you switch to the other team
  • The last person remaining does not switch

Fight Club (2+ Players)

  • Two players fight eachother
  • The loser goes to the back of the line
  • The winner gains a point
  • The player with the most points at the end wins.

Tournament (3+ players)

  • Everyone is paired up 1v1 via controller colors
  • If your controller is white, wait to be assigned to a new player
  • The last person remaining wins!

Non Stop Joust (2+ players)

  • Same as FFA, however when you die you respawn
  • The player that died the least at the end of the 2.5 minute round wins!

Ninja Bomb (2+ players)

  • Players stand in a circle each holding a controller
  • Players press A to join the game.
  • A bomb is passed around by pressing the A button, if held too long it will explode
  • Players can try to pass a traps in order to fake out their opponents.
  • If a player presses A or trigger while holding a trap, they explode
  • Traps are passed by holding the trigger-button half way, too much or too little and you'll give yourself away
  • Traps can also be countered by pressing any of the four front buttons.
  • Players have two lives, the last player remaining wins!

Convention/Random mode

  • This mode allows for multiple game types to be randomly rotated with instructions played before each game
  • Random mode defaults to FFA, Random Teams, Werewolves, and Swapper, more game modes can be added or removed as an Admin or via the web interface (see above)
  • Modes with an insufficient number of players will be ignored, if none are available Joust Free-for-All is selected

Support and funding

If you love this game you can support its development by helping out with my patreon here: https://www.patreon.com/adangert

We also have some great contributors if you would you like to help out with development, or find any bug fixes we would be happy to test them out and incorperate them into the repo!

joustmania's People

Contributors

adangert avatar asonix avatar burk3 avatar drdecagon avatar jouva avatar mbabinski-at-google avatar nam-ereh-won avatar robotopera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

joustmania's Issues

Add admin mode

Allow all four buttons to be pressed to to do things like change game modes and remove controllers

players turn red when they die

To make the game have better player feedback, when a player dies, their controller should flash and turn red. The red in the other game types for player colors will have to be changed as well (FFA, Teams, Werewolfs, Zombies, commander) so that players are not confused

create a second install script for on-board bluetooth

the on board bluetooth is not class 1, and therefore not long range, however in order to reduce costs to entry an extra install script should be created that works with the built in bluetooth (should work for small spaces)

add swapper mode

two teams,
when a player gets hit, there is a 3 second pause then they switch teams

add dynamite mode?

everyone sits in a circle, a red dot(dynamite) goes around, press A to pass to the next person, if you press A too early you explode. the dynamite will eventually explode too. players can shake the dynamite when they have it to make it go down faster

controllers rumble too long on medium sensitivity

currently if you hold the controller light enough in medium sensitivity, then it continues to rumble. In order to solve this, controllers should at max rumble for 1 second and then stop rumbling.

Optional Freeze mode

Freeze mode is apart of the original game, This could be an optional feature that could be turned on.

mp3 support

right now, wavs are supported, mp3 support needs to be added and tested, This might be difficult with the real-time resampling in piaudio.py, perhaps quickly convert the mp3 to a temp wav first before the game starts then delete it after the round is over?

Shut off werewolfs faster

Before the instructions tell everyone to open their eyes, shit off the werewolfs controllers earlier

Issue with swig_import_helper

Hi,

I've been wanting a portable version of Joust since I first saw years ago so this is awesome work you're doing.

I'm trying to set it up at the moment but am having problems with the psmove module. Initially it wasn't finding it all so I added:
import sys sys.path.append('/home/pi/psmoveapi/build/

Now I'm getting a:
Traceback (most recent call last): File "pair.py", line 3, in <module> import psmove File "/home/pi/psmoveapi/build/psmove.py", line 28, in <module> _psmove = swig_import_helper() File "/home/pi/psmoveapi/build/psmove.py", line 24, in swig_import_helper _mod = imp.load_module('_psmove', fp, pathname, description) ImportError: dynamic module does not define init function (init_psmove)

I'm working with a fresh install of Raspbian on a Raspberry Pi 3 v1.2. I've got SWIG version 2.0.12. Any tips as to where I might be going wrong would be really appreciated.

Thanks,

Ben

Waves/fightclub mode

One player is the Juggernaut, there are different waves where players from the sidelines spawn to attack the main player. Main player has bombs he can use, to kill all enemies. The main player also progresses through different waves, and can reach checkpoints which are saved by a pin code from the controller.

--extra detail: enemies: red to green for difficulty, purple for invincibility.

Make joust more sensitive

the regular Joust games are is a bit high intensity, should make different options in the common folder, i.e. high, medium, low sensitivity values, and then assign each of these in the different game modes, and have the default a bit more sensitive than it is right now, for both the slow and fast music speeds. It might also be a good idea to be able to adjust sensitivity on the fly, for bigger or smaller rooms to play in.

sound not currently working

currently getting this output when running the game

[PSMOVE WARNING] Magnetometer in 00:06:f5:88:dd:0f not yet calibrated.
[PSMOVE WARNING] Magnetometer in e0:ae:5e:4e:ca:68 not yet calibrated.
[PSMOVE WARNING] Magnetometer in e0:ae:5e:41:e2:17 not yet calibrated.
trust file is /var/lib/bluetooth/00:15:83:D1:1C:51
trust file is /var/lib/bluetooth/00:15:83:D1:1C:52
trust file is /var/lib/bluetooth/00:15:83:D1:1C:61
[PSMOVE WARNING] Magnetometer in 00:06:f5:88:dd:0f not yet calibrated.
[PSMOVE WARNING] Magnetometer in e0:ae:5e:4e:ca:68 not yet calibrated.
[PSMOVE WARNING] Magnetometer in e0:ae:5e:41:e2:17 not yet calibrated.
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started

what about a "King of the Hill" mode.

I was thinking about a King of the Hill mode, which is probably better suited to a smaller number of players, but maybe not.

Something along of the lines of everyone starts neutral. once someone is knocked out, randomly from the remaining players someone becomes the King, and everyone remaining else is one color (red?). players who die respawn after a certain amount of time.

While you are King, you accrue points over time, the current King wins once he has accrued a certain number of points. (point total could be varied depending on desired game length)

If the King is joustled, he dies awaiting respawn and another random player becomes King.
Perhaps it's better to say only alive player could become king, resulting in some fun backstabbing between non-kings players to improve their odds of becoming King.

Requiring playtesting. i'm not sure whether to win you must accrue those points in a single shot of being King (might be too hard or limiting) or over the course of a match.

If people are interested in how they went, at the end the controllers could go a unique color and the game could say the score.
"Green 20... Red 18... Yellow 5... etc"

thoughts?

Bullets are unbalanced in Zombie mode

At the start of the game, it's very easy to have a bullet, and with enough coordination, zombies could be held off purely with bullets. It seems like something that should be delayed before giving them out, or spawn longer or such

investigate why adapters shut off while pairing

Sometimes the bluetooth service dies when pairing a controller, and all of the controllers turn off. Sometimes the service completely dies and can't be restarted, thus the raspberry pi needs to be rebooted before pairing can continue. It would be nice if neither of these things happened, i.e. when pairing, you are able to pair in one go, without the other controllers resetting.

Investigate adding GUI to the game

It might be nice to have some sort of display that can be output to a projector while the game is going on, i.e. score or who is in or out of the game. This enhancement might also allow for new and different types of games to be created!!

Best way to update?

What's the recommended way to update JoustMania on a RasbPi? Should I just git pull and reboot? Should setup be run again? Should this info be in the readme?

Unable to complete setup.sh

I've followed the instructions using the latest version of Raspian. The following errors occur while running setup.sh

CMake Error: Error in cmake code at
/home/pi/psmoveapi/CMakeLists.txt:3:
Parse error. Expected a command name, got unquoted argument with text "<<<<<<<".
-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found. Stop.
sed: can't read /etc/modprobe.d/alsa-base.conf: No such file or directory

Broadcast message from pi@raspberrypi on pts/0 (Thu 2016-08-25 20:08:04 UTC):

The system is going down for reboot NOW!

LED lag since recent update

I'm not sure it somehow it's just my setup, but since updating recently. I've encountered 2 issues that i was not experiencing previously.

  1. I'm seeing controller LED's all turn off and need to reset to get the controllers to respond agaon.
  2. during play. joustling somebody is working, and i can hear the sound effect to tell me they are out, it's prompt and so i don't believe it to be a bluetooth issue.
    however when someone dies, the LED goes white for maybe 5 seconds then goes out or the controller just continues to be on for 5 off seconds before going out.

anyone else experiencing this? or not?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.