Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


themoonrat last won the day on July 26

themoonrat had the most liked content!

About themoonrat

  • Rank
    Advanced Member
  • Birthday 11/25/1982

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location

Recent Profile Visitors

4274 profile views
  1. https://pixijs.io/examples/#/interaction/custom-hitarea.js
  2. Giving the container a hitArea
  3. hitArea trumps mask which trumps bounds So since you have a mask, that'll be what's checked for interactivity, not the container itself. Give it a hitArea and that'll be used instead of the mask for interactivity.
  4. iPads now support the full screen API, however, if there is a constant interaction with the screen, it pops up a dialogue to make sure you're not unintentionally using a game keyboard. Dismiss it.... and it'll come back again next time it things you've pressed the screen too many times again. Which makes it useless for games. Had to add specific code which was 'use full screen API if it exists unless you are iOS'. If they add iPhone support, I don't trust that they'd also make it useless there.
  5. That's a pretty good shout Ivan. You could also combine the 2.... if your game is state machine based, you could set max fps to 0 when an animation occurs (unlocked fps) and then to 10 when the game is idle. Or, if on battery saving mode, yeah, limits to 30 when animations occuring. @jamesfdickinson "Do most other games just heat up the mobile device?" So, I'd say that's a simple question but not a simple answer. So I'll put some points from my experience. * When developing games, the game designers prioritise how it looks over battery life / phone getting hot. It's easier to g
  6. PixiJS renders when the render function is called. If you're currently using the Application class, then it creates a ticker that automatically calls the render function. You can either not use the Application class or set 'autoStart' to false.
  7. It should be 'fontName' when creating BitmapText. https://pixijs.download/v6.0.0/docs/PIXI.BitmapText.html Docs are correct when describing properties, but example at the top is incorrect. Sorry about that, we will correct soon!
  8. The ticker class within pixi is based upon request animation frame, and that gets paused automatically by the browser when on another tab for efficiency reasons (why have a background tab eating up resources). There's nothing you can do to get around this... you could try animating based off your own version of a ticker that's say, based on setTimeout, but bear in mind it'll still get throttled in the background by most browsers, but at least it'll still run
  9. It's by design, because I may have some children that I want to add to one parent one moment, then to another parent the next. If you went through each child, and called destroy, then that child will automatically remove itself from the parent, so maybe that's the better way to go?
  10. Scoping alienAnim is created in one function, then in gameLoop you try to refer to it, but its not in scope. I'd expect a browser to show a reference error.
  11. For 1. Try setting https://pixijs.download/dev/docs/PIXI.settings.html#FAIL_IF_MAJOR_PERFORMANCE_CAVEAT to false For 2, could you try the latest Dev version please? Or latest release candidate at least, As I know there have been PRs to standardize access to the top level scope, away from window. And that might help in this scenario?
  12. https://pixijs.download/dev/docs/packages_core_src_textures_Texture.ts.html#line266 Texture objects emit an 'update' event So you can do texture.on('update', () => { console.log(texture.valid) });
  13. Ah haha the Megaways chestnut. Still working in slots, so something high level. Hmmm. The main advise would be to not try to make it work in the same visual code as normal reels. They move differently, they work differently. When they are spinning, they all move the same amount of pixels per second, so giving them all that same velocity keeps them lined up there, but when they land, you know that the 'final' position will be adjusted depending on the height. You can either hard bake in these offset positions in, or pre-calculate them. Per size, per index. So imagining a center point
  14. Indeed. Go with whichever way makes it easier for you to manage in code. The issue I see with your first path is that it doesn't play well with wanting to animate symbols bouncing as they land, or animating wins. You may want to consider a custom class to deal with how symbols work rather than relying on a single animated sprite.
  15. The docs show the correct usage parameters to be name, style, options BitmapFont.from("ExampleFont", style, { chars: BitmapFont.NUMERIC }) You have put the chars property with in the style object, when it needs to be in a new object passed in as 3rd parameter.
  • Create New...