Skip to content

Commit bd9b964

Browse files
committed
Added a new Full Screen Mobile template example.
1 parent 428e331 commit bd9b964

21 files changed

Lines changed: 423 additions & 13 deletions

README.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ We also provide a Grunt script that will build Phaser from source along with all
169169
Run `grunt` in the phaser folder for a list of command-line options.
170170

171171

172+
Koding
173+
------
174+
175+
You can [![clone the Phaser repo in Koding](http://learn.koding.com/btn/clone_d.png)][koding] and then start editing and previewing code right away using their web based VM development system.
176+
177+
172178
Bower
173179
-----
174180

@@ -295,32 +301,36 @@ Although Phaser 1.0 is a brand new release it is born from years of experience b
295301
Road Map
296302
--------
297303

298-
The 1.1 release was a massive under-taking, but we're really happy with how Phaser is progressing. It's becoming more solid and versatile with each iteration. Here is what's on our road map for future versions:
304+
The 1.1 release was a massive under-taking, but we're really happy with how Phaser is progressing. It's becoming more solid and versatile with each iteration. Here is what's on our road map:
299305

300306
Version 1.2 ("Saldaea")
301307

302-
* Update to Pixi 1.5 - currently still in dev branch only, but lots of nice internal changes and new features we want to take advantage of.
303-
* Start integration with the p2.js physics system.
308+
* Update to Pixi 1.4 - this newly released build has lots of internal changes and new features we want to take advantage of.
304309

305-
Beyond version 1.2
310+
Version 1.3 ("Shienar")
306311

307312
* Enhance the State Management, so you can perform non-destructive State swaps and persistence.
308313
* Dedicated CocoonJS packaging features (screencanvas, etc)
309314
* A more advanced Particle system, one that can render to a single canvas (rather than spawn hundreds of Sprites), more advanced effects, etc.
310-
* Massively enhance the audio side of Phaser. Although it does what it does well, it could do with taking more advantage of Web Audio - echo effects, positional sound, etc.
311-
* Comprehensive testing across Firefox OS devices, CocoonJS and Ejecta.
312-
* Integration with third party services like Google Play Game Services and Amazon JS SDK.
313315
* Ability to control DOM elements from the core game and layer them into the game.
314316
* Touch Gestures.
315-
* Virtual d-pad support and also support for the Joypad API.
316-
* Test out packaging with Node-webkit.
317+
* Support for parallel asset loading.
318+
* Fixed width bitmap font support, plus enhanced Bitmap font rendering.
319+
320+
Version 2.0 ("Aes Sedai")
321+
322+
* Integrate p2.js physics system completely.
323+
* Comprehensive testing across Firefox OS devices, CocoonJS and Ejecta.
324+
* Integration with third party services like Google Play Game Services and Amazon JS SDK.
317325
* Flash CC HTML5 export integration.
326+
* Massively enhance the audio side of Phaser. Although it does what it does well, it could do with taking more advantage of Web Audio - echo effects, positional sound, etc.
327+
328+
Beyond version 2.0
329+
330+
* Test out packaging with Node-webkit.
318331
* Game parameters stored in Google Docs.
319-
* Add a d-pad example (http://www.html5gamedevs.com/topic/1574-gameinputondown-question/)
320-
* Create more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/)
321332
* Look at HiDPI Canvas settings.
322-
* Support for parallel asset loading.
323-
* Fixed width bitmap font support, plus enhanced Bitmap font rendering.
333+
* Multiple Camera support.
324334

325335

326336
Contributing
@@ -354,5 +364,6 @@ Phaser is released under the [MIT License](http://opensource.org/licenses/MIT).
354364

355365
[1]: https://github.com/photonstorm/phaser/issues
356366
[phaser]: https://github.com/photonstorm/phaser
367+
[koding]: https://koding.com/Teamwork?import=https://github.com/photonstorm/phaser/archive/master.zip&c=git1
357368

358369
[![Analytics](https://ga-beacon.appspot.com/UA-44006568-2/phaser/index)](https://github.com/igrigorik/ga-beacon)

examples/wip/circlebox.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
2+
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
3+
4+
function preload() {
5+
6+
game.load.image('wizball', 'assets/sprites/wizball.png');
7+
game.load.image('platform', 'assets/sprites/interference_tunnel.png');
8+
9+
}
10+
11+
var ball;
12+
var circle;
13+
var platform;
14+
15+
function create() {
16+
17+
// Our ball sprite
18+
ball = game.add.sprite(420, 100, 'wizball');
19+
ball.anchor.setTo(0.5, 0.5);
20+
21+
ball.body.customSeparateX = true;
22+
ball.body.customSeparateY = true;
23+
24+
ball.body.velocity.y = 150;
25+
ball.body.bounce.y = 0.9;
26+
27+
// Our collision circle
28+
circle = new Phaser.Circle(200, 100, 188);
29+
30+
// Our platform
31+
platform = game.add.sprite(200, 450, 'platform');
32+
platform.body.immovable = true;
33+
34+
}
35+
36+
function update() {
37+
38+
// ball.x = game.input.x;
39+
// ball.y = game.input.y;
40+
41+
circle.x = ball.x;
42+
circle.y = ball.y;
43+
44+
// This is a rect vs. rect collision. The callback will check the circle.
45+
game.physics.overlap(ball, platform, null, processCallback, this);
46+
47+
}
48+
49+
function processCallback(a, b) {
50+
51+
// console.log('p', a.y, b.y);
52+
53+
if (Phaser.Circle.intersectsRectangle(circle, platform.body))
54+
{
55+
console.log('boom', ball.body.overlapX, ball.body.overlapY);
56+
// ball.body.x = ball.body.x - ball.body.overlapX;
57+
// ball.body.velocity.x = platform.body.velocity.x - ball.body.velocity.x * ball.body.bounce.x;
58+
59+
ball.body.y -= 10;
60+
ball.body.velocity.y *= -1 * ball.body.bounce.y;
61+
}
62+
63+
return true;
64+
65+
}
66+
67+
function render() {
68+
69+
game.debug.renderText(Phaser.Circle.intersectsRectangle(circle, platform.body), 32, 32);
70+
game.debug.renderText(ball.body.velocity.y, 32, 64);
71+
// game.debug.renderText(ball.body.overlapY, 64, 64);
72+
game.debug.renderCircle(circle);
73+
game.debug.renderRectangle(platform.body);
74+
75+
}
5.79 KB
Loading
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
body {
2+
margin: 0px 0px 1px 0px; /* the extra 1px allows the iOS inner/outer check to work */
3+
background: #000;
4+
}
5+
6+
#orientation {
7+
margin: 0 auto;
8+
position: absolute;
9+
top: 0;
10+
left: 0;
11+
width: 100%;
12+
height: 100%;
13+
background-image: url(../images/orientation.jpg);
14+
background-repeat: no-repeat;
15+
background-position: center;
16+
background-color: rgb(0, 0, 0);
17+
z-index: 999;
18+
display: none;
19+
}
72.5 KB
Loading
4.31 KB
Loading
4.57 KB
Loading
5.79 KB
Loading
6.29 KB
Loading
12.6 KB
Loading

0 commit comments

Comments
 (0)