views:

53

answers:

3

Hello everyone! I am currently trying to make a game in XNA Game Studio. Games and any software for that matter require good organization because when they get big the code starts getting out of hand. This game I am currently working on is one of my most organized projects.

I have dropped projects before because they have gotten to big for me (along with my loosing interest in it). What are some methods that can help me keep my software organized and be able to design the code so that I can integrate future things easier?

Please let me know, thanks

+2  A: 

It's all about layering and separating.

If you will divide your app in smaller parts - it will be much easier for human brains to work on one particular aspect of it. But there's a whole science underneath how to do it properly.

I can't give you direct answer. This art comes with practice.

Best thing you can do - check out ready samples, read a bit about architecture and design patterns. That should do the trick.

Arnis L.
"This art comes with practice." - very true. Almost impossible to achieve this by following a set of rules. Organization is a skill that either evolves in you or not.
Developer Art
A: 

I agree with Arnis. Try to structure your program into modules, i.e., "hide" parts of your overall programm behind well-defined interface that make sense and take possible future developments into account. This is hard to do, but great when you get it right, because then you can change things behind these interfaces without affecting the rest of the program, therefore reducing complexity and dependencies between different parts of the system.

Good luck

Tom

Tom Bartel
+1  A: 

Starting with the obvious: use version control.

Now, if it's just a personal project:

  • Keep documentation up to date, specially for a big project and specially for libraries and helpers (specially in code documentation so you don't have to be always remembering what a given function does, it's also a good practice anyway).
  • Use some GTD method. It does not have to be the latest GTD program but something that let's you keep your work and notes organized. I personally like Microsoft One Note or Evernote for my own projects.
  • Keep a changelog for your project so that you know how, when and why you changed things.
  • Keep a "important decisions" for your project so you know WHY you took certain paths, either in development or design.
  • Keep (and update) a roadmap of what you want you achieve in the next few months, maybe even longer. Having a good roadmap will keep you on track and even encourage you to keep working (I usually just have three txt files in the source control)
  • Don't be afraid to refactor or redesign. With a personal project you have all the time in the world. If you're not sure about the design stop, rethink and if you find a better one just take the time to do it. For personal projects you can't allow yourself to be uncomfortable with the code or the design, that would make you abandon the code.
  • Be ambitious. In order to keep interested the project need to defiant, it needs to be a challenge because no one is paying you, maybe no one does even know about it so if it is also boring you will just let it die :)
Jorge Córdoba
Those ain't bad points, but they are too general. I mean - source control won't make app well structured - it will prevent painful accidents (which ain't bad of course, that's why points aren't bad).
Arnis L.
Damn language... that comment looks horrible. :D
Arnis L.
There's no enough data to give more than general directions. Each project is different and simply knowing something is a game doesn't hint you as to how the code or folder structure or whatever should be structured. Sometimes using a lot of interfaces and concrete implementations work, sometimes that's just losing time and adding complexity. You simply can't know without actually being the one that works in the project.
Jorge Córdoba