AramCP

Members
  • Content Count

    35
  • Joined

  • Last visited

About AramCP

  • Rank
    Advanced Member
  • Birthday 05/14/1999

Contact Methods

  • Website URL
    http://aramenlared.com/pokemonjs/
  • Twitter
    @CreandoPKMN
  • Skype
    aramllcreandopkmnll

Profile Information

  • Gender
    Male
  • Location
    Spain
  • Interests
    Sex, food and sleeping

Recent Profile Visitors

969 profile views
  1. Hi, why is it wrong? My game is not in landscape mode, and mobile screens have more height than width dont they? But yes you're right, im very confused..
  2. When I started to create my game I wanted to make it look good on my own phone as a start. So I searched for my screen resolution and it is 1920*1080, so I decided to make my game 540 width and 960 height, making it the half from my res to not make the sprites too big and then scale it*2 in phaser. Yesterday I first tried it on my phone using cordova, and I can only see like 30% of my game because it is too big for the screen. And I dont really understand why is that happening.
  3. Hi, I was trying to export my game to android devices, I've never done that so I spent some hours installing all the things cordova requires and trying to figure out how everything works. After I did that I've built my cordova project and I've put all the source code in the www folder. So, when I try to run the game in browser using cordova it works perfectly with this comand: cordova run browser -- --livereload. But when I try to run it in my android device, it only displays the html parts and not the game canvas. Basically its the same thing as when you try to run a phaser game opening index.html instead of running it from localhost. I dont really know if thats something normal or if i did something wrong... So if you help me I would appreciate it a lot.
  4. In my update function I also have the player movement so putting a timer there would make my player move weird (I think). So maybe I can put that timer in the firebullet function? But i dont really know how to do that. I've searched for the Phaser 3 timer and I put this in my create function, but dont know what to do now... timedEvent = this.time.addEvent({ delay: 300, callback: onEvent, callbackScope: this});
  5. Hi, im really new to phaser3, im trying to do a space invaders game, now I was creating the bullets group, and what I wanted to do is that when you press Space, it shoots one bullet, but instead of that, when I press space it keeps creating bullets till I lift the key. This is how my code looks like: function create (){ bullets = this.physics.add.group(); this.spaceKey = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); } function update (){ if (this.spaceKey.isDown){ firebullet(); } function firebullet(){ bullets.create(player.x, 290, 'bullet'); bullets.setVelocityY(-300); }
  6. Could you show me a little example about how to do it? I usually dont need all that help but im so confused.
  7. Maybe that will work for star the game, but for making the player movements, i think it wouldnt, because my player movements look like this right now: if(game.input.activePointer.leftButton.isDown && game.input.activePointer.position.x <= 128){ player.body.velocity.x = -velocityy; player.animations.play('left'); return; } if(game.input.activePointer.leftButton.isDown && game.input.activePointer.position.x >= 128){ player.body.velocity.x = velocityy; player.animations.play('right'); return; } else { player.animations.stop(); player.frame = 3; } As you can see i cant use game.input.onDown.add(this.movementFunction, this); Pff i dont know how im going to solve this, but thanks anyway.
  8. Hi guys, i implemented touch controls for my game, but they dont work on phones, only in computers with a mouse. Im using this: //In create function: game.input.mouse.capture = true; //And update: update: function(){ if(game.input.activePointer.leftButton.isDown){ game.state.start('game'); } }, The only thing that i wanted to do with that is start the game state when you click on the screen, and it works perfectly in my computer, but in my phone does nothing, and it should because in phaser docs it says this: A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen. So guys can anyone explain me whi this isnt working? thanks.
  9. Nice, didnt thought in that, thanks man!
  10. By touching i mean that the pointer is over the sprite body yes, like in this image: http://prnt.sc/dqoza Lets imagine that the red ball is the mouse poiner, so as you can see, he is above the sprite called play.
  11. Hi guys, im implementing touch controls to my game because i want to export it to android in the future, its the first time i do that and i want to know how can i make something that detects if the pointer is colliding with a sprite. I am using this for movements of the player and it works: if(game.input.activePointer.leftButton.isDown && game.input.activePointer.position.x <= 128){ player.body.velocity.x = -velocityy; player.animations.play('left'); return; } And the same for the right. So i want to make something like that, but instead of x position, i want to dettect if the pointer is touching a sprite, any ideas about how can i do that? thanks
  12. Thanks man it works now, btw i will check how works that browser storage.
  13. The second one is exactly what i want, but just for one session
  14. For the moment i only want to store it for one session, im not very experienced programmer and i dont really know how to implement that code you put above in my code :/, i would like to but i dont even understand what the code does, i mean i know what you want to do, but i've never used something like that before, and i preffer to dont use things that i dont know for what they're. But i apreciate the help, this will be usefull for me in the future.
  15. Hi guys i have a game where you collect money, and then a menu, where i want all your money to be shown. I have a var called money, and a var called totalmoney. And i want to store all the money that i gain playing in that variable. For example, i play the game and i collect 20 money. And then this money has to be shown on the menu screen, well thats easy, in the menu screen you create a text saying: game.add.text(128, 0, money+'$') and the money will be shown, but what if i want to play again? I cant do the same thing because the money gained will overwrite the actual money, so guys any idea about what can i do?