Intrigued by the idea of having both collaboration and deception between players in the same game, we looked into different types of player-to-player interactions in games. Common categories include MMO boss fights where players fight alongside one another and battle royales where players fight each other to be the last one standing. One game specifically, Castle Crashers by Behemoth, captured our attention with its combination of team fights against enemies and duels between players to reap rewards.

What it does

A two-phase 2D multiplayer game that allows players to interact with the game via their devices that reflect their motions on a common shared screen. The first phase has one player randomly selected to be Waffle while other players join as knights. All players can toggle between sprite movement or spotlight movement using gyroscope on their devices. All deal damage by focusing the spotlight on their target for a prolonged duration. Players only enter the second battle royale phase if they successfully beat the player-controlled boss. Then Players focus their spotlights on each other in their attempts to remain the last one standing.

How we built it

We rely on a single backend server built with Python to process and distribute game information. It communicates with all the individual devices through web sockets where user inputs are sent through. For using mobile devices as controllers, we used the Javascript Device Orientation API to access accelerometer data for gyroscope control. Lastly, frontend logic and UI rendering are implemented with HTML5 Canvas.

Challenges we ran into

Sprite rendering order for isometric 2D quickly becomes convoluted when concerned with potential occlusions and their impacts on fair and balanced gameplay. There were also obstacles with latency from taking inputs from web socket controllers and reflecting them on the main screen but with optimizations in reducing the size of messages with op codes and approximate physics, we were able to establish near-real-time communications. By the way, use ellipses when calculating the magnitude of gyroscope control.

Accomplishments that we're proud of

Getting decent gyroscope control to work on mobile devices. Establishing almost real-time communication through web sockets. Implementation of a fairly creative and interesting control scheme for engaging player interactions that involve both collaboration and deception and order and chaos.

What we learned

How to work scalably in order to accommodate a large number of players in multiplayer and how to scale down to very basic core mechanics of a game to create organic control schemes.

What's next for MMCBFBBR

Perhaps a more complex control scheme with more complex interactions between players. For instance, adding an entire controller layout on mobile devices that allows more actions for players yet still trying to achieve real time.

Share this project: