I take a look to the code, and wow!!, it is only one file with 3454 lines!! Are this necesary? I see that you have many packages, you can modulate a little. It is only a sugest. I play and I like it. Good work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah, you're not the first to point this out to me. In fact, you are the second. I've been thinking about this, and the fact of the matter is this:
Having a single file is just too damn convenient.
It makes deployment and packaging easier.
It makes editing (especially searching for something) a whole lot easier.
So what's the downside? Is it hard to find your way around the file? Perhaps. It takes a bit of getting used to.
The file is fairly simple:
* There's some configuration stuff for starters.
* Then there's code for all game objects
* Then there are some utilities
* Then the Game classes (such as, Game itself, Menu, and friends)
* And finally, the main program.
Could it be broken into 5 files? Sure. Is there a benefit? Maybe. Consider this: one of the greatest pieces of Perl code ever written, UseModWiki, is also one single Perl file. Pang Zero's coding style even bears some similarity to that of UseMod. UseMod 1.0 is 5096 lines long, now that's WOW for you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2006-09-06
That is ok. If you do thus there is because you think that it is better. That surprise me because normally I found a lot of files in a project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I take a look to the code, and wow!!, it is only one file with 3454 lines!! Are this necesary? I see that you have many packages, you can modulate a little. It is only a sugest. I play and I like it. Good work.
Yeah, you're not the first to point this out to me. In fact, you are the second. I've been thinking about this, and the fact of the matter is this:
Having a single file is just too damn convenient.
It makes deployment and packaging easier.
It makes editing (especially searching for something) a whole lot easier.
So what's the downside? Is it hard to find your way around the file? Perhaps. It takes a bit of getting used to.
The file is fairly simple:
* There's some configuration stuff for starters.
* Then there's code for all game objects
* Then there are some utilities
* Then the Game classes (such as, Game itself, Menu, and friends)
* And finally, the main program.
Could it be broken into 5 files? Sure. Is there a benefit? Maybe. Consider this: one of the greatest pieces of Perl code ever written, UseModWiki, is also one single Perl file. Pang Zero's coding style even bears some similarity to that of UseMod. UseMod 1.0 is 5096 lines long, now that's WOW for you!
That is ok. If you do thus there is because you think that it is better. That surprise me because normally I found a lot of files in a project.