Jump to content

Search the Community

Showing results for tags 'unsure'.

  • 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. Hi there! So basically, to cut to the chase. I have an issue that isn't really causing problems as of yet, but I'm worried that it might in the future and I'd rather not get into a habit now that might come back to bite me later. My question is simply as stated above, can there be such a thing as too many JavaScript files in a Phaser game project? I understand the answer to this is yes, but how many would you advise as the cut off point? To help with this I'll provide a little context. I'm currently making a project at the moment as a sort of test bed for a new game idea, but currently my planning has led me to create an extremely split up approach to the game, whereby each object is being created as an extension of either Phaser.Sprite, Phaser.Group etc. Using these, I'm creating prefabs and defining their variables and methods within them and then controlling these as a wider whole throughout. Now, to keep the project structure relatively clean and manageable I'm splitting these object's into separate .js files in a "class" style approach, but this has led so far to me having at least 14 .js files for the objects alone and at least 7 .js files for the game's states. The reasoning for my worry is that I'm sure that having 21 or possibly more .js files is going to cause an extremely long page load time or bottleneck for the end user. Although, I'm not moving between pages so caching and reloading scripts might not be a large issue, but I'm still unsure if this is maybe a bad practice and approach to creating a Phaser game and to a greater extent, HTML5 games in general. But, saying that, would it fix any possible bottlenecks if I were to create a "published" build whereby I place all of my game's logic into one large, minified .js file? Is there any advice on this subject? I know it's fairly open and possibly more opinion based rather than definitively answerable, but I'm extremely confused and any help offered would be appreciated.
×
×
  • Create New...