• Content Count

  • Joined

  • Last visited

About Covacs

  • Rank
  • Birthday 08/12/1996

Profile Information

  • Gender

Recent Profile Visitors

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

  1. Covacs

    Weird rotation bug

    I already solved it, it was a gui plugin that i used for in main menu called "EZGUI" i dont know why when he calls to draw corners or images for the gui when i start the game that bug happens. I still dont know why this happen, if i use webgl renderer all goes fine, but im working in a gui just using phaser.make.text to "solve" it. Thanks for your reply :).
  2. Covacs

    Weird rotation bug

    yes, i use scale, but still i dont understand why my sprite sees that weird, im not talking about the scale. In the third image sprite looks well but when i rotate it looks so bad like some parts of the sprite are not where they should be.
  3. When i rotate a sprite i dont know why it looks weird. After rotation Before Is this a common bug or just my code?
  4. Covacs

    GetPixel trouble.

    ty, but my trouble is that i only know of BitmapData getPixel, and because of that i have to draw the renderTexture i want to check in a bitmapData just to use BitmapData.getPixel(). I cant find any RenderTexture.getPixel function. So because of that draw of the entire planet on the bitmapdata to call getPixel funtion i get tons of lag.
  5. Hi there, im develong a game with ink. They are some planets and you shoot ink on them and then you conquer them. I use a temporal bitmapdata do draw render texture planets on it to use bitmapdata getpixel method to get if the planet is completely of a color (or almost). Im wondering if theres a better method because this is so laggy. Theres a way to get a pixel from renderTexture? conquer: function(p) { //I draw planet renderTexture on bmd bitmapdata to allow the getpixel function bmd.draw(p.capaPintura,0,0,(*2),(*2)); //Points of the planet to get pixels. col = []; col[0] = bmd.getPixelRGB(10,; //izquierda - centro col[1] = bmd.getPixelRGB(((*2)-10),; col[2] = bmd.getPixelRGB(,10); //centro - arriba col[3] = bmd.getPixelRGB(,((*2)-10)); if (col[0].rgba === col[1].rgba && col[2].rgba === col[0].rgba && col[0].rgba === col[3].rgba){ var c = 0; if(col[0].rgba === 'rgba(0,0,255,1)') c = 1; var colorPlanet = []; switch(c) { case 0: colorPlanet[0] = 0x550000; //Shadow color colorPlanet[1] = 0xAA0000; //Shadow color2 colorPlanet[2] = 0xFF0000; break; case 1: colorPlanet[0] = 0x000055; colorPlanet[1] = 0x0000AA; colorPlanet[2] = 0x0000FF; break; } //Shadow color pintData.beginFill(colorPlanet[0]); pintData.drawCircle(0, 0,*2); p.capaPintura.renderXY(pintData,,; //Shadow color 2 pintData.beginFill(colorPlanet[1]); pintData.drawCircle(0, 0,*2); p.capaPintura.renderXY(pintData,*1.1,*.9); //Planet color pintData.beginFill(colorPlanet[2]); pintData.drawCircle(0, 0,*2); pintData.endFill(); p.capaPintura.renderXY(pintData,*1.25,*0.75); } } Thats the code, i use it to check if the planet points (col[0], col[1], col[2] and col[3]) are of the same color, then if they are same color y draw on the planet renderTexture (p.capaPintura) colors of the conquerer ink. this is the planet after being conquerer by the blue team, the code works, but i have to use the conquer function once every time a planet is hit by ink or it wont work.. and its so laggy, theres a method to do it just with render textures?, i have to draw the planet renderTexture on bmd just to use getPixel, so if the planet is bigger then bigger is the lag i get because of that draw... .
  6. Ok, now i use renderTextures for paint shoots, but in planets when bullets collide i kill them. And then the ink explode in some random ways to simule real ink (or a nice effect), so i locked the planet canvas (bitmapData) to avoid drawing outside the circle like here using "bitmapData.context.clip()". Is there a way to lock a renderTexture / sprite that way to a shape and then avoidid using bitmapData?
  7. Wow, thanks a lot to all for this help. I solved the problem with the bitmapdata, and now im gonna try using render textures like feudalwars said. (Lets read phaser docs ).
  8. I use bitmapdata because i want to draw to it another images later, like a ink bullet. Im a quite new on this, so i thought bitmapdata was the best. I attach an image to help understanding what im doing. I have my player, whith a gun dat shoots ink and then i when collision occurs i draw it on those planets bitmapdata (each planet have a own bitmapdata and i use context.clip() to dont alow ink paint outside the circle as i read here, the clip code is on the planet constructor, i dont know if it should be there but it works).
  9. Hí there, im trying to create a game where i shoot ink to walls to paint them. But while i tested i saw that game ram usage increases every time i draw in a bitmapdata. The bitmapdata size is 300x300, when i shoot to it i draw a 64x64 (random color circle) temporal bitmapdata on it. I think the bitmapdata is holding data from all drawing i made... but i dont know why. This is the code where i draw: var color = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')'; ink = game.make.bitmapData(64, 64);, 32, 32, color); wall.draw(ink, ink.x-(wall.x-wall.width/2),ink.y-(wall.y-wall.height/2), ink.width,inkp.height); i only have ink and wall, but if i shoot the walllot of times (Sooo many times bacause i networked it to play with my friends) it start taking like 2000mb ram :/. if i just delete those lines the game is fine, i dont know why wall bitmapdata is acumulating data from all draws i do.... Thanks.
  10. Covacs

    Painting Shots

    Ty a lot ^^ i was looking just for dat.
  11. Covacs

    Painting Shots

    Hi, im new here. I have one big doubt, I´m making a game where you shoot ink, and I'd love to staint the floor with it. But I don´t know how. Does anyone know how to do it? Any ideas? Thanks.