• Content Count

  • Joined

  • Last visited

  1. Hello, I've got a problem with my game. On very old devices it's playable with low fps. The player with this device is in advantage, because the game figure's moves are much slower and he can react very quickly. Even if the game is in the hardest mode, this "low fps player" can play the game very easy... So, how can I make the game unplayable on this low HW devices? I think, the main problem is that I've got a game logic/figure moves in game if the player has 4fps, then he has got only 4 chances to figuremoves instead of 60 (60fps). function gameLoop() { requestAnimationFrame(gameLoop); play(); renderer.render(stage);}function play() { if(startGame) { if(startGame && !started) { game.startGame(; started = true; } if(end) { modals(); renderer.plugins.interaction.destroy(); dragon.rotate = dragon.prevRotate; } else { time.text = Math.floor(game.getElapsedTime() / 1000) + 's'; dragon.prevRotate = dragon.rotate; dragon.rotate += game.evalWindStrength(); dragon.rotation += dragon.rotate; dragon.position.x += (dragon.rotation * MOVEMENT_FACTOR); arrow.rotation += dragon.rotate; Math.abs(arrow.rotation) > Math.PI / 4 ? arrow.tint = 0xB31634 : arrow.tint = 0x22205B; // end game if(dragon.position.x < 600 || dragon.position.x > 1320) { end = true; started = false; } } } }
  2. Yes, I destroyed it, but I've got a DOM button element to start game :-) so the second line is called when the user press the start button.
  3. Ok, thanks for hint (interaction manager) ... renderer.plugins.interaction.destroy();renderer.plugins.interaction = new PIXI.interaction.InteractionManager(renderer)But it doesn't works at all ... If I stop the viewport on the canvas, I cannot scroll again
  4. Hello, I've got a simple webpage, where's my mobile game in pixi.js. My problem is that when user doesn't want to play another round, he cannot scroll down on the webpage, because of canvas gathering touch inputs. How can I stop it and enable user's scrolling? Thanks a lot
  5. I've got a lot of code done yet (so I'm not going to change used technologies), it's a business application with gamification elements, so I've managed to not make the whole app in Phaser, because it's not a classic game.
  6. Hi, I am implementing some complex project, I've got an Angular (MEAN.js) for backend and administration, Phaser for game. Now I've got a question about Phaser game state change. Scenario is: Every user has to choose a position for your village on tilemap, so when he is first logged in, Phaser provides him SignUp game state. After he'll click on the map, Village state must be provided to him. Is better solution than my bellow?? //------------- PHASER CODE ----------------------////in create functiongame.input.onDown.add(function() { if(this.success) { //create users village var posX = this.marker.x / 32; var posY = this.marker.y / 32; var userVillage = { 'village': { 'position': { 'tilemapPosX': posX, 'tilemapPosY': posY } } }; scope.createPlayersCastle(userVillage); }}, this); //in update functionif(scope.success) game.state.start('Village'); //because of assync request, it have to be in update function// ------------- PHASER CODE END ----------------- //// ------------- ANGULAR CODE --------------------//$scope.createPlayersCastle = function(playersCastle) { var user = new Users($scope.user); user.village = playersCastle.village; user.$update(function(response) { $scope.success = true; Authentication.user = response; }, function(response) { $scope.error =; });};Is there another (better) way than testing scope.success in update function? (something like when createPlayersCastle success etc.) Thanks
  7. Hi, I've got a following problem. I've got a main index.html template, where is placed: ...<script src="js/game/game.js"></script>...<div ng-view></div>...On the game page, my template looks similar to this: <div class="jumbotron text-center"><h1>Game Page ou Yeah!</h1><div id="game-canvas"></div></div>And at last, in my game.js file is only one row with: var game = new Phaser.Game('100', '100', Phaser.AUTO, 'game-canvas'); My problem lies in that the phaser object is displaying on every page and outside the game-canvas div. I would like to place it only on game page in #game-canvas. How can I do this? Thanks for answers!
  8. Hello, I am trying (unsuccessfully) to connect Phaser with MongoDB, so I have installed Node.js, MongoDB, download Phaser and via npm install grunt and mongoose. What should I do next? How can I read/write some data from/to my database? Thank you very much!
  9. But is it possible in backbone.js to draw whole app in canvas and run a callback when you click on something?
  10. Hello! I've got a dilemma, what should I use. I am creating an application with user logging, email notifications, admin section, game etc., so there will be a lot of different views. Game will be without animations, just simple browser clickable strategy with pop-up dialogs, world map, user inputs, placing building (something like travian, goodgame empire, ...). Because of an app complexity, I have found mean.js stack usefull, but then I found out that AngularJS doesn't work well with canvas I know, that I will use node.js, mongoDB and, but what else?
  11. Thanks for answer, but this application will be my bachelor work, so i'm not going to develop some prototype :-) I was searching in the morning something about my problem again. Which option shoud I choose? phaser + ajax, php, mysql (is it possible?) phaser + websocketsWhat do you recommend?
  12. I say hello to all game developers! I am beginner at game development, so I would like to ask some questions at first. I've got to create multiplayer game for at least 50 players. It will be a game like a travian, goodgame empire, ... etc. so the database server storage is needed Everything in game will be controlled by mouse-clicking on objects, except moving on world map and entering some text in input fields... I've chosen Phaser for developing game on client-side. I would like to avoid future problems so: What database should I use for storing the game datas? Is real-time networking necessary in this case? Which compoments (except Phaser) will I need? ( nodeJS? ...)Thank you for all your tips!