Jump to content

Divide and keep my code clean


Liranan
 Share

Recommended Posts

Hello everyone!

 

I'm a starter on Phaser, I did some small examples and now I'm working on a bigger game.

 

My code is growing and growing and it has become difficult to read.

 

I use 5 js files: load, boot, menu, game and main. Main is where I write most of the code. I was wondering if it's possible to create other files and attach them to the main state somehow. 

 

For example, write all the level creation code in one file and call it from the main.js file... Like an include on php.

 

I guess my question it's dumb for some of you, hehe, what can I say... I'm new!

 

Thank you very much.

 

Liranan.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...