Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Karsnen_2 · Apr 22, 2013 at 05:45 PM · c#androidios

What is the best way to understand code in a project with null documentation?

Hello Devs,

It is our first game and we are a start-up. I had a programmer who happen to do programming and suddenly he is seeming to be a dead weight. Though we knew him personally we thought that he was as motivated as we are and hence I never looked for a code review or documentation. Now it seems that he is slacking hell a lot and we want him out and pay him for all his work.

Now during a conversation he said that "He would not document the code so as we could be dependent on him". Now I am looking at the code and there is no documentation.

The code is all over the place. What would be the best way to understand his code. This question might be really vague but so am I. I am little stressed with the internal problems and I have to get this job done.

Now to give in insight of the details on the code :

  1. The game play mechanic and camera is scripts are the main and they have no documentation.

  2. Too much of Send/Broadcast messages so I am not able to see the references through mono. (irony is that our target is mobile)

  3. Again hefty use of strings in either invoking methods or passing parameters

  4. Update function everywhere which could have been reduced to co routines.

  5. No documentation

  6. Naming conventions are poor with no consistency

  7. Absolutely no pooling with usage of destroy and instantiation. I am excepting memory leaks.

Any advice would be great. As my head is not functioning properly due to the stress, I am just expecting any sort of help or protocols I should adopt to understand the code and work on top it. It could be links from outside or your own experiences. Anything literally. If you want more info from my end, kindly let me know. I would like to provide as much as possible so as to get the best help.

Thank you.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image asafsitner · Apr 22, 2013 at 06:02 PM 5
Share

I'd ask over at http://programmers.stackexchange.com/

I've seen similar questions there in the past so I know it's a good place to ask about this kind of situation.

As a side note, you'd do well to get rid of him as soon as possible even if it means you'll have to re-write everything.

I'm sorry to hear about what happened, and his code sounds like a nightmare to maintain or review. Good riddance, I say. :|

I$$anonymous$$O, scrap all the code if possible and get a new programmer. Sounds like you shouldn't even bother with this pile of mess.

avatar image Karsnen_2 · Apr 22, 2013 at 06:06 PM 0
Share

Thanks you for your help. We might have to do that. That is what we are thinking too.

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by LesPaul · Apr 22, 2013 at 06:06 PM

What I usually do is break down the code using the order unity calls functions and such. First look at function Awake to see what that does, then function Start, function Update, function FixedUpdate and so on and so on. Just go through step by step and try to understand the code, the function calls it throws, what is used for what. You get the idea.

One thing: Be patient and try to create comments at functions and code-pieces you understand. It may be a slow process, but at-least you understand the whole code when you're finished

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by Owen-Reynolds · Apr 22, 2013 at 10:05 PM

One way to build a project is to slap some barely working junk together, to test whether a certain approach will work. Then remember the general idea and do it for real (know as "Plan to Throw One Away.") You've now successfully completely stage 1 of that plan!

I'd scan the code for the guts. Does the camera move on a spring, Lerp+LookAt or pre-done animation curves? Do units move using rigdbodies, character controllers or hand-positioning? Is selection a raycast or OnMouseOver? Bigger explosions by changing which particleSystem vars (or just using 4 predone sizes?) ...

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Multi Touch Drag Screen To Move Player? 1 Answer

Multiple Tiled GPU warning: RenderTexture color surface errors? 0 Answers

Ride across a tree? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges