Re: Best and worst game-making habits (forum-game)
Posted: Sun Jan 09, 2011 7:47 am
Best: Indentation, indentation, indentation. I like clean code formatting. Even if it's a bit complex. I like being able to tell where functions and loops and if statements start and end without having to read.
Worst: I don't comment much at all. I know I should, but since I can read the code I rarely think I need to comment.
I also use short variable names, mainly to save typing time. If I could, I'd abbreviate everything. At one point I actually was using plyr instead of player because it saved me two characters to type. And because for some stupid reason, when I type player, I almost always hit plater instead. But when I type plyr, I don't. Probably something to do with me not needing the A and E which are on the left side of the R. (I now use player.)
I also put too much code in one file. I only have 7 main files for the thousands of lines my Adventure engine has. I keep meaning to split it up more, but I just never know which functions to put where.
Also, no goal either. I start so many project types and get bored of them or run out of ideas to make it work and abandon them. I've restarted different game types so many times because I thought I had a better method to do it.
Oh, and the same as tentus. I usually end up making really large functions. I've been called on it before, but hey, I code in a stream. Maybe later I take some code that will be used many times and make its own function, but a lot of the time it's a few large functions.
Worst: I don't comment much at all. I know I should, but since I can read the code I rarely think I need to comment.
I also use short variable names, mainly to save typing time. If I could, I'd abbreviate everything. At one point I actually was using plyr instead of player because it saved me two characters to type. And because for some stupid reason, when I type player, I almost always hit plater instead. But when I type plyr, I don't. Probably something to do with me not needing the A and E which are on the left side of the R. (I now use player.)
I also put too much code in one file. I only have 7 main files for the thousands of lines my Adventure engine has. I keep meaning to split it up more, but I just never know which functions to put where.
Also, no goal either. I start so many project types and get bored of them or run out of ideas to make it work and abandon them. I've restarted different game types so many times because I thought I had a better method to do it.
Oh, and the same as tentus. I usually end up making really large functions. I've been called on it before, but hey, I code in a stream. Maybe later I take some code that will be used many times and make its own function, but a lot of the time it's a few large functions.