So I have been learning coding for the last few weeks by messing around with code. I often find that code from even fully functional games is designed incredibly messy. So could anyone give me pointers on what a well organized code file SHOULD look like and if/when sometimes necessary exceptions must be made for the purpose of functionality?
For example, what I am working on right now has 10 different trees at the lowest level in the object tree. And things seem defined in random locations wherever it happened to be convenient. You could take a given function such as "Attacking" and "Skills" and anything pertaining to combat and the definitions are everywhere even in random files that you wouldn't think to look for such definitions. Wouldn't a well coded file have one location with all of its relevant functions and definitions in the same place?
Basically if you were to be hired to work on a project that already has all of it's primary coding completed and you were tasked with a goal of organizing said code, how exactly would you go about it? What should a "proper" object tree look like and how could you define the code it represents as "well organized"?
Jul 20 2019, 11:28 am