All Activity

This stream auto-updates     

  1. Past hour
  2. Oh, thanks, i didnt get it! > therefore, the hitArea that I need to set needs to be rotated? rotate container initially. if you want object to be not rotated afterwards, well, rotate it in other direction. hitArea is measured in local coordinates Here's the code of hitArea that is the same as sprite: container.position.set(...) container.rotation = Math.PI/10; // a bit sprite.anchor.set(0.5); //usually sprite.scale.set(...);//whatever size you want, same as sprite.width = something container.addChild(sprite); container.interactiveChildren = false; // turn off sprite interaction container.hitArea = new PIXI.Rectangle(-sprite.width/2, -sprite.height/2, sprite.width, sprite.height); //that's for anchor 0.5 and position 0. // Your sprite local position and anchor can be different, you have to edit in that case. // (sprite.position.x - sprite.anchor.x * sprite.width, sprite.position.y - sprite.anchor.y * sprite.height); // also sprite.width is actually texture.width * sprite.scale.x if sprite has no children // if it has children - you'll have a problem, use texture.width directly!
  3. Today
  4. My problem has been that the displamentFilter effect hasn't been scaling to the size of the displacementSprite, it's been scaling to the size of the entire container that the filter is added to. I'm probably doing something wrong! I will check my code and report back
  5. Sir I used this plugin and It was scrolling on the laptop browser but not on the mobile.. what can I do else? help please
  6. Hi is there any way to enable mobile scrolling in phaser 2
  7. Can you check if there is a fbapp-config.json file in the root of your zip file? see also: https://developers.facebook.com/docs/games/instant-games/bundle-config
  8. Congratulations to gammafp & veryeviltomato! Great job and thank you. I'm just trying and learning, but I imagine the amount of coding behind this auto-atlas. Best wishes and regards!
  9. Rubydesic

    Hitboxes

    Sorry to be rude, but I do not know if you have gotten a notification for my message so I am quoting this
  10. I'm starting to think this way, too. Kind of came in with the idea that the pixel fonts would be consistent on every device, but SystemText is just..more..convenient. Have to use it for my next project, as I have to be flexible for too many character sets.
  11. Greetings! Here are this week’s new free music tracks: On my Fantasy 9 page: AFTER THE FOREST BATTLE – (Looping) https://soundimage.org/fantasy-9/ On Puzzle Music 5 page: COSMIC PUZZLE – (Looping) https://soundimage.org/puzzle-music-5/ And on my Sci-Fi 8 page: MACHINE EVOLUTION – (Looping) https://soundimage.org/sci-fi-8/ Enjoy…and have a great rest of your week!
  12. @Antriel, How are you setting the scale and position of your objects to update on resize? Do you have a working example we can check out? Also, what version of Phaser are you using here? Thanks!
  13. What about when you need to drag-n-drop an entire scene, (e.g. a map for panning), not an individual object?
  14. Yesterday
  15. I tested it again and now there is no error. Regards.
  16. Here it is, a small System Text plugin with 3 features: 1) typewriter effect 2) strokeColor (border) 3) example how to use gradient colors with systemText in Panda. Please note that I included a custom font in the project to achieve the second and third example. See the demo project for files ans details at: https://github.com/stephanvermeire/systemtextplugin Quick example (typewrite effect not working here because it is a static image): systemtextplugin.js game.module( 'plugin.systemtextplugin' ) .require( 'engine.renderer.text' ) .body(function() { game.SystemText.inject({ /** Enable typewriter-effect @default false **/ typing_effect: false, i: 1, /** StrokeColor of the text. @property {String} color @default #000 **/ strokeColor: '#000', /** Width of the text stroke. @property {Number} color @default 0 **/ lineWidth: 0, _renderCanvas: function(context) { var wt = this._worldTransform; context.globalAlpha = this._worldAlpha; context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * game.scale, (wt.ty + this.size) * game.scale); context.fillStyle = this.color; context.font = this.size * game.scale + 'px ' + this.font; context.textAlign = this.align; context.strokeStyle = this.strokeColor; context.lineWidth = this.lineWidth; if(this.text === undefined) return; var lines; if(this.typing_effect){ lines = String(this.text.substr(0, this.i)).split('\n'); if(this.i <= this.text.length){ this.i++; } }else{ lines = this.text.split('\n'); } for (var i = 0; i<lines.length; i++){ context.fillText(lines[i], 0, (i*this.size) ); if(this.lineWidth){ context.strokeText(lines[i], 0, (i*this.size)); } } } }); }); main.js game.module( 'game.main' ) .require( 'plugin.systemtextplugin' ) .body(function () { game.createScene('Main', { init: function () { //typewriter demo new game.SystemText('Lorem ipsum dolor sit amet,\nconsectetuer adipiscing elit.\nSed posuere interdum sem.', { size: 50, x: 0, y: 0, typing_effect: true, }).addTo(this.stage); //custom font with strokeColor new game.SystemText('Lorem ipsum dolor sit amet,', { font: 'SoSweetHoney', // align: 'left', color: '#2d963b', strokeColor: '#a2e65e', lineWidth: 2, size: 50, x: 0, y: 300, }).addTo(this.stage); //gradient font color const color = game.renderer.context.createLinearGradient(0, 0, game.width, 0); color.addColorStop(0, "#f47c35"); color.addColorStop(1, "#e6e650"); const strokeColor = game.renderer.context.createLinearGradient(0, 0, game.width, 0); strokeColor.addColorStop(0, "#a2e65e"); strokeColor.addColorStop(1, "#3577ca"); let test = new game.SystemText('Lorem ipsum dolor sit amet!', { font: 'SoSweetHoney', lineWidth: 2, size: 50, x: 0, y: 500, }).addTo(this.stage); test.color = color; test.strokeColor = strokeColor; } }); }); index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Panda 2 - SystemText</title> <link rel="stylesheet" href="style.css" media="all" /> <script type="text/javascript" src="src/engine/core.js"></script> <script type="text/javascript" src="src/game/config.js"></script> <script type="text/javascript" src="src/game/main.js"></script> </head> <body> </body> </html> Note that you have to include the fonts directory as well as the style.css file in your project to make the custom font work!
  17. (Disclaimer: I have posted a similar post on the new Phaser 3 forum, but as I crucially need feedback I'm spreading it around) I'm presenting Westward, a collaborative MMORPG where the players have organize themselves to settle a continent, continuously expanding westward in order to grow and conquering an hostile civilization in the process. The game can be played here and you can check this page for more information. I’m also writing regular dev log. There are one or two screenshots at the end of this post to give you an idea of the style. The first basic version of the game is finished and working, but this is still very much work in progress as the gameplay and the visuals are still basic and a far cry from what I have in mind, and surely there are some bugs left. However, it is advanced enough to be shown around and at this stage I crucially need feedback to steer the development in the right direction. Therefore, I invite you to as much as possible point out bugs, indicate what is not fun or annoying, what you think could be improved, but also what you like, if anything. Below the game canvas are a few social links (Slack & Discord) if you want to follow the development, support me and/or give feedback. These channels are still a bit empty, feel free to make that change. Development has been going on in my free time for more than 2 years and started with Phaser 2 but moved to Phaser 3 as soon as it was released and has grown with it.
  18. Great games. For a primary school child will be very helpful.
  19. I think it is best to put this into a separate plugin so you can add this feature (and the extra kbs) if you need the feature. Shall I give it a go? I have already bundled a couple of other SystemText addons into a personal plugin and this feature would be a nice addition. I can publish the plugin on this forum. I really prefer SystemText over(image based) Text, it is so much more flexibel!
  20. It is out-of-the-box Whats the problem? I just didnt understand what you want to do and assumed we have problem with scaling > Ah, thanks Ivan!! I love the "Wait for you to solve it" solution I write it to encourage people to solve everything themselves. Its a bitter option.
  21. Ah, thanks Ivan!! I love the "Wait for you to solve it" solution So, is a demo like this not currently possible in Pixi v5 out-of-the-box? https://pixijs.io/examples/#/filters-basic/displacement-map-crawlies.js
  22. Female Concept art design If interested don't PM, send your requests or hellos to info@deathstalkerentertainment.com Skype: deathstalkerarts
  23. Now its broken again, I believe facebook changed somethings drastically. @enpu ...
  24. Hey Guys try my new game please Mr TONI https://www.crazygames.com/game/mr-toni-miamii-city
  25. @Dilantha Why did you split it? Now everything is harder Its very hard to split or join geometries, calculate intersections and unions, pixi does not have boolean 2D shape library inside. Basically, if you have two sprites you want to mask - put them into mask and mask the container. Alternatively, generate a texture from them (renderer.generateTexture) and use `Graphics.beginTextureFill` with that texture. Yes, the problem can be solved on newbie level, but it will take effort. Sometimes people ask first question that is solvable only if you already know big parts of PixiJS sources, but that's not the case. You can do it, but its not a cake walk for newbie.
  26. Hi, the editor does not provide built-in support for code obfuscation or any other "build" tool.
  1. Load more activity