Jump to content

Mizukage

Members
  • Content Count

    50
  • Joined

  • Last visited

About Mizukage

  • Rank
    Advanced Member

Recent Profile Visitors

1050 profile views
  1. Hi, Which Javascript based game engine would be best and easiest to make online game based on (maybe) websockets ??
  2. Hi, This is video from my Phaser.js game in early dev stage, ENJOY
  3. I have no idea how to inject your tip from this subject to my code. Nothing change in code
  4. For ex. function battle() { player attack //time for sound and animation enemy attack //time for sound and animation } Now whole battle have 0000001 sec
  5. My battle function after objects collision function fightEngine(gracz, enemy) { //Trying to freze player during fight playerSprite.body.immovable = true; if (this.enemies.hp > 0) { this.enemies.hp -= playerDmg; console.log('Enemy recieved ' + playerDmg + ' dmg'); if (this.enemies.hp <= 0) { var enemyGold = Math.floor(Math.random() * this.enemies.goldMax) + this.enemies.goldMin; //get grind stuff player.gold += e
  6. I cut variables and objects who need to be global, from theGame = function (game) { } and left them in outside Than I just removed all of "This." from game code where I call those global variables. And then I dont need to declare those variables in another js state file.
  7. I need to storage player stats in a global var / obj because after chenge the game state normal var will be flushed. Im not sure where to make global var Boot.js var boot = function(game){}; boot.prototype = { preload: function(){ }, create: function(){ this.game.state.start("Preload"); }}Preload.js var preload = function (game) {}preload.prototype = { preload: function () { I cute thise code..... }, create: function () { this.game.state.start("TheGame"); }}TheGame.js var theGame = function (game) { this.player = { name: 'Kirito', lvl: 1,
  8. Problem still exist please help me with that
  9. Thanks for tip, i make this menu ui/ux and working fine characterMenu: function () { this.menuOn = true; playerMenu = this.game.add.sprite(this.game.camera.x + 30, this.game.camera.y + 120, 'playerMenu'); close = this.game.add.button(this.game.camera.x + 215, this.game.camera.y + 123, "close", this.characterMenuClose, this); menuTextWeapon = this.game.add.text(this.game.camera.x + 40, this.game.camera.y + 415, "Weapon - "+this.player.weapon.name, { font: "18px Arial", fill: "#000", align: "center" });
  10. I didn't find how Phaser support this windows. When player click on button 'equipment' this eq window will be on screen until player close. It can be image on button click fadeIn and fadeOut, but must be some better way to do this.
  11. game: function() this.enemies = { name: 'Retard Farmer - [very week]', hp: 50, attack: Math.floor(Math.random() * 8) + 5, exp: 50, gold: 5 }Here enemies is a object create: function() enemies = this.game.add.group(); for (var i = 0; i < 10; i++) { enemies.create(360 + Math.random() * 600, 300 + Math.random() * 600, 'monsterLvl1'); enemies.scale.setTo(1.4); }So here I have enemies, but they are group and dont have a sprites or body (problem with immovable = true;) update: function ()
  12. Greate job. You should make it bigger product
×
×
  • Create New...