Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hybridlogics/run-zidana-run
"RunZidanaRun" is a phaser based game inspired by the true events of 2006 World Cup Final. Featureing Zinedine Zidane, Del Piero, Pirlo, Buffon and Marco Materazzi
https://github.com/hybridlogics/run-zidana-run
game phaser
Last synced: 12 days ago
JSON representation
"RunZidanaRun" is a phaser based game inspired by the true events of 2006 World Cup Final. Featureing Zinedine Zidane, Del Piero, Pirlo, Buffon and Marco Materazzi
- Host: GitHub
- URL: https://github.com/hybridlogics/run-zidana-run
- Owner: hybridlogics
- Created: 2016-10-15T09:07:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-15T15:22:16.000Z (over 8 years ago)
- Last Synced: 2024-11-11T06:44:22.568Z (2 months ago)
- Topics: game, phaser
- Language: JavaScript
- Homepage:
- Size: 1.84 MB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RunZidanaRun #
A phaser based game inspired by the true events of 2006 World Cup Final. Featureing Zinedine Zidane, Del Piero, Pirlo, Buffon and Marco Materazzi## INSTRUCTIONS: ##
Use npm package "live-server" or any alternative local server to run this game.
## KEYS: ##
Press 'SPACE': JUMP / HEADBUTT
Press 'Left Mouse Button': To start stage## TECHNOLOGIES: ##
- HTML 5 Phaser
- jQuery## CODE SNIPPETS: ##
1- Start Game:-
:::javascript
function startGame() {if (headButton.isDown) {
if (zidane.body.onFloor()) {
zidane.body.velocity.y = -bvelocity;
}
zidane.animations.play('headbutt');
} else if (zidane.body.onFloor()) {zidane.animations.play('move');
}gameText.text = "Tap 'Space' to Jump and Headbutt!\nAvoid Others and Take Out Marco";
// game.debug.text("Time: " + game.time.events.duration, 10, 10);
// Scroll the background and ground and italians
background.tilePosition.x += -bng;
ground.tilePosition.x += -bng;
delpiero.body.velocity.x = -ispeed;
buffon.body.velocity.x = -ispeed;
gattuso.body.velocity.x = -ispeed;
marco.body.velocity.x = -ispeed;// Collide zidane with the italians
game.physics.arcade.overlap(delpiero, zidane, zidaneCollidesDelpiero, null, this);
game.physics.arcade.overlap(buffon, zidane, zidaneCollidesBuffon, null, this);
game.physics.arcade.overlap(gattuso, zidane, zidaneCollidesGattuso, null, this);
game.physics.arcade.overlap(marco, zidane, zidaneCollidesMarco, null, this);
}![alt tag](https://cloud.githubusercontent.com/assets/21244627/19411137/d4375744-9314-11e6-829a-2426f7a1afc2.png)