jjwallace

Members
  • Content Count

    143
  • Joined

  • Last visited

Everything posted by jjwallace

  1. jjwallace

    How much faster is phaser3?

    Hi guys, I have built a bunch of games in Phaser2 and now i am working with PixiJs since we can render 20,000 + entities on the screen and animated them. PixiJS lacks a lot of features. So, How fast is Phaser3? Does it render as many objects as PixiJS 4? Anyone have experience using all 3?
  2. jjwallace

    How much faster is phaser3?

    Wow, Really neat stuff, good job @themoonrat ! ~
  3. jjwallace

    How much faster is phaser3?

    Hmm, that looks pretty fast, maybe i will try out building a prototype. Do sprites off the screen also get rendered or are these just data until they enter into the fillrate? (i am probably not saying that right)
  4. I am going to be starting a RTS game in Pixi4JS or Phaser3, I am looking for inspiration or artist that might be interested in working on a new project. My tech plan: NodeJS, SocketIO, ES6, Webpack, Pixi5/ Phaser3
  5. I come from the Phaser world but have recently been working on a new application using PixiJS v4.5+ I don't like the pixiJS sprite sheet example and really would like to find a solution to handleing sprite animations much like phaser2 had. I have taken a look at smoothie. I use tweenMax for tweens. What animation libraries do you use for sprites?
  6. Is it possible to just drop in a pixi application into a component without using pixi-react or anything like this? It is hard to find a solution to this. I am not really into declaritive style for building out this application...
  7. jjwallace

    Using React in Pixi? Pixi in React?

    I am building an app using Pixi as my main render. I am also using D3 and I want to use react as my UI manager. How is the best way to go about this? I am already running Pixi with Webpack and ES6
  8. jjwallace

    Using React in Pixi? Pixi in React?

    closest thing i found so far https://www.protectator.ch/post/pixijs-v4-in-a-react-component
  9. jjwallace

    Using React in Pixi? Pixi in React?

    Cool stuff, I will look into this. Have you seen any projects utilizing multiple frameworks?
  10. Thanks @ivan.popelyshev , yeah i tried these, none are what im looking for. Just React and Pixi in ES6, no typescript shananagans. I am just gonna have to build my own. ok here we go. Declarative style coding is horrible, front end devs be messing with crap and polluting stuff
  11. I am trying to send the players score to the challenged player after a round of my game Sea Frenzy on FB. It seems the code they gave doesn't work. I have implemented everything they have asked for. See documentation link below. // This will post a custom update. If the game is played in a messenger // chat thread, this will post a message into the thread with the specified // image and text message. And when people launch the game from this // message, those game sessions will be able to access the specified blob // of data through FBInstant.getEntryPointData(). FBInstant.updateAsync({ action: 'CUSTOM', cta: 'Play', image: base64Picture, text: { default: 'Edgar just played BASH for 9 points!', localizations: { en_US: 'Edgar just played BASH for 9 points!', pt_BR: 'Edgar jogou BASH por 9 pontos!', } } template: 'WORD_PLAYED', data: { myReplayData: '...' }, strategy: 'IMMEDIATE', notification: 'NO_PUSH', }).then(function() { console.log('Message was sent successfully'); }); Documentation Here: https://developers.facebook.com/docs/games/instant-games/rich-gameplay-features
  12. Do you guys have an example of what you do for your games?
  13. jjwallace

    too many assets?

    30 mb is huge! Also remember that images have a max pixel size for browsers
  14. jjwallace

    Phaser Manifest Loader

    does it load json files for levels?
  15. jjwallace

    Sprite width after zoom?

    sprite.width ? or scaleRatio = window.devicePixelRatio; ?
  16. jjwallace

    Increase the velocity of tilePosition

    I have no idea how to use tile sprite, I have been trying to learn, do you have any resources so i can try implementing it? I am trying to make a block blasting game: https://jjwallace.github.io/Hedgehog-Blast/build/index.html
  17. jjwallace

    Select Image and set it to Sprite

    Here are some hints. In Index or HTML: <img id="sealogo" src="/assets/sprite/ig_logo.png" style="display: none;"> In Phaser: var base64Picture = document.getElementById("sealogo").src;
  18. I am completely lost when it comes to how to use tile maps. I want to have blocks and shoot them with balls, each ball hit subtracts 1 from the text overlaying the tile block. Is there a way to overlay a text on every block? do i need to write my own tile map engine for this? Any samples of what im trying to build?
  19. jjwallace

    Text on tiles, tilemap brick blasters

    got this working with regular sprites. Going to try and load a json from there and have levels. Would still be interested in how to get seperate sprites built from a map itself.
  20. jjwallace

    loading Jsons with Phaser Loader

    Hi guys, i seem to have some issues with loading jsons with webpack json loader. Loader Found here: https://github.com/mattcolman/phaser-manifest-loader I have added some code to allow for json to load but it seems not to be working. I tried just regular loading the json and got a 404 not found error.
  21. I have a main class that attempts to make two groups collide. The items are added to the group in different classes but it seems not collision occures. Main Class: import DragObj from '../objects/drag.obj'; import Block from '../objects/block'; class MainState extends Phaser.State { preload() { } create() { // Set-up the physics body this.game.physics.startSystem(Phaser.Physics.ARCADE); this.game.ballGroup = this.game.add.group(); this.game.blockGroup = this.game.add.group(); //this.game.physics.arcade.gravity.y = 200; this.game.ballGroup.enableBody = true; this.game.blockGroup.enableBody = true; // this.game.ballGroup.bounce.setTo(1); // this.game.blockGroup.bounce.setTo(1); this.game.physics.arcade.enable(this.game.ballGroup); this.game.physics.arcade.enable(this.game.blockGroup); this.game.physics.arcade.collide(this.game.ballGroup, this.game.blockGroup); var myBlock = new Block(this.game, this.game.world.centerX, this.game.world.centerY, 'block', 10); var dragObject = new DragObj(this.game, this.game.world.centerX, this.game.world.height); } } export default MainState; BLOCKS class Block extends Phaser.Sprite { constructor(game, x, y, key, health) { super(game, x, y, key, health); this.game.stage.addChild(this); //this.animations.add('ani'); //this.animations.play('ani', 30, true); this.anchor.setTo(0, 0); game.physics.arcade.enable(this); this.body.bounce.set(1); this.body.immovable = true; //var sfxHit = game.add.audio('ball_hit', 100, false); this.game.blockGroup.add(this); function hitWorldBounds (sprite) { //sfxHit.play(); // Play the flash animation. // // Sometimes you'll notice it doesn't always start, i.e. if the sprite // collides with the world bounds quickly before the previous 'flash' // has completed. This is just because the animation needs to complete // before playing again, the event did actually occur twice. //sprite.play('ani'); } // And then listen for it //this.body.onWorldBounds.add(hitWorldBounds, this); } update() { //this.x ++; } } export default Block; Balls class Ball extends Phaser.Sprite { constructor(game, x, y, key, angle, speed) { super(game, x, y, key); this.game.stage.addChild(this); this.animations.add('ani'); //this.animations.play('ani', 30, true); this.anchor.setTo(0.5, 0.5); game.physics.arcade.enable(this); this.angle = angle; game.physics.arcade.velocityFromAngle(angle, speed, this.body.velocity); this.body.bounce.set(1); this.body.collideWorldBounds = true; this.body.onWorldBounds = new Phaser.Signal(); var sfxHit = game.add.audio('ball_hit', 100, false); game.ballGroup.add(this); //game.ballGroup.add(this); function hitWorldBounds (sprite) { //sfxHit.play(); sprite.play('ani'); } // And then listen for it this.body.onWorldBounds.add(hitWorldBounds, this); } update() { //this.x ++; } } export default Ball;
  22. jjwallace

    Collision not working with different classes

    Moved the collide to update function, everything is working now!
  23. jjwallace

    stop video when changing state

    I have scene that plays a video in the background, when i change scenes i can still hear the video playing. Any clues on how to stop the video or null the objects?
  24. jjwallace

    Playing animation from certain frame, then loopong

    I cannot figure it out, how did you get it to work? I get an error, setFrame is not a function. And then if i default.setFrame it says cannot read setframe of undefined Phaser.Sprite.call(this, game, getRandom(0, game.world.width), getRandom(0, game.world.height), 'spJellyFish'); this.animations.add('default'); this.animations.play('default', 30, true); this.animations.setFrame(getRandom(0, 20), true);
  25. jjwallace

    Generic platformer + ES6 / Webpack 4 boilerplate

    You rock! Gonna play with this thing today.