Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Almost three months ago! We started a big Tough project and still it is continue almost done, some bugs, some logic issues and some redundancies in code. Its a Unity3d Project. Every models/animation/environment are all completed nicely then, it came to the programmers(us).

Now, after writing too many codes, some ill logics, bugs I have learn so many things and I don't want to share. Its is scatters in my mind strongly disagree with lead/teammates but anyhow it is continue. But the next big thing I want to ask you that how do we handle a big project(programming side)? What are the best right suitable pattern to program in Unity3d using C#. How experience programmer do this work? how do they start to code? What I did wrong or notice wrong is the list given below:

 1. Did not do paper work enoguh i.e., algorithm writing

 2. change code abruptly

 3. write code abruptly

 4. without plannig code

 5. things make dependent

Guide me the right thing so that next time it should keep in mind and we don't made any mess.

Answer require from experience Developers, consider myself as your junior and you are giving me instruction.

share|improve this question

closed as too broad by Philipp, Alexandre Vaillancourt, Josh Petrie Mar 16 at 15:16

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Large game projects are just like any other software development projects. They require planning and process to do well and on schedule. So all the software development methodologies which apply to other applications can also be applied to game development. Unfortunately this is a very broad topic. There are tons of different methodologies with conflicting ideas and different pro's and con's. Whole libraries of books were written about each of them. This unfortunately makes this question far too broad for the format of this website. – Philipp Mar 16 at 9:13
    
Answer require from experience Developers, consider myself as your junior and you are giving me instruction. – Mohammad Faizan Khan Mar 16 at 9:22
    
If you were my junior, I would explain you the process we use in our company for our current project. But that would not be helpful for you, because you aren't working at our company and don't work on our project. An answer which would help you would give you the knowledge to pick the right process for your team. In order to do that, I would have to explain them all to you. And that would require me to not just write one but several books. Also, as a junior, picking the process is not your job. It's the job of your team's producer. Your team has a producer, I hope? – Philipp Mar 16 at 9:52
    
there is not team producer! no workflow! no guide line! I have pass one year at company! there no frame of wrok – Mohammad Faizan Khan Mar 16 at 11:00

This applies to most of the programming, not just Unity.

Code should be readable. Follow Clean code guidelines, to make single file, class, method, variable, etc as readable as possible. Meaningfull variable names ( No "x" but "Position.X", no "accMngrExt" but "accountManagerExtension") and continue with method names that should describe what they do, just by reading the name. Clean code book is something that every programmer should read. Atleast the first few chapters.

Code should be easily located. With file structure, you can isolate contexts so, that when you are looking for character shooting function or world spawn generator interface, you can just navigate through self explaining file structure. Ie. World/generation/interfaces or character/actions/shooting ( just an example ).

I have programmed as a hobby, for almost 20 years and as a professional, few years. I write crappy code. We all do. Some might hide it behind nice looking patterns some leave it right there :)

To be able to see that I did something wrong is the first step to cleaner code.

What you should right now do, is to wrap up all the code you have done to build runnable game. Then sit down and without personal attacks, just read the code and find the really smelly parts. Start refactoring. Usually, the code that first comes out, is not the best code. Its code that "just works". Its code, that you wrote, without precisely knowing, what you are even doing. Refactor it. Now you know what it should do, how it can be done and you can write it better. Cleaner.

I mentioned file structure. I find this thing very important with every project, that has more than one file. We spend so much time finding correct functions to fix, right places to add certain behaviour that we should not make it harder, by using overscoped file structure. What I mean is, that you should not have a folder named "Character" and stuff everything there, but brake it down to "inventory", "actions", "AI" and don't be afraid to brake even those down, until you have separated everything that does not share immediate context with each others.

Just remember, THIS is the point where quitters quit. Things are not rainbow colored roses anymore, you notice that you are just a human and even you do errors. Now you can really start to learn. Refractoring code is something you should always do. Everyday. Code is never ready. Even something that looked good yesterday, is now ( after few bug fixes ) looking like old testament was shredded to pieces and clued together by group of monkeys.

TL;DR; Refactor your code to be more readable. Do it step by step, don't force it. Start with the most buggy parts. Read your code. If you can't understand what it says while reading like a book, it needs to be refactored. If you need to comment code, to understand what it does, you need to refactor it. If your friend does not understand, you need to refactor it. Any english speaking person, should understand what your code does, when its read.

WAIT, Theres more!

REAL teams use somekind of task manager system. Something, that keeps track of new features, milestones, bugs and everyting relating to the project. We use JIRA. You can get JIRA as a standalone ( free for 5 users and you host it yourself (quite easy)) or as could service. Its cheap, like 10$/ month.

Next step is to start learning agile development. Don't just say to other developer, do feature x, but break it to parts. To user stories. Those are great and easy to start with.

So, start tracking your project. That is the first thing you should do, if you don't already do it. Fill it with all the bugs you find, all the features that full version of game has. Brake all the future features to smaller pieces, so that there is tasks that can be done in few hours.

With tracking, you start to get picture of what is really going on. You can see bug amount and an estimate about what is ready next week.

With agile, comes the "stand up"-session. You really should discuss daily, for few minutes ( per person ) about Did yesterday go as planned, what are you doing today and do you have any problems. This is important. With this meeting, you can see, if there is problems coming up, if some feature is harder to implement than was thought or some bug has reappeared or anything. This should be help face-to-face or as video-chat.

Now you are in position, where you know, what works and whats to come.

Use code versioning system, such as GIT. You can open public code reposity to github or private repository to BitBucket ( JIRA integrates nicely to it ). This helps you with the new feature implementation, bug fixing and refactoring. If something goes wrong, you can always revert to point in code, where everything worked.

If it works, let it be. This might be the most important thing I can say. While refactoring and clean code is nice, working code is the top priority. Always do best you can, but learn to move forward. Tasks help with this. If task says "as a AI, I wanna chase the player using sprint", then its done, when your code does exactly that.

TL;DR2 Get task management software, such as JIRA. Use versioning software like GIT. Create tasks, complete tasks.

share|improve this answer
    
Thanks man! good efforts! – Mohammad Faizan Khan Mar 16 at 9:33
1  
This is really just an assorted list of general software development tips, but not a complete answer to the question how to organize a large software development project. – Philipp Mar 16 at 9:35
    
I edited it to contain more specific "how to get this thing back to track" stuff. – Katu Mar 16 at 10:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.