Skip to content

Block Fiesta is a multiplayer block game between a desktop application and mobile phones

Notifications You must be signed in to change notification settings

MindCookin/KujengaPamoja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kujenga Pamoja

Kujenga Pamoja is a kind of tribute to "Jenga", the block playing game. In fact, "Jenga" means "built" in Suajili, and "Kujenga Pamoja" means "build together".

This said, the idea was to create a multiplayer experience based on the use of socket communications, connecting mobile phones with a desktop application, using the phones like a gamepad while desktop application acts like the machine/console.

How to play

First of all, open the game in Chrome( at this time, it is not avalaible in other browsers ). You will be presented with an URL. Introduce the URL in your smartphone (this time you can use any browser) and follow the instructions. You should be able to play with the "machine" (desktop) from your mobile phone.

Note1 : Enable Wifi connection in your smartphone. If you don't have a good bandwith, you will experiment strange behaviours. Note2 : If you don't have any smartphone, just open the given URL in a new tab. It is not so beatiful but is much more handy.

How it works

Basically the machine (the application on your desktop browser) opens a communication channel with the player( mobile phone) that let the server receive and send messages inbetween them in nearly real time. Now we can use the phone as a gamepad and update the game in real time.

In the code side, we need to create a channel from the Google App Engine javascript Channel API. This is made at ConnectionClass ( there is one Connection for each side: one for machine and one for player ). Once we have the connection ready, we can send messages between machine and player. We have to take care that each message pass through our server, and he handles were to distribute it.

In the very first step ( when we first open the "machine" and ask the server for a Channel ), the server creates a unique identifier for our Channel (the token) and gives the machine a unique identifier to identify that user. We create a url with some get parameters that let us identify players when they connect to our server. When a new player is connected, the server just give him a new identifier, without modifying the token.

We store the actual state of the game in the server ( initialized, ready, ongame, lose, etc... ). This is send at the same time to all the ConnectionClass instances, and each player and machine updates its state accordingly. In the other side, both machine and player send messages to the server whenever a button is pressed or when the player loses or if the game is ready to start...

More

For further information on how the game was made please read the documentation.

Resources

Libraries

The incredible THREE.js for WebGL and 3D.

Physijs for physics integration in THREE.

Google App Engine Channel for socket communications.

TweenMax for tweening and animations.

jQuery for DOM selections.

Closure compiler to compress the code. Really useful.

Hosted on Google App Engine

Fonts :

Commando Licensed by CC BY-SA 3.0.

Music and sounds :

Lift Licensed by CC BY 3.0

Click Licensed by CC BY 3.0

Fairyland Licensed by CC BY 3.0

Life Lost Licensed by CC BY 3.0

8bit Coin Licensed by CC BY 3.0

Coinup Licensed by CC BY 3.0

This game is licensed by CC BY 3.0

About

Block Fiesta is a multiplayer block game between a desktop application and mobile phones

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published