See, I read these posts about "How long is too long?!" .. and I see responses like 1000 lines is too much, or 2000 is too much.. But I don’t care.. I want to keep all relevant code together in the same file. Sure, if its a player or enemy object, class them out. Its not a big deal.

But for example, the profile page on this project.  It has the following responsibilities:

  1. Check for all existing saved profiles
  2. Load in all existing profiles
  3. Display a menu to allow users to create, delete or load a profile
  4. Show the 5 different steps to create a new profile
  5. Handle all the input to delete a profile, or load one

It may not sound like much until you think about it… till you code it.. lol.. Heres the enum:

 

enum ProfileState
{
       checkExistingProfiles,
       displayMenu,
       loadProfile,
       deleteProfile,
       selectProfileImage,
       selectName,
       selectMap,
       selectDifficulty,
       saveProfile,
       launchGame,
} 

Theres the enum to handle all the different profile screen states. Break that all down, re-use what you can, handle the popup error messages if theres too many profiles etc, and pretty soon your up to a pretty damn good size screen.

Right now, I still have to implement LaunchGame, LoadProfile and DeleteProfile.. those, especially the last 2, require some sort of menu control to allow the user to select what to load or delete..

Well, right now If you remove all the blank lines in the code, it sits at a healthy 792 lines of code.. Now mind you, opening and closing brackets are also on their own lines.. helps with readability in my opinion. SO. Remove all of those, and its still at least 550-600 lines I would guess.. 

But back to the point, you look at these posts around the net claiming you should class this, and class that.. But at what point does your code become a collection of 1,237 different class files and absolutely NO FREAKING WAY to easily follow it? Better yet, why worry at all about the size of your classes or screens, so long as they do the job in the best possible way!

I figure this page will probably be about 12-1300 lines of code once its done.. completely.. And even then once I start the actual gameplay screen, I’m going to have to come back to edit this.. since it handles loading in the saved games, etc.. UGH!!! But at least I can use this for almost any other game.. just have to replace the pngs… 

But thats enough for tonight.. Im about done.. its 2am and I need sleep.. Oh, and for everyone out there who kept telling me the movie "The Strangers" was awesome, scare the shit out of you, dont watch at night, blah blah blah.. I was horribly horribly sorely dissapointed in that movie. Honestly one of the worst "thrillers" I’ve seen in a while. It was boring and wayyyy to predicatable.. worth a watch once, but done let the hype get you.