Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by totallybueno

  1. I´m getting the same problem and I´m not being able to fix it, did you find any solution to this? Access to XMLHttpRequest at 'https://cdn.*********.png?v=1.0' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  2. How can you set up CORS for that images? I´m not being able to load some images from a CDN when using Phaser, they load correctly with a <img> tag in a html file...
  3. Same problem here, did you find any solution?
  4. Yes, I didn´t want this solution but finally I extended Sprite instead of Group and attached manually the other elements instead of into a group. Not the best solution probably but at least I can continue with the game Thanks @samme
  5. Maybe I´m missing something, but still same result. Now I have the Ribbon prefab like this: Ribbon = function (game, posX, posY) { // //other code // Phaser.Group.call(this, game); this.myBackground = this.create(this.posX, this.posY, "my-background"); game.physics.arcade.enable(this.myBackground)//line you told me // //and more code // }; But as I said, still same result. Should I add something when I creat the item in the Game.js?
  6. Hi there, I´m having a few problems with something related with a group and Arcade physics, let me explain. I have a prefab extending the normal group, the idea is that I need to add some graphics here in differente layers and one of them, the background should act the de physics sprite, I mean, this one should be the one detecting collisions, the rest of the graphics would be just that, graphics. I create this item like this: Ribbon = function (game, posX, posY) { // //other code // Phaser.Group.call(this, game); this.myBackground = this.create(this.posX, th
  7. I thought I´d be an easier way to do it... anyway, for my game I think I´m gonna be able to use hero.body.checkCollision.up = false... I still don´t get why tilesArray[i].collideDown=false is not working as I was expecting.
  8. Hi, I have this basic platform game and I would like the hero to jump through the platforms, from underneath to the top of the platform, but I´m not being able to do that and the head of the hero collides with the bottom of the platform even when I set the collideDown of that tile (actually, to all the tiles of that layer) to false. What am I missing? this.platformsLayer = this.map.createLayer("platforms") this.map.setCollisionBetween(1,50, true, "platforms") var tilesArray = this.platformsLayer.getTiles(0,0,this.game.world.width, this.game.world.height) for(var i=0;i<
  9. Hi there, I have a Phaser game almost finished and my client wants to make a "special" version to play in desktop with a phone synced to use it as a controller (check the provided link to see what I´m talking about). I need someone to make this part, only the sync part. The game is almost finished and I just need someone to make the sync part, I mean, I just need someone able to comunicate a phone with the desktop game. I never did this before and I prefer if someone with more experience with this makes it. So, if you´re interested, DM me and we´ll talk about it. You can make it re
  10. Awesome, that fixed the problem! What´s the difference between those two calls? Well, I´m gonna check the docs, I guess I´ll find info there Thanks for helping me with this!
  11. Hi there, I´m a bit confused about some core concepts with Arcade Physics... I´ll try to explain it because actually it´s a little bit confusing even to understand what´s going on. The thing is that I have a game where the main character is falling like if he jumps from the top of a building and when I init that sprite, I just apply a gravity to him this.prota.body.gravity.y = 700 Then, on both sides of the game I have some mushrooms and some black-weird-plant-arms and when you hit them, I want the player to receive like an impulse, I mean, I want the player to "be launched like a
  12. I don´t have any problem pausing the game, that´s ok, the problem I have (not really related with Phaser) is how to deal with the canvas when it loses/gains focus...
  13. Hi there, everytime I have to make a game that pauses when the canvas loses the focus (jquery blur()) I struggle with lines and lines of stupid lines of javascript and I´m pretty sure there´s something simpler than my way to do that. I have a normal sprite on the game that pauses/unpauses the game, and I would like to do exactly the same when the canvas focus/blur... how do you guys handle this?
  14. I guess if they´re not renderable I´ll have less cpu/ram needed, right? Thanks for the tip @samme
  15. I just uploaded a demo to http://totallybueno.com/demo/falling/ When I create the game, that tag is Phaser.AUTO, I tried with Phaser.WEBGL too but I have the same result... so fustrating... And it seems with Phaser.CANVAS that performance is really good, thanks for the tip @totor. I´m just curious, if someone can explain here why this happens, would be really nice... anyway, it´s working
  16. Hi there, I have a "more o less basic" game and now that is almost finished, I realized that the performance on iOS is ridiculously bad. Running the game on old Android devices I get easyly 60 fps, everything runs smoothly, but the same game, running on an iPhone 7 (and obviusly on older devices) it´s gettting 15 fps, being and easy game on a much more powerfull device (good one, Apple). The thing is, I read that maybe tilesprites (I´m using one) could "help" to this poor performance, but this is not the case, even without that tilesprite I´m still getting 15 fps... Can any
  17. Should these two items circled botton left (they´re in the same group) fire that onOverlap function? They´re not firing it... I don´t know if it´s because of the body size (not the whole sprite as you can see with the render rectangle) of because I can´t check group vs group this way...
  18. Is there a way to determine the actual objects overlapping instead of the group? I mean, in the callback function, I´d like to know which two items are overlapping to destroy one of them as if I thing1.destroy() I destroy de whole group, or do I need to loop inside the callback to check the items overlapping?
  19. Hi there, I have two groups, each one with 50 item placed randomly in the stage. I need to check if any of the items of group1 overlaps with any of the items of group2 (and then, destroy it) but I´m doing something wrong as all the elements of group 2 are being destroyed, it´s like is checking object1 with the whole group2... how can I check items by item? I have this code (not working properly) function checkOverlaps(group1, group2){ group1.forEachAlive(function(obj1){ group2.forEachAlive(function(obj2){ var boundsA = obj1.getBounds(); var boundsB
  20. @samme thanks, that´s what I needed! The bounce is now working properly, even with a bouce.y = 1 I can see a tiny tiny movement, I guess something else is affecting this, but anyway, the platform thing is working and with a player.body.velocity.y =-500 y can make that rebound effect... so, fixed, thanks for your help
  21. Hahahaha, ok, well, I thought you knew Phaser as this is on the Phaser forum
  22. With Arcade Physics? I don´t see that on the docs...
  23. Hi there, I have a basic game where the player jumps from a building and must fall into different platforms during the falling to avoid crashing directly with the ground. The thing is that those platforms should have some bounce, I mean, when the player falls into those platforms, it should rebound like if they were some kind of elastic stuff... the problem is that as the platform has body.immovable = true it seems that body.bounce is not working at all, and I can´t apply body.bounce to the player because he should rebound only on those platforms, not on every single object.
  • Create New...