• Content Count

  • Joined

  • Last visited

  1. Rich you wouldn't happen to know why my sprite sometimes falls through the tiles upon state change would you? I asked about it last week but so far I have not found a fix. Cheers
  2. My games a bit buggy and is a work in progress but could someone please test it on Kongregate in its current state and let me know if it throws the error with the level not loading correctly? It works fine on my laptop but as I mentioned not on the other one. It's available at: http://www.kongregate.com/games/Kobi6/kobot Thank you.
  3. The other computer is using chrome which is what my computer is using. The audio files have loaded and there are no errors in the console. Also I have tested it and the speakers are working. I'm guessing the computer maybe just isn't compatible with it? One of my sprites is about 60 x 64 pixels, should it ideally be 64 x 64 pixels to fit in with the power-of-two then?
  4. The game level loads on the other laptop when it is set to Canvas, however the game runs fairly badly and seems a bit buggy. Also no sounds are played. Could this be due to the specs of that device?
  5. Thank you for your comment. So would it be possible to get the game to run on that low end device? I want the game to run on as many different set ups as possible. There isn't a maximum or recommended size for a JSON / tile map is there? I have just double checked and all of the images I am using are 1024 x 512 pixels except for sprites, so I am not sure where the error is occurring? I will test it in a minute in Canvas and see what happens.
  6. Hello, I would really appreciate some help. I am making a phaser game for a university project and have uploaded the current progress of the game to Kongregate. The game works fine on my laptop but I tried it on another laptop and it errors. The initial menu and loading screen loads and then when the game starts the sprites show but the tiles do not and there is a black background. On the console it says: webGL:invalid_value: texImage2d: width or height out of range. And that the texture is not a power of two. I'm assuming I may have to resize some of the assets I have used? I am confused as to why the game works on my laptop though. Also two players have scores on the leader board which I assume means the game worked for them also? Any help would be greatly appreciated. Thank you.
  7. Hey, I have implemented a method to control enemy movement in a platform game. I have done it pretty sketchy and i'm wondering what would be a better / 'proper' way of doing it. Essentially it makes an enemy sprite walk to the end of a platform and when the sprite collides with the corner tile (before falling off the edge of the platform) the sprite then turns around and walks towards the other end of the platform and vice versa. I found that if I made the sprite turn as soon as it hit the corner tile that it would constantly go backwards and forwards on the spot because it was updating so quickly so I made it so it could only turn after a certain amount of time of previously turning. I know this solution is pretty sketchy but would be grateful if anyone could give me ideas as to a better way of doing this. Thank you. this.game.physics.collide(bird, layer, this.enemyTurn, null, this);enemyTurn: function (enemyHit, layerHit) { if(layerHit.tile.index == 25 || layerHit.tile.index == 35 || layerHit.tile.index == 34 || layerHit.tile.index == 54 || layerHit.tile.index == 28 || layerHit.tile.index == 38 || layerHit.tile.index == 44 || layerHit.tile.index == 10) { if (enemyHit.body.velocity.x == forward && allowedToTurn == true) { timeWhenTurned = this.game.time.now; allowedToTurn = false; enemyHit.body.velocity.x = backwards; } else if (enemyHit.body.velocity.x == backwards && allowedToTurn == true) { timeWhenTurned = this.game.time.now; allowedToTurn = false; enemyHit.body.velocity.x = forward; } } timeSinceTurned = this.game.time.elapsedSecondsSince(timeWhenTurned); if(timeSinceTurned > 0.06) { allowedToTurn = true; } },
  8. Oh but I have changed the body of the sprite if that makes any difference? player.body.setSize(22, 60, 0, 0);
  9. The tiles are 32 x 32 pixels. The sprite is 61 x 64 pixels.
  10. No I have it dropping from about 5 pixels or so above the tile onto the tile. Could this be why it is happening?
  11. Hello, I have nearly finished a platform game I have made in Phaser. The game runs mostly fine, however sometimes when the state is changed to a new level and the player sprite is created, it falls through the floor tile, hence losing a life and restarting the level. I'm not sure why this is and it doesn't happen very often but does occasionally which seems odd. I would be grateful for any info as to what might be causing this. Cheers!
  12. zxxz

    Default drag

    Hey I have a feature where a sprites velocity becomes the velocity of a moving platform when landing on it which worked fine. I have now however tweaked some of the controls including the drag.x and now when riding the platform the sprite slips off? I have also tried to change the drag to 0 when the sprite is on the platform but I get he same thing happen? Not sure of there is a way to essentially turn drag off or to whatever it is initially? Thanks
  13. zxxz

    Collision question

    Thank you, do you know how that may be possible? Looking at the docs I can't see how to do this? Thanks!
  14. zxxz

    Collision question

    Hello, I have created a platform game where the main character can run in front of crates and then jump up to land on top of them as seen in Mario etc. I have tried setting the relevant tiles to only collide on the top face, however this leads to the main character getting sucked up on top of the crate whenever any part of his body collides with the top of the crate. So if you are stood in front of the crate, jump, half of the body goes through the top of the crate as expected before the sprite is pushed on top of the crate. I have tried a few ways of getting around this such as changing the collision of the crate tiles, judging on whether the bottom of the sprite is above the crate but have not managed to get this working. Any help would be appreciated, cheers!