adityaravishankar/command-and-conquer — Issue #30: Split code into multiple files
Author: jakemac53
Created: 2012-01-24 20:01:58+00:00
State: open

Especially since this is on git and you probably will want to merge changes with other peoples branches (or your own) the main game file should probably be split up into multiple files. This way you won't constantly run into merge conflicts and also it just makes it way easier to go directly to the code you want to edit.

A simple structure would just be like game.js which holds the basic game object and its global properties. Then each unit category can have its own file like vehicles.js, infantry.js. The structure for splitting up the files doesn't matter that much as long as its consistent. Also you can have like mouse.js, sidebar.js, etc...