Level visuals ready

This commit is contained in:
Ruben Müller 2013-04-11 21:34:22 +02:00
parent 899abbb72e
commit 9f3c7a1252
7 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,8 @@
width: 624px;
height: 383px;
background: transparent;
display: block;
margin: -170px auto 0 auto;

View File

@ -1,6 +1,6 @@
ig.module( 'game.levels.level1' )
.requires( 'impact.image','game.entities.paddle-enemy','game.entities.paddle-player','game.entities.ball','game.entities.goal' )
.defines(function(){
LevelLevel1=/*JSON[*/{"entities":[{"type":"EntityPaddleEnemy","x":32,"y":132},{"type":"EntityPaddlePlayer","x":560,"y":128},{"type":"EntityBall","x":300,"y":184},{"type":"EntityGoal","x":576,"y":48,"settings":{"size":{"x":48,"y":288},"owner":"human"}},{"type":"EntityGoal","x":0,"y":48,"settings":{"size":{"x":48,"y":288},"owner":"ai"}}],"layer":[{"name":"bg","width":3,"height":2,"linkWithCollision":false,"visible":0,"tilesetName":"media/bg.png","repeat":false,"preRender":false,"distance":"1","tilesize":250,"foreground":false,"data":[[1,1,1],[1,1,1]]},{"name":"playfield","width":13,"height":10,"linkWithCollision":false,"visible":1,"tilesetName":"media/playfield.png","repeat":false,"preRender":false,"distance":"1","tilesize":48,"foreground":false,"data":[[1,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,27,0,0,0,0,0,0,0,0,0],[0,0,0,27,6,6,6,0,0,0,0,0,0],[0,0,6,6,6,6,6,0,0,0,0,0,0],[0,0,0,6,6,6,6,63,0,0,0,0,0],[0,0,0,6,6,6,63,63,0,0,0,0,0],[0,0,0,0,0,0,63,0,63,22,0,0,0],[0,0,0,0,0,0,63,63,63,22,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0]]},{"name":"board","width":13,"height":8,"linkWithCollision":false,"visible":0,"tilesetName":"media/tileset.png","repeat":false,"preRender":true,"distance":"1","tilesize":48,"foreground":false,"data":[[1,2,1,1,1,8,9,10,1,2,2,1,1],[5,0,0,0,0,0,0,0,0,0,0,0,5],[5,0,0,0,0,0,0,0,0,0,0,0,5],[5,0,0,0,0,0,0,0,0,0,0,0,5],[5,0,0,0,0,0,0,0,3,0,0,0,5],[5,0,0,0,0,0,0,0,0,0,0,3,5],[5,0,0,0,0,0,0,0,0,0,0,0,5],[2,1,1,2,1,1,1,1,2,2,2,2,1]]},{"name":"collision","width":13,"height":8,"linkWithCollision":false,"visible":0,"tilesetName":"","repeat":false,"preRender":false,"distance":1,"tilesize":48,"foreground":false,"data":[[1,1,1,1,1,1,1,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,1,1,1,1,1,1,1,1,1]]}]}/*]JSON*/;
LevelLevel1Resources=[new ig.Image('media/bg.png'), new ig.Image('media/playfield.png'), new ig.Image('media/tileset.png')];
LevelLevel1=/*JSON[*/{"entities":[{"type":"EntityPaddleEnemy","x":8,"y":152},{"type":"EntityPaddlePlayer","x":584,"y":172},{"type":"EntityBall","x":300,"y":184},{"type":"EntityGoal","x":612,"y":48,"settings":{"size":{"x":12,"y":312},"owner":"human"}},{"type":"EntityGoal","x":0,"y":48,"settings":{"size":{"x":8,"y":312},"owner":"ai"}}],"layer":[{"name":"playfield","width":13,"height":8,"linkWithCollision":false,"visible":1,"tilesetName":"media/playfield.png","repeat":false,"preRender":false,"distance":"1","tilesize":48,"foreground":false,"data":[[1,2,3,4,5,6,7,8,9,10,11,12,13],[14,15,16,17,18,19,20,21,22,23,24,25,26],[27,28,81,81,31,81,33,36,36,36,36,36,39],[40,41,81,81,81,81,46,36,36,36,36,36,52],[53,54,81,81,81,81,59,36,36,36,36,36,65],[66,67,81,81,81,31,72,36,36,36,36,36,78],[79,80,81,80,81,81,85,36,36,36,36,36,91],[92,93,94,95,96,97,98,99,100,101,102,103,104]]},{"name":"collision","width":26,"height":16,"linkWithCollision":false,"visible":0,"tilesetName":"","repeat":false,"preRender":false,"distance":1,"tilesize":24,"foreground":false,"data":[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]}]}/*]JSON*/;
LevelLevel1Resources=[new ig.Image('media/playfield.png')];
});

View File

@ -20,6 +20,7 @@
score: {'ai': 1, 'human': 1},
showStats: false,
showPause: false,
clearColor: null,
init: function() {
ig.input.unbindAll();
@ -86,6 +87,7 @@
},
draw: function() {
ig.system.context.clearRect( 0 ,0, ig.system.realWidth, ig.system.realHeight );
this.parent(); // Draw entries and background
this.font.draw(this.score.ai, 270, 25, ig.Font.ALIGN.CENTER);
this.font.draw(this.score.human, 350, 25, ig.Font.ALIGN.CENTER);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View File

@ -5,12 +5,12 @@ Initial release
* Game over screen (change main background)
* Highscore-Screen
* Font for score (search fo a tool and make it fancy)
* Pause Screen
## Sound
* Background-tune! (http://www.nosoapradio.us/)
## Code
* Pause-Mode (pause the game, or stop the game)
* Display the Highscore in the game
* An special effect on ball hit (sprite/glor/whatever) (http://clokwork.net/2012/03/07/particle-generation-in-impactjs/)
* Highscore-Script (http://www.holoville.com/blog/?p=948, http://www.scoreoid.net/)