Jump to content

themoonrat

Members
  • Content Count

    310
  • Joined

  • Last visited

  • Days Won

    4

themoonrat last won the day on August 12 2020

themoonrat had the most liked content!

About themoonrat

  • Rank
    Advanced Member
  • Birthday 11/25/1982

Contact Methods

  • Website URL
    http://www.moonrat.co.uk
  • Twitter
    themoonrat

Profile Information

  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

4118 profile views
  1. 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!
  2. 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
  3. 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?
  4. 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.
  5. 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?
  6. 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) });
  7. 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
  8. 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.
  9. 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.
  10. The thing with custom fonts, is that, once loaded, the first instance being used doesn't work, but after that it does. So if you're creating text before ffo is finished, or during it finishing, then I'd totally expect to see it not working on text drawn at one time compared to text created / drawn at another time. If you want to 'force' text to redraw, call updateText on it. But that's a brute force method rather than solving the underlying issue.
  11. I recommend using https://github.com/bramstein/fontfaceobserver to load custom fonts before creating pixi text objects
  12. No downsides that I know of, or on games I've released. https://github.com/pixijs/pixi.js/issues/6853 got the potential to make it true by default for pixi V6, and examples for other libs like three where a certain setting to WebGL is just slow on certain intel gpus
  13. Have you tried setting transparency to true when creating the renderer? A lot of people have noted it gives a big boost to performance, for some reason, with Intel GPUs. By default it is false
  14. The very latest version of pixi let's you dynamically create a Bitmap Font, which I think would work really well here. https://pixijs.download/dev/docs/PIXI.BitmapFont.html#.from You get the flexibility of dynamic styles, as PIXI.Text can generate, but it'll generate texture atlases for you so the rendering speed, and changing text speed, will be as fast as BitmapText Initially it could just generate the ASCII characters, but if you detect a different character you can regenerate the atlas?
  15. Short answer. Not much. Slightly longer answer: the Ticker class uses requestAnimation to do the looping, just as would be recommended if handling calling render yourself. It just handles some edge cases with ordering and timing when adding and removing things to this rAF callback, adds a bit of useful information, like a delta, and lets you control the minfps / maxfps and speed of the ticker. There is nothing wrong with not using it at all. But what it contains are the kind of things you may start to realise are useful as you progress
×
×
  • Create New...