Make a single post with suggestion is too long, I actually was planning to write a book about it once I will get a bit of free time. Anyway, I agree with all the ones that suggest to organise your project putting variables in one dedicated Event Sheet, also as Ashley suggested, i start to use Static Local variables when things are getting crowded, also in the debugger they are listed separated from the other variables.
Here is I organise Constant and Variables, I start with Constants, written all in CAPITAL letters, Variable have instead only the first letter of each word as capital, unless is a conjunction or similar, also I add _ (underscore) between constant and variables name to make it easier to read them. Also comment always variables because when you use them in the events, you can see the description and I like to have reminder about the possible values they can have, like for example variable Location has as description (House, Village, Cemetery, Dungeons) those are the values I can use for my game. In this way if you go back after a while on your project, you don't have to worry if the value was Village, Town or City, you will be shown that it has to be Village.
When you give name to constant and variables, try to have them in a big category first and then go on more details, it will be easier to type and found them. As from my screenshot you can see that I am using for example SLOT_PLAYER_FRONTLINE, if you have instead them called as PLAYER_SLOT_FRONTLINE, while start to type you will probably get lots of variables that start with Player as your game becomes big. This is an easier way to find and remember variables. Since you know that you are looking about something related to the Slot object, then next thing is the Player's slot or the Enemy's slot? And finally, which type/location of Slot?
Moving on, a thing that will probably need to use a lot will become Arrays, I use plenty of them in basically nearly of all my games.
For the Array, make a separate Event Sheet from Constants and Variables one, to make it easier to find what you need.
Create Constant for your Arrays, to identify Rows and Columns and eventually even the Z axis. In this way it will be like having the title of those in the first row and column of excel. You don't need to remember what is Array_Cards.At(loopindex, 1), you can just easy read it as Array_Cards.At(loopindex,CARD_NAME), so going back to check your code you know that you are looping through your Array reading the Cards' Names.
As you can see from the screenshot, I divide them according to the Array and I give names related to the Array name itself, but I don't mention the word Array in the constant because again, I would receive so many suggestions when typing variables.
Finally, still related to the Array, things are getting easily out of hand when you start to have ten or more different arrays, therefore under those array constants, I create a sub group that encloses all comments that explain the structure of each array. This is not useful only if you work by yourself, but also if someone else is going to read your program.
Here another screenshot of my game current in development. It's a card game and needs a few arrays to handle all the things:
As you can see, in the example, X is used as index of the card (first card, second card, and so on), while the Y is basically the details of each card.
Going back to the array constants, it's not easy to also add some values in between arrays, if you want to expand or even reduce fields, so what you will have to do is to go to the comment of the Array Structure, add the line you need. For example you want to have "Cost", after the name, so you add a line there. Then you go back to the constants and change their value. That means that you don't need to go to check anywhere in your thousands lines of code the value to alter, you just change it from the Array event sheet once and you are good.
Last thing you can notice from the last screenshot, is how I organise groups, sub groups always mention the main groups to show the whole "path", so when you enable and disable them you easily understand which one is which and it's also easy to recall them while typing.
Same things applies to function names.
I will stop here since the list of things you can do can really be covered only by writing a book. Other suggestions are:
- Track the event workflow adding Logs through the Browser plugin (you can check them pressing F12 and going in the Console Tab of your browser)
- Make a small project first, then add stuff. Have a complete one level game, then add more levels later. You will always have the game ready to be published at any time, in case you have to cut it short because you run out of time or money.