Menu

The code

Anonymous
2006-09-05
2013-04-11
  • Anonymous

    Anonymous - 2006-09-05

    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.

     
    • UPi

      UPi - 2006-09-05

      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!

       
      • Anonymous

        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.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.