Search the Community

Showing results for tags 'breakout'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 14 results

  1. Can I do a recursive function?

    First of all, sorry for my english Hello! I'm trying to make a Arkanoid game on android Phaser. When the ball hits a brick, the brick disappears and the ball bounces well. Now I have two types of bricks, a normal brick, brick and TNT brick. I've implemented that when the ball touches a TNT brick, kill adjacent bricks too, but when one of those adjacent bricks is a TNT brick, it must call the same function recursively, but something does not work ... any idea? here is my function:
  2. Brick-Bricker

    Hey I am currently polishing off my Breakout or Brick-Breaker game (whichever you prefer to call it). I am trying to add music to the game when the start button is pressed and then sound effects every time a brick is destroyed. Unfortunately Phaser keeps saying Key "Sample" is not found in cache. I have tried using Phasers examples and basing the music off that but to no avail. I am new to programming with Phaser and would really appreciate the help. When the game is finished i will post a link. Thanks in Advance Pheaset here is my code var game = new Phaser.Game(480, 320, Phaser.AUTO, null, { preload: preload, create: create, update: update }); var firework;; var music = Phaser.Sound; var lives = 1; var livesText; var lifeLostText; var ball; var paddle; var bricks; var newBrick; var brickInfo; var scoreText; var score = 0; var playing = false; var startButton; function preload() { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.stage.backgroundColor = '#eee'; game.load.image('ball', 'ball.png'); game.load.image('paddle','paddle.png'); game.load.image('brick', 'img/brick.png') game.load.spritesheet('ball', 'img/wobble.png', 20, 20); game.load.spritesheet('button','button.png', 120, 40);'Good-Riddance', 'Good-Riddance.mp3'); } function create() { game.physics.startSystem(Phaser.Physics.ARCADE); startButton = game.add.button(*0.5,*0.5, 'button', startGame, this, 1, 0, 2); startButton.anchor.set(0.5); music ='Good-Riddance') ="Good-Riddance")["Good-Riddance"]); if(playing === true) { }else{ music.mute = false; }
  3. View Counter

    Hey Guys, I was wondering if anybody knew how to add a view counter. I want to know how many views my breakout game will get when it is launched and the same for my other tennis game. Help is really appreciated Pheaset
  4. River Dash

    Hi everyone, Finally, we're completing a new game, casual breakout with HQ graphics. Check it out here: Gameplay video: I'm very interested in testing, as I haven't managed to optimize game assets yet Avaliable for exclusive licensing. Contact:
  5. Hello guys, I just recently started to play with Phaser and so far I'm loving it.. However as I'm not used to it, I run into wall.. I'm creating a breakout game where I want different bricks to respond to ball hitting them differently.. Mostly I want to add bricks a health so to speak, so depending on the color of the brick, it will take 1,2,3.. etc ball hits to kill it.. I'm so far doing this in this fashion: // Red bricks bricks_1 =; bricks_1.enableBody = true; bricks_1.physicsBodyType = Phaser.Physics.ARCADE; // Yellow bricks bricks_2 =; bricks_2.enableBody = true; bricks_2.physicsBodyType = Phaser.Physics.ARCADE; // Gray bricks bricks_3 =; bricks_3.enableBody = true; bricks_3.physicsBodyType = Phaser.Physics.ARCADE; // Green bricks bricks_4 =; bricks_4.enableBody = true; bricks_4.physicsBodyType = Phaser.Physics.ARCADE;So, I'm creating a group for each of the type of the possible bricks.. Then as I randomly create a level, I do this: function randomLevel(){ var brick; for (var i = 0; i < 8; i++) { for (var j = 0; j < 6; j++) { var rand = game.rnd.integerInRange(1, 4); switch(rand) { case 1: brick = bricks_1.create(75 + (i*80), 55 + (j*40), 'brick_1'); brick.body.bounce.set(1); brick.body.immovable = true; break; case 2: brick = bricks_2.create(75 + (i*80), 55 + (j*40), 'brick_2'); brick.body.bounce.set(1); brick.body.immovable = true; break; case 3: brick = bricks_3.create(75 + (i*80), 55 + (j*40), 'brick_3'); brick.body.bounce.set(1); brick.body.immovable = true; break; case 4: brick = bricks_4.create(75 + (i*80), 55 + (j*40), 'brick_4'); brick.body.bounce.set(1); brick.body.immovable = true; break; } } }}And then I have 4 onHit functions (which I don't really like, would prefer a single one with some switch statement in there) where depending on what type of brick has been hit, it can play ie different sound for example.. game.physics.arcade.collide(ball, bricks_1, ballHitBrick_1, null, this); game.physics.arcade.collide(ball, bricks_2, ballHitBrick_2, null, this); game.physics.arcade.collide(ball, bricks_3, ballHitBrick_3, null, this); game.physics.arcade.collide(ball, bricks_4, ballHitBrick_4, null, this);This is example of one of the onHit functions (I basically used example of breakout a lot): function ballHitBrick_1(_ball, _brick) { _brick.kill();; score += 10; scoreText.text = 'Score: ' + score; // Are they any bricks left? if (bricks_1.countLiving() == 0 && bricks_2.countLiving() == 0 && bricks_4.countLiving() == 0) { // New level starts scoreText.text = 'Score: ' + score; introText.text = '- Next Level -'; // Let's move the ball back to the paddle ballOnPaddle = true; ball.body.velocity.set(0); ball.x = paddle.x + 16; ball.y = paddle.y - 16; ball.animations.stop(); // And bring the bricks back from the dead randomLevel(); }}And this all works well, ie I can play different sounds based on what brick has been hit.. However what do I need to do to add health to these bricks? So for example, bricks_1 bricks die only after 1 shot, while bricks_3 don't die ever (think of like concrete/metal/blocking bricks).. Thanks a ton!
  6. Invaders Breakout

    First Game for #ios released! Support! Available for #iPhone and #iPad #indiegame #gamedev #dev #indiegamedev #invaders #breakout Classic Games brought together, enjoy awesome gameplay and adorable graphics. See supported devices below* features: - 72 different levels - arcade mode - level mode - iPad & iPhone compatible - retina graphics - 2 favorite gameplays brought together - unique powerups - no advertising No Advertising, just gaming. Nothing else. Invaders Breakout is a classic indiegame based on two popular retro games. It combines the tricky parts of breakout with unique abilities that each invaders has. Try to complete all 72 levels and get the highest score! No in-game purchases, no advertising. Only for true gaming. Supported devices: iPhone 5, iPhone 5s, iPhone 5c, iPhone 6, iPhone 6+, iPad3, iPad4, iPad Mini 2, iPad Mini 3, iPad Air, iPad Air 2
  7. Created a plain simple breakout game as an exercise to play around with Phaser v2.0.5. Designed two version: 1. A desktop version, control with arrow keys 2. Mobile version, play by pressing the left part or the right part of the canvas Desktop version: Mobile version:
  8. Hi, I am trying to learn Phaser by following the breakout demo game available on the examples site. It works, except that when I hit the paddle to the right wall, after that the ball just passes through the left portion of the paddle. But it does bounce off the right side of the paddle. Note, that If I don't hit the right wall it works! To reproduce the problem: - Download the minimal bug reproducible code of the game attached as zip. - Start the game. - Hit the ball few times to see it works (left and right portion of the paddle) - Now Hit the paddle to the right wall. - & try hitting the ball with the left portion of the paddle, it'll just pass through! Info: - Phaser Version - 2.01 - Chrome 35.0.1916.114 (Tried on Firefox as well) - Mac OSX 10.8.5 I've pasted the code inline below as well. Any help would be really great! Thanks! var game = new Phaser.Game (800, 600, Phaser.AUTO, 'game_div', { preload: preload, create: create, update: update});var paddle;var ball;var ballOnPaddle = true;var s;function preload () { game.load.atlas ('breakout', 'assets/breakout.png', 'assets/breakout.json'); game.load.image ('starfield', 'assets/starfield.jpg');}function create () { game.physics.startSystem (Phaser.Physics.ARCADE); game.physics.arcade.checkCollision.down = false; s = game.add.tileSprite (0,0,800,600, 'starfield'); /**PADLE SECTION**/ paddle = game.add.sprite(, 500, 'breakout', 'paddle_big.png'); paddle.anchor.setTo(0.5, 0.5); game.physics.enable (paddle, Phaser.Physics.ARCADE); paddle.body.CollideWorldBounds = true; paddle.body.bounce.set (1); paddle.body.immovable = true; /*BALL SECTION*/ ball = game.add.sprite (, paddle.y - 16, 'breakout', 'ball_1.png'); ball.anchor.set (0.5); ball.checkWorldBounds = true; game.physics.enable (ball, Phaser.Physics.ARCADE); ball.body.collideWorldBounds = true; ball.body.bounce.set (1); game.input.onDown.add (releaseBall, this);}function update () { paddle.body.x = game.input.x; if (paddle.x < 24) { paddle.x = 24; } else if (paddle.x > game.width - 24) { paddle.x = game.width - 24; } if (ballOnPaddle) ball.body.x = paddle.x; else { game.physics.arcade.collide (ball, paddle, ballHitPaddle, null, this); }}function releaseBall () { if (ballOnPaddle) { ballOnPaddle = false; ball.body.velocity.y = - 300; ball.body.velocity.x = -75; }}function ballHitPaddle (_ball, _paddle) { var diff = 0; if (_ball.x < _paddle.x) { diff = _paddle.x - _ball.x; _ball.body.velocity.x = (-10 * diff); } else if (_ball.x > _paddle.x) { diff = _ball.x -_paddle.x; _ball.body.velocity.x = (10 * diff); } else { _ball.body.velocity.x = 2 + Math.random() * 8; }}index.html <!DOCTYPE html><html><head> <meta charset="utf-8" /> <title>Empty project</title> <script type="text/javascript" src="phaser.min.js"></script> <script type="text/javascript" src="main.js"></script></head><body> <div id="game_div"> </div></body></html>
  9. Breakout I'm more than happy to release my first finished game. I made it specially for this project: So soon I hope it will appear on the list, and for now you can play it here: Source code here: I've made some gameplay changes compared to the other engine ports/versions and they are more like bonus features. If you press: "B" you will toggle mouse/keyboard control If you press: "S" you will toggle a "shake" effect If you press: "V" you will spawn a ball (there is no collision check till the countdown ends so don't freak out if the ball pop out of the game bounds. Other things it that you can save a ball if hit it with the vertical side of the paddle but only if it hit the top half - I call it "action save" or "phew just in time save" Also when multiple balls are in game they collide with each other.
  10. This is what I made: play here: And I want to make other version with absolutely new graphics, sound, and extended game play It's going to be based on this game, but with: - new graphic - new dimension and scale support - more levels and more bonuses - better sound effects I'm not going to start it alone since I have to other game projects with graphic artist but I'll love if someone wants to make such a game: check arkanoid and breakout. For now the game is supposed to be free and non commercial but if in time we invest and make a good product I'm open to release a commercial version with some additions or completly transfer the game to some sponsor... But the main requirements to join the project are: 1. You got to love making such a game 2. You have to be: graphic artist, js coder or sound artist 3. contact me on mail or skype: so we can brainstorm some gameplay things together and make a working plan and so on. So contact me on mail: or skype: mike86bgtsubasa
  11. Breakout Game - need help

    So I need your help to finish, and polish the Breakout game with Phaser. In short i make it for this: I've made like 50% i think, what's left is: - Start, Game Over Screen - Display Lives, Level, Score - Display the Countdown - Make powerups and powerdown fall from predefined random bricks (if you press "Z" you trigger the powerdown and paddle become smaller) - All sound related (here i wait for final version of Phaser) But there are some problems i met during the development: - I think that justPressed and justReleased doesn't work as expected i tried fixed it but failed... The problem is that even with one quick press, the update calls justPressed and execute code several times: Just press "V" to spawn a ball. Sam thing with "X" and "C" for switching levels, here i tried a bit hackish for me thing to set the duration as 22 ms... 11ms fails, and 44ms trigger multiple - I don't quite understand the paddle.immovable = true; but as i tested and read from flixel without it collision goes nuts and don't do what "expected imho" I'll be glad if Rich point me to some reading, or example - Still think how to implement the different play states Start scree, Playing, and Game over Here is the TS source: Also I'll be happy if someone takes a time the restructure the game to not be in one big .js And of course when this is finished it will be added to the Breakout projects, and i think it's going to be useful for all new comers to Phaser
  12. Breakout Cove

    Hello everybody, I thought I would share my latest game. This was an attempt to create something old-school which might have a market in fledgling html5 portals but with a modern, sleek revision. What I came up with feels quite good and is definitely a mile-stone in my work, so I thought I would share it. Platforms: Desktop and Mobile Controls: Mouse/Touch >>Play<< Thoughts, etc. are appreciated. If you'd like to see more of my work, my portfolio can be found here: Ryan
  13. Did a write up on our implementation of Matt Greer's Breakouts project:
  14. Hey all, I'd like to share with you my first HTML5 mobile game, Farmyard Outbreak. I designed and bult it with the sole idea of offering it to mobile game portals. It's basically a breakout clone, but the bricks (monsters) travel down the screen, and you must protect your cows from them. It's game over if the ball hits the cow fence 3 times, or if the monsters reach either the fence or the player. There is also an emphasis on using the four power-ups available, and choosing the right time to do so! I made the game using GameMaker Studio and I licensed True Valhalla's mobility engine to get the device scaling and orientation working properly. Whilst making the game I've been testing it on iPhone 4S and iPad 3 which work great, but I don't have access to any Android devices right now, so if anybody plays it on an Android I'd really appreciate it if you'd let me know how well it works for you. Due to the amount of movement on screen I suspect that it won't run very well on older hardware, but that's no real surprise! It's also worth mentioning that I burned the candle at both ends to release this version of the game on time to meet the One Game A Month deadline, and as such it's possible there may be some small remaining bugs. I hope I've squashed them all already but if you do spot anything odd, again please let me know. I'll be refining and optimising it over the coming weeks before I even consider offering it to portals. Please click through and play, I'd love to hear what you think. Thanks. PS if you decide to look around the rest of my website linked above note that it's currently just a mockup that I cobbled together with Twitter bootstap, and needs a lot of work!