Jump to content


  • Content Count

  • Joined

  • Last visited

About diegoalmesp

  • Rank

Contact Methods

  • Twitter
  1. Hello guys! I'm having a big, big bug and I cannot see if it's just my code or a phaser attribute that I'm missing (I'm sure is my code hehe). This is a tic tac toe game, with a multiplayer mode. So you can send your movement to the other player and he can watch the new piece being added in real time. And also, after there are 6 pieces in the board, both players can drag them to keep playing (turn based of course). My problem is: player 1 starts, and only he can see the piece being dragged over the board (I mean: you move the piece in the mouse and the piece is visibly being moved to the new
  2. Thanks for answer! I'm using yeo-man generator and node to work with modules and compile them into one single file. Thanks! that seems to be my problem! One more thing. As you can see on the second file I posted (PlayerVsCpuGame) I was adding stuff with 'this', and I need to access that in the third module (cpu_play_hard.js), should I add those functions to 'this.game' instead? would that be a right approach?. And yes, the idea is in the future to add a multiplayer instance, scores, etc so I need this to be as much "ordered" as posible. Thanks guys!!!
  3. Hello guys! I'm having some "problem" (not really, more a doubt). Working with Node js (firstime) I'am organizing an already made game. My problem is to acces the "game object" outside the modules. So, how would you make the game object (var game = new Phaser.Game(SCREENWIDTH, SCREENHEIGHT, Phaser.CANVAS, 'game') available to all the sub-modules in the app?. I'm sending the game as a parameter but I don't think this is a good approach. This is what I have now: main.js: 'use strict';// var PlayScene = require('./play_scene.js');var GlobalVariables = require('./main_variables.js');va
  4. thanks substandardgaussian ! I tried that but I get the same error. Maybe is the way I'm assigning physics to the sprites?, this is the code in the create function: create: function() { this.handleResize(); // some custom function this.physics.startSystem(Phaser.Physics.ARCADE); this.preloadBG = this.add.sprite(0,0,'generalBG'); this.preloadBG.width = TaTeTi._WIDTH; this.preloadBG.height = TaTeTi._HEIGHT; this.board = this.add.sprite(TaTeTi._WIDTH/2+TaTeTi._RATIO*30,TaTeTi._HEIGHT/2,'board'); this.board.anchor.set(0.5,0.5); this.board.scale.setTo(TaTeTi._RATIO*0.35,TaTeTi._RATIO*0.35);
  5. I'm having that error too, I have no idea what is going on. This happends when I restart the game. I have a restart function in which, after the user clicks on a "restart" button, I reset all the variables (inside an object) and start the game with this.game.state.start("Game"); The full error is: Uncaught TypeError: Cannot read property 'hasOwnProperty' of undefined c.Physics.Arcade.enableBody @ phaser.js:62117 c.Physics.Arcade.enable @ phaser.js:62097 TaTeTi.Game.dragGame @ Game.js:311 TaTeTi.Game.controlPlace @ Game.js:294 TaTeTi.Game.onDown @ Game.js:231 c.SignalBinding.execute @ phaser
  6. Thanks man!! I was looking for something like this, the initial setup is great and clean. Good job!
  • Create New...