jjwallace

Members
  • Content count

    56
  • Joined

  • Last visited

About jjwallace

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://jjwallace.info
  • Twitter
    jjaywallace
  • Skype
    jjaywallace

Profile Information

  • Gender
  • Location
    Manhattan NYC

Recent Profile Visitors

795 profile views
  1. I know this is an old thread but did this end up leading to anything cool?
  2. Who is at GDC? SLACK: https://html5gdc2017.slack.com/shared_invite/MTQ3MTk1MjQ3MTI0LTE0ODgyMjY4MDMtZjNmMmJjYTkzOA My Email: JJaywallace aaaaattt gmail dooot com
  3. I am at GDC, hit me up jjaywallace aat gmail.com
  4. Hi guys, I am building a multiplayer game in Phaser. I want to add a UI button that builds a QR code so other people can scan the laptop or cell phone and join right into the game. Has any of you implemented QR code generation into any of your games and if so would you like to share how you did it. I will attempt today and post what I end up using.
  5. Hi guys, I am building a multiplayer game in Phaser. I want to add a UI button that builds a QR code so other people can scan the laptop or cell phone and join right into the game. Has any of you implemented QR code generation into any of your games and if so would you like to share how you did it. I will attempt today and post what I end up using.
  6. Hi guys, I am making an app that overlays a png over a video. I want the user to insert their face via webcam or upload. How do i allow user to upload image to phaser? Is it possible to use webcam? I am also building resize image UI, unless there is already one.
  7. Wow 'broadcast.emit()' sounds really cool
  8. When you create a game object do sprites inside its create class automatically become children of that class? Frome Examples: MonsterBunny = function (game, rotateSpeed) { // We call the Phaser.Sprite passing in the game reference // We're giving it a random X/Y position here, just for the sake of this demo - you could also pass the x/y in the constructor Phaser.Sprite.call(this, game, game.world.randomX, game.world.randomY, 'bunny'); this.anchor.setTo(0.5, 0.5); this.rotateSpeed = rotateSpeed; var randomScale = 0.1 + Math.random(); this.scale.setTo(randomScale, randomScale) game.add.existing(this); }; MonsterBunny.prototype = Object.create(Phaser.Sprite.prototype); MonsterBunny.prototype.constructor = MonsterBunny; MonsterBunny.prototype.update = function() { // Automatically called by World.update this.angle += this.rotateSpeed; }; var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.image('bunny', 'assets/sprites/bunny.png'); } function create() { for (var i = 0.1; i < 2; i += 0.1) { new MonsterBunny(game, i); } }
  9. Hi guys, I have a socket.io server running with node.js and i am trying to add players/sprites to my game. I am trying to figure out the best way to do this. As of now i have been working towards using object arrays but i know this is a better way. socket.on('addPlayer',function(data){ var thisID = data;//myArrayID; if(data.id == myID){ }else{ console.log(thisID); pFish[thisID] = this.add.sprite(); pFish[thisID].x = this.world.centerX; pFish[thisID].y = this.world.centerY; pFish[thisID].anchor.setTo(0.5, 0.5); pMouth[thisID] = this.add.sprite(0, 0, 'spMouth'); pMouth[thisID].anchor.setTo(0.5, 1); pMouth[thisID].animations.add('eat'); pMouth[thisID].animations.play('eat', 30, true); pTail[thisID] = this.add.sprite(0, 0, 'spTail'); pTail[thisID].anchor.setTo(0.5, 0); pTail[thisID].animations.add('swim'); pTail[thisID].animations.play('swim', 30, true); pTail[thisID].y = spMouth.y - 12; pFish[thisID].addChild(spMouth[thisID]); pFish[thisID].addChild(spTail[thisID]); pFish[thisID].scale.setTo(0.2, 0.2); pFish[thisID].angle = 110; } }) So what i really want to do is add a player object. This way i can have all 3 sprites inside the object and i can just change the object. Of course i will need to update each player with the corisponding input comming in from the server. Any good examples of how to do this in a OOP method for Phaser.? Example: BasicGame.Game.prototype = { preload: function () { //this.load.script('io', 'node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js'); //console.log('NODE LOADED'); }, create: function () {
  10. Faktori that game looks sweet
  11. Uncaught ReferenceError: map1 is not defined For the life of me cannot find out why map1 is not found var map; var coins; var layer; var sprite; BasicGame.Game3.prototype = { create: function () { console.log('Game Launched'); this.camera.flash('#006600'); this.loadVars() this.loadLevel(); this.renderGame(); //this.input.onDown.add(this.fire, this); }, fire: function () { }, loadVars: function(){ }, loadLevel: function(){ this.load.tilemap('map1', 'assets/lvl/collision_tests.json', null, Phaser.Tilemap.TILED_JSON); this.load.image('ground_1x1', 'assets/tiles/ground_1x1.png'); this.load.image('walls_1x2', 'assets/tiles/walls_1x2.png'); this.load.image('tiles2', 'assets/tiles/tiles2.png'); // this.load.tileset('ground_1x1', '/assets/tiles/ground_1x1.png', 72, 72); // this.load.tileset('walls_1x2', '/assets/tiles/walls_1x2.png', 72, 72); // this.load.tileset('tiles2', '/assets/tiles/tiles2.png', 72, 72); }, renderGame: function() { console.log(map1); map = this.add.tilemap('map1'); <<<<< ERROR IS HERE!!!!!!!!!!!!!!!!!!!! console.log('Map loaded');
  12. You have to unload the instance of the game. You can encapsulate everything and just destroy it if you want. Sometimes with grunt and angular you will get a double instance of your game also its kinda a pain. Have you tried just destroying the instance of the game and loading another one?
  13. Great call kids! I encapsulated the code and it works well! You saved me, my client would have been very unhappy.
  14. Hi, can you please ad my latest game. Missions 1 and 4 are Phaser menu is Angular. http://www.goarmy.com/joinesd.html
  15. Fade from black when you start state (oncreate) this.camera.flash('#000000'); Fade to black from state: startGame: function (pointer) { this.music.stop(); this.camera.fade('#000000'); this.camera.onFadeComplete.add(this.fadeComplete,this); }, fadeComplete: function () { this.state.start('Game'); } Make sure you have the latest version of phaser.