Jump to content


  • Content Count

  • Joined

  • Last visited

About jevisan

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hi, thanks for your response. Well since the platforms are in a tilemap layer im not sure how to work with the body of the layer, been running test but with weird results. There's no manual set for the player.y value.
  2. thanks for your response, i've already tried setting Phaser.CANVAS without success. And setting sprite.body.maxVelocity.x does not reduce the flickering, i also tried setting the maxVelocity.y parameter but the flicker remains the same. What i find funny is how tweaking the y velocity and gravity parameters affect the flickering. If you have any other suggestion, it would be really appreciated. edit: would it be because of the x and y positioning of the sprite?
  3. Im having an issue with my game. The player sprite flickers when positioning at certain points in the game. My tile maps are made in tiled editor so no risk of misplacing a tile. The flickering is only vertical and the physical body of the sprite is set a little smaller than the actual sprite which is 32 x 32 while the physical body is 16 x 28. I've also noticed that the flickering varies with the setting of the velocity. As an example, when jumping above a certain platform the sprite flickers when the assigned negative velocity of y and y gravity are assigned certain value, but it doesn'
  4. alright, this info is really well documented, thanks for your response. I'll test this out and then post my results.
  5. Hi , i'm having a difficulty while trying to play sounds on player input. The character is supposed to move and play a footstep sound while doing so. But the sound is really short and end up restarting the sound every call to update which causes it to sound mashed up. Is there any way i could fix this? The code isn't really that much relevant but still: update: function() { if (this.cursors.left.isDown) { this.player.body.velocity.x = -this.player.speed; this.player.animations.play('walk-left'); this.footstepA.play(); } } Oh and i wo
  6. Oh yeah, sorry i didn't reply earlier. Yes i indeed found a similar post where changing the collision/input check solved the issue. It would be interesting to study the issue a bit deeper. Although doing that and checking for blocking in bottom gives me the desired result, i can't just make the touching.down() method to work and the debug display still doesnt recognizes the sprite touching the floor of a tile. Just so it remains documented, the fix was changing the collision and input check like so: update: function () { this.processCollisions(); this.processPlayerInp
  7. oh hell, this solved my problem as well, i was having a similar problem while using tilemaps. I also couldn't have imagined that the checking input - collision order would be relevant. thank you for posting it It still doesnt solve the issue about touching the ground tho, my debug still displays that the sprite is blocked from the bottom but isnt touching the ground, even when its on a collisionable layer.
  8. hi, i just did verify the collision layer, and everything is as it should be. The debug info says the character is being blocked from the bottom but not the top. as additional info, if i dont call the procedures to set up the map, the player can jump just fine. and as the player spawns above the floor, while hes falling he can jump as well. the moment he touches the ground is when hes locked to the ground. srsly this is really odd. also, the multiplying of the collision layer after the map is over could it be because of the resizeworld() call?
  9. Hi, i'm having a problem with the collisions in my game. I'm using tilemap layers the character can jump as long as it's not touching the ground, but the moment it touches the tiles that are set for check for collision, it just seems unable to move upwards. Can move sideways tho. Everything else is loaded and displayed just fine. BasicGame.Game = function (game) {}; BasicGame.Game.prototype = { create: function () { this.game.physics.startSystem(Phaser.Physics.ARCADE); this.setUpInput(); this.setUpMap(); this.setUpPlayer(); }, update: function
  10. thanks for your responses, i already figured i have to tweak the cameraOffset values to make the sprite appear where i want it
  11. thanks, that at least put the sprite in the top right corner of my screen, but its really just confusing as why is behaving like that and why is necessary to set the camera offset. the fixedtocamera value must be enough, right?
  12. I'm trying to develop a HUD for my game but im having an unexpected behavior when setting one of my sprites like this: this.mysprite.fixedToCamera = true; the sprite desapears completely, but commenting the line makes the sprite visible just fine. I havent come up with the reason just yet. any ideas?
  13. I figured it out I dont know why but it seems the adding events function requires the "this" parameter in order to work: this.txt = this.game.add.text( 30, 80, 'text', { font: '20px monospace', fill: '#fff', align: 'left' } ); this.txt.inputEnabled = true; this.txt.events.onInputUp.add( this.initiateState, this ); // <- heres the magic
  14. Greetings, i'm having issues trying to initiate a state by clicking over an option text. I create my options inside a "LevelSelection" state with a function: addMenuOption: function(text, callback) { var text = this.game.add.text( ... ); var onOver = function(target) { ... }; var onOut = function(target) { ... } text.inputEnabled = true; text.events.onInputUp.add(callback); text.events.onInputOver.add(onOver); text.events.onInputOut.add(onOut); } So i can construct levels with difficulty inside create() by just: this.addMenuOption( "easy", function(
  15. oh, thank you so much, this will make my life so much easier. I'll try it right away
  • Create New...