ibb671

Members
  • Content Count

    29
  • Joined

  • Last visited

About ibb671

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi guys i added a few more levels. I think I actually finished a game .
  2. Hi can you make a tutorial to make a game similar to your last uploaded video. I would like to know how you were able to make the game mechanics. Thanks
  3. Hello, Thank you Rich . I'm so glad. This is my first game that I want to finish. And Phaser is such a good framework that also helped me understand programming hehe. Thank you so much for your comment Rich. Hi Umz, Thank you, really appreciate that. Yup going to keep adding more levels to improve the game, this is my first game and excited, will definitly be making more levels, no sleep for me LOL Zombie Mode.
  4. Hi guys, I wanted to share a game i'm working on. I have been learning phaser for the past couple months since April actually and started with very minimal programming knowledge. But with the help of the phaser community I was able to make something hehe . Link to the game http://islandbodybuilding.com/wp-content/kb_games/WIP_ANIMAL_CHELU/ I am creating the game for more of educational purpose for the kids here on Guam, to help learn our language which is Chamorro. . I am asking for your recommendations or what you think so far. All are welcome to advise. -Thank You
  5. Hey guys thanks for all your help. I think I figured it out.
  6. is the audio decoding due to how i coded my app? Or is there a setting in cocoon that I may have missed before compiling? Sorry I'm such a noob
  7. @fatalist hi i took your advice and used webview+ and that made the app work (i used bluestacks to run the apk) but i noticed that there is no audio and the tilesprite stopped working . Instead of using Phaser.tileSprite I just used a normal image. But im having trouble making the audio to work. I'm using mp3 and ogg files for my audio. Any help? Thank You
  8. hi Thank you for your reply. After reviewing I had discovered most of the phones was android version 4.0 that wan't able to get it to work and the phones that were able to run was on android version 5.0 or greater. Is there any way to make older versions run the app? Also how do i go about remote debugging? This is something i haven't learned about yet. Also i haven't used any native plugins. I'm very new to phaser and programming in general so i'm not sure what that is. Here is a link of the app that works on the browser http://islandbodybuilding.com/wp-content/game/ibbsirena/
  9. Hello I was wondering if anyone can help. I'm learning Phaser and javascript and I have finally finished a project. I have made a story book app and was able to publish it in the google play store with cocoon here is the link https://play.google.com/store/apps/details?id=com.sirenaStory.c1467975884137. It works fine on my samsung galaxy tab 3. And on one of my friend's phone. Although a few of my friends was not able to even launch the app to get to the main menu and was stuck on the preloading bar. I have uploaded a screen shot. I also used cordova and have sent them the apk file and they had the same issue. Could it be how i coded the application? Any help is greatly appreciated thank you.
  10. Thank you so much for your help really appreciate your assistance. I am still new and learning , but I'm glad that this is a good place I can get help when I get stuck.
  11. hi ok thank you. So what i should do is add a win state? then add an event listener to increment current Level and then reload the game state? Please let me know if this is the approach i should take. Thank you
  12. Hi, if anyone can help me. I'm learning Phaser and I'm trying to attempt to start and finish a game. I'm trying to load the next level after an enemy sprite is dead and after i have shown a tween. So far I have no luck. Here is the code I have so far. Please advise. Thank you guys. var fireballMatching = fireballMatching || {}; fireballMatching.Game = { init:function(currentLevel){ this.currentLevel = currentLevel || 0; this.map =[ { buttons:[{x:100,y:300,key:"pig"},{x:300,y:300,key:"parrot"}], questionText:{x:100,y:400,text:"Babui"}, rightAnswer:"pig" }, { buttons:[{x:200,y:400,key:"parrot"},{x:300,y:300,key:"pig"}], questionText:{x:100,y:500,text:"Parrot"}, rightAnswer:"parrot" } ]; this.maxLevel=25; }, create:function(){ //variables this.canGoNextLevel = false; this.game.stage.backgroundColor="#8296d1"; this.player = this.game.add.sprite(100,100,"player"); this.player.animations.add("walk",[20,21,22,23,24],5,true); this.player.animations.play("walk"); this.game.physics.arcade.enable(this.player); this.enemies = this.game.add.group(); this.enemies.enableBody = true; this.enemies.createMultiple("3","charizard"); this.bullets = this.game.add.group(); this.bullets.enableBody = true; this.bullets.createMultiple("3","square"); this.createEnemy(); this.buildMap(); }, update:function(){ this.game.physics.arcade.overlap(this.bullets, this.enemies, this.collisionHandler, null, this); this.game.physics.arcade.overlap(this.player, this.bullets, this.collisionHandler, null, this); if(this.enemy.alive==false){ console.log("enemy is dead") //this.canGoNextLevel = true; //this.currentLevel++; //tween the correct display this.showCorrectTween = this.game.add.tween(this.showCorrect).to({y:this.game.world.centerY},1000,"Linear",true); this.showCorrectTween.onComplete.add(function(){ this.goToNextLevel(); },this) } }, createEnemy:function(){ this.enemy = this.enemies.getFirstDead(); if(!this.enemy){ return; }else{ this.enemy.reset(this.game.world.width,50); } this.enemy.body.velocity.x = -100; // Kill the enemy when out of the screen this.enemy.checkWorldBounds = true; this.enemy.outOfBoundsKill = true; this.enemy.scale.setTo(0.5); }, collisionHandler:function(bullet,enemy){ bullet.kill(); enemy.kill(); }, createBullet:function(x,y,direction){ var bullet = this.bullets.getFirstDead(); if(!bullet){ return; }else{ bullet.reset(x,y); } //bullet.body.velocity.x=300; bullet.body.velocity.x=direction; bullet.checkWorldBounds = true; bullet.outOfBoundsKill = true; }, buildMap:function(){ this.levelData = this.map[this.currentLevel]; this.animalButton = this.game.add.group(); var button; this.levelData.buttons.forEach(function(element){ button = this.game.add.sprite(element.x,element.y,element.key); button.anchor.setTo(0.5); button.scale.setTo(0.3); button.inputEnabled = true; this.animalButton.add(button); },this); this.animalButton.forEach(function(element){ element.events.onInputDown.add(this.checkAnswer,this); },this) this.text = this.game.add.text(this.levelData.questionText.x,this.levelData.questionText.y,this.levelData.questionText.text,{font:"21px Arial",fill:"#fff"}); this.showCorrect = this.game.add.text(this.game.world.centerX,this.game.world.height,"CORRECT",{font:"30px Arial",fill:"#fff",align:"center"}); }, checkAnswer:function(sprite){ if(sprite.key==this.levelData.rightAnswer){ console.log("Match"); this.createBullet(this.player.x+30,this.player.y,300); }else{ console.log("no match"); this.createBullet(this.enemy.x-30,this.enemy.y+50,-300); } }, goToNextLevel:function(){ //the answer is right so add 1 to currentLevel this.currentLevel++; console.log(this.currentLevel); this.canGoNextLevel = false; if(this.currentLevel > localStorage.getItem('bestLevel')){ localStorage.setItem('bestLevel', this.currentLevel); } this.game.state.start("game",true,false,this.currentLevel); } };
  13. hello, actually no errors. But I was able to get it to work by doing the following code. But now I ended up having trouble to loop through the "enemyPosition" to be added to the game. I tried forEach loop and had an error. Any advice var levelData=[ { playerPosition:{x:200,y:20}, enemyPosition:[{x:100,y:20},{x:150,y:100}] }, { playerPosition:{x:100,y:200}, enemyPosition:[{x:200,y:20},{x:300,y:100}] }, { playerPosition:{x:150,y:100}, enemyPosition:[{x:100,y:20},{x:150,y:100}] } ]; var gameState = { init:function(currentLevel){ this.currentLevel=this.currentLevel || 0; }, preload:function(){ game.load.image("pokeball","Pokeball.PNG"); game.load.image("mushroom","mushroom.gif"); }, create:function(){ console.log("in create method"); //init enemy this.enemies=this.add.group(); this.scheduleNextEnemy(); this.level=levelData[this.currentLevel]; this.pokeballSprite=this.game.add.sprite(this.level.playerPosition.x,this.level.playerPosition.y,"pokeball"); this.pokeballSprite.scale.setTo(0.3); this.pokeballSprite.inputEnabled = true; this.pokeballSprite.events.onInputDown.add(this.clicked,this); }, update:function(){ if(this.currentLevel==2) { this.currentLevel=-1; } }, clicked:function(){ this.currentLevel++; console.log(this.currentLevel); console.log("i clicked it"); // this.pokeballSprite.x=this.level.playerPosition.x; // this.pokeballSprite.y=this.level.playerPosition.y; this.game.state.start("game",true,false,this.currentLevel); }, scheduleNextEnemy:function(){ var enemyIndex = 0 var enemyData = levelData[enemyIndex].enemyPosition[enemyIndex]; var enemySprite; if(enemyData) { // enemySprite=this.game.add.sprite(enemyData.x,enemyData.y,"mushroom"); // this.enemies.add(enemySprite); enemyData.forEach(function(element,index){ this.game.add.sprite(element.x,element.y,"mushroom"); enemyIndex++; },this); } } }; var game = new Phaser.Game(320,480,Phaser.AUTO); game.state.add("game",gameState); game.state.start("game");
  14. Hello I'm practicing how to load sprite positions from a levelData variable, I'm trying to figure out how to change the position of a sprite with a click. And i'm having trouble figuring it out. The position is not being updated. Please help. Thank you var gameState = { init:function(){ this.currentLevel=0; }, preload:function(){ game.load.image("pokeball","Pokeball.PNG"); }, create:function(){ console.log("in create method"); levelData=[ { playerPosition:{x:200,y:20} }, { playerPosition:{x:100,y:200} } ]; this.level=levelData[this.currentLevel]; this.pokeballSprite=this.game.add.sprite(this.level.playerPosition.x,this.level.playerPosition.y,"pokeball"); this.pokeballSprite.scale.setTo(0.3); this.pokeballSprite.inputEnabled = true; this.pokeballSprite.events.onInputDown.add(this.clicked,this); }, update:function(){ }, clicked:function(){ this.currentLevel++; console.log(this.currentLevel); console.log("i clicked it"); this.pokeballSprite.x=this.level.playerPosition.x; this.pokeballSprite.y=this.level.playerPosition.y; } }; var game = new Phaser.Game(320,480,Phaser.AUTO); game.state.add("game",gameState); game.state.start("game");
  15. Hi So sorry im new to phaser and programming in general. How should a simple loadLevel method be like? I'm learning phaser through a online video tutorial and i happened to just use a load next level code from there. Thank you.