diff --git a/dev/lib/game/entities/ball.js b/dev/lib/game/entities/ball.js index 3e743f8..e3bf015 100644 --- a/dev/lib/game/entities/ball.js +++ b/dev/lib/game/entities/ball.js @@ -10,11 +10,11 @@ EntityBall = ig.Entity.extend({ name: 'ball', - size: {x:48, y:48}, + size: {x: 24, y: 24}, collides: ig.Entity.COLLIDES.ACTIVE, type: ig.Entity.TYPE.B, - animSheet: new ig.AnimationSheet( 'media/ball.png', 48, 48 ), + animSheet: new ig.AnimationSheet( 'media/ball.png', 24, 24 ), bounciness: 1, maxVel: {x: 1000, y: 1000}, diff --git a/dev/lib/game/entities/paddle-player.js b/dev/lib/game/entities/paddle-player.js index 993247b..00cd268 100644 --- a/dev/lib/game/entities/paddle-player.js +++ b/dev/lib/game/entities/paddle-player.js @@ -8,7 +8,7 @@ ig.module( EntityPaddlePlayer = EntityPaddle.extend({ - animSheet: new ig.AnimationSheet( 'media/paddle-player.png', 64, 128 ), + animSheet: new ig.AnimationSheet( 'media/paddle-player.png', 30, 96 ), update: function(){ if( ig.input.state('up') ) { diff --git a/dev/lib/game/entities/paddle.js b/dev/lib/game/entities/paddle.js index 3630c74..240f955 100644 --- a/dev/lib/game/entities/paddle.js +++ b/dev/lib/game/entities/paddle.js @@ -10,11 +10,11 @@ EntityPaddle = ig.Entity.extend({ name: 'paddle', - size: {x:64, y:128}, + size: {x: 30, y: 96}, collides: ig.Entity.COLLIDES.FIXED, type: ig.Entity.TYPE.A, - animSheet: new ig.AnimationSheet( 'media/paddle.png', 64, 128 ), + animSheet: new ig.AnimationSheet( 'media/paddle.png', 30, 96 ), maxVel: {x: 0, y: 400}, diff --git a/dev/lib/game/levels/level1.js b/dev/lib/game/levels/level1.js index c1f0d43..0e3402f 100644 --- a/dev/lib/game/levels/level1.js +++ b/dev/lib/game/levels/level1.js @@ -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":48,"y":128},{"type":"EntityPaddlePlayer","x":512,"y":128},{"type":"EntityBall","x":288,"y":192},{"type":"EntityGoal","x":604,"y":48,"settings":{"size":{"x":20,"y":288}}},{"type":"EntityGoal","x":0,"y":48,"settings":{"size":{"x":20,"y":288}}}],"layer":[{"name":"bg","width":13,"height":8,"linkWithCollision":false,"visible":1,"tilesetName":"media/tileset.png","repeat":false,"preRender":false,"distance":"1","tilesize":48,"foreground":false,"data":[[1,1,1,1,1,1,1,1,1,1,1,1,1],[2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2],[2,2,2,2,2,2,2,2,2,2,2,2,2],[1,1,1,1,1,1,1,1,1,1,1,1,1]]},{"name":"collision","width":13,"height":8,"linkWithCollision":false,"visible":1,"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/tileset.png')]; +LevelLevel1=/*JSON[*/{"entities":[{"type":"EntityPaddleEnemy","x":56,"y":148},{"type":"EntityPaddlePlayer","x":536,"y":148},{"type":"EntityBall","x":300,"y":184},{"type":"EntityGoal","x":600,"y":48,"settings":{"size":{"x":24,"y":288}}},{"type":"EntityGoal","x":0,"y":48,"settings":{"size":{"x":24,"y":288}}}],"layer":[{"name":"bg","width":3,"height":2,"linkWithCollision":false,"visible":1,"tilesetName":"media/bg.png","repeat":false,"preRender":false,"distance":"1","tilesize":250,"foreground":false,"data":[[1,1,1],[1,1,1]]},{"name":"board","width":13,"height":8,"linkWithCollision":false,"visible":1,"tilesetName":"media/tileset.png","repeat":false,"preRender":false,"distance":"1","tilesize":48,"foreground":false,"data":[[1,2,1,1,1,2,1,1,1,2,2,1,1],[7,4,0,0,0,0,0,0,0,0,0,4,6],[7,5,0,0,0,0,0,0,0,0,0,5,6],[7,5,0,0,0,0,0,0,0,0,0,5,6],[7,5,0,0,0,0,0,0,0,0,0,5,6],[7,5,0,0,0,0,0,0,0,0,0,5,6],[7,3,0,0,0,0,0,0,0,0,0,3,6],[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/tileset.png')]; }); \ No newline at end of file diff --git a/dev/media/ball.png b/dev/media/ball.png index 07d7fbd..6ac5608 100644 Binary files a/dev/media/ball.png and b/dev/media/ball.png differ diff --git a/dev/media/bg.png b/dev/media/bg.png new file mode 100644 index 0000000..95af4f3 Binary files /dev/null and b/dev/media/bg.png differ diff --git a/dev/media/paddle-player.png b/dev/media/paddle-player.png index f0bc0ee..2e5dd84 100644 Binary files a/dev/media/paddle-player.png and b/dev/media/paddle-player.png differ diff --git a/dev/media/paddle.png b/dev/media/paddle.png index 81961aa..859dbff 100644 Binary files a/dev/media/paddle.png and b/dev/media/paddle.png differ diff --git a/dev/media/tileset.png b/dev/media/tileset.png index a895476..315c699 100644 Binary files a/dev/media/tileset.png and b/dev/media/tileset.png differ