jjwallace

Members
  • Content Count

    146
  • Joined

  • Last visited

Everything posted by jjwallace

  1. I have scene that plays a video in the background, when i change scenes i can still hear the video playing. Any clues on how to stop the video or null the objects?
  2. I cannot figure it out, how did you get it to work? I get an error, setFrame is not a function. And then if i default.setFrame it says cannot read setframe of undefined Phaser.Sprite.call(this, game, getRandom(0, game.world.width), getRandom(0, game.world.height), 'spJellyFish'); this.animations.add('default'); this.animations.play('default', 30, true); this.animations.setFrame(getRandom(0, 20), true);
  3. You rock! Gonna play with this thing today.
  4. get the ratio of width vs height and then multiply that
  5. You might want to use this: (see documentation) fadeTo(duration, volume) Fades the volume of this Sound from its current value to the given volume over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (volume) as the second parameter.
  6. Sounds like a scoping issue, have you tried removing game and just using 'this'
  7. Are you referring to concept creation or final product?
  8. Yeah, get an extension for use with development. I use this one, https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn?hl=en
  9. Its because your scripts will be running in index so you will be 'assets/image.png'. Doesn't matter where the js files, just matters where the canvas is located and in this case its located on index.html
  10. is this for a user interface? I only use my own physics so I am not sure if P2 has that function, perhaps there is a way.
  11. Ive never had good luck with these things on mobile, they only work in webGL so canvas will not display them at all. Scaling is weird with them too
  12. The way you did it is how I would do it, it's as lightweight as it gets to my knowledge. Here is tween code in phaser: https://github.com/photonstorm/phaser/search?utf8=✓&q=tween&type=
  13. Very interesting, that is kinda what i have now without the onDestroy. I wish there was a way to completely obliterate it though.
  14. So what i found is that after my fish is eaten (alive=false) he falls to the bottom and off the screen (active=false) so i found even after deleteing the sprite the object is being push farther and farther along the Y. This causes the drawable area or something larger and larger and so i was able to stop the prototype from making these calculations. I still wana destroy it if i can. I tried setting it to null but it hates that.
  15. Why not use a android mini PC? Yes you can also run it on a raspberry pie! Here in NYC we have a club that builds games and cabinets a lot for their shows.
  16. Alex_h, moving options outside target worked! thanks
  17. Hmm normally yah you would use a sprite sheet with two images. So you are loking for some type of layering effect?
  18. I have a fish game and i add fish and remove them using destroy. The game gets slower as more and more fish are eaten and removed and added again. Is there a way to destroy the prototype and everything inside? I checked memory leaks and it seems its the CPU that is having trouble not memory
  19. module.exports = function(grunt){ var gameName = 'game' // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { options: { separator: ';', }, dist: { src: ['src/*.js'], dest: 'build/game.js', }, }, uglify: { my_target: { options: { mangle: { toplevel: true }, compress: true, ie_proof: false }, files: { 'build/game.min.js' : ['build/game.js'] } } }, watch:{ scripts: { files: ['src/*.js'], tasks: ['compile'], } } }); //GRUNT PLUGINS grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); //Concat and Uglify Task grunt.registerTask('compile', ['concat','uglify']); grunt.registerTask('both', function(){ console.log('I am Speaking.'); }); } Hmm, same result......
  20. Thanks Guys, you rock! @Jammy @alex_h
  21. Hey guys, i did uglify on some games inthe past and got the most discusting code over. I now use Grunt concat and uglify but the code isnt ugliy enough. Any suggestions? x2F","\x6F\x70\x65\x6E","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x74\x68\x65\x73\x65\x78\x67\x61\x6D\x65\x2E\x63\x6F\x6D\x2F","\x6D\x75\x74\x65","\x70\x6C\x61\x79\x62\x61\x63\x6B\x52\x61\x74\x65"];BasicGame[_0x4f44[0]]=function(_0x2f67x1){this[_0x4f44[1]]=null;this[_0x4f44[2]];this[_0x4f44[3]];this[_0x4f44[4]];this[_0x4f44[5]];this[_0x4f44[6]];this[_0x4f44[7]];this[_0x4f44[8]];this[_0x4f44[9]];this[_0x4f44[10]];this[_0x4f44[11]];this[_0x4f44[12]];this[_0x4f44[13]];this[_0x4f44[14]];this[_0x4f44[15]];this[_0x4f44[16]];this[_0x4f44[17]];};var scnQuestion= new Array();var scnQuestionBeat= new Array();var scnAnswer1= new Array();var scnAnswer2= new Array();var scnAnswer3= new Array();var scnAnswer4= new Array();var scnAction1= new Array();var
  22. Email publishers that own HTML5 portals or put ads in your game, yeah you can also publish to app stores.
  23. This game you posted 'warlords crystals' is made in pixi which Phaser also runs so you can even make better. Phaser would be a great choice.