Jump to content

Search the Community

Showing results for tags 'best-practice'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. It has been a year since i last tried out PIXI and i wanted to use it in a new project but organizing my code a bit better (last year i used it for LD27 and the code was a bit of a mess). I tried the ezelia example, but with the update from the PIXI version used in the example to the latest one the mouse events did not work anymore. I tried the whole day to fix it, rewrote the example in pure JS but i still have the problem that once i switch from one stage to the other and then back (calling the renderer with the different stages), the mouse events of the first Stage do not work anymore, even when i reset them after the switch. Is there a best practice on how to deal with different views / Stages of an app? Lets say i have the intro screen, the game / app itself and a couple of other views with highscore / help and such things. How would one go about with the latest PIXI version while trying to keep the code organized? I thought it would make sense to initialize the views and then switch freely between them, but somehow i am missing something there (i guess there is a hierarchy problem or sth?) So is the way one should go about it to just have one stage at a time and destroy it after use, reinitializing when it is needed again? That does not seem to be very efficient. Or should everything go into one stage object which then has to handle all the different states of the game / app? That seems to be very cluttered and not easy to maintain?
×
×
  • Create New...